feat(windows): add native maka.cu/2 executor - #8
Conversation
hqhq1025
left a comment
There was a problem hiding this comment.
Review of d722afda8517cd3f7557b895b2603cb6087c4278
This is the correct architectural direction: a Windows direct-COM executor behind the existing maka.cu/2 protocol, with no second model-facing schema or supervisor. The current revision is not merge-ready yet.
Blocking findings:
- The advertised snapshot/image lifecycle is not implemented. The handshake promises a 120-second snapshot TTL and a 256 MiB image-directory budget, but snapshots have no timestamp, no expiry/eviction path exists, and image files are not tracked or deleted when a snapshot is spent, superseded, expired, evicted, or released by
session.end. After 64 unspent observations the executor permanently returnssnapshot_registry_full, and image files accumulate until the host restarts. This violates the shared protocol's resource and stale-image guarantees. limits.maxResponseBytesis advertised as 6 MiB while the sharedmaka.cu/2contract fixes this limit at 1 MiB. The implementation also replaces an oversized response with an RPC error instead of reducing/truncating the observation to the declared bound. Please use the shared 1 MiB limit and add conformance coverage for bounded observations.- The stated local validation is not reproducible on this revision:
cargo test --all-targetspasses 7 tests, not 8, andcargo clippy --all-targets -- -D warningsfails on the current checkout. This repository currently has no GitHub checks for the PR. Please make fmt/clippy/test green on both the normal Windows build and the non-Windows CI analysis target, then add the checks as an actual merge gate.
The implementation is otherwise aligned with the agreed boundary: semantic element actions use UIA patterns, keyboard dispatch is observation/focus-bound, and dispatch.point is fail-closed. I recommend fixing the lifecycle contract first, then rerunning the real Windows matrix against the new head.
Production code that can be removed or simplified: the #[cfg(test)] compatibility authorization/input subsystem is historical experiment code and does not exercise the production maka.cu/2 path. Move any useful vectors into protocol tests and delete the inactive production-file implementation.
Test quality: keep lifecycle and real-application tests, but make the authoritative tests run against this repository revision and report the exact head/artifact digest. Current downstream reports alone cannot replace repository CI.
Verdict: not ready to merge. A deeper architectural rewrite is not required; focused lifecycle/resource accounting, protocol-limit conformance, test cleanup, and CI are required.
hqhq1025
left a comment
There was a problem hiding this comment.
Re-review of 47972926c8c938f4ccaa6563d8241849d1d161a1
The revision makes substantial progress on the previous findings: it adds explicit live/spent/superseded/expired/evicted states, 120-second cleanup, eight-live-snapshot enforcement, image accounting, the 1 MiB advertised limit, focused lifecycle tests, removal of the compatibility experiment, and a CI workflow. The current revision is still not merge-ready.
Blocking findings:
- Snapshot IDs are still deterministic process-local counters (
s000...) and contain no 128-bit per-process nonce. A restarted executor will mint the same IDs again, so a stale request from the previous generation can resolve to a fresh snapshot instead of returningsnapshot_unknown. This violates the explicit restart-isolation requirement inHOST_PROTOCOL.mdsection 4.1. - Terminal snapshots retain their full
elementsmaps indefinitely untilsession.end. The eight-snapshot limit counts only live entries, so a long session can accumulate an unbounded number of spent, superseded, expired, and evicted snapshots, each retaining up to 512 element records. Keep only compact, bounded tombstones for terminal error classification and release the heavy snapshot payload immediately. - Oversized responses are made to fit by recursively truncating every JSON string and then dropping elements/tree nodes. The protocol requires retrying observation with a reduced
maxElementsand, if it still does not fit, returningresponse_too_largewith{bytes, limit}; it explicitly says fields must not be dropped to fit. The current transformation can also change element text after its digest was computed and does not mark each changed field inelement.truncated, so the returned snapshot is not a faithful dispatch authority. - The new merge gate is not green on this exact head. I reran
cargo clippy --locked --all-targets --manifest-path apps/OpenComputerUseWindows/native/Cargo.toml -- -D warningson the Linux analysis target and it fails with 16 errors (unusedOnce, Windows-only constants and fields, readback symbols, and the non-Windows worker stub). GitHub currently reports no checks for this fork head, while the README and execution plan claim clippy passed.cargo fmt --check,cargo test(10/10), and the release build do pass locally.
The previous lifecycle/image-leak and 6 MiB declaration findings are directionally addressed. The architecture remains appropriate: one shared maka.cu/2 contract and a native Windows executor, with no new model-facing schema. No deeper product-side rewrite is required, but the executor still needs protocol-conformant response generation, bounded tombstones, nonce-based IDs, and a genuinely green Windows/Linux gate.
Recommended next revision:
- Add one random 128-bit generation nonce at process startup and include it in every snapshot ID; add a two-generation collision test.
- Split live snapshot payloads from compact terminal tombstones and bound/prune both explicitly.
- Enforce the response budget while constructing/retrying the observation, preserving the protocol's truncation semantics and exact digests.
- Fix cfg scoping/dead-code warnings, make the fork workflow run on the PR head, and attach the exact Windows artifact digest.
Verdict: not ready to merge. After these focused fixes and a green exact-head Windows/Linux run, the next review can move to real Windows application and packaged Maka qualification.
|
Codex-assisted implementation review, posted on behalf of @sunheyi6. The native executor should implement the background-only desktop contract documented in The current PR should not be treated as distribution-ready yet because several advertised/implemented paths violate or cannot prove that contract:
Recommended v1 advertised surface:
Required concurrency test: keep a user typing in foreground Notepad while the executor manipulates a different background Notepad/Calculator/WPF fixture. Assert that foreground HWND/PID, mouse position, clipboard, and every user keystroke remain with the foreground app. The background action must be verified or return a typed refusal/unknown result, and an unknown outcome must not be blindly retried. After the safe semantic slice passes, background text support can be added through an explicit ladder: Ablation conclusionThe foreground/global compatibility-input paths are not required for the stated product goal and should be removed from the advertised surface. The existing snapshot lifecycle, UIA semantic operations, WGC capture, and supervised helper are the useful core; adding another mode or fallback layer would weaken the guarantee without being necessary for the browser use case. 中文说明这是一条由 Codex 协助、代表 @sunheyi6 发布的实现审查说明。原生执行器应落实 当前 PR 还不能视为可分发,因为以下已实现或已声明的路径违反了、或无法证明满足该合同:
建议 v1 只声明以下能力:
必须增加并发验收:用户持续在前台 Notepad 打字,同时执行器操作另一个后台 Notepad/Calculator/WPF fixture。断言前台 HWND/PID、鼠标位置、剪贴板以及用户每一个按键都保持在前台应用。后台动作必须得到验证,或返回明确的拒绝/未知结果;结果未知时不得盲目重试。 安全语义切片通过后,再按明确阶梯增加后台文本能力: 消融结论前台/全局兼容输入路径不是当前产品目标所必需的,应从声明能力中移除。现有 snapshot 生命周期、UIA 语义操作、WGC 截图和受监管 helper 才是有用核心;增加另一种模式或 fallback 层会削弱保证,而且浏览器场景并不需要它。 |
Summary
maka.cu/2snapshot, image, response-size, cancellation, and shutdown boundaries.clickandset_value; unconditionally refuse keyboard, point, launch, scroll, text-selection, and secondary actions.SetForegroundWindow,SetFocus,SendInput, and the obsolete scroll readback subsystem.unknown, and unknown mutations are not retried.x86_64-pc-windows-msvcwith static CRT linkage.distributionReadyremains false until the exact signed artifact passes clean-machine, mixed-DPI, concurrent-user, and packaged conversation E2E.Why browser automation is excluded
Browser workflows belong to Maka Browser Use/OpenCLI. That layer has browser-native DOM/accessibility, tab, navigation, page lifecycle, and command state, which are more reliable than treating a browser as an opaque desktop window. Duplicating browser control here would widen permissions and test scope and would create pressure to add coordinate/global-input fallbacks that violate the non-interference contract. This executor is intentionally for native desktop applications only.
Validation
cargo fmt -- --checkcargo test --locked --all-targets— 14 passedcargo clippy --locked --all-targets -- -D warningscargo build --locked --release --target x86_64-pc-windows-msvcelementActions=click,set_value, empty point/key capabilities; launch returnsunsupported_actionInteractive concurrent-user/mixed-DPI packaged E2E and Authenticode qualification remain release blockers, so this PR does not claim distribution readiness.
中文说明
摘要
maka.cu/2的 snapshot、图片、响应大小、取消和关闭边界。click和set_value;键盘、点位、启动应用、滚动、文本选择和次级操作一律明确拒绝。SetForegroundWindow、SetFocus、SendInput和已无用途的滚动读回子系统。unknown,且不会自动重试。x86_64-pc-windows-msvc目标和静态 CRT 构建。只有同一份已签名 artifact 通过 clean-machine、混合 DPI、并发用户和 packaged conversation E2E 后,才能开启distributionReady。为什么排除浏览器
浏览器流程由 Maka Browser Use/OpenCLI 负责。该层能直接使用 DOM/可访问性树、标签页、导航、页面生命周期和浏览器命令状态,比把浏览器当作不透明桌面窗口更可靠。若在本执行器重复实现浏览器控制,会扩大权限和测试范围,也会诱导加入坐标或全局输入兜底,破坏“不干扰用户”的约束。因此本执行器只面向原生桌面应用。
验证
click,set_value,点位/键盘能力为空;启动应用返回unsupported_action。并发用户/混合 DPI 的 packaged E2E 和 Authenticode 资格验证仍是发布阻断项,所以本 PR 不宣称可分发。