Skip to content

desk-hub: MW3 scoped allows — Raised.suggestions under the bridge's bound, decide.scope - #162

Merged
SSFSKIM merged 2 commits into
masterfrom
desk-ctl-mw3
Oct 26, 2026
Merged

SSFSKIM merged 2 commits into
masterfrom
desk-ctl-mw3

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 26, 2026

Copy link
Copy Markdown
Owner

The hub half of the desk control surface's MW3, scoped allows. The machine half, sminos 1.13.0, is SSFSKIM/doperpowers#398.

What it builds

Protocol.

  • Raised.suggestions?: PermissionUpdate[] is the engine's permission updates, carried verbatim.
  • SUGGESTIONS_MAX = 8 and SUGGESTION_BYTES_MAX = 2048 are now exported.
  • RpcArgs.decide.scope?: SuggestionScope is {suggestion, sha256, destination: 'session' | 'localSettings'}.

raisedShapeError checks a raise's suggestions against exactly the bridge's bound. A raise past the bound is refused bad-shape, and so is a pending set that holds such a raise. That covers more than 8 suggestions, an entry over 2048 bytes of canonical UTF-8 JSON, and anything that is not a list of objects.

The fake machine's mw3 producer reports sminos 1.13.0 with decide.scope and decide.addDirectory available.

  • raiseRecordedScoped raises the MW3 live check's recorded requests (dx4/mw3-scoped.json, whose sha256 is in dx4/README.md).
  • A decide carrying a scope is resolved the way the daemon does it, before anything runs.
  • Each resolved rule is recorded in scopedAllows.
  • The CLI raises the recorded requests after play.

Spec.

  • Interfaces gains two dated "MW3 as built" lines, one at the decision POST and one at DX6.
  • The Decision Log gains "MW3 as built", which lists the gaps settled, what was rejected, and one open item: a daemon older than 1.13.0 runs a scope as a plain allow, so the web must gate scopes on controls['decide.scope'].
  • Surprises gains three entries: what 2.1.310 suggests for each kind of call; the restored input in the engine's suggestions; and the harness note on scrubbed output.

Nothing in apps/desk-web changes.

Validation Evidence

  • Bound tests, written first. npx vitest run test/session-plane.test.ts -t suggestions failed before raisedShapeError checked suggestions: 2 failed | 1 passed (a ninth suggestion and 2049 bytes refused; a pending set refreshing). After the change: 3 passed. Both sides of the bound are covered: 8×2048 is kept, while 9 suggestions, 2049 bytes, a non-object and a non-list are refused. A pending set refreshes with suggestions and without them, and one past the bound refuses the whole set.
  • Wider desk-hub run. npx vitest run test/fake-machine test/protocol test/session-plane.test.ts (desk-hub): Test Files 21 passed (21), Tests 423 passed (423). This includes desk-mw3.test.ts (9 tests): the recording's hash, its contents and a type test; the producer advertising, raising and resolving scopes; 7 refusals with nothing executed; read-only; and the mw2 producer.
  • Typecheck and lint. npm run typecheck (desk-hub): exit 0. eslint on the changed files: exit 0.
  • CI. scripts/ci-gate.sh /tmp/maws-desk-mw3 --gates static,unit: static, unit 1/4, unit 2/4, unit 3/4 and unit 4/4 all reported success, then ci-gate: run 40306657981 success (https://github.com/SSFSKIM/MAWS/actions/runs/40306657981).
  • Live check. The recording comes from the live check on engine 2.1.310, run with python3 -I live.py scoped f1 against doperpowers 2fecc279. The setup was isolated: an env -i profile under /private/tmp, a throwaway checkout, a recording stub with zero inference, and devcloud's real secrets guard.
    • A session rule, a localSettings rule (it wrote only work/.claude/settings.local.json) and an addDirectories allow each ran, and the next call ran unasked.
    • The request the guard had restored was raised without suggestions, and stayed that way after a respawn.
    • The value appeared in no stream, route, snapshot or SMINOS_HOME.
    • A stand-in guard (f2) gave the same results.
    • The recording holds no secret value (grep -c gives 0).

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

…ound, decide.scope

The protocol carries a raise's `suggestions` (the engine's permission
updates, verbatim) and a decide's `scope` {suggestion, sha256,
destination}. raisedShapeError admits suggestions under exactly the
bridge's bound (8, each at most 2048 canonical UTF-8 bytes) and refuses a
raise, or a whole pending set, past it. The fake machine's `mw3` producer
(sminos 1.13.0) advertises decide.scope and decide.addDirectory, raises
the MW3 live check's recorded requests (dx4/mw3-scoped.json) and resolves
a scoped decide as the daemon does. The spec records MW3 as built in
Interfaces, the Decision Log and Surprises.

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-26T10:33:26.416918Z cc0dfcc 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: desk-sminos-orchestrator#b4948247 (doperpowers 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