Skip to content

P5 O13 M7: the staging phone harness, the owner's sitting and the production rollout brief - #281

Merged
SSFSKIM merged 14 commits into
masterfrom
p5-o13-m7
Oct 28, 2026
Merged

SSFSKIM merged 14 commits into
masterfrom
p5-o13-m7

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 28, 2026

Copy link
Copy Markdown
Owner

P5 O13 M7: the staging phone harness, the owner's sitting, and the production rollout brief.

This milestone changes nothing on production. It adds:

  • the live run that proves acceptance 1, 2, 3 and 5 on staging with the owner's phone;
  • the owner's sitting, written step by step;
  • the production rollout, written as steps the owner runs in order.

The staging run: staging-run.sh phone <n> [--rehearse] [--lane-b]

  • The machine is the real endpoint module, run in-process by test/endpoint/staging-phone.live.test.ts and gated on DESK_STAGING_PHONE=1.
    • It enrolls o13-phone-<n> on staging-ssfskim through OrgAdmin.listedMachine.
    • It runs over the fake services, the fake engine host and M4's fake sminos.
    • The owner holds lane A la-1 and lane B app-1. The harness holds its own la-2 and app-2. A second member, o13-b-<n>@staging.invalid, holds la-b and app-b.
  • A second web-cards device, o13-c-<n>, pairs as a real device does, through M3's DeviceController against staging's pairing exchange. It drives:
    • acceptance 3's refusals on both lanes: a replayed assertion, a borrowed assertion, a cards subscription and an answer on the other member's session;
    • with --rehearse, the answers in the phone's place.
  • The report items:
    • registration;
    • round-trip lane A and round-trip lane B, the second required with --lane-b;
    • class-bound;
    • push-owner-only: the sink's notices, decrypted, are exactly one per owner session and none for the second member's;
    • freeze-seam: desk-web's seam functions run over the live staging head.
  • The run undoes itself however it ends.
    • Cleanup finds the run's objects by name: the machine, member B, the cards device and the push subscriptions. It runs at three levels: in the run, as the runner's separate pass, and as a pre-sweep.
    • A TERM or INT stops the suite's process group (10 s, then KILL) before the cleanup pass.
    • A pending pairing entry, which no hub route deletes, is reported LEFT with its expiry. It is never read as clean.
  • Every staging wait is bounded. Each request, body included, has 30 s (test/endpoint/staging/bounded.ts), and every poll races its deadline.
  • The push sink's tunnel: start_tunnel makes three cloudflared tunnel --url tries, then falls back to the quick-tunnel API asked directly. That call answers in 22–33 s, beyond --url's 15 s client timeout; going direct, the tunnel registers within 2 s.
    • The fallback's secret goes to a 0600 file, listed for the scan and removed on every exit path, a stale one included.
    • O11's acceptance step shares the helper.
    • A sink that still does not come up reads NOT SHOWN with its reason, and costs the owner no extra step.
  • No key or token is recorded. The Access token reaches the suite in the environment only.
  • deployment admin genesis --media-check only adds refusals.
    • It is accepted only with --hub.
    • It holds a loopback genesis's recovery path to a deployment's removable-media rule, so the owner's USB drive meets the check before production's genesis does (P5 DL 74).

The owner's sitting, and the rollout

