Skip to content

docs: re-diagnose #018 (generation not retrieval), close #019, add #022 governance worklist#1073

Merged
BigSimmo merged 12 commits into
mainfrom
claude/rag-018-019-diagnosis
Jul 22, 2026
Merged

docs: re-diagnose #018 (generation not retrieval), close #019, add #022 governance worklist#1073
BigSimmo merged 12 commits into
mainfrom
claude/rag-018-019-diagnosis

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Free ($0, read-only) diagnosis of the two P2 retrieval items plus the #22 governance worklist, all derived from the run #61 + #57 Eval Canary artifacts. No provider calls, no live queries, no code change.

#19 — closed, not reproducible

Both runs place Admission of Community Patients (AKG).pdf at ranks 4–5, with missingDocumentSubstrings: [], documentRecallAt5: 1, contentRecallAt5: 1, and zero failing cases across the 36-case retrieval suite. The claim ("misses on every canary #57–#61") is false at both endpoints of its own range. No retrieval canary was spent.

#18 — re-scoped from retrieval to generation

Retrieval is healthy (grounded, 4–5 citations, 100% doc/content recall, content_mrr_at_10 0.9344). The real cause:

  • quality-lithium-monitoring-range and quality-adhd-medication-monitoring return the source_backed_review_fallback boilerplate — "a full written answer could not be completed just now" — which cannot contain a schedule, so targeting scores 0 by construction.
  • quality-antipsychotic-metabolic-monitoring emits degenerate extractive text and is classified document_lookup when the case expects medication_dose_risk.

It is also not monitoring-specific: 15/30 cases hit the fallback and all 7 targeting misses are route=extractive across dose/monitoring/pathway intents — substantially the same phenomenon as #21. A retrieval-side fix would have targeted the wrong layer.

#22 — prioritized worklist generated

New docs/source-governance-refresh-worklist-2026-07-22.md. Disambiguates the two rates (0.8409 = per-case over 44 answer cases; 0.5976 = per-slot over 676 retrieval slots) and reframes the work: of 124 surfaced documents, 59 are review-required, but 38 (64%) are the BMJ tier all at unverifiedone attestation-policy decision, not 38 reviews. Top-10 documents clear 44% of flagged slots; top-20 clear 66%.

#25 — new

The canary's own ## Source Governance table prints Top results | 0 and all-zero rates despite topResults carrying full governance metadata, so operators cannot see any of this from the log.

Verification

  • prettier --check clean · docs:check-links passes (1097 references)
  • Docs-only: docs/outstanding-issues.md + one new doc

