Skip to content

docs(issues): unstick the ledger write path — reconcile 21 queued requests and rescue two orphaned review records - #2268

Merged
BigSimmo merged 2 commits into
mainfrom
claude/friendly-davinci-u4iwed
Aug 22, 2026
Merged

docs(issues): unstick the ledger write path — reconcile 21 queued requests and rescue two orphaned review records#2268
BigSimmo merged 2 commits into
mainfrom
claude/friendly-davinci-u4iwed

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • The outstanding-issues write path had been stuck since 2026-08-17, and this lands the backlog. Feature branches never edit the canonical ledger; they queue immutable request files, and one deliberately serialised npm run issues:reconcile applies them. That step had not succeeded in five days, so 21 queued notes — including today's Lighthouse CLS root-cause records — were invisible in docs/outstanding-issues.md.
  • The blocker was four abandoned reconcile branches, not work in flight. claude/issues-reconcile-2026-08-19, claude/ledger-reconcile-2026-08-21, claude/ledger-reconcile-issues-c1trbj and claude/rag-r0-reconcile-inbox each started this transaction and none landed. assertSafeRemoteReconciliation correctly refused to start a fifth while they existed (#EH9VA6). None has an open pull request, so there was nothing to land or close and nothing to wait for.
  • The override was taken only after proving the premise it protects, rather than assuming it. Every request UUID present on all four branches is already present on main — checked by comparing each branch's docs/outstanding-issues-inbox tree against main's, in both the pending and applied/ directories — so no queued note could be lost. Their only content absent from main is the two branch-review records rescued in the second commit, plus five source files main deleted deliberately in Restrict document uploads to administrator backend #2211 (use-upload-desktop-layout.ts, service-group-nav.tsx, therapy-compass/icons.tsx and two upload tests). The four branches themselves are left untouched for the owner to delete.
  • 21 requests applied, 4 cancellation decisions, pending inbox now zero. Six new rows: #S4R2W3, #M6JNR8, #NPQJKP, #2TAQDC, #JZM7RM, #VV83VA. #231 re-scoped to separate initial provider timeouts from quality-retry exhaustion, #6GW95D demoted P2 → P3 now the Dev Drive capacity emergency is resolved, and #50QRCF / #TYZK23 / #KFRC3H now carry the mobile-/ CLS root cause landed in feat(dictionary): merge Search and Browse into one catalogue and rebuild the phone header #2253.
  • One cancellation did not take effect, and that is reported rather than swallowed. Request 76390200 cancels 0a0ab127, which an earlier reconciliation had already applied. The tool recorded the cancellation, changed nothing, and printed the reason; correcting the affected row needs a fresh update request. It is called out here so the next reader does not read the audit trail as though the cancellation had bitten.
  • Two branch-review records are rescued (65d188be…, 42c9767e…), recovered verbatim rather than rewritten because the records are content-addressed and immutable by contract. Both document real 2026-08-17 reconciliation reviews whose transactions were later redone and landed by other branches — the reviews happened, their audit records never did.

The two commits are kept separate deliberately: check:ledger-write-discipline requires the canonical ledger diff to equal exactly its recorded reconciliation transaction, so the record rescue cannot ride inside that commit.

Verification

  • npm run verify:pr-local

All 11 selected steps completed, none failed:

PR-local verification summary:
- completed: check:runtime, check:installed-lock-parity, format:changed, sitemap:check,
docs:check-index, docs:check-inventory, docs:check-scripts, docs:check-links,
check:branch-review-ledger, check:outstanding-issues, check:ledger-write-discipline
- failed: (none)
- not reached: (none)

Every step ran fresh; no gate receipt was reused. Recognised low-risk documentation scope, so lint, typecheck, the full unit suite, the RAG fixture scan and the build were skipped, each with its reason reported rather than passing silently.

The three gates that actually bite on this change:

Ledger write discipline passed for aa0c04bce129..HEAD.
Branch review ledger guard passed: 880 live table records + 1206 archived + 447 immutable
(880 under the 2026-07-29 machine-readable contract), immutable review writes, six cells each,
no conflict markers, mojibake, heading records, or duplicates.
Outstanding-issues guard passed

npm run format was run against the whole tree before committing and reported nothing to change.

  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed

UI verification not run: no UI, routing, styling, browser, reduced-motion or forced-colors behaviour changed. The diff is the canonical ledger, inbox request files moving to applied/, and two review records.

  • npm run verify:release before release or handoff confidence claims

Verification not run: release confidence is not claimed, and the gate is provider-backed.

  • npm run eval:retrieval:quality (must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed

Verification not run: no retrieval, ranking, selection, chunking or scoring behaviour changed. Nothing under src/lib/rag/, clinical-search, retrieval-selection, ranking-config, answer-ranking, the eval harness or the golden fixture is touched — the diff contains no executable code at all. The gate is also provider-backed.

  • npm run eval:rag -- --limit 15 + npm run eval:quality -- --rag-only when answer generation, the synthesis prompt, or answer post-processing changed

Verification not run: answer generation, the synthesis prompt and answer post-processing are untouched. The gates are provider-backed.

  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed

Verification not run: none of those changed.

  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed

Verification not run: deployment startup, hosting and rollout behaviour are unchanged.

Risk and rollout

  • Risk: Low, and confined to project memory rather than anything that runs. The reconciliation is the tool's own transaction, produced by npm run issues:reconcile and not hand-edited, and check:ledger-write-discipline verifies the canonical diff equals exactly that recorded transaction. The genuine risk was losing a queued note by overriding the concurrency guard, which is why every request UUID on all four branches was checked against main first; none is unique to a branch.
  • Rollback: git revert of the two commits restores the previous ledger and returns the 21 requests to pending. No IDs are burned irrecoverably by a revert-and-redo, because allocation is driven by the request files themselves.
  • Provider or production effects: None. No OpenAI, Supabase, Railway or hosted-CI call is made or changed. No branch was deleted, no pull request closed, and the four abandoned reconcile branches are left exactly as they were.
  • RAG impact: none

Notes

  • --allow-concurrent is the documented path for this case, not a bypass. The guard's own message offers it, and its stated hazard is a concurrent reconciliation corrupting the journal. There is no concurrent reconciliation here: the newest of the four branches is five days old, none has an open pull request, and the override's use plus its evidence is recorded in the commit message so a later reader can audit the judgement rather than infer it.
  • The four branches are still on origin and will block the next reconciliation exactly as they blocked this one. Deleting them is the durable fix and is deliberately not done here, since branch deletion is irreversible and belongs to the owner. This PR establishes what they contain, so that decision can now be made on evidence: nothing but the two records rescued here.
  • Why the backlog grew to 21 unnoticed. Nothing reports pending-inbox depth. check:outstanding-issues prints the count as part of a passing line, so a growing queue reads as a healthy gate. A follow-up worth considering is a threshold that warns above, say, ten pending requests — recorded here rather than filed as a request, to avoid adding to the very queue this PR just drained.

Generated by Claude Code

…ledger
The inbox write path had been stuck since 2026-08-17. Four reconcile
branches on origin (claude/issues-reconcile-2026-08-19,
claude/ledger-reconcile-2026-08-21, claude/ledger-reconcile-issues-c1trbj,
claude/rag-r0-reconcile-inbox) each started this transaction and none
landed, and the guard against concurrent reconciliation correctly refused
to start a fifth while they existed. None has an open pull request, so
nothing was in flight to wait for.
Verified before overriding the guard, rather than assuming: every request
UUID on all four branches is already present on main, so no queued note
would be lost. Their only content absent from main is two branch-review
records (added in the next commit) and five source files that main
deleted deliberately in #2211.
Applies 21 requests with 4 cancellation decisions. One cancellation,
76390200 against 0a0ab127, arrived after its target had already been
applied by an earlier reconciliation; the tool recorded it and changed
nothing, and correcting that row needs a fresh update request.
Six new rows, including the hydration-gap guard filed today as #2TAQDC;
#231 re-scoped, #6GW95D demoted P2 -> P3, and the three CLS rows carry
the root cause. Pending inbox is now zero.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UksCoUHQMp72XUdp7RjchE
…cile branches
These are the only content on the four abandoned reconcile branches that
exists nowhere on main. Both record real 2026-08-17 reconciliation
reviews whose transactions were later redone and landed by other
branches, so the reviews happened but their audit records never did.
Recovered verbatim from claude/ledger-reconcile-issues-c1trbj and
claude/rag-r0-reconcile-inbox rather than rewritten, since the records
are content-addressed and immutable by contract.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UksCoUHQMp72XUdp7RjchE
@coderabbitai

coderabbitaiBot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your current included review allowance is based on your included PR review attempts over the past 7 days.

Next review available in:6 minutes

Limit details: You’ve used the included review currently available. Your 90 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b3378cec-c210-4aec-b672-3d2de0b219d5

📥 Commits

Reviewing files that changed from the base of the PR and between aa0c04b and 71cbf03.

📒 Files selected for processing (24)
  • docs/branch-review-records/42c9767e935f4f73474461a37aeb350869157a151008e52d8e808b1f58a33faa.record.md
  • docs/branch-review-records/65d188be1a43a7c8cb344d1587c1f8e617108bc2de777d41e308fa989bb725c3.record.md
  • docs/outstanding-issues-inbox/applied/05a7854d-49d3-40b1-8973-fbbf191883da.json
  • docs/outstanding-issues-inbox/applied/0c9671c5-34ed-4c53-b896-3a61108816ba.json
  • docs/outstanding-issues-inbox/applied/1f2a0d03-e7be-4e77-9e41-d3e5e854ab9f.json
  • docs/outstanding-issues-inbox/applied/416afc07-6d2a-479d-a10d-c323bf037767.json
  • docs/outstanding-issues-inbox/applied/47f8e3bf-7d16-489d-b01d-962cb3b0e9df.json
  • docs/outstanding-issues-inbox/applied/50eff4b6-19e0-4992-9596-95501f63226b.json
  • docs/outstanding-issues-inbox/applied/5481ae21-8980-4056-9c0f-64baee28bd73.json
  • docs/outstanding-issues-inbox/applied/5c3b582c-9dc6-4462-ba5c-563279d9ebc5.json
  • docs/outstanding-issues-inbox/applied/61ed61bb-e3f1-406d-9842-5068bf30dfcc.json
  • docs/outstanding-issues-inbox/applied/6895c60a-309d-4ecc-ae2e-5d34163761b2.json
  • docs/outstanding-issues-inbox/applied/7099cbfb-c105-45c3-9ad3-4b1ada4d4a3e.json
  • docs/outstanding-issues-inbox/applied/76390200-e6e0-4280-86de-adb758ee98a9.json
  • docs/outstanding-issues-inbox/applied/79122ddb-a365-495b-a591-b21fa621aecb.json
  • docs/outstanding-issues-inbox/applied/7c0f035c-2b63-47c2-b5a6-6df0118fdb9f.json
  • docs/outstanding-issues-inbox/applied/a01b19c4-f58a-4d57-915a-f9e62849ca6c.json
  • docs/outstanding-issues-inbox/applied/cab0fdc2-b88c-45bb-98ac-3e4acffcddd2.json
  • docs/outstanding-issues-inbox/applied/cb98537c-0571-4bd2-bf65-1993e31565fb.json
  • docs/outstanding-issues-inbox/applied/d1763a59-f5ba-436f-808a-189bde920e7c.json
  • docs/outstanding-issues-inbox/applied/d83ca697-3bb1-431d-b740-9691b5a20b39.json
  • docs/outstanding-issues-inbox/applied/f048c9c7-fc23-4361-8cb8-38bee74e3405.json
  • docs/outstanding-issues-inbox/applied/fe5acdef-dd9d-4aad-be88-edf6d531985a.json
  • docs/outstanding-issues.md

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

@supabase

supabaseBot commented Aug 22, 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 August 22, 2026 06:10
@BigSimmo
BigSimmo enabled auto-merge (squash) August 22, 2026 06:10
@BigSimmo
BigSimmo merged commit 2327bd9 into mainAug 22, 2026
44 checks passed
@BigSimmo
BigSimmo deleted the claude/friendly-davinci-u4iwed branch August 22, 2026 06:11
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