Uh oh!
There was an error while loading. Please reload this page.
feat(cu): establish foundation contract and approval boundary - #857
Conversation
ca09dd2 to
50ebaf8Compare50ebaf8 to
c4468e1Comparee80b218 to
79923b4Comparehqhq1025
commented
Jul 13, 2026
@astrohan The rebuilt Computer Use stack is now fully published and ready for review. Merge order: #857 -> #892 -> #893 -> #894 -> #895 -> #896 -> #897 -> #898. Each follow-up currently targets |
Astro-Han
left a comment
There was a problem hiding this comment.
Approving #857 as the foundation PR. I do not see a P1 in this PR by itself.
P2
ToolRuntimesnapshots tool arguments, but the dynamic sandbox resolver still receives the originalargs. It should receiveexecutionArgsso permission and execution use the same input.- The approval contract accepts targetless
observeandscreenshotrequests. #857 has no executor, so I am treating this as P2 here, but the contract should either require a target or define the target resolution step before approval. - Real mutation requests carry an
observation_idbut no app or window. The permission prompt therefore cannot show the canonical target required by the contract. The new Story uses app and window fields that the runtime schema will reject for these actions. bounded()collapses whitespace and truncates app selectors before building the remembered scope. Distinct exact selectors can receive the same scope key. Authorization identity should remain lossless; display normalization should be separate.- The persisted Computer Use summary still accepts raw
appandobservationIdvalues without secret redaction. Since the driver accepts an exact window title asapp, window titles and secret-shaped identifiers can enter session logs, telemetry, and artifact metadata. PiAgentBackendwrites raw Computer Use arguments throughensureToolCall()before permission projection. Typed text and coordinates can be stored even though the emitted permission request is redacted. Thetool_startpath has the same gap.- Unknown, malformed, and unbound requests can receive reusable scopes. Examples include an unbound
typerequest with onlyapp, different unknown actions collapsing into the sameunknownscope, andscreenshotbeing downgraded byinclude_screenshot:false. Invalid shapes should fail before permission evaluation, or at minimum be ineligible for turn memory. - The CLI prompt says only
allow, but every accepted request is sent withrememberForTurn:true. It needs separate one-time and turn-scoped choices whenrememberForTurnAllowedis true.
P3
- The Desktop note says a new observation will prompt again, but a remembered
observerequest for the same target is allowed without another prompt. The copy and lease behavior should agree. - The accepted contract links four
docs/*.mdevidence files that are not present in the repository. Please add stable references or remove those links.
Scope note: once #892 and #893 are included, item 2 becomes a reachable P1 because targetless observe selects a window after approval and targetless screenshot captures the desktop. That should be fixed before those PRs merge.
79923b4 to
b15b1e6Comparehqhq1025
commented
Jul 13, 2026
@Astro-Han Thanks, I went through all ten points and applied the ones that hold under the current architecture. Addressed in #857:
Addressed in #892 because these require Runtime-owned observation state:
I intentionally did not make Core invent or trust a canonical target before Runtime has observed one. That would move executor state into the foundation and weaken the boundary rather than fix it. Validation after rebasing onto current main: #857 full build/test/typecheck passed (Desktop 2415/2415); #892 Runtime 1462 passed with 7 platform skips and full typecheck; #893 Computer Use 103/103 and full typecheck; downstream stack was rebased and its CI is running. |
Uh oh!
There was an error while loading. Please reload this page.
* docs: retire tracked notes into the archive notes/ regrew tracked files after the archive README retired it as an undocumented parallel authority. Move the simplification baseline map (#871-#887) and the shipped composer-mentions v1 spec (#979) into docs/archive/, register them under Former repository notes, and point the citing source comments at the archived path. * docs: archive computer-use chronicles and research records The #857-#985 computer-use chain left one root document per PR: follow-up fix records, an incident investigation, and run logs that duplicate the kept contracts. Archive the seven chronicles, mark the foundation contract validation matrix as the #857 split-gate baseline (current state lives in source and contract tests), and register each archived file in the archive README with a pointer to its current authority. Also archive the WorkBuddy/QoderWork reverse-engineering records (the shipped design contract stays at docs/expert-team-runtime.md) and the synthesis-cache benchmark log (progress belongs in issues #481/#578), and fix the two surviving links to the moved paths. * docs: map current contracts in the documentation README Seventeen root documents existed outside the authority map with zero incoming links. After archiving the chronicles, list the surviving computer-use contracts and the expert-teams runtime contract, and write down the maintenance rule that PR follow-up records, incident investigations, and run logs belong in pull requests or the archive — with notes/ and docs/local/ as untracked local scratch.
Summary
First slice of the rebuilt Computer Use stack. This PR establishes the provider-neutral contract and the approval/privacy boundary before any runtime frame state or native executor is added.
computer_usecategory;Reverse-engineering evidence
The contract is aligned with the local Codex Computer Use reproduction lab:
docs/08-wrapper-policy-and-toctou.md: canonical app approval, pre-await parameter snapshot, approval is capability rather than action freshness;docs/13-policy-error-state-machine.md: policy -> approval -> fresh observation -> action, plus intervention/lock/blocked-URL states;docs/16-service-process-lifecycle-and-retention.md: exact executable ownership and fail-closed connection cleanup;docs/19-electron-presentation-and-mcp-event-contract.md: presentation is separate from native action transport.Maka intentionally uses a stricter short-lease policy than Codex's persistent app approval: target and action class changes require a new approval.
Scope
Owned by this PR:
Not owned by this PR:
Verification
Validated again after rebasing onto
maka-agent/main@9750ff51:git diff --checkpassed.Stack
This is PR A. Planned follow-ups:
Tracks #836.