os-sdlc: AutocorrectPrepass JSON parse breaks on any rubocop stderr output #236
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#236
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?
AutocorrectPrepass runs REPORT_COMMAND via Open3.capture2e, so stderr (e.g. a cop-crash warning like 'An error occurred while ... cop was inspecting ...') lands in front of the JSON and JSON.parse fails with 'rubocop json report was not parseable'. Found 2026-08-02 when a TautologicalAssertion cop crash (since fixed) broke the residual phase. Fix: capture stdout and stderr separately (capture3), parse stdout only, surface stderr.
Triage: confirmed bug, fully specified. Agent Brief -- Category: bug/update. Summary: AutocorrectPrepass parses rubocop output via Open3.capture2e, mixing stderr into the JSON stream; any stderr (e.g. a cop-crash warning) breaks JSON.parse. Current: capture2e interleaves stdout/stderr. Desired: use capture3 to separate streams, parse stdout only, surface stderr separately (e.g. logged/warned). Acceptance: a rubocop run producing stderr output no longer breaks the residual phase's JSON parsing. Out of scope: the underlying cop crash itself (already fixed). Labels: bug, ready-for-agent, update.
Salvaged from the retired sdlc-229 worktree: two uncommitted red tests for autocorrect_prepass_test.rb that are acceptance tests for THIS issue — both fail today because capture2e mixes rubocop stderr into the JSON parse ("Configuration file not found" leaks into stdout). Apply with
git applywhen implementing. Patch: