docs(issues): close #310 — the fuzzy catalogue cap already landed on main - #1943
Conversation
The #310 re-land task was overtaken by 247a359 ("Add tappable phone suggestion ticker and conservative fuzzy catalog search (#1851)", 2026-08-14 02:03 +0800), which put the Damerau-Levenshtein catalogue matcher back on main already carrying the one-edit cap and both regression tests. No source change is needed; src/lib/catalog-search.ts is untouched by this commit. The pending inbox requests for #310 had inverted against that reality. Request e1506952 ("closeable when #1851 merges") was cancelled by 31650c87 at 05:48 on 2026-08-14 — after the merge at 02:03 — leaving 8621298b ("NOT REACHABLE ON MAIN ... do not close this row") as the sole surviving mutation. Because ledger-inbox mutationConflicts only throws when two or more mutations for one id survive cancellation, the next reconcile would have applied that stale text quietly, stamping "the matcher is gone, do not close" onto a row whose code is present, capped and tested. Queued through the tool, never hand-written: - cancel 8621298b, whose stop-rule against closing #310 was conditioned on the code being absent from main - done #310, carrying the evidence: typoDistanceLimit is >= 5 -> 1 with no >= 8 two-edit tier, both test files, 19/19 passing, and a re-run of the original measurement method (hazard pairs 0, intended recovery 1, all five guards 0, co-present ranking clean) docs/outstanding-issues.md is deliberately untouched — reconcile owns it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0122UC4BL5R39kz41WbBYcPj
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:55 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #10777 (cancelled). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
Uh oh!
There was an error while loading. Please reload this page.
Runs `npm run issues:reconcile` from a fresh base off origin/main (0011a05), applying all 35 pending requests with 5 cancellation decisions. The motivating case is #310, which main was carrying with a false statement. Request 8621298b ("NOT REACHABLE ON MAIN ... The whole matcher is gone") had been applied, while the cancellation queued against it was lost in the PR #1943 squash. The correcting closure 00428ff0 survived as a pending request, so this reconcile applies it: #310 now records that 247a359 re-landed the matcher with typoDistanceLimit >=5 -> 1 and both regression tests, and the false text is gone from the file. The lost cancellation was deliberately NOT re-filed. Its target is already in applied/, so planRequestBatch would reject it with "cancel request targets missing pending request" and block every future reconcile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0122UC4BL5R39kz41WbBYcPj
Summary
Read this first: the assigned work was already done, and this PR contains no source change. The task was to re-land the fuzzy catalogue matcher and cap the
term.length >= 8tier at 1 edit. That landed on main as247a359("Add tappable phone suggestion ticker and conservative fuzzy catalog search (#1851)", 2026-08-14 02:03 +0800) about eight hours before the session started.src/lib/catalog-search.tsis untouched here. This is a ledger correction only.#310.typoDistanceLimitis nowterm.length >= 5 → 1,0below, with no>= 8two-edit tier at all, so the window that produced the cross-drug hits no longer exists. The hazard pairsfluoxetine → Duloxetineandprednisone → Prednisolone(and both reverses) return 0; intended recoverysetraline,olanzepine,clozpaine,monitroing,fluoxetne,prednisne,schizophrnia,lithumall return 1; all five guards (SSRI/SNRI, ADHD/ODD, citalopram/escitalopram, clozapine/clonazepam, quetiapine/olanzapine) return 0. With the exact and near-match records both present,fluoxetineranks["Fluoxetine"]andprednisoneranks["Prednisone"]. Fuzzy search was not removed, per the row's stop rule.tests/catalog-search.test.tscarries "never cross-matches a distinct drug two edits away, even with both records present", citing#310by number, plus a dedicatedtests/catalog-search-drug-name-regression.test.ts. Both pass: Test Files 2 passed (2), Tests 19 passed (19).cancelof inbox request8621298b. It asserted the matcher was absent from main and instructed that#310not be closed on that ground. The ground no longer holds.donefor#310carrying the evidence above.Why the cancellation was necessary
The pending inbox requests for
#310had inverted against reality. Requeste1506952("closeable when #1851 merges") was cancelled by31650c87at 05:48 on 2026-08-14 — after the merge at 02:03 — which left8621298b("NOT REACHABLE ON MAIN … do not close this row") as the sole surviving mutation.mutationConflictsinscripts/ledger-inbox.mjsonly throws when two or more mutations for one id survive cancellation, so the nextissues:reconcilewould have applied that stale text quietly, stamping "the matcher is gone, do not close" onto a row whose code is present, capped and tested. A third mutation could not simply be added — it would trip the conflict guard — ande1506952could not be revived, sinceledger-inbox.mjsforbids cancelling a cancellation. Cancel-then-close was the only shape that reconciles.Both requests were created through
scripts/ledger-inbox.mjs, never hand-written.docs/outstanding-issues.mdis deliberately untouched — reconcile owns it.Verification
npm run check:outstanding-issues—Ledger inbox check passed: 77 pending request(s), 19 applied./Outstanding-issues guard passed: 314 rows (115 open, 199 archived), unique ids, next-id=317 above the highest, no merge driver, no ids deleted from base d47aa6d08b9b.npm run check:ledger-write-discipline—Ledger write discipline passed for d47aa6d08b9b..HEAD.npm run check:branch-review-ledger—Branch review ledger guard passed: 880 live table records + 1206 archived + 58 immutable …npm run docs:check-index/docs:check-inventory/docs:check-scripts/docs:check-links— all passed (1732 repo path references resolve,473 npm-run reference(s) resolve to real scripts)planRequestBatchover all 77 real pending requests —no conflict throw; active mutations: 63, cancellations: 7/ACTIVE MUTATIONS FOR #310: 1 -> done 00428ff0/8621298b cancelled: true. This is the specific failure the change exists to prevent, so it was proven rather than inferred.applyRequestBatchsimulated in memory against the real ledger (nothing written) — succeeds, and#310moves to the resolved format carrying the outcome.npx prettier --checkon both new files —All matched files use Prettier code style!Verification not run: npm run verify:pr-local— the container runs Node v22.22.2 against a repo requiring 24.x and has nonode_modules(engine-strictwould reject an install on this major), socheck:runtimefails atresolve-tsx-clibefore the plan starts. Its dry-run selects this diff as recognised low-risk docs scope — no lint, typecheck, unit suite, build or RAG checks — and every selected check that does not needtsxwas run individually and passed, listed above.format:changedandsitemap:checkfail on the same missing-dependency cause; Prettier was verified directly on both files instead, and the diff touches no routes. CI runs the real gate.UI verification not run:no UI, routing, styling, or browser behaviour changed.Risk and rollout
git revertthis commit. Since the requests are additive and unreconciled, reverting before the nextissues:reconcileleaves#310exactly as it is on main today.Clinical Governance Preflight
Not applicable — measured, not assumed.
classifyPullRequestFilesreturnsclinicalRisk: false,operationalRisk: false,ragRanking: false,ui: falsefor both changed paths. The preflight would have been required had this PR editedsrc/lib/catalog-search.tsas the task anticipated; it does not, because that work is already on main. NoRAG impact:line is required either — nothing undersrc/lib/rag/**is touched, and catalogue ranking is not the pgvector retrieval path.Notes
f23c14ecand829597d4still assert that PR Add conservative typo-tolerant fuzzy matching to catalogue searches #1800's content is absent from main. The merge-loss finding itself stands (acf78bfreally did drop it), but the "absent from main" claim is now stale for the catalogue-search portion.cancelrequests in the inbox write the action value's third character as a unicode escape rather than a literalc.ledger-inbox.mjsserialises withJSON.stringify, which never escapes ASCII letters, so none of them came from the tool. It is identical across every cancel file, so it reads as a quirk of whatever writes cancellations rather than a one-off, and it parses tocanceleither way.main(which advanced mid-session); the diff is two new files, so no conflict is possible.🤖 Generated with Claude Code
https://claude.ai/code/session_0122UC4BL5R39kz41WbBYcPj
Generated by Claude Code