apps/desk-hub/deploy/README.md gains both.

  • The sitting (staging):

    • 0: the USB drive meets the removable-media check;
    • 1: staging at the branch's build;
    • 2: the phone installed, signed in, notifications on;
    • 3: the pairing, at /dev/tty;
    • 4: the run, answered on the phone;
    • 5: cleanup.
  • The rollout (production, every step the owner's):

    • 1: hub v2's first production deploy, through production-run.sh checkout and production-deploy.sh --confirm;
    • 2: the org's root, through admin init and admin genesis --recovery onto the USB drive, with orgGenesis committed;
    • 3: the phone paired on production;
    • 4: the mini's cutover (O14);
    • 5: admin refresh before every 30th day.

    The rollout is also in the spec's Outcomes.

Validation Evidence

  • Offline suites:

    • apps/desk-hub/test/deploy/staging-scripts.test.ts 21/21, including TERM stopping the suite, the API fallback and a stale credentials file;
    • admin.test.ts 30/30, including --media-check;
    • test/endpoint/staging/pieces.test.ts 15/15, including the pending-entry sweep and the bounded waits;
    • the full pnpm typecheck is clean, as is eslint on the touched files.
  • Rehearsal m7r4 on staging (staging-run.sh phone m7r4 --rehearse, 09:05Z, before P5 O10 follow-up: lane B pending counts reach notify from the engine host (WIRE_MINOR 4) #272):

    • PASS registration, round-trip lane A, class-bound, push-owner-only (the tunnel came up on try 1) and freeze-seam;
    • lane B's refusals ran live (replayed, step-up, grade);
    • cleanup left nothing current, production was untouched (hub@3486527c [email protected]), the scan count was 0, exit 0.
  • TERM rehearsal m7t1: a TERM after the pairing ended the suite's process group within about a second. Cleanup then left nothing current, with no process and no file left.

  • Rehearsal m7b2 with --lane-b, on d06edfc plus 6c44a5a, after O10's lane B feed (P5 O10 follow-up: lane B pending counts reach notify from the engine host (WIRE_MINOR 4) #272). All six items PASS:

    • push-owner-only got 4 notices decrypted at the sink, one each for la-1, la-2, app-1 and app-2, and none for la-b or app-b;
    • the lane B round trip and its refusals ran against the feed;
    • cleanup left nothing current, production was untouched, the scan count was 0, exit 0.

    The first --lane-b run, m7b1, failed push-owner-only with seven notices. The endpoint pushes once per rise in a session's count, and the harness raised lane B's requests one at a time. It now raises them as one change per session, as lane A's fake sminos does.

    The scope of the lane B PASS: it proves the endpoint's lane B path, not P5 DL 29's linked-app bound. The harness runs the endpoint in-process over an always-attached fake engine host.

  • Review: doperpowers:reviewer-medium, 5 rounds.

    • Round 1 found four P2s, all fixed failing-first:
      • a TERM did not reach the foreground suite;
      • the sweep missed a pending pairing entry;
      • the poll deadlines did not bound each request;
      • lane B's refusal cases were missing.
    • Round 2 found one P2: a stale fallback credentials file survived a fast-path rerun. Fixed.
    • Round 3: correct.
    • Round 4, over the lane B batching fix: correct.
    • Round 5, over the gate fix (the scan literal and the portable file mode): correct.
  • ci-gate on 8da1e6d (the PR head; master as of P5 O10 follow-up: lane B pending counts reach notify from the engine host (WIRE_MINOR 4) #272 plus desk-web e2e-hub: the cards list shows the owner's lane B session with its count (#272) #278's commit): --gates static,unit,probes,e2e:desk-web,e2e:desk-web-hub --class1a pool --runner macos --lane hosted --label o13-m7-3, run 40669200856.

Confusions

  • The lane B leg's first live run failed because the endpoint pushes once per rise in a session's count, while the spec's "one notice per owner's session" assumed one push per session. The harness now raises each session's requests as one change, as lane A's fake sminos does, so both lanes are judged by the same rule. O10's own notifier tests cover the per-request rise (spec Decision Log, 2026-10-28).

Residue

  • The phone does not follow a recovery rewind (verifyRewind). After a recovery, the owner re-pairs the phone (M3).
  • No abandon-pending verb. A pending proposal left by an interrupted admin run blocks the next one until it is resolved by hand. O14 owns the verb.

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

…nesis's recovery destination to a deployment's volume rules (the owner's USB check, P5 DL 74)

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…earse]), the owner's sitting and the production rollout brief

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…up pass; the sweep reports a run's pending pairing entry; every staging wait bounded; lane B's refusals; the quick-tunnel API fallback (start_tunnel, shared with acceptance)

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
… at line 54

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…ntials file before its first try

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…sh each, as lane A's), and the README's lane B scope and --lane-b sitting

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…the rollout brief

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
…d built at run time, its file mode read portably (Python's os.stat); cards-landing's lane B comment

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)
@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-28T10:25:27.879397Z 8da1e6d 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.

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit c7875c5 into master Oct 28, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
…e row

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)

@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: 8da1e6d56f

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

Comment on lines +244 to +246
await admin.amend(`${name} (ref ${posted.ref}) listed`, (s) => {
s.machines.push({ name, ref: posted.ref, pub: posted.pub, owners: [admin.member] });
s.machineNames.push({ name, ref: posted.ref });

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 Reuse the machine-name binding when retrying a run

If a run is interrupted or fails after listing its machine, retrying with the same run ID cannot succeed, despite the runner explicitly recommending that recovery path. undoRun preserves the append-only machineNames history, but fakeServices generates a new random ref on every attempt and this edit appends the already-used name again. machineNamesKept in apps/org-protocol/src/org-state.ts rejects that successor as name-retired (or malformed if the ref is reused without avoiding the duplicate). Reuse the historical name's ref and only append its name record when absent so a same-ID retry can finish after sweeping.

Useful? React with 👍 / 👎.

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