From be94fbbb31843f4593783b9ca388ee0526b74e84 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Aug 2026 15:03:00 +0000 Subject: [PATCH 1/3] chore(issues): reconcile the four rejected-closure corrections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applies the requests merged in PR #1957 to the canonical ledger: #235, #237 and #238 now carry the rejected closure, its reason and a Stop rule naming the evidence class that must not be reused; #231 records that scripts/probe-generation-quality.ts exists and PR #1861 was adjudicated. 4 update requests, no cancellations, zero live same-target collisions. Row counts are unchanged at 99 open / 235 archived — these are detail rewrites, not archives. Inbox 0 pending / 133 applied. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_017paT42ZVMf8jaLtkjFxdy5 --- .../38c6095f-41f5-4925-b1ea-f5af5187885d.json | 0 .../7f5e6922-8d0b-424a-b359-12bed3a4e315.json | 0 .../bd11cfe9-1627-425f-a8f7-e0e202b980a4.json | 0 .../ec6d0c23-2f19-4159-9c73-49bdc103b61e.json | 0 docs/outstanding-issues.md | 8 ++++---- 5 files changed, 4 insertions(+), 4 deletions(-) rename docs/outstanding-issues-inbox/{ => applied}/38c6095f-41f5-4925-b1ea-f5af5187885d.json (100%) rename docs/outstanding-issues-inbox/{ => applied}/7f5e6922-8d0b-424a-b359-12bed3a4e315.json (100%) rename docs/outstanding-issues-inbox/{ => applied}/bd11cfe9-1627-425f-a8f7-e0e202b980a4.json (100%) rename docs/outstanding-issues-inbox/{ => applied}/ec6d0c23-2f19-4159-9c73-49bdc103b61e.json (100%) diff --git a/docs/outstanding-issues-inbox/38c6095f-41f5-4925-b1ea-f5af5187885d.json b/docs/outstanding-issues-inbox/applied/38c6095f-41f5-4925-b1ea-f5af5187885d.json similarity index 100% rename from docs/outstanding-issues-inbox/38c6095f-41f5-4925-b1ea-f5af5187885d.json rename to docs/outstanding-issues-inbox/applied/38c6095f-41f5-4925-b1ea-f5af5187885d.json diff --git a/docs/outstanding-issues-inbox/7f5e6922-8d0b-424a-b359-12bed3a4e315.json b/docs/outstanding-issues-inbox/applied/7f5e6922-8d0b-424a-b359-12bed3a4e315.json similarity index 100% rename from docs/outstanding-issues-inbox/7f5e6922-8d0b-424a-b359-12bed3a4e315.json rename to docs/outstanding-issues-inbox/applied/7f5e6922-8d0b-424a-b359-12bed3a4e315.json diff --git a/docs/outstanding-issues-inbox/bd11cfe9-1627-425f-a8f7-e0e202b980a4.json b/docs/outstanding-issues-inbox/applied/bd11cfe9-1627-425f-a8f7-e0e202b980a4.json similarity index 100% rename from docs/outstanding-issues-inbox/bd11cfe9-1627-425f-a8f7-e0e202b980a4.json rename to docs/outstanding-issues-inbox/applied/bd11cfe9-1627-425f-a8f7-e0e202b980a4.json diff --git a/docs/outstanding-issues-inbox/ec6d0c23-2f19-4159-9c73-49bdc103b61e.json b/docs/outstanding-issues-inbox/applied/ec6d0c23-2f19-4159-9c73-49bdc103b61e.json similarity index 100% rename from docs/outstanding-issues-inbox/ec6d0c23-2f19-4159-9c73-49bdc103b61e.json rename to docs/outstanding-issues-inbox/applied/ec6d0c23-2f19-4159-9c73-49bdc103b61e.json diff --git a/docs/outstanding-issues.md b/docs/outstanding-issues.md index 0ed58896bd..d3da9ee55d 100644 --- a/docs/outstanding-issues.md +++ b/docs/outstanding-issues.md @@ -179,10 +179,10 @@ removed after current-main verification; it is not missing recommended work. | #212 | P3 | task | Replace as unknown as casts and unvalidated JSON.parse with Zod or runtime guards | **DEPRIORITISED 2026-08-12 (yield review against current main).** 40 casts at trust boundaries. Same reasoning as #211: worth doing, no measured defect traces to it, and it competes with clinical work for review attention. VERIFIED CORRECT 2026-08-12 — re-checked against merged main during the full ledger sweep and left unchanged: 40 `as unknown as` casts remain under src/ — the row's population is intact. This stamp exists so a later reader can tell "checked and still true" from "never looked at"; the two were indistinguishable before. 48 as unknown as casts and ~24 unvalidated JSON.parse calls across src/ trust Supabase, OpenAI, localStorage, file metadata and extraction boundaries. Start with src/lib/rag/rag.ts and src/app/api/* routes, mirroring existing Zod use in src/lib/validation/body.ts and src/lib/extractors/document.ts. See docs/review-findings-2026-08-02.md sections 2.2, 2.3 and 8. | session 2026-08-02 /ledger sweep — docs/review-findings-2026-08-02.md | 2026-08-02 | | #215 | P3 | task | Add image-optimization basics for lightbox, PWA lifecycle and demo PNGs | **Outcome:** two of the four image-only findings from the 2026-08-02 audit are shipped; two remain open for an explicit implementation-or-drop decision. **RESTATED 2026-08-13 after inspection against main 2d270392 — two of the four items already shipped and the row no longer describes them as open.** DONE: src/components/clinical-dashboard/image-lightbox.tsx carries decoding="async" (Phase 0, PR #1660), asserted by tests/signed-image.dom.test.tsx. DONE: SignedImage has the priority prop for above-fold evidence — it also skips the IntersectionObserver deferral entirely — and document viewer Phase 3 (PR #1772) added the other half of that pair: an explicit fetchPriority of high when priority is set and low otherwise, so a deferred rail figure does not contend with the page's own above-the-fold work. The document rail additionally passes a 240px observer root margin against the shared 640px default. REMAINING, both confirmed by inspection rather than inferred: (a) src/components/pwa-lifecycle.tsx still has no decoding attribute; (b) public/demo-documents/ still contains no .webp — the PNGs are ~80 KB each and served as-is, so the conversion with a PNG fallback has not been done. **Next:** apply decoding=async in pwa-lifecycle.tsx, and either convert the demo PNGs to WebP with a PNG fallback or record that an ~80 KB synthetic demo asset is not worth the build step. **Stop:** do not treat this row as covering the broader performance findings — those live under #016, #013, #117 and #147. | session 2026-08-02 /ledger sweep — docs/audit/performance-image-cwv-audit-2026-08-02.md | 2026-08-02 | | #222 | P3 | task | Headers surface only partially converged in PR-J: mode-home-template and search-results-header-band untouched | VERIFIED CORRECT 2026-08-12 — re-checked against merged main and left open: Still unconverged: src/components/mode-home-template.tsx defines ModeHomeStatusNotice locally (:232) and imports neither PageHeader nor the DS EmptyState; search-results-header-band.tsx is likewise untouched. Note the adjacency — in-flight PR #1842 delegates ModeHomeStatusNotice to the DS EmptyState under #221, which is a different conversion from the PageHeader question this row asks. Re-check after #1842 merges. Builder A converged DsmPageHeader, InformationPageHeader and InformationPageBreadcrumbs onto PageHeader plus Breadcrumb, and declined two files with reasons. mode-home-template.tsx ModeHomeHero is a centred display hero on the fluid text-hero token and is the slot the in-flow phone composer sits in, so converging it onto a left-aligned PageHeader is a redesign of 13 mode homes that collides with the one-composer-per-page contract. search-results-header-band.tsx is a results spine carrying status, counts and filters, not a page-title stack, so its pin tests/search-results-header-band.dom.test.tsx remains unflipped. Both are defensible; both leave the headers surface partially adopted. Next action: decide whether either is in scope at all, or record them as permanently out of the PageHeader vocabulary. Found during PR-J adoption, 2026-08-03. | session 2026-08-03 (PR-J Wave 5, Builder A) | 2026-08-02 | -| #231 | P1 | issue | Generation fallbacks no longer stick in answer cache; lithium generation quality still falls back safely | PARTIAL 2026-08-12: This PR fixes the clinically consequential stale-fallback path: every answer whose routing or degraded reason contains generation_fallback is excluded from rag_response_cache. Offline evidence: 96 focused answer-route tests and 574 RAG fixture/contract tests passed. Approved live baseline/final canaries preserved 36/36 document and content recall at 1.0 with zero per-case reciprocal-rank regressions; the final 44-case answer gate had zero citation or numeric-grounding failures. A budget extension was tested and rejected: four cache-bypassed 'Lithium dosing?' probes remained grounded, cited safe extractive fallbacks at 35-40 second candidate budgets; the decisive 40-second probe completed generation in 25.272 seconds and 27.237 seconds total with route_deadline_exceeded=false, but failed generation quality. Therefore OPENAI_ANSWER_TIMEOUT_MS and the route budget are not the current residual binding cause. Next: instrument and reproduce the structured generation-quality failure using provider-safe metadata, then make a separate bounded output-quality fix with an offline fixture and live canary. Stop: do not increase route/provider timeouts or cache any generation fallback. | session 2026-08-04 (production triage, live /api/search + /api/answer) | 2026-08-04 | -| #235 | P3 | task | ADOPTION.md section 7 proof shots exist for only four of the adopted surfaces | IN FLIGHT 2026-08-12 in PR #1842 (records adoption evidence). Checked against the open-PR list during the full ledger sweep. Do NOT start this row while that PR is open — duplicating a queued conversion is the exact failure #292 records, and it has happened twice. Re-verify this row against main after that PR merges, and close it there rather than here. The adoption contract asks for a proof shot per adopted surface. The Wave 5 adoption captured four - DSM header, settings rows, patient panel, answer surface - and none for the forms fold, the catalogue and docs surfaces, the headers convergence, or the empty states adopted since. Section 7 therefore reads as complete while most of the adoption is unevidenced, which matters because the proof shot is what a later reader uses to tell an intended restyle from a regression (the #229 DSM eyebrow was almost rediscovered as a defect for exactly this reason). Next action: capture the missing shots against a warmed local server and attach them to section 7. Cheap and mechanical - no gate, no provider access. Stop: this is not the visual-baseline harness (#118) - do not commit Playwright snapshot PNGs or flip that job to blocking. | session 2026-08-04 (DS V2 Wave 5 close-out capture) | 2026-08-04 | -| #237 | P2 | rec | Eyeball low-confidence AccessibleTable densities at 320px before freezing Linux visual baselines | IN FLIGHT 2026-08-12 in PR #1841 (renders empty dense cells wrapping rather than truncated, with a 320px jsdom assertion). Checked against the open-PR list during the full ledger sweep. Do NOT start this row while that PR is open — duplicating a queued conversion is the exact failure #292 records, and it has happened twice. Re-verify this row against main after that PR merges, and close it there rather than here. PR #1616 clinical MissingValue phrases increase text volume in sparse OCR grids. Contract forbids abbreviating to a dash. Next: open one real lowConfidence extraction at 320px phone width and accept or adjust dense preview column widths before committing Linux screenshots (#118). | PR #1616 review findings; session 2026-08-05 | 2026-08-05 | -| #238 | P2 | rec | Visual pass for Sheet portal default on settings, sidebar, and answer overlays | IN FLIGHT 2026-08-12 in PR #1842 (exercises the Sheet portal default and adds tests/sheet.dom.test.tsx). Checked against the open-PR list during the full ledger sweep. Do NOT start this row while that PR is open — duplicating a queued conversion is the exact failure #292 records, and it has happened twice. Re-verify this row against main after that PR merges, and close it there rather than here. PR #1616 flips Sheet portal default to true, moving ~10 product overlays into OverlayRoot. Token inheritance is safe; residual risk is ancestor-scoped CSS / contain / transform. Next: one visual pass of settings-dialog, ClinicalSidebar, answer-result sheets, launcher sheet, section-nav. | PR #1616 review findings; session 2026-08-05 | 2026-08-05 | +| #231 | P1 | issue | Generation fallbacks no longer stick in answer cache; lithium generation quality still falls back safely | PARTIAL 2026-08-12: This PR fixes the clinically consequential stale-fallback path: every answer whose routing or degraded reason contains generation_fallback is excluded from rag_response_cache. Offline evidence: 96 focused answer-route tests and 574 RAG fixture/contract tests passed. Approved live baseline/final canaries preserved 36/36 document and content recall at 1.0 with zero per-case reciprocal-rank regressions; the final 44-case answer gate had zero citation or numeric-grounding failures. A budget extension was tested and rejected: four cache-bypassed 'Lithium dosing?' probes remained grounded, cited safe extractive fallbacks at 35-40 second candidate budgets; the decisive 40-second probe completed generation in 25.272 seconds and 27.237 seconds total with route_deadline_exceeded=false, but failed generation quality. Therefore OPENAI_ANSWER_TIMEOUT_MS and the route budget are not the current residual binding cause. INSTRUMENT NOW EXISTS 2026-08-14: the "Next: instrument" half of this row is done. Commit a3bc4da adds scripts/probe-generation-quality.ts — one cache-bypassed live answer reporting the structured generation_quality_gate_reasons, provider-backed, refusing demo mode, never caching or logging the probe. The same commit adjudicates PR #1861: superseded for phase 1, close recommended, with the numeric-retry half deferred to phase 2 pending probe evidence. So do not review #1861 as though it were the live fix, and do not re-implement the probe. Next: run scripts/probe-generation-quality.ts in an environment that has OPENAI and Supabase credentials — it is blocked in offline containers, which is why it has not been run yet — then make a separate bounded output-quality fix with an offline fixture and live canary. Stop: do not increase route/provider timeouts or cache any generation fallback. | session 2026-08-04 (production triage, live /api/search + /api/answer) | 2026-08-04 | +| #235 | P3 | task | ADOPTION.md section 7 proof shots exist for only four of the adopted surfaces | CLOSURE ATTEMPTED AND REJECTED 2026-08-14 — read this before closing again. PR #1940 queued a `done` for this row citing ADOPTION.md section 7.1's per-surface executable-evidence table; the closure was cancelled on review with the reason "executable evidence does not replace the requested desktop and phone proof shots". The cancellation is correct, and the trap is worth naming: section 7.1 opens with "This PR records executable evidence RATHER THAN committing image baselines", so the very section that looks like the evidence says in its first line that it is not. A test that proves a component is mounted is not a picture of the surface, and this row asks for the picture. IN FLIGHT note retired: PR #1842 merged, so the do-not-start warning no longer applies. The requirement is unchanged. The adoption contract asks for a proof shot per adopted surface. Wave 5 captured four - DSM header, settings rows, patient panel, answer surface - and none for the forms fold, the catalogue and docs surfaces, the headers convergence, or the empty states adopted since. Section 7 therefore reads as complete while most of the adoption is unevidenced, which matters because the proof shot is what a later reader uses to tell an intended restyle from a regression (the #229 DSM eyebrow was almost rediscovered as a defect for exactly this reason). Next action: capture the missing shots against a warmed local server (npm run ensure) and attach them to section 7. Cheap and mechanical - no gate, no provider access. Stop: this is not the visual-baseline harness (#118) - do not commit Playwright snapshot PNGs or flip that job to blocking. Stop: do not close this row on unit, DOM or contract evidence of any kind. | session 2026-08-04 (DS V2 Wave 5 close-out capture) | 2026-08-04 | +| #237 | P2 | rec | Eyeball low-confidence AccessibleTable densities at 320px before freezing Linux visual baselines | CLOSURE ATTEMPTED AND REJECTED 2026-08-14 — read this before closing again. PR #1940 queued a `done` for this row citing tests/accessible-table.dom.test.tsx:110 ("keeps the full missing-value phrase readable in the dense 320px preview"); the closure was cancelled on review with the reason "the jsdom assertion does not verify the requested real 320px browser visual pass". The cancellation is correct. jsdom does not lay out text, so a 320px assertion there proves the string is present, not that it fits, wraps or stays legible at that width — which is the whole question for a low-confidence extraction in a sparse grid. IN FLIGHT note retired: PR #1841 merged, so the do-not-start warning no longer applies. The requirement is unchanged. PR #1616 clinical MissingValue phrases increase text volume in sparse OCR grids; the contract forbids abbreviating to a dash. Next: open one real lowConfidence extraction at 320px phone width in an actual browser (npm run ensure, then a phone viewport) and accept or adjust dense preview column widths before committing Linux screenshots (#118). Stop: do not close this row on a jsdom, DOM-testing-library or snapshot-string assertion — only a real browser at 320px settles it. | PR #1616 review findings; session 2026-08-05 | 2026-08-05 | +| #238 | P2 | rec | Visual pass for Sheet portal default on settings, sidebar, and answer overlays | CLOSURE ATTEMPTED AND REJECTED 2026-08-14 — read this before closing again. PR #1940 queued a `done` for this row citing tests/sheet.dom.test.tsx and the `portal = true` default; the closure was cancelled on review with the reason "generic Sheet coverage does not verify the requested product-overlay browser journeys". The cancellation is correct. The residual risk this row exists for is ancestor-scoped CSS, `contain` and `transform` on the specific product overlays — a property of where each overlay sits in the real page, which a component-level unit test cannot see no matter how thorough it is. IN FLIGHT note retired: PR #1842 merged, so the do-not-start warning no longer applies. The requirement is unchanged. PR #1616 flips the Sheet portal default to true, moving ~10 product overlays into OverlayRoot; token inheritance is safe. Next: one visual pass in a real browser over settings-dialog, ClinicalSidebar, answer-result sheets, launcher sheet and section-nav. Stop: do not close this row on Sheet component coverage — the question is about the five host surfaces, not about Sheet. | PR #1616 review findings; session 2026-08-05 | 2026-08-05 | | #239 | P3 | rec | Manual phone rotation check for ResizeObserver-only phone chrome reserve | PR #1616 phone overlay reserve publishes only from ResizeObserver quiet-window deliveries. Desktop↔phone and late-mount recovery are covered; orientation that does not change stack height is a narrower trigger. Next: rotate a physical phone on a chrome-overlay route and confirm --phone-overlay-chrome-h updates. | PR #1616 review findings; session 2026-08-05 | 2026-08-05 | | #240 | P3 | rec | Confirm tooltip visual hard-clip asymmetry with design owner | Tooltip keeps overflow-hidden visual clamp while sr-only/aria-label retain full text. Design contract says supplementary-only. Next: design-owner confirmation that sighted users losing the clipped tail is acceptable, or allow overflow-y-auto for long clinical strings. | PR #1616 review findings; session 2026-08-05 | 2026-08-05 | | #242 | P2 | task | Commit approved Linux visual baselines and promote adoption not-committed → committed | VERIFIED CORRECT 2026-08-12 — re-checked against merged main during the full ledger sweep and left unchanged: Six linux/ PNGs are committed, but the adoption manifest still carries 68 `not-committed` entries — the surfaces flip is the remaining work, as stated. This stamp exists so a later reader can tell "checked and still true" from "never looked at"; the two were indistinguishable before. Baselines and provenance are DONE as of PR #1729 (branch claude/ds-adopt-visual-baselines): all six linux/ PNGs committed from ubuntu artifact visual-baseline-31251091603 (main @ bc33d414e), AWAITING_BASELINE emptied, and tests/__screenshots__/linux/provenance.json written with per-candidate SHA-256 + dimensions and an approved human review. Proven by that PR's own run: visual-junit tests=9 failures=0 skipped=0, and no visual-candidates/ directory, i.e. all six compared rather than skipped. REMAINING: only the surfaces flip to baseline.status committed. Blocked on ordering, measured 2026-08-08: validateLinuxVisualBaselineSet short-circuits on declaredPaths.length===0, so declaring files activates its rule that no non-allowlisted path may change since candidateSourceHead — and PR #1729 necessarily changed tests/design-system-adoption.test.ts, whose initialiseCandidateRepository seeded fixtures from the LIVE spec and so failed the moment AWAITING_BASELINE emptied. The two cannot land together. Next: after #1729 merges, re-capture candidates from a main run that already contains that fixture fix, then flip the surfaces against that head. Note this does not affect whether pixels compare — Playwright compares because the goldens exist on disk. | PR #1616 review findings; session 2026-08-05 | 2026-08-05 | From 3db6ba0045699772c12d6d2eff0721d64d0b9c3d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 14 Aug 2026 15:04:57 +0000 Subject: [PATCH 2/3] chore(ledger): record the third reconciliation review Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_017paT42ZVMf8jaLtkjFxdy5 --- ...2857a64df609c9722ca734364de32bf354d9092762d7a6e4786.record.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/branch-review-records/332ea83963cbf2857a64df609c9722ca734364de32bf354d9092762d7a6e4786.record.md diff --git a/docs/branch-review-records/332ea83963cbf2857a64df609c9722ca734364de32bf354d9092762d7a6e4786.record.md b/docs/branch-review-records/332ea83963cbf2857a64df609c9722ca734364de32bf354d9092762d7a6e4786.record.md new file mode 100644 index 0000000000..f159c6f610 --- /dev/null +++ b/docs/branch-review-records/332ea83963cbf2857a64df609c9722ca734364de32bf354d9092762d7a6e4786.record.md @@ -0,0 +1 @@ +| 2026-08-14 | claude/ledger-reconcile-batch-3 | be94fbbb31843f4593783b9ca388ee0526b74e84 | docs/outstanding-issues.md + inbox — reconcile the four rejected-closure corrections | Applied 4 update requests from PR #1957, no cancellations, zero live collisions. #235/#237/#238 now carry the rejected closure, its reason and a Stop rule naming the evidence class; #231 records the probe script and the #1861 adjudication. Row counts unchanged at 99 open/235 archived by design — detail rewrites, not archives. Inbox 0 pending/133 applied. | issues:reconcile --dry-run; verify:pr-local (11 completed, 0 failed); check:ledger-write-discipline | From 50a0a48a72164e251820837a0c1b18501052bef1 Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Sat, 15 Aug 2026 01:39:26 +0800 Subject: [PATCH 3/3] docs(ledger): record PR #1959 base sync review --- ...8c8d29b3a26ffae52f385cd5e9fa87be7bbcb0fe5f75c369912.record.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/branch-review-records/2cdb103223cd78c8d29b3a26ffae52f385cd5e9fa87be7bbcb0fe5f75c369912.record.md diff --git a/docs/branch-review-records/2cdb103223cd78c8d29b3a26ffae52f385cd5e9fa87be7bbcb0fe5f75c369912.record.md b/docs/branch-review-records/2cdb103223cd78c8d29b3a26ffae52f385cd5e9fa87be7bbcb0fe5f75c369912.record.md new file mode 100644 index 0000000000..d30dd131a1 --- /dev/null +++ b/docs/branch-review-records/2cdb103223cd78c8d29b3a26ffae52f385cd5e9fa87be7bbcb0fe5f75c369912.record.md @@ -0,0 +1 @@ +| 2026-08-14 | PR-1959 | 428fa8772198817e17ef6330c63f7f5e47e090b0 | PR #1959 base-preserving reconciliation review | Required base sync resolved the sole ledger conflict with main: all four inbox requests were already applied upstream; preserved main’s newer #231 evidence and retained the existing immutable historical record. | docs link check passed: 1776 repo path references resolve; Ledger inbox check passed: 12 pending request(s), 138 applied; branch-review-ledger self-test passed; Branch review ledger guard passed: 880 live table records + 1206 archived + 92 immutable; verify:pr-local unavailable: tsx/cli absent from isolated worktree (Node v24.14.0). |