fix: preflight reads CLAUDE.md from origin, not the stale clone working tree #227
No reviewers
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor!227
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/preflight-claude-md-on-origin"
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?
What this PR does
CLAUDE.mdfromorigin/$PR_BASE(the ref the worktree is carved from), not the clone's stale working treeBug: the local clone is a fetch-only anchor --
ensure_repo_local(and the clone-if-needed step) onlygit fetch, never re-check-out -- so a repo cloned before itsCLAUDE.mdlanded keeps a frozen working tree forever. The preflight[ ! -f "$REPO_PATH/CLAUDE.md" ]read that frozen tree and falsely blocked repos that haveCLAUDE.mdon their default branch (and pass API validation, which checks the remote).Impact: two repos were walled off from all issue work:
joshtronic/porksicle.com-- clone frozen on its 2026-06-19 initial commit, 125 commits behind;CLAUDE.mdlanded 2026-06-20. (This isporksicle.com#43, blocked with "CLAUDE.md is missing at the repo root" despite clearly having it.)joshtronic/devopsafterdark.com-- same shape.(
joshtronic/igor's own clone is 148 commits behind too -- it just dodged the bug because its initial commit already hadCLAUDE.md.)Fix: fetch, then
git cat-file -e "origin/${PR_BASE}:CLAUDE.md"-- aligning preflight with the rest of the harness ("readorigin/<ref>, never the clone's tree"). Also drops the now-redundant fetch in the worktree block.Test plan
bash -n bin/tick.shcleanbin/check-sync.shpassesporksicle.com+devopsafterdark.comflip BLOCK -> PASS;flipflopfrenzy.com(genuinely no CLAUDE.md) correctly stays BLOCK -> BLOCKStatus/Blockedfrom the falsely-blocked issues (porksicle.com#43and any siblings) so the harness re-claims themDirectly authored (not via the issue grind) because the bug blocks the grind itself on the affected repos.