From 9c2a636c5d84692ae176e4b76316ddb69969d97b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 18 Aug 2026 19:47:56 +0000 Subject: [PATCH] docs(issues): queue the two risk-classifier gaps PR #2145 exposed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both were found on a change that removed the Therapy production gate, and neither is a defect in that change — they are gaps in what the classifiers notice, so the next similar change gets the same reduced scrutiny. - `pr-policy` returned `clinicalRisk: false` for a diff touching the two modules that decide whether 205 clinically-unreviewed records are reachable in production, because its `src/lib/` patterns key on filenames and neither `app-modes` nor `therapies` matches one. No governance preflight was enforced; both PRs completed one voluntarily, which is precisely the fragility. - CI change-scope recorded `UI_CHANGED: false` and skipped Production UI for a change that alters which modes render for every user, because the UI patterns cover `src/app/`, `src/components/`, `public/` and the Playwright specs but not `src/lib/`. Browser coverage came only from a local run that no policy required. Each carries a stop rule against the obvious over-correction: do not widen clinical-risk until ordinary UI work trips the preflight, and do not make all of `src/lib` UI scope — that would put a 20-minute Chromium gate on every library change and reintroduce the documented cancellation waste. Co-Authored-By: Claude Opus 5 --- .../25e8c062-8fa0-46be-844a-03245fc9857b.json | 13 +++++++++++++ .../77c314b4-f2d8-4682-a08e-0f34de180f5e.json | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 docs/outstanding-issues-inbox/25e8c062-8fa0-46be-844a-03245fc9857b.json create mode 100644 docs/outstanding-issues-inbox/77c314b4-f2d8-4682-a08e-0f34de180f5e.json diff --git a/docs/outstanding-issues-inbox/25e8c062-8fa0-46be-844a-03245fc9857b.json b/docs/outstanding-issues-inbox/25e8c062-8fa0-46be-844a-03245fc9857b.json new file mode 100644 index 0000000000..755f0b0119 --- /dev/null +++ b/docs/outstanding-issues-inbox/25e8c062-8fa0-46be-844a-03245fc9857b.json @@ -0,0 +1,13 @@ +{ + "version": 2, + "id": "25e8c062-8fa0-46be-844a-03245fc9857b", + "createdOn": "2026-08-18", + "action": "add", + "payload": { + "pri": "P2", + "type": "issue", + "summary": "pr-policy classifies the switch controlling whether unreviewed clinical content reaches production as clinicalRisk false, so no governance preflight is enforced", + "detail": "Found 2026-08-18 on PRs #2145 and #2150, both of which removed the Therapy production gate. classifyPullRequestFiles in scripts/pr-policy.mjs returned clinicalRisk false for a diff touching src/lib/app-modes.ts and src/lib/therapies.ts - the exact two modules deciding whether 205 clinically-unreviewed therapy records are reachable by users in production. Its clinicalRiskPatterns match src/lib/ only when the filename contains auth, permission, privacy, security, rag, retriev, rank, search, answer, clinical, citation, source, document, upload or download; app-modes and therapies match none. The data patterns (src/data, data, public/therapy-compass-data) match the records themselves but not the code gating their reachability. Both PRs completed a governance preflight voluntarily, which is exactly the fragility: the next such change may not. Consider matching on reachability/exposure surfaces, or treating any diff that changes an app-mode devOnly flag or a review-status filter as clinical-risk. Stop rule: do not widen the patterns so far that ordinary UI work trips the preflight - the classifier comment already warns that presentation files are not clinical-risk merely for living under a clinically-named directory, and that judgement is correct.", + "issueUlid": "01M0B6JK3WP5542X784CMAJ002" + } +} diff --git a/docs/outstanding-issues-inbox/77c314b4-f2d8-4682-a08e-0f34de180f5e.json b/docs/outstanding-issues-inbox/77c314b4-f2d8-4682-a08e-0f34de180f5e.json new file mode 100644 index 0000000000..14da2c6216 --- /dev/null +++ b/docs/outstanding-issues-inbox/77c314b4-f2d8-4682-a08e-0f34de180f5e.json @@ -0,0 +1,13 @@ +{ + "version": 2, + "id": "77c314b4-f2d8-4682-a08e-0f34de180f5e", + "createdOn": "2026-08-18", + "action": "add", + "payload": { + "pri": "P2", + "type": "issue", + "summary": "CI change-scope reports UI_CHANGED false for changes that alter which modes render, so Production UI is skipped on user-facing work", + "detail": "Found 2026-08-18 on PR #2145. The CI run recorded UI_CHANGED false, UI_RESULT skipped and UI_FAST_RESULT skipped for a diff that removed devOnly from the therapy-compass mode and switched off the production record filter - a change that alters which modes appear in the shell for every user. Production UI therefore never ran. The uiPatterns in scripts/pr-policy.mjs and the equivalent scope detection in scripts/ci-change-scope.mjs match src/app/ (non-api), src/components/, src/styles/, public/, tests/ui-*.spec.ts and playwright config; the diff touched only src/lib/app-modes.ts, src/lib/therapies.ts and unit tests, so nothing matched. PR #2150 supersedes that change and adds a visible component, and would still not trip the classifier for its src/lib half. Browser coverage for both was supplied only by a local verify:ui run (447 passed), which no policy required. Consider treating src/lib/app-modes.ts as UI scope, since it is the mode registry the shell renders from, and auditing which other src/lib modules feed rendering. Stop rule: do not make all of src/lib UI scope - that would run a 20-minute Chromium gate on every library change and reintroduce the cancellation waste documented in docs/testing.md.", + "issueUlid": "01M0B6K3Y20HFDWD4T5SVZGC1P" + } +}