Skip to content

P5 O13: execution document (web-cards, the phone) - #241

Merged
SSFSKIM merged 11 commits into
masterfrom
p5-o13-doc
Oct 28, 2026
Merged

SSFSKIM merged 11 commits into
masterfrom
p5-o13-doc

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

This PR adds O13's execution document, docs/doperpowers/plans/2026-10-27-p5-o13-web-cards.md. It is the only file changed. O13 is the desk side of keeping the phone's cards loop alive through the cutover. Desk-web keeps push and the question and permission cards. It becomes a web-cards device over RL2 in WebCrypto, and every answer carries a WebAuthn assertion.

Drafted against the code on master cb5f388 and O10's p5-o10-m7 and p5-o10-m8. It went through self-review and four rounds of doperpowers:adversarial-reviewer buildability review, with 7 → 3 → 2 → 1 findings. Every finding was verified against the code and folded in. Round 4 found nothing more of substance.

Milestones (one PR each)

  • M1: production's deploy steps go into the repo (P5 DL40). These are apps/desk-hub/deploy/production-deploy.sh and production-run.sh, proved offline. Nothing is deployed.
  • M2: the pairing code and its MAC go into apps/org-protocol. It also adds the owner-run deployment admin command (init, genesis, adopt, pair, devices, remove-device).
  • M3: the phone registers as a web-cards device. It holds a non-extractable WebCrypto key and a cards passkey, keeps a pinned org store fed over the ?app=1 registry socket, and binds push to the device.
  • M4: the phone's channel and cards client. It answers with a WebAuthn assertion in RequestAnswer's three exact forms and reseals the retained operation on retry. It needs O10 M7 and M8, including the lane A snapshot's launch.
  • M5: the cards view on the phone, side by side with DX6 cards.
  • M6: push on the v2 notice, plus the freeze's one seam (moved to MAWS).
  • M7: acceptance on staging with the owner's real phone. It also writes the owner-run production rollout brief.

Needs a ruling before it lands: residue 1 below, which roots production's org before O8. I've sent it to the architect and to remote-architecture.

Owner questions, 2026-10-28. The owner chose two of them:

  • notify only for to-human messages on the phone;
  • the pairing code travels by the Mac's clipboard.
    The recovery key question is reopened. RL DL28 keeps the key off the Mac's disk, so it is now a question of which medium the owner uses. The document is written under the recommendation, a removable volume mounted at genesis, and marks it pending.
    I settled the other three on their recommendations:
  • frozen views show one reason string;
  • nothing special happens on the phone during a cutover;
  • no second staging email.

