os-sdlc test suite writes stray '(string)' artifact into plugin tree #234
Labels
No labels
P0
P1
P2
P3
bug
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
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#234
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?
Running ruby tests/all.rb in plugins/os-sdlc leaves a stray '(string)' path in the plugin root. Pre-existing on main (reproduced 2026-08-02 during #229 work); likely a rubocop -a real run whose in-memory source has no path. Test-isolation defect: suite should have zero filesystem side effects outside tmpdirs.
Triage: confirmed bug, kept open over duplicate #237 (this one has the more specific root-cause hypothesis and acceptance bar). Agent Brief -- Category: bug/update. Summary: ruby tests/all.rb leaves a stray file named '(string)' in plugins/os-sdlc/ root. Current: test suite has filesystem side effects outside tmpdirs. Desired: zero side effects outside tmpdirs; locate the test writing to a path derived from a nil/placeholder name (likely rubocop -a on in-memory source with no path) and route it to a tmpdir. Acceptance: running the suite leaves no stray files in the plugin tree. Out of scope: unrelated rubocop/report parsing (see #236). Labels: bug, ready-for-agent, update.
Fixed in
4c7e139. Root cause: tests/test_helper.rb autocorrected_source_for ran RuboCop::Cop::Team with autocorrect:true on in-memory snippets (nil path); Team#autocorrect File.writes to processed_source.file_path, which defaults to the buffer name '(string)'. Fix: team.defer_corrections = true (helper already reads via corrector.rewrite). Regression test added (red before, green after); suite 579 runs green, no stray file. Blast radius checked: production unaffected — AutocorrectPrepass shells out to the rubocop CLI with real paths, never the in-process API.