Skip to content

Record the two refspec traps #109 only found in review - #1402

Merged
BigSimmo merged 1 commit into
mainfrom
claude/test-coverage-analysis-2vcd8a
Jul 30, 2026
Merged

Record the two refspec traps #109 only found in review#1402
BigSimmo merged 1 commit into
mainfrom
claude/test-coverage-analysis-2vcd8a

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

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.

#109 recorded 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:

  1. 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": [].
  2. 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 then 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:
2 deletion candidate(s) (no unique patch content — squash-merged or empty):
- heads/feature
- heads/main
EXIT=0

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-linksdocs link check passed: 1375 repo path references resolve.
  • npx vitest run tests/repo-hygiene.test.tsTests 40 passed (40), confirming the shipped guards still hold at this base.
  • Ledger integrity after the edit: 115 rows, 115 unique ids, no row added or dropped.
  • npx prettier --write docs/outstanding-issues.md — clean.
  • Full verify:cheap not re-run for this commit: the diff is one markdown row, and the code it describes was gated at verify:cheap on 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)).
  • UI verification not run: no UI, routing, styling or browser behaviour changed.
  • Retrieval/answer evals not run: no retrieval, ranking, selection or answer-generation change.
  • npm run check:production-readiness not run: no clinical workflow, privacy, environment, Supabase, source-governance or deployment change.

Risk and rollout

  • Risk: none to runtime. One documentation row; no code, schema, API, or gate behaviour is touched.
  • Rollback: revert this PR. The ledger loses the two measurements.
  • Provider or production effects: None.

Clinical Governance Preflight

Not applicable to this diff. The only changed path is docs/outstanding-issues.md; classifyPullRequestFiles reports clinicalRisk: false for 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/main line 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

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
@coderabbitai

coderabbitaiBot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • docs/outstanding-issues.md
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 29b6384d-40b4-48c4-baac-1598d73f2d19

📥 Commits

Reviewing files that changed from the base of the PR and between da24b8a and 2d7a30d.

📒 Files selected for processing (1)
  • docs/outstanding-issues.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@supabase

supabaseBot commented Jul 30, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@BigSimmo
BigSimmo marked this pull request as ready for review July 30, 2026 03:48
@BigSimmo
BigSimmo enabled auto-merge (squash) July 30, 2026 03:48
@BigSimmo
BigSimmo merged commit 13c16cf into mainJul 30, 2026
20 checks passed
@BigSimmo
BigSimmo deleted the claude/test-coverage-analysis-2vcd8a branch July 30, 2026 03:49
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@BigSimmo@claude