fast-gate rubocop step does not see extensionless Ruby scripts #1457
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1457
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
FastGate::ChangedFiles#changeskeeps only paths that end with ".rb". The fast-gate rubocop new-offense step skips extensionless Ruby scripts. The full gate usesProject::Codebase#ruby?andRubyFileCheck.ruby?, which also accept an extensionless file with a ruby shebang. The two paths disagree.Observed
fast-batch for #1455 (2026-10-28, merge
67762412) reported "0 changed files" on all three findings. Those findings edited the extensionless scriptsaudit-stats,self-test, andgen-logsunderplugins/os-context.Reproduce
Edit an extensionless Ruby script with a shebang under a target. Run fast-gate. The rubocop step reports "0 changed files".
Approach
ChangedFiles#changesalready owns the changed paths and the repo root. Replace its.rbsuffix test withProject::RubyFileCheck.ruby?, called on the path joined toroot.RubyFileCheck.ruby?reads the working-tree file, so a path with no file on disk is not a change (tracked deletes are already dropped). No new object, no change toNewOffenseCheck,Rubocop, orRubyFileCheck.Required work:
ChangedFiles#changesuse the same Ruby-file test as the gate (RubyFileCheck.ruby?) onFile.join(root, change.path)— check: absentend_with?(".rb")inplugins/os-sdlc/lib/os_sdlc/fast_gate/changed_files.rbChangedFiles— check: presentRubyFileCheck.ruby?inplugins/os-sdlc/lib/os_sdlc/fast_gate/changed_files.rbAcceptance criteria
bin/foo(shebang#!/usr/bin/env ruby, no extension) under the target runs rubocop onbin/foo, and the rubocop step summary counts it as 1 changed file.bin/foowith a ruby shebang and no extension reports a new offense in it atbin/foo:<line>.Owner sketch
In scope
FastGate::ChangedFiles#changesfile selection..mdand.yml, and files outside the target path.Out of scope
Project::RubyFileCheckandProject::Codebase#ruby?(already correct).Lint::Autocorrection::ChangedFiles(a separate class).Origin
VERDICT: CREATE
Work started on branch ticket-1457 via /os-sdlc:implement.
Resolution
Done: fast-gate ChangedFiles#changes now selects files with the shared Project::RubyFileCheck.ruby? test, so extensionless scripts with a ruby shebang get the rubocop new-offense step.
Evidence: Commit
ba2103ca(implementation 210): changed_files.rb plus new tests in plugins/os-sdlc/tests/fast_gate/fast_gate_extensionless_script_test.rb; full suite green; contract-auditor pass.Follow-ups: Contract-auditor LENS line: RubyFileCheck now has callers in two concepts (Project, FastGate) and could be promoted to OsSdlc::RubyFileCheck; goes through the lens challenge and is filed as a Lens proposal if it holds.