Skip to content

Studio keeps a visitor's work sealed to their Prism ID (FA-93) - #238

Merged
humuhumu33 merged 7 commits into
mainfrom
private-workspace-ux
Nov 16, 2026
Merged

humuhumu33 merged 7 commits into
mainfrom
private-workspace-ux

Conversation

@humuhumu33

Copy link
Copy Markdown
Contributor

Why

A visitor's apps, chats, files, versions, prompts and settings sat in this browser's IndexedDB in the clear. Anything with access to the browser profile could read them, and they stayed on a device the visitor had removed from their Prism ID. FA-91 proved the kernel's decisions for a private workspace, but nothing asked them yet.

What the visitor experiences

Nothing, until something changes. Each record is sealed as it is saved and opened as it is read, with no step on the visitor's part. Then they get one sentence, each a statement of FoundryExperience.lex.tex (workspaceWords):

  • The one-time move: "Your work is now sealed to your Prism ID. Only your devices can open it."
  • A removed device: its work, built previews and covers are cleared, and it starts fresh, saying so.
  • Full storage, an altered record, or a key that hasn't arrived: a plain sentence with one next step. A workspace that can't open offers Try again.
  • The Prism ID card reads "Your ID and your work, sealed on your devices".

How (FA-93)

  • The key. The Prism frame's workspace key (UOR-Foundation/template#95, FR-04) opens only on a device of the visitor's Prism ID. The frame carries the key when this browser joins the ID from another device.
  • Sealing. studio/shell/inference.js (workspace) wraps the one database handle the host gives every writer. Each value is sealed with Hologram's seal_bytes (ChaCha20-Poly1305) on put and opened with open_bytes on read, inside the writer's own transaction, because the cipher is synchronous. No writer changed. The sealed bytes record the record's place, so a copied record doesn't open elsewhere.
  • Left plain: what the service worker reads. That is the grants, published .holo bytes (checked by their address) and the audit.
  • The kernel decides every step: open, the one-time move, and each read and save. Studio asks the guest it pins.
  • The frame. Studio bundles the frame frame.lock pins (re-pinned to UOR-Foundation/template@975f95c; UOR-Foundation/template#96 fixed the template's own lock). It works offline and asks no network. The live frame loader in the sidebar is gone, and the shell keeps one frame for the page.
  • The kernel pin. This merges UOR-Foundation/foundry#233 (blake3:f1c50fb2) with a merge commit, so KERNEL_REV's commit stays reachable. The guest Studio shipped before answered invalid to every workspace request.

Evidence

  • private_workspace_fa_93 runs in_tab_kernel_verdict.test.mjs, which builds every request with Studio's own workspaceRequest and openFacts and asks the pinned guest.
  • storage_request_browser.mjs (Studio CI, Chromium) runs the built shell's own inference.js over the real guest, cipher and frame. It checks:
    • the move seals in place and opens as written, dates included;
    • new writes are sealed;
    • altered, planted and copied records are refused and never returned;
    • the grant stays plain;
    • a removed device is cleared, previews included, and a fresh workspace opens.
  • shell_ui.test.mjs holds the six sentences to the spec.
  • Planted defects (no sealing, no place check, no removed fact) were each rejected. They are recorded in verification/private-workspace.md.
  • Nine browser tests now write through workspace(), the handle Studio uses, instead of the plain db(). These run only in Studio CI, not locally (they need the full lane).

Ratchet

Upstream Dyad's own tests (src/__tests__/ and one test that read its fixtures) are removed. Foundry never ran or typechecked them, and VENDORED.md records the removal. Net: −14,701 counted lines.

Not covered

  • Other devices: the work isn't carried to the visitor's other devices, so a lost browser still loses what it alone kept.
  • Keys: IndexedDB keys (app ids, file paths) stay readable, because writers find files by key range.
  • Previews and covers: they stay plain while the device belongs to the ID, since the service worker serves them without it.

🤖 Generated with Claude Code

github-actions Bot and others added 7 commits November 16, 2026 20:04
Built and proved by the locked SDK in the kernel pin workflow, from 3144154.
Every record of the visitor's work is sealed with Hologram's seal_bytes as it is
stored and opened as it is read, under the workspace key the Prism frame keeps for
this origin (UOR-Foundation/template FR-04), which only a device of their Prism ID
opens. The cipher is synchronous, so the one database handle the host hands its
writers seals inside their own transactions and no writer changed. Foundry's Prism
kernel decides every step: open, the one move of the work kept before, and each read
and store. A removed device's work, previews and covers are cleared. The visitor
hears one sentence when something changed, each a statement of the experience module.

Studio bundles the frame frame.lock pins (now UOR-Foundation/template@975f95c), so it
opens offline and asks no network, and runs the kernel guest built from this model
(the pin of #233, merged here so its commit stays reachable).

Upstream Dyad's own tests, which Foundry never ran or typechecked, are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… visit opens fast

The Performance gate refused a first visit's mobile LCP of 31 s: opening the workspace
waited for the holospaces wasm. The core, loaded at start already, now provides
hologram-space's PayloadCipher seam with ChaCha20-Poly1305 (13 KB), and a published
.holo is recognised by its ref instead of by hashing it. Also: the perf gate measures
the entry the page loads, not the Prism frame's; the experience module's lost brace
after the Theater merge; rustfmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the settings gate now names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ich the workspace now asks on load

On each load after the first the frame asks stitch's relay whether this device was
removed, since the workspace opens only for a device still the ID's. The relay topics
are hashes of secrets only the ID's devices hold; isPrismIdRelay admits exactly those.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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