os-sdlc autocorrect pre-pass fails cryptically when target project lacks .rubocop.yml #229
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#229
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?
os-sdlc autocorrect --dir <project>resolves its rubocop config as<root-or-project>/.rubocop.ymlunconditionally (lib/os_sdlc/autocorrect_prepass.rb). On a project without one, rubocop exits 2 withConfiguration file not found: ...; becauseTestRunnerusesOpen3.capture2e, that stderr line lands in front of the JSON and the harness dies withrubocop json report was not parseable: unexpected character: 'Configuration' at line 1 column 1— never mentioning the missing config.By contrast
bin/lint-worklistbuilds a merged config viaLintWorklistRubocopConfigthat skips missing files, so the worklist works on the same project while the pre-pass fails.Suggested fixes (either/both):
AutocorrectPrepass, matching lint-worklist.capture3and surface stderr in the HarnessError, so config failures name the real cause.Workaround today: run
os-sdlc lint-init <project>first.Discoverer: /home/jared/dev/ruby-gems/caldotcom-api, session 640995ae-717a-443c-9430-772546887b90, 2026-08-01. Hit during an /os-sdlc:fix-lints residual phase on a project with no .rubocop.yml.
Pipeline blocker cleared: the --target threading bug that stopped the os-sdlc run on this ticket is fixed in
235c330(SELECTED_TARGET now passed to shard-plan/workspace-housekeeping; 4 CLI regression tests). This ticket's own bug (autocorrect pre-pass without .rubocop.yml) is still open and unaddressed.Agent Brief
Category: bug
Summary: Autocorrect pre-pass should tolerate a target project without a
.rubocop.yml, using the same merged-config approach as the lint worklistCurrent behavior:
AutocorrectPrepassresolves its rubocop config to a single path — the root's.rubocop.ymlif it exists, otherwise the project's.rubocop.ymlunconditionally, with no existence check. On a project without one, rubocop exits 2 withConfiguration file not foundon stderr; because the test runner merges stderr into stdout, that line lands ahead of the JSON payload and the harness raisesrubocop json report was not parseable: unexpected character: 'Configuration'— never naming the real cause.LintWorklistRubocopConfigalready solves this for the worklist path by building aninherit_from:chain that filters to only the config files that exist (plugin config first, then the target's if present), sobin/lint-worklistworks on the same project where the pre-pass dies.Desired behavior:
The autocorrect pre-pass runs successfully on a project with no
.rubocop.yml, using the plugin's shipped config. On a project that has one, behavior is unchanged (both configs apply, project's layered on the plugin's, matching the worklist). If rubocop still fails for a config-related reason, the raised harness error includes rubocop's own stderr message rather than only the JSON parse failure.Key interfaces:
AutocorrectPrepassconfig resolution — should reuse or mirror the merged-config chain thatLintWorklistRubocopConfigbuilds, rather than pointing rubocop at one possibly-missing fileAcceptance criteria:
os-sdlc autocorrect --dir <project>completes on a project with no.rubocop.yml(regression test with a fixture project lacking the file).rubocop.yml, the effective config includes both the plugin config and the project's, same as the worklist pathOut of scope:
bin/lint-worklistorLintWorklistRubocopConfigthemselveslint-initworkaround (remains valid but should no longer be required)capture2etocapture3for its own sake — only if it falls out naturally of surfacing stderrAgent Brief
Category: bug
Summary: Autocorrect pre-pass should tolerate a target project without a
.rubocop.yml, using the same merged-config approach as the lint worklistCurrent behavior:
AutocorrectPrepassresolves its rubocop config to a single path — the root's.rubocop.ymlif it exists, otherwise the project's.rubocop.ymlunconditionally, with no existence check. On a project without one, rubocop exits 2 withConfiguration file not foundon stderr; because the test runner merges stderr into stdout, that line lands ahead of the JSON payload and the harness raisesrubocop json report was not parseable: unexpected character: 'Configuration'— never naming the real cause.LintWorklistRubocopConfigalready solves this for the worklist path by building aninherit_from:chain that filters to only the config files that exist (plugin config first, then the target's if present), sobin/lint-worklistworks on the same project where the pre-pass dies.Desired behavior:
The autocorrect pre-pass runs successfully on a project with no
.rubocop.yml, using the plugin's shipped config. On a project that has one, behavior is unchanged (both configs apply, project's layered on the plugin's, matching the worklist). If rubocop still fails for a config-related reason, the raised harness error includes rubocop's own stderr message rather than only the JSON parse failure.Key interfaces:
AutocorrectPrepassconfig resolution — should reuse or mirror the merged-config chain thatLintWorklistRubocopConfigbuilds, rather than pointing rubocop at one possibly-missing fileAcceptance criteria:
os-sdlc autocorrect --dir <project>completes on a project with no.rubocop.yml(regression test with a fixture project lacking the file).rubocop.yml, the effective config includes both the plugin config and the project's, same as the worklist pathOut of scope:
bin/lint-worklistorLintWorklistRubocopConfigthemselveslint-initworkaround (remains valid but should no longer be required)capture2etocapture3for its own sake — only if it falls out naturally of surfacing stderrWork started in worktree branch worktree-issue-229-autocorrect-config (2026-08-02).
Fixed in worktree branch worktree-issue-229-autocorrect-config, commit
aeb1a9e: pre-pass now uses the LintWorklistRubocopConfig merged inherit_from chain (ADR-0082), and the JSON-parse HarnessError includes a 500-char rubocop output excerpt. Suite green (571 runs, 0 failures). Awaiting merge + sign-off.Closed via session 6c82f3a7-3b99-4353-8f3b-4f9f6a2e7656. Fix merged to main:
aeb1a9e(route autocorrect pre-pass through merged rubocop config), merge commit762591f, status leaf updated in332a32b.