Skip to content

desk-hub: MW5 image and PDF intake — the media RPC, MediaOpBody, the fake's mw5 producer - #174

Merged
SSFSKIM merged 4 commits into
masterfrom
desk-ctl-mw5
Oct 26, 2026
Merged

SSFSKIM merged 4 commits into
masterfrom
desk-ctl-mw5

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

This is MW5 of the desk control surface (spec docs/doperpowers/specs/2026-10-22-desk-control-surface-design.md, Plan of Work, the machine-side wave). It is the hub's half of image and PDF intake. Nothing in apps/desk-web changes.

What it builds

  • Protocol:
    • src/protocol/rpc.ts: the RPC media takes {attachments: MediaAttachment[]} and answers {upload, root, paths, state: 'queued'}; this file also adds MEDIA_TYPES.
    • session.ts: OpBody.op admits media, with MediaState and MediaOpBody. The body is {op:'media', rpc: upload, id, phase, attachments:[{index, name, mediaType, path, state, reason?}], t}.
    • The replay store (putOp) is unchanged, so media ops are relayed live only.
  • Fake machine: a mw5 producer (--producer mw5, sminos 1.15.0). It answers from the live check's recording (fake-machine/dx4/mw5-media.json, its sha in the README):
    • the daemon's shape check;
    • unsupported without a bridge that takes media;
    • a queued answer whose root is under the live cwd;
    • the recorded order of op notices, ending in forwarded, failed, aborted or indeterminate after reload;
    • the files it holds, in uploads.
  • Spec:
    • Dated Interfaces lines (DX5 op and event, DX4 op, DX6). The event field is index, not n, because the child stamps n on every line.
    • Surprises (MW5).
    • The Decision Log's MW5 as built.
    • The MW5 Progress tick is left to the orchestrator.

Validation Evidence

  • apps/desk-hub/test/fake-machine/desk-mw5.test.ts: Tests 9 passed (9). RED, run on the base commit with only the test and recording added: Tests 7 failed | 2 passed (9). frames.test.ts is updated for the media result.
  • vitest run test/fake-machine test/protocol test/op-store.test.ts test/session-plane.test.ts: 24 files, 445 tests passed. desk-hub typecheck exits 0. ESLint on the touched files exits 0.
  • CI: scripts/ci-gate.sh /tmp/maws-desk-mw5 --gates static,unit → run 40333564047 success, exit 0, on a71e6a9 (https://github.com/SSFSKIM/MAWS/actions/runs/40333564047)
  • Live check: Claude Code 2.1.310, isolated profile behind a recording stub, zero inference; the daemon's RPC path runs in-process. The mw5 producer replays its answers. Results:
    • An idle PNG and a whole PDF were answered queued and ended forwarded. The next request carried the image and document blocks.
    • An upload during a busy turn was read in that turn.
    • A denied Read ended failed.
    • Esc ended the claim aborted.
    • A reload ended a claimed attachment aborted (indeterminate after reload).
    • Full detail is in the doperpowers PR.

The doperpowers half (bridge, daemon, sminos 1.15.0): SSFSKIM/doperpowers#400

Review fix wave (26f4816)

  • Spec: a dated DX6 Interfaces line covering wrong JSON types as bad-shape, every walk from /, the scoped rollback, a file already in the way that is not a regular file, and the exclude refusal. A Decision Log entry, "MW5's review fixes", records all six fixes. The hub code is unchanged.

Validation:

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)

…fake's mw5 producer

RPC_NAMES gains media ({session, attachments: [{name, mediaType, data}],
delivery: 'queued-turn'}, answered {queued: true, upload, intake:
'native-read', root, paths} once the bridge holds the upload); MEDIA_TYPES
and MediaAttachment name its shape. OpBody's op admits 'media', and
MediaOpBody documents one attachment's change: rpc and id the upload, index,
state, toolUseId, reason, and the whole upload's attachments, phase 'end'
once every attachment has ended. The hub admits the RPC by name and relays
its op messages unread, as every op. The fake machine's mw5 producer (sminos
1.15.0) checks an upload as the daemon does, answers it queued with the
root under the session's live working directory, and sends each
attachment's states as op in the order the MW5 live check recorded them
(dx4/mw5-media.json); an older producer refuses media bad-shape.

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
…n Log

DX5's media op and event as built (the attachment's index is `index`; the
event carries id, phase and the whole upload), DX4's op, DX6's media checks,
refusals and restarts; the measured surprises (the engine's module-load rule
on `$`, a Read outside the cwd after /cd, reloads deferred past a turn, a PDF
document block on the Codex gateway); and the decisions MW5's text left open.

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T13:56:38.840652Z a71e6a9 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.

…the exclude, the wake re-check

Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM merged commit 3486527 into master Oct 26, 2026
SSFSKIM added a commit that referenced this pull request Oct 28, 2026
… local images (ci-kit #174 deployed); under direct, a peer group takes a hosted Mac (#290)

Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM added a commit that referenced this pull request Nov 7, 2026
…; M4's residue on boards #173 and #174

Progress records each merge with its sha; the cutover is ticked. Outcomes
gains the cutover's entry, and M4's left-for-later items name their tickets
(the conversation fixture is a row in the architect's tracker).

Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM added a commit that referenced this pull request Nov 7, 2026
…due on boards #173/#174

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