The software root (remote layer DL28, spec PR #242). The remote layer accepts a software-keyed first root, and 3d72304 folds in its conditions. The root's end belongs to O8 and does not depend on the key class: once the app's device is a root, it revokes the deployment admin device. The other conditions:

  • the recovery key goes only to an offline destination;
  • the keys file refuses paths in sync and backup scopes, and is excluded from Time Machine;
  • a refresh command and a warning on the phone after 21 days, against the 30-day backstop;
  • confirmations read from /dev/tty;
  • a pairing fingerprint.

Residue item 9 (DL40's fold) reads as before, but the rollout it describes now includes the refresh step.

What the code showed that the section did not say

  1. Production holds no signed org state, the hub takes a genesis only from ORG_ADMIN_EMAIL's Access identity, and nothing in P5 roots production before O8's Org page; deploy/org-admin.ts refuses production by design. The phone's device entry needs a state, so O13 is the first child to need production's root: M2's admin command.
  2. O11 M3's pairing exchange stores a device's entry and leaves the MAC to the approving device, but no function in the package or the hub defines a device's MAC input (enrollmentMacInput is a machine's). M2 adds it to the package.
  3. A lane A action's context.launch is mandatory and compared for equality (O10 M7), and the lane A cards snapshot on p5-o10-m8 carries only {raised}; O10's own suites take the launch from the fake sminos's member frame, which the phone never sees. Ask of O10 M8.
  4. The hub's v2 push payload (OwnerNotice {project, machine, session, kind}) has no v, alias, title or count; today's service worker draws it as the plain "Something needs you" prompt landing on the grid.
  5. The Machine socket takes a ref (/api/machines/<ref or name>/socket), and lane B's listing and notify already use the appSessionId the sub takes, so the phone needs no name lookup to reach a machine.
  6. Hub v2 needs no Durable Object migration: wrangler.jsonc keeps v1's classes and every new table is CREATE TABLE IF NOT EXISTS.
  7. A web-cards entry may carry no stepUpPub (isDevice) and keyStorage: 'webcrypto' exists; the hub refuses a pending entry with one.
  8. The endpoint's WebAuthn origin is new URL(<enrollment's hub URL>).origin, and rpId comes from the device's entry, so the phone's passkey must be made under the hub's hostname (it is served from there).
  9. A web-cards query is refused grade for any session target (P5 DL 64, queries.ts), so recovery of a lost acknowledgement is a reseal under the same opId (a fresh gesture) or the next cards snapshot; the carry note's "add name to sminos's binding" is not needed.
  10. The hub refuses an http: push subscription endpoint, so no local push sink can receive a real push; the hub's own push is provable only on staging (the quick-tunnel sink) and on the real phone.
  11. desk-web imports nothing of org-protocol today (only desk-hub/protocol, which re-exports none of RL2/RL4/RL5); the package becomes a direct workspace dependency.
  12. The grid's waiting counts come from DX2 project summaries, which a cut-over machine no longer sends; the phone's list of waiting sessions must come from the org state's machines and each Machine socket's presence frame.

