Record the two refspec traps #109 only found in review - #1402
Conversation
The #109 entry recorded the shallow clone and the single-branch refspec but not the two failure modes found after those fixes landed, both of which reach the same wrong answer — an empty branch inventory reported as complete — and both of which came from checking only half of the refspec. The destination matters as much as the source, because the sweep enumerates refs/remotes/origin and nothing else: with +refs/heads/*:refs/remotes/upstream/* every branch is fetched, refs/remotes/origin stays empty, and the sweep exits 0 with "branches": []. And git substitutes the matched suffix into <dst>, so a refs/* source nests one level deeper. +refs/*:refs/remotes/origin/* writes refs/remotes/origin/heads/main, origin/main does not resolve at all, every comparison fails into 0/0, and the sweep exits 0 naming both heads/feature and heads/main as deletion candidates — a green run recommending the deletion of main. That consequence is the strongest available argument for the guard and was not written down anywhere durable; the code comments and test bodies carry the mechanism, but the ledger is what survives a session. Both were measured on git 2.43.0. The guards themselves shipped in #1392 and #1398; this is the memory, not a behaviour change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012YRCXgX4AWZ579bKN6sk6b
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
One row of
docs/outstanding-issues.md. No code change — the guards themselves shipped in #1392 and #1398; this is the durable memory they left behind.#109recorded the shallow clone and the single-branch refspec, but not the two failure modes found after those fixes landed. Both reach the same wrong answer — an empty branch inventory reported as complete — and both came from checking only half of the refspec:refs/remotes/originand nothing else. With+refs/heads/*:refs/remotes/upstream/*, every branch is fetched,refs/remotes/originstays empty, and the sweep exits 0 with"branches": [].<dst>, so arefs/*source nests one level deeper.+refs/*:refs/remotes/origin/*writesrefs/remotes/origin/heads/main;origin/mainthen does not resolve at all, every comparison fails into0/0, and the sweep exits 0 naming bothheads/featureandheads/mainas deletion candidates:A green run recommending the deletion of
main. That is the strongest available argument for why the guard exists, and it was not written down anywhere durable — the code comments and test bodies carry the mechanism, but the ledger is what survives a session.Both measured on git 2.43.0.
Verification
npm run docs:check-links—docs link check passed: 1375 repo path references resolve.npx vitest run tests/repo-hygiene.test.ts—Tests 40 passed (40), confirming the shipped guards still hold at this base.npx prettier --write docs/outstanding-issues.md— clean.verify:cheapnot re-run for this commit: the diff is one markdown row, and the code it describes was gated atverify:cheapon both Refuse to report a branch inventory from a shallow clone #1392 and Refuse a branch inventory that cannot be shown to cover every branch #1398 (Test Files 432 passed (432)).npm run check:production-readinessnot run: no clinical workflow, privacy, environment, Supabase, source-governance or deployment change.Risk and rollout
Clinical Governance Preflight
Not applicable to this diff. The only changed path is
docs/outstanding-issues.md;classifyPullRequestFilesreportsclinicalRisk: falsefor it. No ingestion, answer generation, search/ranking, source rendering, document access, privacy or clinical output behaviour changed.Notes
RAG impact: no retrieval behaviour change — no file under
src/lib/rag/**, clinical-search, retrieval-selection, released-search-order, ranking-config, answer-ranking, the eval harness, the golden fixture, or the retrieval RPCs is touched.Worth recording for the next reader of this sequence: the second trap was reported by Codex and fixed by cursoragent while #1398 was open, and I verified that claim against a real fixture rather than taking it. The fixture is what produced the
heads/mainline above — a stronger consequence than either the report or the fix had stated. The branch was restarted from the post-#1398main, so this is a new branch and a new PR rather than a reopen.🤖 Generated with Claude Code
https://claude.ai/code/session_012YRCXgX4AWZ579bKN6sk6b
Generated by Claude Code