Skip to content

P5 O14: execution document (cutover) - #249

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

SSFSKIM merged 11 commits into
masterfrom
p5-o14-doc

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

This PR adds O14's execution document, docs/doperpowers/plans/2026-10-27-p5-o14-cutover.md, and changes nothing else. O14 is the cutover on the desk side: each machine moves to mawsd and RL1 for good, and then the shared DX1 org key is retired.

The document has two parts:

  • The shared build: M1–M5b, one PR each.
  • The briefs: B0–B4, ordered runbooks for the owner and mini-ops. Each step has Do, Check and Undo, and the owner gates and irreversible steps are named.

It was drafted against master and the children's branches, then reconciled with O13 after O13 landed (DL69–74, RL DL28). O14's production administration is a set of verbs on O13 M2's deployment admin. O14 roots nothing, pairs nothing, writes no recovery key, and leaves the admin device's revocation to O8. The parent is pinned at master 4e1f33f.

The phone at a re-enrollment (residue 9): a bounded pause, per RL Decision Log 29 (spec PR #251). The redemption ends the machine's DX2 credential, as the hub already does. Until the machine is listed and sminos is welcomed, the phone's loop for that machine pauses, inside the owner's 30-minute window:

  • the window is entered only when no session is waiting and nothing is owed;
  • a card test runs within 10 minutes;
  • the undo deadline is 60 minutes from the redemption.

M6 proposed keeping the DX2 credential until the endpoint's first RL1 claim. It was withdrawn after its adversarial round found four P1 and two P2 issues. Making it safe would take a migration state machine for a security-sensitive credential, all to save a few minutes inside an approved window. Remote-architecture's point 1 stays as one small hardening in M5a (residue 26): DX2 is refused to a credential whose enrollment has posted a machine key.

Owner inputs, all answered 2026-10-28. Q2–Q8 are the owner's answers. I settled Q9 and Q10 on their recommendations.

  • Convert the acceptance VM, plus two throwaways.
  • The 30-minute window as the pause.
  • mini-ops builds the packaged app; the code is pasted over screen sharing and compared.
  • The tailnet port is opened.
  • Plain VMs are local-only after B4 (doperpowers board docs(spec): desk control surface — path A's machine-side wave (MW1–MW5) #150, deferred).
  • The MacBook moves one week after the mini.
  • A 7-day soak before keys purge.

Review: four doperpowers:adversarial-reviewer buildability rounds on the draft (19, 11, 10 and 2 findings, converged), one focused round after the O13 reconciliation (5 findings, folded), and one round on M6 (6 findings, M6 withdrawn). Each milestone PR gets reviewer-high.

Flags: O2 (residues 18 and 21), O8 (13 and 16), O12 (17, which I own) and O13 (2, now landed in #247, and 13).

Milestones and briefs

The shared build (one PR each, built by a plan-executor):

  • M1 — The v2 provisioning code, its redemption, the certificate's retirement and the local unenroll (MAWS; its src/mawsd half needs O2). smns-provision-v2. codec in apps/org-protocol (enrollDelegated's fields, optional legacy org key during the window); mawsd endpoint provision (stdin code → live certificate; a four-state resumable transaction with provisioning.json written before the first authenticated request); mawsd endpoint retire (the VM retires its own certificate under a durable retirement.json, frees its hub row, destroys its keys); mawsd endpoint unenroll (local: RL10 unserved, private keys destroyed, state aside, machine.json kept, the first half of every cutover undo); delegated in keys/status; O2's CLI taught to carry a secret for provision as for enroll.
  • M2 — The admin command's O14 verbs (MAWS, apps/desk-hub/deploy/; extends O13 M2's deployment admin; needs O13 M2). show, enroll (code on /dev/tty + clipboard; compare name/ref/key id with mawsd keys --json before list), delegation create --code-to-stdout (a pipe into Secret Manager through the runners' --pipe mode) / drop, machine drop (attended, certificate or phase-1), code strip-legacy|inspect (local transforms), keys retire|purge (M5a's), provisioning revoke; same device, anchor, /dev/tty confirmations and scope as O13's; the shared amend gains a pending-proposal record under a per-anchor lock (O13's verbs inherit it).
  • M3 — devcloud: the v2 seed, the first devenv up, provisioning at boot, retirement at departure (doperpowers). [desk] provisioning_secret_v2, delegation_id, name_prefix → descriptor → /etc/devcloud/env's MAWS_DELEGATION_ID before step 12; a boot step 13 redeems the code into mawsd (exit 4 deferred to the enroll timer); step 11 stops re-enrolling cut-over machines and installs the daemon without hub.json; up.py labels v2 VMs; departure retires through mawsd and stops it; forced deletes print the admin command.
  • M4 — History re-attestation (MAWS). A signed per-(project, writer) digest checkpoint (smns-history-attest-v1, carrying the machine's names claim) over the hub's inventory by name (GET /machine/history-inventory?names=), built by mawsd endpoint attest-history [--former …] from the hub's copy, stored and served by the Project DO, verified by org-protocol with Certificates {certs, retirements}; --check compares coverage against the inventory; a consumer contract for O7/O8's "attested at migration" label.
  • M5a — The org key's retirement in the state, the endpoint and the hub (MAWS; deployable at any time). OrgState.legacyRetired (optional; the exact-field validator learns it; every verifier must carry the package first); the endpoint follows its head into a tombstone that keeps the key's bytes until legacy purge; v1 events inert under it; POST /api/org/keys/purge zeroes the wrapped copies on the head's word; legacy retire removed from the CLI; the hub refuses DX2 (/machine/stream, /machine/frames → 403 v2-credential) to a credential whose enrollment has a posted key (resolve marks the principal v2 from OrgRecords.machineKey(enrollment)), so the credential a re-enrollment minted cannot open DX2 during the owner's window; the production hub runs this build before B2.
  • M5b — The phase-1 routes leave the hub (MAWS; merged and deployed only in B4). /machine/stream, /machine/frames, org-key POST/DELETE → 404; the project socket's rpc frame → refused retired; enrollment routes untouched (a v1 and a v2 token redeem alike); GET /api/org/keys stays at 410.
  • (M6 — the DX2 credential kept until the first RL1 claim — was added on 2026-10-28 and withdrawn the same day; the section "M6" below.)

The briefs (run by the owner's session, the owner at every gate; the mini only through mini-ops):

  • B0 — The org root is O13's. Checks O13 M7's rollout (production on v2, the pin, the runner's anchor, the admin device and the phone listed, no listed or certified machine), then drops O14's stale phase-1 rows. Needs O13 M7.
  • B1 — The devcloud acceptance VM. Delegation and code into Secret Manager (owner); mawsd with the prefixed ref; provision; the cutover (automatic); the undo exercised once; dual-coding checks; re-attest; a throwaway VM proves the unattended boot and the delete hook (owner); hand to O10 M11's item 7.
  • B2 — The mini. Phase-2 sminos through mini-ops; bench_scale at the owner's scale (RL10 mode, from O12); the packaged app built by mini-ops and launched once by the owner (Q4); a "nothing owed" gate inside the owner's 30-minute window (Q3); the code by clipboard over screen sharing, pasted by the owner at mawsd enroll's prompt and compared with mawsd keys --json before listing; the phone's loop for the mini paused from the redemption (the hub ends the DX2 credential; RL DL29) until sminos's welcome; the card test from the phone within 10 minutes of the cutover; undo by 60 minutes from the redemption; re-attest; O12 M9 verifies.
  • B3 — The MacBook. Same shape, this session's hand and the owner's Terminal; one week after the mini is stable, not waiting for O3 or O7 (Q7).
  • B4 — The final brief. Every verifier at M5a's package (the phone's running bundle checked); keys retire in the state (reversible; every endpoint tombstones, bytes kept); the soak; M5b merged and deployed (owner; reversible by redeploying M5a's build); keys purge at the hub (irreversible); legacy purge + hub.json removed on each machine; every browser that unlocked the key forgets it; the v2 code stripped of legacy (old versions destroyed), the phase-1 key revoked, the v1 secret deleted; a throwaway VM proves v2-only boot and inert history import.

What the code showed that the section didn't say

  1. Production has no signed org state and nobody can sign one. apps/desk-hub/deploy/config.json pins no orgGenesis; OrgAdmin refuses production by name and refuses an unpinned config; no app code signs org states; the Org page is O8's, not dispatched, while P5's M1 cuts the VM and the mini over before O8. RL §9 step 1 ("set up the org root") had no owner. → M2 and B0.
  2. A re-enrollment in place kills sminos's DX2 credential at redemption. registry.ts reenroll fences the old credential and mint deletes every service token of the name at Cloudflare (org-enrollment.test.ts:125-145). The machine is off the hub from mawsd enroll's redemption until it is listed, RL10 is served and sminos's first welcome cuts it over. → the "nothing owed" gate and the bounded pause inside the owner's window (Q3; RL DL29). M6, keeping the credential until the first RL1 claim, was proposed and withdrawn on 2026-10-28 (the section "M6" below).
  3. A delegated name has no re-enrollment in place (redeemThrough → 409 name-taken for any held name). An existing DX2 VM must have its hub row dropped first; a VM born under the v2 code never has one. → B1's two paths; the code carries the legacy key so new VMs skip DX2 entirely.
  4. Removing identity.json alone re-cuts the machine over within about a second while the endpoint still serves RL10 (sminos_daemon.py:1253-1256 probes at once), resetting the cutover time. Decision Log 51's undo is incomplete. → every undo first stops the endpoint serving RL10 (retire the certificate, or drop the machine from the state), then removes the file; DX2 resumes only with a credential that works (a v1 code from desk-web's Machines page).
  5. mawsd endpoint legacy retire doesn't stick: link.ts:316 asks legacy-key? at every hello while no key is held and sminos answers every time from hub.json. → M5's tombstone, and hub.json removed in the same brief step.
  6. Re-attestation isn't built and can't be a re-upload: stored positions are immutable (log-store.ts:211 sameEvent), a re-signed resend is a conflict; the Project DO never verified v1 MACs (only readers did). → M4's digest checkpoint; hub/<member> history stays inert.
  7. smns-enroll-v2. lives in apps/desk-hub/src/protocol/identity.ts, not org-protocol, so DL35's "beside smns-enroll-v2." named the phase-1 module that B4 retires. → the codec goes in org-protocol/src/provisioning.ts.
  8. devcloud's boot breaks on a cut-over VM: hub check exit 1 reads as "not enrolled", hub enroll is refused, the step fails three times at every boot and every half-hourly refresh-secrets; converge installs the sminos daemon only when hub.json exists; departure's leave fails and nothing retires anything; departure doesn't stop mawsd. → M3.
  9. mawsd install --delegation-id is silently ignored when machine.json exists (identity-file.ts:59-92), and the id comes from MAWS_DELEGATION_ID at the first devenv up (O2 M8 as built), not from "the devcloud seed" (which is a GCP credential). → M3 puts the id in /etc/devcloud/env from the driver profile; B1 1a discards an unprefixed, never-listed ref before installing.
  10. bench_scale.py has no RL10 mode and drives DX2 against hub_standin.py, so O12 M9's "measure the words pass" can't run as written; and the sminos floor "M8's version" (1.23.0) predates the receipts (1.24.0) and spent (1.26.0). → B2 depends on O12 extending it; the floor is 1.26.0.
  11. The hub's DELETE /api/org/keys/<id> refuses the last copy (last-key), so retirement needs its own route; and "DX2 and DX6 leave the hub" has no flag — it is route removal. → M5.
  12. GET /api/machines' online/seen are DX2 lease presence (DL37: RL1 presence reaches the relay alone), so "no DX2 stream" is checked on the machine (sminos daemon status), not at the hub.
  13. The MAWS app's dual-coding of the owner's words (RL §9) is built nowhere, and every machine moves before O8 ships the app's words. → not built; flags O8.
  14. Smaller: mawsd endpoint status has no "serving RL10" field (check rl10.json's presence); DL50's chain.jsonl is superseded (the chain is in org.json); the tailnet ACL is verified for port 22 only (O10 M11's direct carrier); every VM can read every Secret Manager secret (accepted already by the provisioning-keys design).

Residue for P5's Decision Log under O14

  1. O14's administration of production's org state is a set of verbs on O13 M2's deployment admin (M2: show, enroll, delegation create|drop, machine drop, code strip-legacy|inspect, keys retire|purge, provisioning revoke): the same admin device, anchor, keys file and /dev/tty confirmations, run on production through O13 M1's production-run.sh admin. O14 roots nothing, pairs nothing, writes no recovery key, and never names the admin device's revocation, which is O8's (Decision Log 69, the remote layer's 28). The shared org key its final brief retires is DX1's.
  2. deployment admin's shared amend writes a signed proposal into the anchor (pending) before posting it, and every verb, O13's included, reconciles a pending proposal before signing another from the same parent (adopt, resend the same bytes, or refuse fork), under a per-anchor lock taken at signing time; without it a hub that kept a revocation but answered with an error could obtain a second successor without it. Flags O13 (refresh, pair and remove-device inherit the rule).
  3. A machine's enrollment code travels as the phone's pairing code does (/dev/tty and the clipboard, pasted at mawsd enroll's hidden prompt; on the mini by screen sharing), and the owner compares the name, ref and key id the command shows with mawsd keys --json on the machine before it is listed. A provisioning code goes from delegation create --code-to-stdout through the runners' secret-stream mode (admin --pipe) into gcloud secrets create --data-file=- and is refused on a terminal; code strip-legacy likewise. No code is ever a file on a Mac.
  4. The v2 provisioning codec lives in apps/org-protocol/src/provisioning.ts (corrects Decision Log 35's placement: smns-enroll-v2. is in desk-hub/protocol, which retires with DX7).
  5. During the migration window the v2 provisioning code carries the legacy org key (legacy), so a VM born after M3 never enrolls on DX2, holds no hub.json and leaves no phase-1 row; the field is stripped at B4. Rejected: DX2 first, then the certificate (no path to a certificate while the row exists: 409 name-taken).
  6. The endpoint keeps the delegation key (delegation.json), written before the redemption so an interrupted provisioning resumes, and retires its own certificate at departure (mawsd endpoint retire), also dropping its hub row; a forced or unreachable delete prints the admin command (production-run.sh admin machine drop <name>, which retires a certificate machine's key by an admin's state change). Decision Log 24's "the delete hook lives in devcloud" holds for the normal path.
  7. provision is a four-state resumable transaction: provisioning.json (the whole redemption, the machine key, the signed certificate, the pins) written before the first authenticated request, the certificate's post idempotent, the write set rebuilt from it alone and completed before the endpoint's key-without-ledger rule runs; enrollDelegatedInto's refusal of an existing enrollment narrows to an attended one or another delegation's.
  8. retire keeps retirement.json (the same signed record and notAfter on every rerun) and reads a 401 after a posted retirement as the hub's completed DELETE; unenroll and retire destroy private keys, current and archived, because nothing reuses them and a retirement is trusted only if its key is destroyed (RL §5.2).
  9. A machine's re-enrollment in place ends its DX2 credential at the redemption, as the hub does today (one credential per name: reenroll's fence, mint's deleteNamed), and from then until it is listed and sminos is welcomed the machine is on neither DX2 nor RL and the phone's loop for it pauses (the remote layer's Decision Log 29: §9 step 2's exception, step 4's pause). The pause is bounded by the owner's answer to Q3: a 30-minute window the owner names, entered only with no session waiting and nothing owed, a card test within 10 minutes of the cutover, and an undo back to DX2 within 60 minutes of the redemption; nothing is lost in it, owed deliveries wait, and after the cutover the phone reaches the machine through web-cards. The trust model is the same throughout: accepting one trust model is the machine's rule, enforced at sminos's welcome (O12 M5); the hub is trusted with availability only. M6, keeping the DX2 credential until the endpoint's first RL1 claim, was proposed and withdrawn on 2026-10-28 after its adversarial round (four P1, two P2: the claim is no fence on local DX6 execution; cutOver would delete before a claim succeeded; a stale principal could reach a name-only cutOver; confirmation ends expiry so the prior token would outlive a failed listing; deletion by client id where a token id is needed; a second re-enrollment would overwrite the prior credential): making it safe is a migration state machine for a security-sensitive credential, to save a few minutes inside a window the owner approved. The architect amends O14's acceptance 4 in P5 at landing.
  10. The cutover undo is one idempotent sequence, the same before or after sminos's welcome: mawsd endpoint unenroll (RL10 unserved, the private key destroyed, machine.json kept), remove identity.json if present, the hub-side drop, then DX2 back with a v1 code where a DX2 exists; a certificate machine uses retire for the first and third steps; a v2-born VM is recreated, not undone. Amends Decision Log 51's bare "remove identity.json": sminos re-probes within a second, and a disconnected endpoint never sees the hub's 4403.
  11. An existing DX2 VM is converted by dropping its hub row first (a certificate can't take a held name); the rehearsal's redo drops it again.
  12. Re-attestation is a signed per-(project, writer) digest checkpoint (smns-history-attest-v1) over the hub's inventory of the machine's writers by name, carrying the machine's own names claim (its former names, read from sminos hub show, since the Registry holds none), binding only where no machineNames entry and no certificate, live or retired, holds the name for another ref; kept by the Project DO, verified by org-protocol with Certificates {certs, retirements}; --check compares coverage against the inventory; readers draw "attested at migration by <name>" by Interfaces §D's contract (O7's log views, O8's project channel); hub/<member> history and unclaimed names stay inert; B4 waits for one reader to draw a migrated event (Q10). Rejected: per-event signatures reposted in place (positions are immutable); projects from the state (empty).
  13. The org key's retirement is a field of the signed state (legacyRetired, optional; the package's exact-field validator learns it) that every endpoint, present and future, follows into a tombstone keeping the key's bytes until a per-machine mawsd endpoint legacy purge; the per-machine legacy retire verb O10 shipped is removed; a v1 event under a tombstone is inert ({kind: 'legacy', checked: false}), never held. The hub purges the copies only on the head's word, after a soak, and refuses a successor that un-retires after the purge. The field is published only once every deployed verifier (the hub, each endpoint, O13's web-cards running bundle, O8's app if landed) carries M5a's org-protocol. Flags O13 (a desk-web deploy at or after M5a; the phone's page reopened) and O8.
  14. M5 is two builds: M5a (the retirement in the state, the endpoint, the purge route) deployable at any time; M5b (the two phase-1 transports, the org-key POST/DELETE, the project socket's rpc frame refused retired) merged only in B4, so a production deploy from master can't remove the routes early. No "v1 enrollment route" exists: a v1 and a v2 code redeem the same token at the same route; DX7 ends through the phase-1 key's revocation and the v1 secret's deletion. Removed-route probes run authenticated (only /machine/enroll bypasses Access); DX6's removal is checked over the project socket.
  15. Browsers that unlocked the phase-1 key keep a usable copy in IndexedDB that no hub purge reaches; B4 has every such browser forget it. Secret Manager's latest is the most recently created version, so the v2 code's strip is undone by re-adding the old payload, and earlier versions are destroyed at the irreversible boundary.
  16. The MAWS app's dual-coding of the owner's words (RL §9) is not built: every machine moves before O8 ships the app's words, and the phone moves in O13. Flags O8: send v2-only.
  17. The sminos floor for a cutover is 1.26.0 (not O12 M9's 1.23.0; 1.26.3 is current); before B2, O12 gives bench_scale.py an RL10 mode (words pass p95 under 1 s per pass, uplink CPU under 5 % of a core at the Macs' scale) and sminos a bounded sminos daemon owed, which the "nothing owed" gate reads beside sminos list --json's waiting; O12 also adds a test for the un-cutover branch, which has none. Flags O12.
  18. MAWS_DELEGATION_ID comes from the driver profile ([desk] delegation_id) through the descriptor into /etc/devcloud/env, not from the seed (a GCP credential); the name prefix joins the profile ([desk] name_prefix) so a replacement delegation under another prefix is possible; up.py labels v2 VMs devcloud-enroll. Flags O2: its "from the devcloud seed" wording, and mawsd install should say, not stay silent, when it ignores --delegation-id.
  19. A devcloud VM created without --project maws has no mawsd and, after B4, no way onto the hub; it runs a local-only sminos (the owner accepted, 2026-10-28). Deferred: devcloud installing a mawsd release at boot from a published pack, doperpowers board docs(spec): desk control surface — path A's machine-side wave (MW1–MW5) #150; B4 does not wait for it.
  20. The MacBook's cutover (B3) is not bound to O3 or O7: one week after the mini is stable (the owner, 2026-10-28; Q7).
  21. O2's packaged e2e job on the mini (the check that the canonical plist never appears) meets B2 step 3, which installs that plist; O2 or the gate's owner decides how the job reads the mini after B2. Flags O2.
  22. A human event owed from before the cutover and asked words? afterwards is refused; the "nothing owed" gate avoids it and a residual one is an accepted one-time cost (extends Decision Log 51; the owner accepted, 2026-10-28; Q9).
  23. Decision Log 50's chain.jsonl is superseded by O10 M2 as built (org.json's chain). A correction, no decision changes.
  24. The verification: four adversarial buildability rounds on the draft (19, 11, 10, 2 findings, all folded; converged), one focused round after the reconciliation with O13 (5, folded), and one on M6 (4 P1, 2 P2) that withdrew it; reviewer-high per milestone PR; the briefs' evidence recorded in Outcomes, not reviewed as code.
  25. The owner's inputs (Q2–Q10) were answered on 2026-10-28, each with the document's recommendation, and are recorded in its register: the acceptance VM converted if it exists, else one kept VM, plus a throwaway at the end of B1 and one at B4; the mini's 30-minute window, card test within 10 minutes, undo by 60 minutes; the packaged app built by mini-ops, the code by clipboard over screen sharing; the listener port opened from the Macs to tag:devcloud and the mini before O10's item 7; the 7-day soak between M5b's deploy and keys purge; B4 waits for one reader to draw a migrated event unless O8's reader lags the soak.
  26. The hub refuses DX2 (/machine/stream, /machine/frames: 403 v2-credential) to a credential whose enrollment has a posted machine key (resolve marks the principal from OrgRecords.machineKey(enrollment), the lookup machineRefOf already makes), so the credential a re-enrollment minted cannot open DX2 during the owner's window; the hub cannot mark a row at redemption (a v1 and a v2 code redeem the same token at the same route), so the instant before the key post and a credential whose key post never came are accepted, since nothing is owed and nothing is answered for the machine during the window. In M5a; the production hub runs it before B2. From M6's review, standing without M6.

(The first draft's residue items on a deployment org family, its own admin device and a pairing contract are withdrawn; the list below is the drafter's original, kept for the record.)

What O2, O10, O12 and O13 must provide

  • O2: land p5-o2 (M9 and its PR are open; master has only the identity-file prefix and private-path.ts). On its branch: mawsd install should warn or refuse when --delegation-id is ignored because machine.json exists (today silent); its CLI reads a secret for enroll alone — M1's src/mawsd half generalizes that to a table (enroll, provision) once O2 is on master, or O2 can do it first; its document's "from the devcloud seed" wording for the delegation id; a decision on gate.yml's packaged job on the mini once the mini runs the real dev.maws.mawsd (B2 step 3 installs the very plist the job forbids).
  • O10: M10 (the endpoint inside mawsd); M11's item 7 run against the cut-over VM, under the hygiene recipe (a separate user / managed settings aside, or a zero-inference stub), with the tailnet ACL for the direct carrier (Q5); a status field saying whether RL10 is being served (today only rl10.json's presence shows it). Everything else M1/M4/M5a change in src/endpoint/ is O14's own work on master's module (enrollDelegatedInto's refusal narrowed; the orphan-key rule ordered after a pending provisioning; legacy retire removed).
  • O12: before B2: an RL10 mode for sminos/tests/bench_scale.py (an endpoint_standin.py stand-in, identity.json, owed human events) and a bounded sminos daemon owed listing owed deliveries (the "nothing owed" gate reads it beside sminos list --json's waiting); a test for the un-cutover branch (none exists); M9's verification after B2; its documents' floor (1.23.0 → 1.26.0) and the undo text ("remove identity.json") amended to this document's order. Nothing else in sminos changes for the cutover.
  • O13: its first milestone, the production deploy fold (DL40), before B0 — including a config.json that B0 can then pin; web-cards live with the phone's device approved through M2's device pair/device approve (no app can countersign before O8), so its registration must post PendingDeviceRequest.mac = pairingMac(k, …) under Interfaces §C's contract (the pairing code is base64url of a 32-byte k); before B4, a desk-web deploy at or after M5a's org-protocol and a way to read the phone's running build (or its own update mechanism), since the service worker navigates an open page without reloading its script.
  • O7/O8 (later): draw M4's attestations by Interfaces §D's consumer contract ("attested at migration by <name>" when a stored attestation verifies and covers the seq); O8 sends the owner's words v2-only, takes over the org root from M2's admin device through the pairing flow, and carries M5a's package before B4.
  • The architect / P5's writer: the residue list for the Decision Log under O14; residue 9 is the fallback (RL DL29 already carries it; P5's O14 acceptance 4 to be amended at landing to state the pause); residue 26 (M5a's DX2 refusal) is new; the label's readers (Q10) and the staging OrgAdmin's trust in the hub's head remain the design conflicts to record. The re-pin to current master (4e1f33f49: DL74, O13 M2 landed, RL DL29) at landing.

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

…nd the brief per machine (B0–B4)

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…sumable provision, pairing, the history inventory, M5 split in two, the briefs' undo order, the owner's inputs

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
… a durable redemption, the machine's own former names, one cutover undo, retained key bytes until purge, M5b narrowed, authenticated probes

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ons and retirements under a lost answer, private keys destroyed at unenroll, retired-certificate names unclaimable, DX6 as a frame, the phone's running bundle, browsers' keys, Secret Manager's latest

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…fore the orphan-key rule, archived private keys destroyed, the browser-lock check at the forget step; the review is converged

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…one device, one anchor), B0 checks O13's rollout, the parent re-pinned at 8512374, Q1 withdrawn, codes by /dev/tty and the clipboard or a pipe into Secret Manager

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…unners' secret-stream mode, compare-before-list on enroll, a per-anchor lock on the pending record, the code verbs local, B0's anchor path

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

chatgpt-codex-connector Bot commented Oct 28, 2026 •

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 ✅ Completed 2026-10-28T02:28:37.260047Z fc9d76d 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc9d76d58f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- **The `mawsd` side carries the secret [needs O2].** O2's CLI reads a secret and stretches the deadline for `enroll` alone (`src/mawsd/cli.ts`, `enroll()`); M1 generalizes that path to a table of secret-reading commands (`enroll`, `provision`), each with its `--wait` deadline, so `mawsd endpoint provision` reaches `Endpoint.cli('provision', args, secret)` with the code read from stdin or the hidden prompt and never from argv. This half lands in M1's PR if O2 is on master by then, else as M1's follow-up PR on the same branch name with `-mawsd`; until it lands, `provision` is reachable in tests through `Endpoint.cli()` and in no brief.
- **The endpoint keeps the delegation key.** RL §5.3 accepts that a VM under a delegation holds its key (every VM under it can read the secret store anyway, and the remedy for a compromised VM is revoking the delegation), and the retirement record must be signed by it (RL §5.2). Rejected: re-reading the secret store at departure, which fails exactly when departure is already in trouble (a reclaimed spot VM, a VM whose ADC is gone).
- **`mawsd endpoint retire [--not-after <ISO>] [--json]`** signs `CertRetirement {org, keyId, notAfter}` with `delegation.json`'s key under `smns-cert-retire-v1`, `notAfter` defaulting to now plus 60 s of skew margin (RL §5.2: set once the key is gone, with a margin), and **writes `retirement.json` (the signed record, `posted: false, deleted: false`) before any hub call**, so a rerun reuses the same record and `notAfter`; posts it to `POST /machine/cert-retirements` (marks `posted` on 2xx; an identical repost is accepted), then `DELETE /machine/enrollment` so the hub row and its credential go too (both are needed before a recreated VM may take the name: `apps/desk-hub/test/org-delegations.test.ts`; marks `deleted` on 2xx), then, both marked, **destroys `machine-key.json` and `delegation.json`** rather than archiving them (RL §5.2: a retirement is trusted because the retired key is destroyed, so it can sign nothing backdated), runs `unenroll`'s local part for the rest, and exits 0 printing `retired: <name> (certificate <keyId> not after <ISO>); the hub row is gone; the keys are destroyed`. A lost answer is reconciled on the rerun: a `401`/`403` to the retirement's post or to the `DELETE` while `retirement.json` says `posted` means the hub already invalidated the credential, which is the `DELETE`'s effect, so `deleted` is marked from that evidence and the run completes locally; a `401`/`403` while `posted: false` is a refusal (exit 1, nothing destroyed, the admin's `machine drop` is the remedy). It refuses on a machine with no `delegation.json` (`not-delegated`, exit 1): an enrolled machine's key is retired by an admin's state change, never by itself. It is idempotent: a second run with no `retirement.json` and no credential exits 0 saying so. After it, the endpoint is unenrolled and sminos, cut over, waits for an endpoint that never comes; the VM is about to be destroyed, which is the only reason to run it.
- **`mawsd endpoint unenroll [--json]`** is local and talks to no hub: it stops the hub link and the direct listener, closes every channel `removed`, removes `rl10.json` and the socket (so sminos sees no endpoint), **destroys the private material of `machine-key.json` and `delegation.json`, and of every `machine-key.json` and `delegation.json` under an earlier `stale-*/`** (keeping each key id in `<stateDir>/stale-<ISO>/keys.json` for the record; `retire` does the same), moves `grants.json`, `enrollment.json`, `org.json`, `legacy.json`, `listings.json`, `notified.json`, `signatures/` and `inbound/` to that `stale-<ISO>/` (the key-without-ledger rule's directory, O10 M2), leaves `<profile>/machine.json` untouched, and reports `enrollment: none`. The private key is destroyed at once because nothing can use it again: a later `enroll` or `provision` generates a new key under the same ref (as `--replace` does), and the hub-side entry is dropped by M2's `machine drop` (which retires or revokes the old key by its id, never needing the private half) or by `retire`; a retired key that lingered on disk could sign backdated events that its retirement would verify (RL §5.2). `unenroll` refuses nothing: an unenrolled endpoint is the state O10 M10 ships in. This is the first half of every cutover undo in the briefs, because O12's switch re-probes RL10 within a second of `identity.json`'s removal (Orientation). Rejected: relying on the hub's `4403` to stop RL10, which reaches only an endpoint that is connected at that moment and leaves a disconnected one holding `org-listed`; archiving the private key, which keeps what retirement assumes gone.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cancel pending provisioning when unenrolling

If provisioning stops after writing provisioning.json but before completing the enrollment write set, this unenroll sequence neither removes that transaction nor destroys the private JWK it contains. M1 explicitly makes startup replay a pending transaction before normal state recovery, so restarting after this supposedly local undo can restore the key and resume enrollment; it also leaves private material behind despite the destruction guarantee. Include pending provisioning state in the cancellation and key-destruction procedure, with a test that unenrolling an interrupted provisioning cannot resume it.

Useful? React with 👍 / 👎.


0. **Preconditions.** Do: nothing. Check: master holds O2, O10 M10, M1 (both halves), M2 and M4; doperpowers `origin/main` holds M3 and the devcloud plugin installed on this Mac is M3's version (`claude plugin update devcloud@doperpowers` if not); sminos on `origin/main` is at or above 1.26.0; B0 is done; `[owner]` the owner has removed `[desk] provisioning_secret` (the v1 code's id) from `~/.claude/devcloud/driver.toml` and will add `[desk] provisioning_secret_v2` and `[desk] delegation_id` at step 2; the architect has named the VM and Q2 is answered. Undo: none.
1. **`[owner]` The VM.** Two paths; the architect's naming decides.
- **1a, the named VM exists**, created before M3 and enrolled on DX2. Check: `(VM) sminos hub show` prints its DX2 identity and no `cut over`; `sminos daemon status` says `uplink: running (<pid>)`; `~/.config/MAWS/machine.json` is absent, or its ref is unprefixed and `mawsd keys --json` says `"enrollment": "none"` (nothing was ever listed under it). Do, when such a `machine.json` exists, as root through `devcloud vm ssh --root`: stop `mawsd.service`, remove `~/.config/MAWS/machine.json` and `~/.config/MAWS/mawsd/endpoint/`; this is the one time a ref is discarded, and only because nothing was ever listed under it. Check: the files are gone. Undo: none needed. Steps 3 to 7 run as written; the undo rehearsal of step 6 returns the VM to DX2.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the VM owner's state rather than root's state

For path 1a with an existing unprefixed identity, the cleanup is explicitly run as root but uses ~/.config/MAWS/.... In that shell, ~ refers to root's home rather than the VM owner's profile where O2 installs the daemon and creates machine.json. The actual unprefixed identity therefore survives, and the later installation cannot mint the delegated ref, preventing the VM from provisioning. Resolve the VM owner's home explicitly and perform the cleanup against that profile.

Useful? React with 👍 / 👎.

…osed by design; Q2–Q10 recorded

The hub keeps a re-enrolled machine's DX2 credential (prior_client_id, DX2 routes only) until the listed ref's first RL1 claim, deletes it there, and refuses any DX2 open after a claim (410 cut-over), so the phone's cards have no gap at the mini's cutover and an older sminos cannot evict RL1. Acceptance 4, the cutover undo, B2 steps 4–7, B3 steps 0–1, M2's enroll --cancel, Interfaces §E2, the Decision Log and the Surprises follow. The owner's answers to Q2–Q10 (2026-10-28) are in the register; nothing pends.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…tands under RL Decision Log 29; M5a refuses DX2 to a v2 credential

The hub keeps ending a re-enrolled machine's DX2 credential at the redemption; from then until the machine is listed and sminos is welcomed the phone's loop for it pauses inside the owner's 30-minute window (Q3: card test within 10 minutes, undo by 60). The six findings against M6 are the Decision Log's reason. One hardening stands without M6: resolve marks a principal whose enrollment has a posted key v2, and the two DX2 routes refuse it (M5a).

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit 60074ad into master Oct 28, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…e 4 states the owner's window (RL DL29), M6 rejected; O7, O8, O12, O13 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