Governance

  • RAG impact: no retrieval behaviour change — documentation and ledger only; no src/** touched.
  • Clinical governance preflight: N/A (no ingestion/answer/retrieval/document-access code changed).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated outstanding-issue tracking for the next cycle (advanced the next-issue marker), refreshed the detailed operator notes for issue #022, and archived a non-reproducible item; added a new open issue #031 about Source Governance table reports showing all zeros despite available governance metadata.
    • Added a regenerated source-governance refresh worklist for 2026-07-22, including clarified review-required rules, a documented canary reporting gap, burn-down math, a prioritized top-25 list, and a suggested execution order.

BigSimmo and others added 2 commits July 22, 2026 14:16
Free diagnosis from the run #61 + #57 eval-canary artifacts (no spend, no
provider calls, read-only).

- #19 closed as NOT REPRODUCIBLE: both runs place "Admission of Community
  Patients (AKG).pdf" at ranks 4-5 with missingDocumentSubstrings [],
  documentRecallAt5 1, contentRecallAt5 1, and zero failing cases across the
  36-case retrieval suite. The claim is false at both endpoints of the stated
  #57-#61 range.

- #18 re-scoped from "retrieval-depth" to answer generation. Retrieval is
  healthy (grounded, 4-5 citations, 100% doc/content recall,
  content_mrr_at_10 0.9344). Two of the three cases return the
  source_backed_review_fallback boilerplate, which cannot carry a schedule;
  the third emits degenerate extractive text and is misclassified as
  document_lookup. Suite-wide rather than monitoring-specific: 15/30 cases hit
  the fallback and all 7 targeting misses are route=extractive across
  dose/monitoring/pathway intents - substantially the same phenomenon as #21.
  No retrieval canary warranted.

Docs-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ting gap

Generated read-only at $0 from the run #61 + #57 eval-canary artifacts.

- New docs/source-governance-refresh-worklist-2026-07-22.md (successor to the
  2026-07-02 priority list): disambiguates the two governance rates (0.8409 is
  per-case over the 44-case answer suite; 0.5976 is per-slot over 676 retrieval
  top-result slots), gives the burn-down curve, and lists the top 25 documents
  by surfaced slots.

- Key reframing: 59 of 124 surfaced documents are review-required, but 38 (64%)
  are the BMJ published-reference tier all at clinical_validation_status
  "unverified" -> ONE attestation-policy decision, not 38 clinical reviews. The
  remaining 21 are genuine local WA health-service reviews. Top-10 documents
  clear 44% of flagged slots; top-20 clear 66%.

- #25 (new): the canary's own "## Source Governance" table prints all zeros
  (Top results | 0) even though topResults carry full governance metadata, so
  the operator-facing log does not surface this at all.

Docs-only. No provider calls, no code change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@supabase

supabase Bot commented Jul 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 enabled auto-merge (squash) July 22, 2026 06:24
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR updates the outstanding-issues ledger and adds a regenerated source-governance worklist based on canary runs. It documents governance metrics, review-required classifications, a reporting gap, prioritized documents, burn-down calculations, execution order, and scope limits.

Changes

Source governance documentation

Layer / File(s) Summary
Issue ledger updates
docs/outstanding-issues.md
Advances the issue counter, updates issue #022, and adds issue #031 for the canary Source Governance table reporting zeros despite metadata in the run JSON.
Governance metrics and review scope
docs/source-governance-refresh-worklist-2026-07-22.md
Defines governance metrics, review-required conditions, the reporting gap, document classes, and aggregated counts.
Prioritized worklist and execution order
docs/source-governance-refresh-worklist-2026-07-22.md
Adds burn-down calculations, a prioritized top-25 worklist, execution order, and scope limits.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning Summary and verification are present, but the required Risk and rollout and Clinical Governance Preflight sections from the template are missing. Add the template's Risk and rollout section and Clinical Governance Preflight checklist, and format Verification as the required checkbox list or note why items were not run.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the doc-only changes: #018/#19 re-diagnosis, the #022 worklist, and the Source Governance table issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/rag-018-019-diagnosis

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d153f0bb5

ℹ️ 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".

Comment thread docs/outstanding-issues.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/outstanding-issues.md`:
- Line 54: Update the `#025` detail in the outstanding-issues ledger so the
literal “Top results | 0” does not split the Markdown table row: escape the pipe
or rephrase the text, and add spaces around the affected inline code spans.
Preserve the issue’s meaning and keep the row aligned to seven cells.

In `@docs/source-governance-refresh-worklist-2026-07-22.md`:
- Around line 32-33: The BMJ policy decision entry must be constrained to the
metadata governance contract: replace the broad “ingestion default” option with
an explicit, auditable metadata update that preserves the third-party/unverified
distinction and never silently assigns current or approved status. Apply the
same clarification to the corresponding BMJ entry referenced around lines 88–90,
and ensure the debt remains open until the approved policy is implemented.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0742619c-3965-44f2-bf2c-d99568eb6d04

📥 Commits

Reviewing files that changed from the base of the PR and between 98a1bed and 5d153f0.

📒 Files selected for processing (2)
  • docs/outstanding-issues.md
  • docs/source-governance-refresh-worklist-2026-07-22.md

Comment thread docs/outstanding-issues.md Outdated
Comment thread docs/source-governance-refresh-worklist-2026-07-22.md Outdated
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Cannot run autofix: This PR has merge conflicts.

Please resolve the conflicts with the base branch and try again.

Alternatively, use @coderabbitai resolve merge conflict to automatically resolve the conflicts.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Cannot run autofix: This PR has merge conflicts.

Please resolve the conflicts with the base branch and try again.

Alternatively, use @coderabbitai resolve merge conflict to automatically resolve the conflicts.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Cannot run autofix: This PR has merge conflicts.

Please resolve the conflicts with the base branch and try again.

Alternatively, use @coderabbitai resolve merge conflict to automatically resolve the conflicts.

@BigSimmo

Copy link
Copy Markdown
Owner Author

@copilot resolve the merge conflicts on this branch.

auto-merge was automatically disabled July 22, 2026 08:38

Head branch was pushed to by a user without write access

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts on this branch.

Merge conflicts resolved. The only conflicting file was docs/outstanding-issues.md. Resolution strategy:

Commit: the latest push to this branch.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 1 unresolved review comment.

Files modified:

  • docs/source-governance-refresh-worklist-2026-07-22.md

Commit: 715d6489d7a31d237b3ab1e6aa68f054cd11ad53

The changes have been pushed to the claude/rag-018-019-diagnosis branch.

Time taken: 2m 10s

BigSimmo and others added 3 commits July 22, 2026 16:48
@github-actions

Copy link
Copy Markdown

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #4453 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

BigSimmo and others added 3 commits July 22, 2026 16:52
…updates

Clarify that BMJ attestation must preserve third-party/unverified status
and never silently default ingestion metadata to current or approved.

Co-authored-by: Cursor <cursoragent@cursor.com>
…updates

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@BigSimmo
BigSimmo enabled auto-merge (squash) July 22, 2026 09:21
@BigSimmo
BigSimmo merged commit 9fa9fa6 into main Jul 22, 2026
17 checks passed
@BigSimmo
BigSimmo deleted the claude/rag-018-019-diagnosis branch July 22, 2026 09:23
Sign up for free to 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