Skip to content

Fix the lint trip from committed Cloudflare output; add the pilot-readiness workflow - #12

Merged
4waiz merged 6 commits into
mainfrom
feat/pilot-workflow
Sep 28, 2026
Merged

4waiz merged 6 commits into
mainfrom
feat/pilot-workflow

Conversation

@4waiz

@4waiz 4waiz commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

The lint failure

Commit 9fb4e96 tracked 1,437 files of .open-next/ build output and the SQLite state in .wrangler/. main stopped tracking them in 8e22104, and 05b5cc2 taught ESLint to skip them, but any branch cut in between still carries both the files and the old ESLint config. On ff30ac2 (the one-screen story branch), eslint . reports 363 errors and 11,402 warnings, every one inside .open-next/. On main and on this branch it reports none.

If your local branch predates 8e22104, merge main (or run git rm -r --cached .open-next .wrangler) and lint passes.

This PR makes sure it cannot come back quietly:

  • ESLint declares generated directories with globalIgnores; TypeScript excludes .open-next/.wrangler, whose .d.ts templates **/*.ts was pulling in.
  • npm run verify:tree, now the first gate of npm run verify, fails with the exact git rm --cached command if build output, node_modules, .env files or Wrangler secrets are ever tracked.
  • CI (.github/workflows/ci.yml) runs every gate, the unit tests and the Cloudflare Worker build on each push to main and each PR, so the lint step is automated rather than remembered.

Pilot readiness

Builds the seven-point roadmap into the workspace:

  1. Review workflow. Every case moves through six recorded steps (evidence updated, records matched, owner assigned, decision documented, follow-up approved, case closed). It has a named owner, a review deadline by priority with one-time escalation to the service lead, decisions Refer to genetics / Needs further evidence / No action with a required rationale, follow-ups approved by someone other than their proposer, and closure rules. Four demonstration roles (reviewer, service lead, data steward, read-only sponsor) enforce separation of duties in state and in the UI. Case histories and the audit trail export as CSV/JSON.
  2. Explainable alerts. A What changed? panel shows ClinVar's reading then and now (its own words, with links), every archived checkpoint, VariantPulse's change type and priority labelled as inference, how each record was matched, conflicts and limitations, and data freshness including the last successful live read. It downloads as an evidence snapshot.
  3. Silent pilot (/pilot). Silent mode holds patient-facing follow-ups, letters and exports. A retrospective replay runs ClinVar's archived releases: 4 open alerts by Jan 2024, 7 by Jan 2025, 12 by Sep 2026. Metrics are computed only from adjudications entered or loaded from a reference set, and success criteria stay unset until agreed. No figure is supplied.
  4. Data onboarding (/onboarding). Row-by-row validation of a structured file (national-ID-shaped or personal keys, GRCh37, HGVS, identifier conflicts, transcript versions, duplicates, unmonitored variants), with a report, an impact preview and a synthetic sample file. The Sources page lists integrations honestly (built and tested vs not built) instead of badges.
  5. Trust & governance (/governance). Hosting options, a controls matrix, the external data-flow register including AI services with their live status, an AI inventory, limitations, human oversight, session deletion, and the package as Markdown. It states no compliance.
  6. Regional evidence. A coverage table that shows absence, full detail for both regional signals (they previously rendered empty), a corrected summary, and a source register separating live, bundled and curated content, each with its reuse status.
  7. Oversight (/oversight). Open, undecided and overdue cases, turnaround, reviewer workload, a deadline forecast, and referral and letter tracking.

Also:

  • "Improve with AI" on a patient letter no longer sends the record reference, test date, team or clinician to the model. Placeholders go out and the facts are restored after the checks.
  • Removed dead code: the unused story graph, the three.js helix with its 1 MB CC BY-NC model (not licensed for commercial use), and 47 packages.
  • Fixed demo mode being described as a failed live read, added per-page titles, and corrected "1 hours" to "52 minutes".

Verification

  • npm run verify: tree, types, lint, data, history and contrast all pass.
  • npm test: 168 tests pass (78 new: workflow, roles, onboarding, pilot, explainability, governance, letter redaction).
  • npm run cf:build: every route returns 200 in local workerd, including live ClinVar reads.
  • Browser QA at 1440, 1366 and 390 px: no horizontal overflow on any route. The full workflow runs end to end (take ownership, refer, propose, approve as service lead, close), and metrics compute from adjudications.

An independent review of the branch found two serious workflow bugs, both fixed in c262ba5 with tests:

  • a follow-up proposed by the service lead could never be approved, so the case could never close;
  • amending a decision left the old decision's follow-ups in force.

The same commit keys session state by variant rather than by positional case ID, runs demo-mode deadlines from the session instead of the snapshot date, gates session deletion, and tightens import validation.

Deployed to https://variantpulse.kanbanstudios.ae from this branch (Worker version 5c1deee8; the previous production version 3bd2359b is the rollback target: npx wrangler rollback 3bd2359b-dab3-49ee-aadd-8df28c843ab5).

🤖 Generated with Claude Code

4waiz and others added 6 commits September 28, 2026 21:38
Commit 9fb4e96 tracked 1,437 files of .open-next/ build output and the
SQLite state in .wrangler/. main stopped tracking them in 8e22104 and
05b5cc2 taught ESLint to skip them, but any branch cut in between still
carries both the files and the old config: on ff30ac2, `eslint .` reports
363 errors and 11,402 warnings, every one of them inside .open-next/.

- ESLint: generated directories are declared with globalIgnores, so they
  are skipped whichever way lint is invoked.
- TypeScript: .open-next/ ships .d.ts templates that `**/*.ts` pulled
  into the program; they are now excluded.
- verify:tree: a new first gate in `npm run verify` that fails, with the
  exact `git rm --cached` fix, if build output, node_modules, .env files
  or Wrangler secrets are ever tracked again.
- CI: a GitHub Actions workflow runs every gate, the unit tests and the
  Cloudflare Worker build on each push to main and each pull request, so
  the lint step is automated rather than remembered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge that kept the hero-helix home page left the earlier story-graph
home, the three.js helix and the evidence pipeline without a single
importer. The helix also shipped a 1 MB glTF model licensed CC BY-NC,
which does not permit the commercial use a pilot would be.

Removes those five modules, the model, and framer-motion, recharts,
three and @types/three, none of which anything else used (47 packages).
The lockfile keeps every Linux native binary CI needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Improve with AI" sent the filled template to the Claude API, so the
record reference, the month of the test, the ordering team and the
signing clinician all left the workspace, contradicting the README's
claim that only variant identifiers ever do.

The letter is now redacted before it is sent: those four facts become
{{REFERENCE}}, {{TEST_DATE}}, {{TEAM}} and {{CLINICIAN}} in both
languages, the prompt tells the model to copy each placeholder exactly,
and the real values go back in before the existing checks run. A reply
that drops, mangles or invents a placeholder falls back to the template.
The gene name is still sent: it names a variant, not a person.

Tests prove the request body carries none of the four facts and that a
placeholder reply round-trips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Builds the pilot-readiness roadmap into the workspace.

Review workflow
- Six steps on every case, each with who and when: evidence updated,
  records matched, owner assigned, decision documented, follow-up
  approved, case closed.
- A named owner and a review deadline by priority (7/14/30/60 days,
  placeholders a pilot agrees), with one-time escalation to the service
  lead when an undecided case passes it.
- Decisions become Refer to genetics, Needs further evidence (holds the
  case open) and No action, each with a written rationale; amendments
  are appended. FHIR observations turn final only on a referral.
- Follow-ups are proposed from the decision and approved or declined by
  someone other than the proposer; a patient letter exists only through
  an approved letter follow-up. Closure needs a settled decision, nothing
  pending approval and a note, from the owner or the service lead.
- Four demonstration identities (reviewer, service lead, data steward,
  read-only sponsor) enforce these rules in state as well as in the UI,
  and every action carries its actor and role into the case history and
  the audit trail, both exportable.

Explainable alerts
- A "What changed?" panel on each case and variant: ClinVar's reading
  then and now in its own words with links, every archived checkpoint,
  VariantPulse's change type and priority labelled as inference, how
  each record was matched, conflicts and limitations, and data
  freshness, including the last successful live read. It downloads as
  an evidence snapshot.

Silent pilot, onboarding, oversight, governance
- /pilot: silent mode holds patient-facing follow-ups, letters and
  exports; a retrospective replay of ClinVar's archived releases (4
  alerts by Jan 2024, 7 by Jan 2025, 12 by Sep 2026); metrics computed
  only from adjudications entered or loaded from a reference set, and
  success criteria unset until agreed. No figure is supplied.
- /onboarding: row-by-row validation of a structured file (national-ID
  or personal keys, GRCh37, HGVS, identifier conflicts, transcript
  versions, duplicates, unmonitored variants) with a report, an impact
  preview and a synthetic sample carrying seeded problems.
- /oversight: open and overdue cases, turnaround, reviewer workload, a
  deadline forecast, referrals and letters.
- /governance: hosting options, a controls matrix, the external
  data-flow register including AI services and their live status, the
  AI inventory, limitations, oversight, session deletion, and the whole
  package as Markdown. It states no compliance.

Accuracy fixes found on the way
- Regional: the summary counted CTGA agreement against signals that
  have no CTGA record, and those two signals rendered with no detail;
  both fixed. Adds a coverage table that shows absence, and a source
  register separating live, bundled and curated content with its reuse
  status.
- Sources: bundled data was labelled Connected, and integrations read
  like badges; now an honest readiness list.
- Demo mode was described as a failed live read on several pages.
- Per-page titles, grouped navigation, "52 minutes" not "1 hours".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README now covers the six-step review workflow, the pilot pages, the
six verify gates and CI, how to deploy to Cloudflare, and an accurate
account of what leaves the workspace. Drops the credit for the removed
3D model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A follow-up proposed by the service lead could never be approved: the
  lead was the only approver and nobody approves their own proposal, so
  the case could never close. The lead no longer proposes follow-ups,
  and any proposer can now withdraw one nobody has approved yet.
- Amending a decision left the old decision's follow-ups in force: a
  referral approved before an amendment to "No action" still released
  the patient letter, and a "No action" notification let a later
  referral close. Each follow-up now records the decision it serves; an
  amendment supersedes those still open, and stage, closure, the letter
  and the journey count only the decision in force. A referral decision
  now needs an approved genetics referral, not just any follow-up.
- Case state was keyed by case ID, which is a position in the priority
  order, so a live resync that reordered the queue could move an owner
  or a decision onto another variant. It is keyed by variant now.
- Demo-mode deadlines ran from the snapshot's fixed date, so from
  2 October every new session would escalate the lead case on load.
  Deadlines now run from when the session first sees the case.
- Deleting session data was open to every role; it now needs the
  service lead or the data steward.
- Import validation: a row whose unquoted comma shifts its fields is
  rejected instead of misread; line numbers are physical lines; the
  delimiter comes from the first non-empty line; c.5266dupC-style
  notation, GRCh38.p14 and versioned VCV accessions are read; a
  zero-padded record key is no longer taken for a phone number; and a
  report dated today is judged by the reader's own calendar.
- Silent-mode wording says what is held (patient contact, exports to
  hospital systems) rather than claiming nothing leaves the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@4waiz
4waiz merged commit ef15ca1 into main Sep 28, 2026
1 check passed
@4waiz
4waiz deleted the feat/pilot-workflow branch September 28, 2026 19:25
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.

1 participant