docs(issues): capture the fuzzy catalogue-search drug-match finding (#310) and the ledger loss-detector (#311) - #1870
Conversation
…s-detector #310 — PR #1851's fuzzy catalogue search matches DIFFERENT drugs at edit distance 2. Measured by running the PR's own algorithm rather than reading it: fluoxetine -> duloxetine (Damerau counts the lu->ul transposition as one edit, both are 10 chars, so the >=8 tier's 2-edit budget allows it) and prednisone -> prednisolone. Intended recovery still works (sertraline, olanzapine) and the short-term guards hold (SSRI/SNRI, ADHD/ODD). Two real mitigations recorded so it is not over-read: fuzzy fires only when nothing matched literally, and sub-5-character terms are excluded. Tested fix is one line — cap the >=8 tier at 1 edit, which kills both cross-drug hits and keeps every legitimate typo case. Blast radius is eleven modules including medications.ts, because catalog-search.ts feeds the whole clinical catalogue. #311 — promote the derived ledger loss-detector into scripts/. Two main-merges silently reverted ledger edits this session, including the whole #293 refutation, and the hand-enumerated recovery list could not catch it. The derived version has now earned its place twice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017paT42ZVMf8jaLtkjFxdy5
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 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 (2)
Comment |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6eb4c64b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex Please update this PR end-to-end on its current head. Address the unresolved P2 thread in |
|
@codex address that feedback |
Summary
Testing
|
Summary
Testing
|
There was a problem hiding this comment.
Pull request overview
Captures two session-only findings into the durable outstanding-issues ledger (new rows #310 and #311) and records the work in the branch review ledger, so these notes aren’t lost when the chat transcript disappears.
Changes:
- Add ledger rows
#310(fuzzy catalog typo recovery can cross-match different drug names) and#311(promote the derived ledger loss-detector intoscripts/). - Advance
<!-- issues:next-id -->to312and append the corresponding entry todocs/branch-review-ledger.md. - Add a branch-specific GitHub Actions workflow intended to auto-edit the ledger (this is problematic for merge).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/outstanding-issues.md | Adds #310/#311 rows and updates issues:next-id. |
| docs/branch-review-ledger.md | Appends a ledger entry documenting this capture work and verification. |
| .github/workflows/pr-1870-ledger-fix.yml | Adds a workflow that commits/pushes a docs edit back to the branch (should not be merged as-is). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@codex Address all currently unresolved inline review comments on this PR against the current GitHub head. Correct the #310 fuzzy-search ledger wording/regression premise to reflect candidate-local scoring, remove any temporary write-capable branch-fix workflow still present, run proportionate docs/tests checks, and push minimal fixes. Do not merge, close, rebase, force-push, deploy, or alter auto-merge. Please report the exact commit SHA and test results. |
Summary
Testing
|
|
@claude Fix all currently unresolved review threads on this PR at the current GitHub head. Correct outstanding-issues row #310: fuzzy score===0 is candidate-local, so duloxetine can still fuzzy-match alongside an exact fluoxetine result; the risk does not require the queried drug to be absent. Make the regression premise explicitly include both records and exact fluoxetine excluding duloxetine. Also remove the temporary .github/workflows/pr-1870-ledger-fix.yml write-capable helper if it remains. Keep this docs/workflow-only and minimal, run the repository docs/workflow checks, push only to this PR branch, and report exact SHA/tests. Do not merge, close, rebase, force-push, deploy, or alter auto-merge. |
|
Hi @BigSimmo — thanks for the @claude mention. Open this in Claude Code on the web to continue here: https://claude.ai/code Context: Automated backlink from the Claude backlink workflow. Claude Code can pick up the mention and push a scoped fix to the branch. |
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
Final review-and-fix summary
Fixed / dispositioned
Adversarial reviewA distinct manual adversarial pass was performed because no separate fresh-context review subagent was available in this connector session. The #310 conclusion was independently checked against PR #1851’s actual Decisive verificationRecorded on the candidate final commit and reflected in the current PR metadata:
No Lighthouse, UI/browser, live/provider-backed evaluation, deployment, release, or production test was run because the final delta is documentation-only. Exact-head hosted CI
Residual blockers / riskThe only current merge blocker identified is unfinished exact-head required CI. GitHub therefore reports The PR was not merged. Final merge is left to the user. |
Final review-and-fix summaryFinal state
Issues fixed and dispositioned
Adversarial review and comments
Decisive verificationPassed on the repaired candidate/final content:
The earlier broad-suite failure was not a PR defect: it was caused by a runner lacking PyMuPDF after the verifier selected an unnecessarily broad historical range. The final supported explicit-file verification passed. Exact-head required CIFor final head
Advisory checks and residual risk
PR #1870 is merged. This review did not perform or authorise the merge. |
Summary
fluoxetineand a two-editduloxetinenear-match can both score when both records exist.mainwith the repository ledger merge driver, preserves concurrent ledger records, and removes the temporary write-enabled repair workflow.Verification
npm run verify:pr-local -- --files docs/branch-review-ledger.md docs/outstanding-issues.md— passed in the repository workflow environment.npm run check:outstanding-issues— passed.npm run check:branch-review-ledger— passed.git diff --check b850a58166b68fa9cdd9ff6248c5e93e34c87f73...72c8b4d2e3ad4c7766dc8baaf71811b1542bd3e2— passed.docs/outstanding-issues.mdanddocs/branch-review-ledger.md.Risk and scope
Documentation-only final delta. No source, schema, dependency, or workflow file remains changed. The underlying catalogue-search implementation and regression test belong to draft PR #1851 and remain outside this documentation PR.
No UI, provider-backed, deployment, release, Lighthouse, or production test was run.