Skip to content

Add guard against new duplicate migration stems - #152

Merged
BigSimmo merged 2 commits into
mainfrom
bigsimmo-skill-recommendations-run
Jul 2, 2026
Merged

Add guard against new duplicate migration stems#152
BigSimmo merged 2 commits into
mainfrom
bigsimmo-skill-recommendations-run

Conversation

@BigSimmo

Copy link
Copy Markdown
Owner

Summary

  • Add a regression guard in tests/supabase-schema.test.ts that scans migration stems and fails if any new duplicate stem names are introduced.
  • Preserve the known legacy duplicate stems via an explicit allowlist so historical migration history is unchanged.
  • Reduce migration-drift and replay-noise risk without editing existing migration files.

Verification

  • npm run verify:cheap
  • npm run verify:ui when UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changed
  • npm run verify:release before release or handoff confidence claims
  • npm run format:check
  • npm run check:production-readiness when clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changed
  • npm run check:deployment-readiness when deployment startup, hosting, or rollout behavior changed
  • npx vitest run tests/supabase-schema.test.ts

Clinical Governance Preflight

N/A - test-only migration hygiene guard; no ingestion, answer generation, clinical output, privacy, or production-environment behavior changed.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy)
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

  • Known legacy duplicate migration stems are intentionally allowlisted: api_rate_limits, audit_logs, audit_logs_service_role_policy, indexing_reliability_recovery, rag_queries_retention.

