Skip to content

feat(quickstart): end on the person's own Seal, in an offline viewer - #1437

Draft
abrichr wants to merge 4 commits into
mainfrom
feat/quickstart-own-seal
Draft

abrichr wants to merge 4 commits into
mainfrom
feat/quickstart-own-seal

Conversation

@abrichr

@abrichr abrichr commented Oct 20, 2026

Copy link
Copy Markdown
Member

Draft, paused mid-task. Built on #1408, which is now merged; this branch has not been merged with main since.

What it does

  • packages/seal-view (@openadapt/seal-view, MIT): openadapt.ai's Seal page (openadapt-web#587 at 23409443) extracted into a shared package. The site-specific parts now come in as props. The rings read any program graph, a pure-JS Ed25519 check covers browsers whose WebCrypto lacks Ed25519, and sealPageProps builds the page from a run's files as data.
  • Offline viewer: one HTML file built with Preact, with the program map and styles inlined. It is 202,270 bytes (65,703 gzipped), against a 262,144-byte budget. Its CSP allows no requests. The launcher wheel ships it as openadapt/seal_view/viewer.html.
  • Quickstart finale: the stopped run is sealed too. The finale writes run-1/seal.html and run-broken/seal.html, opens the first one when a display is available, and prints Your Seal: <path> followed by See real Seals from OpenEMR runs: https://openadapt.ai/seals.
  • openadapt seal view RUN_DIR [--keys FILE] [--bundle DIR] [--no-open]: writes and opens the Seal page for any sealed run.
  • Tests: tests/test_seal_view.py uses a real quickstart run as its fixture. It opens the pages from file:// in Chromium and checks that the Seal is valid, that a tampered copy fails with subject_mismatch or bad_signature, and that the page makes no network requests (a Playwright request listener). It also snapshots the viewer's size. Vitest covers the package's libraries. A new seal-view job in packages.yml runs the browser tests with the browser required.

Verified locally

  • The launcher suite: 664 passed, 8 skipped.
  • tests/test_seal_view.py: 15 passed.
  • Vitest: 8 passed.
  • node packages/seal-view/scripts/build.mjs --check passes.
  • A real openadapt quickstart run recorded in VHS ends on the Seal lines. That take predates the fix that picks run 1's page; it showed run 3's.

Not done

  • Merging with main; CI has not run yet.
  • The final recording: the terminal take again, plus the browser half.
  • Porting the Seal-page session's newer commit 2ae9d49d (full ProgramWorkbench in SealMap, InspectorSeal, MiniIris, backToSeal, irisSeed on run strips).
  • A CAPABILITIES.md row.
  • The openadapt-web follow-up issue for importing the package.
  • Don't release until https://openadapt.ai/seals is live; the finale links to it.

🤖 Generated with Claude Code

abrichr and others added 4 commits October 20, 2026 12:35
Move openadapt.ai's Seal page (openadapt-web#587) into a shared package,
packages/seal-view (@openadapt/seal-view, MIT): the Seal art, the replay, the
tamper demo and every check (offline Seals, run authorizations, Rekor anchors,
RFC 3161 timestamps), with the site-specific parts passed in as props. The
rings now read any program graph, and fall back to each step's own record
checks when a run has no governed requirements (the quickstart's case).

The package builds one HTML viewer with Preact, the program map and the styles
inlined: 202,139 bytes (65,614 gzipped), budget 262,144. Its CSP allows no
requests. The launcher ships it as openadapt/seal_view/viewer.html, and
openadapt.seal_view embeds a run's exact files in it.

The quickstart now seals the stopped run too, writes run-1/seal.html and
run-broken/seal.html, opens the first one when a display is available, and
prints "Your Seal: <path>" and then the openadapt.ai/seals line.
`openadapt seal view RUN_DIR` writes and opens the page for any sealed run.

Tests: tests/test_seal_view.py opens a real quickstart run's pages from
file:// in Chromium (valid, tampered, no requests) and snapshots the viewer's
size; the new seal-view job in packages.yml runs it with the browser required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The full program workbench under the Seal (sections, inspector, evidence
lanes, stop rules, tour), with a Seal card at the top of the inspector while
it shows the step the Seal certifies, and Back to the Seal. Timestamps now
name their token file (seal.tsr), checked by its SHA-256; the viewer and
openadapt.seal_view carry it. The witness checks are tested on a published
OpenEMR Seal's real Rekor entry and Sigstore timestamp. The viewer is
212,468 bytes (68,661 gzipped).

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

This branch has not been deployed

No deployments
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