Repository navigation
desk-hub: MW3 scoped allows — Raised.suggestions under the bridge's bound, decide.scope - #162
Merged
Merged
Conversation
…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)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 = 8andSUGGESTION_BYTES_MAX = 2048are now exported.RpcArgs.decide.scope?: SuggestionScopeis{suggestion, sha256, destination: 'session' | 'localSettings'}.raisedShapeErrorchecks a raise's suggestions against exactly the bridge's bound. A raise past the bound is refusedbad-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
mw3producer reports sminos 1.13.0 withdecide.scopeanddecide.addDirectoryavailable.raiseRecordedScopedraises the MW3 live check's recorded requests (dx4/mw3-scoped.json, whose sha256 is indx4/README.md).decidecarrying ascopeis resolved the way the daemon does it, before anything runs.scopedAllows.play.Spec.
scopeas a plain allow, so the web must gate scopes oncontrols['decide.scope'].Nothing in
apps/desk-webchanges.Validation Evidence
npx vitest run test/session-plane.test.ts -t suggestionsfailed beforeraisedShapeErrorchecked 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.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 includesdesk-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.npm run typecheck(desk-hub): exit 0. eslint on the changed files: exit 0.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, thenci-gate: run 40306657981 success(https://github.com/SSFSKIM/MAWS/actions/runs/40306657981).python3 -I live.py scoped f1against doperpowers2fecc279. The setup was isolated: anenv -iprofile under /private/tmp, a throwaway checkout, a recording stub with zero inference, and devcloud's real secrets guard.localSettingsrule (it wrote onlywork/.claude/settings.local.json) and anaddDirectoriesallow each ran, and the next call ran unasked.f2) gave the same results.grep -cgives 0).Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)