BigSimmoand others added 2 commits July 2, 2026 17:27
@BigSimmo
BigSimmo enabled auto-merge July 2, 2026 10:42
@BigSimmo
BigSimmo merged commit 1251c5d into mainJul 2, 2026
4 checks passed
@BigSimmo
BigSimmo deleted the bigsimmo-skill-recommendations-run branch July 2, 2026 16:31
BigSimmo pushed a commit that referenced this pull request Jul 30, 2026
Fourth ledger id collision on this branch: main allocated #149
(check:installed-lock-parity only compares seven top-level packages) and #150
(CodeRabbit reviewed none of a full day's PRs) while this branch held
#149-#151 for the answer-home notice capture.
main's rows are kept and the incoming rows renumber per the ledger's own
rule: #151 adopt a consolidated answer-home notice block, #152 answer mode
ships no verify-before-use caveat, #153 verify:pr-local exits 0 when its
build step refuses to run. Their three cross-references and the marker (154)
follow.
check:outstanding-issues: 151 rows (58 open, 93 archived), unique ids,
next-id=154 above the highest, no ids deleted from base 4312a21.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPyFcMfn1jMmphr6AqiWBg
BigSimmo added a commit that referenced this pull request Jul 30, 2026
…closed (#1508)
PR #1490 was closed unmerged, so none of its content reached main. Confirmed by
content rather than id: main's #149 and #150 are unrelated rows (installed-lock
parity and CodeRabbit rate limits) that happened to take those ids, so an
id-presence check reported them as landed when they were not.
- #151 corrects the earlier claim that CI is unreadable. The PAT lacks Checks:
read but has Actions: read, so workflow runs are queryable; the endpoint that
looked authoritative returns an empty result rather than an error, which is
what made it read as a hard wall.
- #152 re-lands the at-risk worktree inventory together with the four
preservation snapshots taken on 2026-07-31, which existed in no other record.
- #153 archives the pre-commit fail-open as resolved by PR #1494.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
BigSimmo pushed a commit that referenced this pull request Jul 30, 2026
#151 was written before the word-only pass existed, so it referenced only
/mockups/warning-consolidation and recommended 02 + 01. A memory row that
lags the work is the failure mode this ledger exists to prevent, so it now
also records:
- /mockups/warning-line, the words-only study (six variants A-F), with the
line counts measured from the rendered DOM rather than asserted
- the constraint that matters: nothing fits one line on a 390px phone while
the pinned APP-5 sentence stays verbatim, because 45 characters of
obligation plus the 27-character link exceeds the ~60 available at 11px
- D as that study's recommendation, and why F fits better but needs the
same privacy sign-off as #152 plus a tests/privacy-ui.test.ts update
- that PR #1437 was closed unmerged as a deliberate pause during an
owner-authorized ordered merge sweep, with the branch preserved
Evidence and the original diagnosis are left intact; this extends the Detail
and Next rather than rewriting the row.
check:outstanding-issues: 151 rows (53 open, 98 archived), unique ids,
next-id=154 above the highest, no ids deleted from base db50738.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPyFcMfn1jMmphr6AqiWBg
BigSimmo pushed a commit that referenced this pull request Jul 30, 2026
Adds /mockups/answer-home-proposal, the concrete proposal that came out of
the two exploratory studies. Drawn as before/after of the whole hero at phone
390 and desktop 1440, not of the notice alone, because the change moves
information between two places rather than only deleting a line.
Six changes, each with its rationale on the page:
1. Remove the "Searches indexed clinical sources · Clinical Guide library"
badge — accent-blue semibold 14px, the loudest element on the screen,
and a capability claim rather than a safety statement.
2. Remove the ShieldCheck. A shield-and-tick reads as "verified", which is
exactly what the PT-06 comment above ModeHomeVerificationFooter in
answer-status.tsx forbids the pre-query copy from asserting. The wording
obeys that comment; the icon undoes it. It also sat ~40px from a
ShieldAlert carrying the opposite meaning.
3. Move "Clinical Guide library" into the existing subtitle, keeping the one
genuinely useful fact without a second voice. Ordinary product copy
(ui-copy.ts answerEmptyState.subheading), not pinned by any test.
4. Remove the ShieldAlert; hierarchy comes from weight instead.
5. Join the privacy link to the same line — it previously wrapped alone with
no lead-in and read as navigation.
6. Add "Verify answers against the cited source." — labelled on the page as
needing governance sign-off, per #152.
Measured on the rendered page rather than asserted: the proposed notice is one
line at desktop width and two at 390px, because the pinned 45-character
obligation plus the 27-character link exceeds the ~60 characters available at
11px. The phone subtitle also gains a line where the footer loses two.
Both pinned strings appear verbatim on both sides. No production surface
changes; mockups 404 in production.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NPyFcMfn1jMmphr6AqiWBg
BigSimmo pushed a commit that referenced this pull request Aug 12, 2026
…e-local rows
Archived: #179 (compact catalogue restored AND gated at build-therapies-index
.mjs:240-244).
Re-measured: #213 (only 3 empty catches left), #180 (re-confirmed live with
exact source/target lines), #275.
Annotated four machine-local rows (#152, #169, #236, #260) so a cloud session
cannot mistake a fresh container for evidence and close them wrongly.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017paT42ZVMf8jaLtkjFxdy5
BigSimmo added a commit that referenced this pull request Aug 13, 2026
… queue text (#1890)
* docs(issues): retire 22 non-actionable ledger rows and correct the #231 queue text
A yield review of all 114 open rows against current main. The queue had become
roughly 60 tasks and 50 notes; this removes the notes and fixes two places where
the ledger was actively misdirecting.
The correction that matters most: the recommended-queue entry for #231, the top
clinical P1, told every session to "measure and fix the fast-route budget /
generation timeout" — an approach #231's own detail records as tested and
rejected, because the decisive 40-second probe completed generation in 25.272s
with route_deadline_exceeded=false and still failed quality. The session-start
hook prints the queue, not the row, so the refuted text was the text agents read.
Closed 22 rows:
- #304 was already done on main (commit d182844 refreshed the ranking
snapshot; generatedAt is 0 days old, not 2026-07-20), yet sat in the queue
advertising a freshness fuse that is not armed.
- #241#244#272#294#300#257 were standing cautions whose own text says
"no action". Each one's knowledge now lives in the code it protects, so
closing the row loses nothing.
- #196-#200 are five steps of the disaster-recovery checklist that is
canonical in docs/operator-backlog.md, with no trigger until a restore.
- #86#188 were index rows over children that are individually findable.
- #250#253#254 were superseded; #250 and #253 say so themselves.
- #156#301#152#236#260 merged into #168, #292 and #169 respectively —
each pair or group was one problem recorded two to four times.
Demoted 20 rows with a stated reason (premature ops for a single-user
prototype, upstream-blocked, measurement-gated, or design-system adoption
competing with an open clinical P1). The Pri cell is unchanged because the
writer has no --pri flag — which is now #313.
Added three rows for mechanism gaps this sweep exposed: rows outliving their
own completion (#312), the missing --pri flag (#313), and the queue being able
to contradict the row it cites with no guard (#314).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DuYJz8hauCsCdx8r4fXiZU
* docs(ledger): record the ledger yield review handoff
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DuYJz8hauCsCdx8r4fXiZU
* Keep recovery work visible and pin forced colors
---------
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto 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.

1 participant

@BigSimmo