feat(ledger): record 15 delivered resolutions, harden operator runbooks, and relax source metadata schema - #2107
Conversation
…ks, and relax source metadata schema
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 5 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 101 included PR reviews in the past 7 days; at that activity level, included reviews refill 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?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 (18)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
CI triageCI failed on this PR. Automated classification of the 2 failed job(s):
Compared with main CI run #12004 (cancelled). Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger. |
…ook command syntax
Synced origin/main into the branch (behind-but-clean, no conflicts). PR policy check genuinely fails and is left for a human: the diff touches the RAG-ranking-protected src/lib/rag/rag-row-contracts.ts without a required `RAG impact:` line or Clinical Governance Preflight section. Trust/integrity spot-check: the PR body claims 15 delivered resolutions but only 14 outstanding-issues-inbox tickets exist in the diff -- #178 is described in prose but was never actually queued. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary of Changes
This PR implements safe, zero-risk tasks across three categories, plus one RAG-surface schema change requiring the governance sections below.
1. Category A: 14 Verified Resolutions Recorded in Ledger Inbox
Queued merge-safe immutable JSON resolution tickets in
docs/outstanding-issues-inbox/for tasks previously verified onmain:tests/search-route-round-trip-budget.test.ts).scripts/audit-merge-loss.mjs.npm run check:merge-loss).source-contract.tshelper.Correction from an earlier version of this description: #178 (PR policy clinical/operational risk bundling detection) was listed here but was never actually queued as an inbox ticket by this PR — it doesn't need one, since it's already resolved directly on
docs/outstanding-issues.md("DELIVERED — verified on main 2026-08-14"). Count corrected from 15 to 14 to match what this PR's diff actually contains.2. Category B: Pure Documentation & Runbook Hardening (Zero Risk)
AGENTS.mdfor web containers.docs/launch-operator-runbook.md.3. Category C: Safe Helper & Schema Resilience
source_metadataschema insrc/lib/rag/rag-row-contracts.tsfrom.nullable()to.nullish()— see RAG impact below for why this is a genuine, investigated no-op rather than an assumed one.RAG impact
src/lib/rag/rag-row-contracts.tsmatches this repo's RAG-ranking-protected-surface pattern, so here is the required declaration:RAG impact: no retrieval behaviour change.
sourceMetadataSchemawidened from.nullable()(value must be present: an object ornull) to.nullish()(value may additionally be absent/undefined). Traced the only consumer,normalizeOptionalSourceMetadatainsrc/lib/source-metadata.ts:98-111: it starts withif (input == null || ...) return null— a loose (==) equality check that treatsnullandundefinedidentically, falling back to the same conservative"unknown"governance-field defaults (document_status,clinical_validation_status,extraction_quality) either way. Ranking, scoring, and citation output are therefore provably unaffected by this change — the one real effect is at the validation boundary itself: a retrieval row with thesource_metadatakey entirely absent (as opposed to present-and-null) now passesretrievalRowSchemainstead of throwingRetrievalRowShapeError. Givensource_metadatais deliberately the one field this contract pins stricter than the rest specifically to catch RPC drift (per the file's own doc comment, and per the active RPC divergencedocs/outstanding-issues.md#316documents), that tradeoff is worth naming even though it doesn't change clinician-facing output: a genuinely malformed/drifted row missing this key will now be silently accepted rather than rejected. No canary was run since there is no retrieval-output behaviour to measure a difference in.Clinical Governance Preflight
Complete this section when the change touches ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.
Clinical KB Database(sjrfecxgysukkwxsowpy) — unaffected.source_metadatawas already"unknown"for every governance field before this change, and remains so after it (see RAG impact above).Verification
npm run check:outstanding-issuespassed.docs/codebase-index.mdcoverage verified.npm run format100% clean.