Residue for P5's Decision Log under O13

  1. The production org root and the phone's approval, before O8, are an owner-run command on the Mac, deployment admin, with its own software admin device: a software-keyed first root, which the remote layer accepts (RL DL28). Its end is O8's and independent of key class: once the app's device is a root, the app signs the successor that revokes the deployment admin device (it signs no log events and an endorsement is checked only in the step that adds its device, so revoking discredits nothing, the phone's entry included) and its key file is deleted; O15's recomposition checks that no deployment admin device is a root once the app's device is. Its keys file lives at a durable 0600 path that init refuses under /tmp, /private/tmp, $TMPDIR, a git work tree, ~/.claude, ~/Library/Mobile Documents or ~/.config/claude-secrets, excluded from Time Machine (tmutil addexclusion). The org's recovery key is written at genesis only to an offline destination the owner names (a removable volume mounted for the step, or printed once for paper), read back and checked against recoveryPub before anything is signed; only recoveryPub stays on the Mac, and the key is never on the admin key's disk or inside a backup or sync scope (the medium is the owner's, pending). refresh signs the weekly no-change successor RL §5.2 expects of an admin app, since the endpoint's 30-day backstop would otherwise stop the phone's answers; every subcommand prints the head's age and the phone's Device panel warns from day 21. Every confirmation against a deployment reads /dev/tty, so an agent's shell, which has none, can sign nothing.
  2. The pairing code (smns-pair-v1.), its MAC (smns-pair-mac-v1, length-prefixed under its own domain over the org, the member and the device entry) and the entry's fingerprint (pairingFingerprint: the first 10 base32 characters of SHA-256 over the same canonical input the MAC covers without k: the org, the member and the whole entry, its passkey's credentialId, publicKey and rpId included, as xxxxx-xxxxx; a channel-key-only fingerprint let a swapped credential match under a leaked k, RL DL28 as amended) are this child's additions to the protocol package (§A). The code travels by the Mac's clipboard, which exposes k to every process under the uid and to clipboard history, so k admits nothing by itself: the Mac command and the phone's panel both show the fingerprint, the owner compares them before y, and two entries verifying under one k are refused and the code spent (RL DL28).
  3. The lane A cards snapshot gains launch (asked of O10 M8); the endpoint never fills a web-cards act's context for it.
  4. The phone never queries: a lost acknowledgement is resealed as the retained operation (the action minus nonce, created and assertion, the ledgers' fingerprint) with a fresh gesture, or settled by the next snapshot; a done envelope's inner outcome is normalized before the card draws it. No change to sminos's RL10 binding.
    4a. The lane B request digest is mirrored in the browser (the shared module's four-rule field extraction over desk-hub/protocol's WebCrypto inputSha256, pinned byte-equal to requestDigestOf); src/shared/host/request-digest.ts stays Node's, since it hashes with node:crypto synchronously on the engine host's claim path.
    4b. Once registered, desk-web's registry socket opens ?app=1 (DL 38): state notices drive the pinned sync, listings/listing frames fill a listings store; certificates are re-read on an unresolvable signer, a push landing and the Cards view's opening, since a delegated VM's certificate advances no org version. Cut-over machines are resolved as the package's machineKeys does, entries and live certificates both.
  5. The cards passkey is a credential of its own (ES256, non-discoverable, no PRF), not the org key's PRF passkey.
  6. The v2 push notice draws without a title (RL §7.4) and lands on the cards route; a wrote notice sends the owner to MAWS (pending the owner's answer on to-human messages on the phone).
  7. desk-web imports org-protocol directly as a workspace dependency.
  8. The freeze's one seam is a capability reason, moved to MAWS, for a session whose machine the org state lists; the grid gains nothing; the machines dialog loses the machine (DL 37 accepted).
  9. DL 40's fold as built: the production scripts carry the staging mechanism with the roles swapped and run only at the owner's hand; the commit confirmation (--confirm <sha8> equal to the checkout's HEAD, HEAD at origin/master) is the deploy's alone, the runner's mutating steps announce their change and the admin command asks before it signs; the checkout step lives at a durable path, never /tmp; access-sync waits for O14's first production machine, since the genesis changes no membership.
  10. The phone stays on the hub relay (DL 39): no direct dial, no endpoint record read.
  11. The live acceptance runs the real endpoint module in-process on staging over the suites' fake engine host and fake sminos with the owner's real phone; the run with mawsd on the VM is O10 M11's and O14's.
  12. No surviving desk-web view renders transcript rows, so the engine's answeredWithoutRequest: true rows (doperpowers PR mawsd spine: a command that waits on the engine host wakes it from its park #411) need nothing in O13; the frozen session view, which does render them, is not O13's to change.

Depends on O10 M8: the lane A cards snapshot gains launch. I've asked the O10 executor to add it before M8 lands; otherwise O13 M4 adds it.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
The lane B digest is mirrored in the browser (request-digest.ts is Node's); the lane A snapshot's launch is an owned dependency; the lane B request id is the item's nested one; the registry socket opens ?app=1 for state notices and listings; cut-over machines include certified ones; access-sync waits for O14's first production machine; the push clause's second direction stands on the hub's suite.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
admin adopt and a deterministic genesis; the commit confirmation is the deploy's alone; certificates re-read without a state change.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Retry reseals a retained operation; a done envelope's inner outcome is normalized before the card view sees it.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
… review has converged

A lane B answer is one of three exact RequestAnswer forms: Allow with scope once, Deny with no scope, a question with its answers.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-28T01:02:54.819648Z a20cc68 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…orary or in-repo keys path

The architect's ruling on #241: retiring the software admin device needs
the enclave device O8 brings, so the step is O8's acceptance, not O14's
final brief. The window's bounds become init's checks.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ecovery key file); the other three settled

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
The set end is O8's and independent of key class (revoke, not retire); the recovery key goes to an offline destination named at genesis and is checked back (medium pending the owner); init refuses the sync and backup scopes and excludes the file from Time Machine; refresh, the head's age and the Device panel's 21-day warning against the 30-day backstop; confirmations from /dev/tty; the pairing fingerprint and the two-entries refusal.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…L28 amended)

#242's review: a fingerprint over channelPub alone matched an entry whose
step-up key or passkey a leaked k let an attacker swap. It now hashes the
MAC's own input without k, with a swapped-credential vector.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit 1ce67af into master Oct 28, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…n's software first root until O8, which revokes it; O8, O13, O15, tracking and risks updated

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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