One Ruby-file rule: lint gates classify changed files with Codebase#ruby? (DRY row F7) #772
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#772
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
Two gates classify "Ruby file" by different rules. The diff-test path uses
Project::RubyFile.ruby?(plugins/os-sdlc/lib/os_sdlc/adapter/project/ruby_file.rb:10-16), which accepts.rbfiles and extensionless files with a Ruby shebang. The lint gates userepo.changed_paths(plugins/os-sdlc/lib/os_sdlc/query/gate/commands.rb:59-61) whose default glob is"*.rb"(adapter/git/repo.rb:50). A changedbin/script counts as code for diff-test and is invisible to rubocop. The 17 extensionless Ruby scripts in plugins/os-sdlc/bin, including the eight os-sdlc-* dispatch scripts from ADR-0232, are production code with no lint. The lint definition was never updated when the other production-code definitions were. The user ruled on 2026-09-27 (CRC slice-plan P2 behavior half, ruling S7, audit finding 9) that the shebang rule wins.Reproduce
change plugins/os-sdlc/bin/os-sdlc-gate; run the lint gate; the file is absent from the rubocop file list while the diff-test gate lists it.
Approach
Required work:
Project::Codebase#ruby?(path)delegating toRubyFile.ruby?with the project path joined;Changes#ruby_file?calls it.Changes#ruby_paths: changed paths filtered byruby?.Gate::Commands#diffed_ruby_filestochanges.ruby_paths; remove the"*.rb"default glob fromchanged_pathsif it has no other sender.Acceptance criteria
.rbfile, when the lint gate runs, then behavior is unchanged.".rb"and shebang checks, then exactly one classifier exists,RubyFile.ruby?, reached throughCodebase#ruby?.Owner sketch
Origin
Work started on branch crc-pass-os-sdlc, session dffd2906.
Resolution
Done: Added Project::Codebase#ruby? (shebang-aware via RubyFile.ruby?), Changes#ruby_paths, and Gate::Commands#diffed_ruby_files now returns changes.ruby_paths; Repo#changed_paths default glob removed. DRY row F7 closed in slice-plan.md.
Evidence: Commit
ebca6544on branch crc-pass-os-sdlc; new test commands_rubocop_procman_test.rb asserts a changed extensionless shebang script reaches the lint command; suite 1311 runs, 0 failures.Follow-ups: bin/move-map-0222 and bin/move-tests-0222 carry 31 design-level rubocop offenses; they are the finished #737 movers and are candidates for deletion, raised to the user this session rather than ticketed.