Repository navigation
fix(cli): resolve config from main worktree - #258
Conversation
|
Implementation summary: issue #249 is implemented in this change request. Both CLI tools now use the shared worktree → main worktree configuration resolver and report the selected source on stderr. Confirmed profile writes target the main config when appropriate, and foreign targets are rejected. Local focused and full-suite verification passed; the checks for this pushed head are being recorded once under the parallel CI policy. |
[CCR-20260916-258] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Initial review — PR #258 (work item #249)Status: CHANGES_REQUESTED — reviewed head SummaryThe shared resolver ( Findings[REV-001] · medium · open · - · blocks:yes —
|
[CCR-20260916-259] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Initial review — PR #258 (work item #249), verification of recovered attemptStatus: CHANGES_REQUESTED — reviewed head Recovered attempt Findings[REV-001] · medium · open · - · blocks:yes —
|
| ID | Outcome |
|---|---|
| REV-001 | still_open |
| REV-002 | still_open |
| REV-003 | still_open |
Security triage
.code-cycle.yml declares no security_review.always_when, so the defaults applied and the rule did not fire (no auth, session, secrets, dependency, workflow or deployment path changed). My own reading flagged the new write-target check (filesystem write boundary); I inspected it inline: a foreign --config target is rejected from a linked worktree (covered by test_linked_worktree_write_rejects_a_foreign_config_target). No confirmed vulnerability. A separate cc-security-review pass was not run.
Validation executed
- REV-001 and REV-003 reproduced against head and (for REV-001) base
cad0b88, as above; REV-002 confirmed by readingdocs/configuration.md:19. - Not re-run: the full unittest suite (the recovered review recorded 1470 tests OK on this head). Separate
cc-verifypass not run. - Windows behaviour of
_validate_write_target(absolute()comparison, case-insensitive paths) was not exercised locally; CI log text for the failing shards was not retrievable while the run was in progress.
CI (policy: parallel, read once, not waited on)
Skills, manifests, and Bash installer: pass · Windows test shard (windows-1): pass · Windows test shard (windows-2): pending · Windows test shard (windows-3): fail · Windows test shard (windows-4): fail. Reported as state only, not as findings; the CI gate decides.
Residual risks
Windows path handling in the write guard (see above), plus the failing windows-3/windows-4 shards whose cause is not established by this review. resolve_config now runs git rev-parse twice per call (minor).
Verdict
CHANGES_REQUESTED — blocking: REV-001.
[CCR-20260916-258] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20260916-259] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCT-20261016-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:fdaad2b211149c048017a2324ebabda61156856d · schema:2Resolution — PR #258 (work item #249)All findings were classified as Applied fixes[REV-001] · medium · resolved · valid · blocks:yes —
|
[CCR-20261016-260] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-262] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Rereview — PR #258 (work item #249), current head after fixesStatus: REVIEW_PASSED_AWAITING_CI — reviewed head This comment already carried the receipt of earlier attempt What changed since the previous review
Previous findings[REV-001] · medium · resolved · valid · blocks:yes —
|
[CCR-20261016-260] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-261] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Rereview — PR #258 (work item #249), verification of recovered attemptStatus: REVIEW_PASSED_AWAITING_CI — reviewed head This is a completed review of this head, not an approval. The CI gate waits for the checks. Recovered attempt Previous findings[REV-001] · medium · resolved · valid · blocks:yes —
|
[CCT-20261016-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:75e17b4cc1c9a51e03782bae8878edc5a62c954f · schema:2[CCR-20260916-258] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Resolve summary — PR #258 (work item #249)Status: RESOLVED — the reviewed head was Review findingsTriage was against [REV-001] · medium · resolved · valid · blocks:yes —
|
[CCT-20261016-002] · cheap_coder · openai/gpt-6-luna→? · high · triaged:75e17b4cc1c9a51e03782bae8878edc5a62c954f · schema:2[CCT-20261016-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:75e17b4cc1c9a51e03782bae8878edc5a62c954f · schema:2[CCR-20260916-258] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20260916-259] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-260] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-262] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-261] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Resolution — PR #258 (work item #249)Status: RESOLVED — all three trusted review findings are resolved on Findings[REV-001] · medium · resolved · valid · blocks:yes —
|
[CCR-20261016-263] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Rereview — PR #258 (work item #249), current head after fixesStatus: REVIEW_PASSED_AWAITING_CI — reviewed head What changed since the previous review
Previous findings[REV-001] · medium · resolved · valid · blocks:yes —
|
Resolution — PR #258 (work item #249)Status: RESOLVED on [CCT-20261016-003] · cheap_coder · openai/gpt-6-luna→? · high · triaged:7cd4ade6a9ae8d4d302c7d58f8725f24346e7a4c · schema:2[CCR-20260916-258] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20260916-259] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-260] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-262] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-261] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2[CCR-20261016-263] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Review findings (unchanged by this check resolution)[REV-001] · medium · resolved · valid · blocks:yes —
|
[CCR-20261016-264] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Rereview — PR #258 (work item #249), after the symlink-loop fixStatus: REVIEW_PASSED_AWAITING_CI — reviewed head What changed since the previous review
Previous findings[REV-001] · medium · resolved · valid · blocks:yes —
|
[CCR-20261016-265] · reviewer · anthropic/claude-sonnet-5-5→? · high · schema:2Earlier run lines on this change request are preserved: CCR-20260916-258, CCR-20260916-259, CCR-20261016-260, CCR-20261016-261, CCR-20261016-262, CCR-20261016-263, CCR-20261016-264. Rereview — PR #258 (work item #249)Status: APPROVED — reviewed head Changed since the previous reviewOnly Previous findings (dispositions frozen)[REV-001] · medium · resolved · valid · blocks:yes —
|
Resolves the linked-worktree configuration gap in
cc-profile-configandcc-statsfor #249.Diagnosis
From a linked worktree without its own
.code-cycle.yml,cc-profile-config showsilently selected built-in defaults andcc-statsfailed to find the repository selector, even when the main worktree had the configuration. In a disposable linked-worktree reproduction, profile-config exited 0 with the defaultcheap_codertarget; stats exited 2 withno repository identity. The issue's hypothesis was confirmed: both readers looked only at<cwd>/.code-cycle.yml.The invariant is that all toolkit readers use the same configuration precedence: explicit path when supported, current worktree file, main worktree root file, then defaults where allowed. This change shares the resolver in
run_cycle.py, reports the selected absolute path on stderr, and keeps stdout unchanged. Profile writes from a linked worktree target the main worktree file when no local file exists; the target is shown before confirmation and checked against the repository's main worktree before the atomic write.Related work searched: #244 / merged PR #248 introduced the runtime resolver; #234 is a broader closed tracker; open #186 concerns a future
stats.pyrefactor and does not share this defect. No other open item is addressed.Work units
WU-1scripts/run_cycle.py,scripts/profile_config.py,scripts/stats.py, both CLI skill docstests/test_profile_config.py,tests/test_stats.pyindependentVerification
Agent-reported local results:
rtk python3 -m unittest discover -s tests -p test_profile_config.py -q— passed, 29 tests.rtk python3 -m unittest discover -s tests -p test_stats.py -q— passed, 42 tests.rtk python3 -m unittest discover -s tests -q— passed, 1,470 tests.rtk git diff --check— passed.rtk python3 -m compileall -q scripts/profile_config.py scripts/stats.py scripts/run_cycle.py— passed.rtk python3 /tmp/cc249_boundary.py— passed: both read CLIs used the main worktree config and kept JSON on stdout; confirmed write changed only the main config; foreign target was rejected.The local checks use Python 3 and Git with disposable temporary repositories; the fixture sets its own Git author. No shared service, credentials, or user-global Git identity is required.
Closes #249