Skip to content

docs(computer-use): fix residual intervention-lock and keyboard doc drift - #5867

Merged
Astro-Han merged 1 commit into
apache:mainfrom
daierenao:docs/computer-use-audit-3522-v2
Oct 10, 2026
Merged

Astro-Han merged 1 commit into
apache:mainfrom
daierenao:docs/computer-use-audit-3522-v2

Conversation

@daierenao

Copy link
Copy Markdown
Contributor

Summary

Re-creation of #4899 without the disclosed Grok-generated content, per the maintainer guidance on that PR: the original was closed on process grounds (Category X tooling under the draft ASF generative-tooling criteria), not on its merits. This PR was produced with ZCode (GLM) and every statement below was re-verified against current main today.

Since #4899 was opened, #5172 landed an independent audit of the same nine-document group (2026-09-12). Re-diffing that audit against the current tree shows four of #4899's five corrections are already satisfied on main; two code-anchored corrections from the original review remain outstanding, and this PR fixes exactly those:

  • docs/computer-use-foundation-contract.md — the intervention/lock/stop matrix row still read FAIL ("no Desktop production event producer"), but the guards are wired: createDesktopPhysicalInputGuard (idle-time via powerMonitor.getSystemIdleTime) and createComputerUseScreenLockGuard are assembled in apps/desktop/src/main/desktop-native-capability-assembly.ts, and packages/computer-use/src/maka-cu-backend.ts maps their outcomes to user_intervened / screen_locked. The row becomes PARTIAL, retaining the point that there is still no attributable macOS event-tap producer.
  • docs/computer-use-model-loop-foundation.md — keyboard was listed as disabled and fail closed alongside the coordinate and pixel paths, but press_key is a semantic action and type/key are implemented in maka-cu-backend.run, where §6.4 requires each dispatch to bind to the observed target or a verified focus owner. The sentence now describes keyboard as capability-dependent.

Both documents are translation_status: source-only with no counterpart, so no paired-translation sync is needed; last_verified is refreshed on both.

Refs #3522
Refs #4899

Verification

  • Re-confirmed on today's main (e6db756) that the two previously removed test paths (apps/desktop/src/main/__tests__/computer-use-pip-motion.test.ts, apps/desktop/e2e/accessibility-coverage.spec.ts) remain absent and that every path cited in the diff resolves.
  • Re-confirmed createDesktopPhysicalInputGuard / createComputerUseScreenLockGuard assembly (apps/desktop/src/main/desktop-native-capability-assembly.ts:83,100), the user_intervened / screen_locked mapping (packages/computer-use/src/maka-cu-backend.ts), and the §6.4 focus-binding refusals for unbound keyboard dispatch.
  • Re-confirmed no attributable macOS event-tap producer exists (CGEventTap / global event monitor appears only in PiP comments, not as a producer).
  • Markdown-only change: biome format does not process .md; no frontmatter/translation sync issues (both documents are source-only).
  • Not run (Markdown-only change): full npm test, Desktop E2E, Computer Use real-provider/real-machine harnesses.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope:

ZCode (GLM-5.3-Flash) re-verified the original audit against current main, drafted the two residual corrections, and prepared this PR. @daierenao remains the human contributor of record and reviewed the final diff.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally (documentation-only change; no code affected)

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

…rift

Re-creation of apache#4899 without the disclosed Grok-generated content, per
the maintainer guidance on that PR. apache#5172 already landed the bulk of the
Computer Use audit on main; two code-anchored corrections from that
review remain outstanding:

- foundation-contract: the intervention/lock/stop matrix row still said
  FAIL with no Desktop production event producer, but the idle-input and
  screen-lock guards are wired via
  apps/desktop/src/main/desktop-native-capability-assembly.ts and mapped
  to user_intervened/screen_locked in
  packages/computer-use/src/maka-cu-backend.ts. The row is PARTIAL now;
  there is still no attributable macOS event-tap producer.
- model-loop-foundation: keyboard actions were listed as disabled and
  fail closed alongside the coordinate and pixel paths, but press_key is
  a semantic action and type/key are implemented in maka-cu-backend.run
  under the 6.4 focus-binding rules.

Refs apache#3522
Refs apache#4899

Generated-by: GLM-5.3-Flash (ZCode)
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 30, 2026

@hqhq1025 hqhq1025 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 71a7644a7f496fe702761978f49eedd0c123b65a. This documentation-only change corrects the intervention/lock/stop matrix from FAIL to PARTIAL (docs/computer-use-foundation-contract.md:159) and distinguishes capability-dependent keyboard actions from disabled coordinate/pixel actions (docs/computer-use-model-loop-foundation.md:64-68). Both documents remain source-only translations.

The corrected claims match the inspected implementation: Desktop assembles the screen-lock guard and idle-time physical-input guard (desktop-native-capability-assembly.ts:83,100-106); the backend maps active input to user_intervened (maka-cu-backend.ts:1069-1080), implements press_key and type/key (maka-cu-backend.ts:2288-2308,2319-2339), and requires a bound focus token before key dispatch (maka-cu-backend.ts:2073-2124). I found no substantiated P0-P3 issue in these two corrections.

This exact head's hosted CI test and labeling checks passed. Diff check and static merge against current main ed38ccbb were clean; current main's adjacent assembly change does not alter the cited guards. I did not run native Computer Use, a real provider loop, or full local tests for this Markdown-only diff. GitHub still requires its normal review gate; this comment is not merge approval.

Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at @Astro-Han's explicit request: the automated review of this exact head found no blocking (P0–P2) issues, and CI is green.

@Astro-Han
Astro-Han merged commit 449c62c into apache:main Oct 10, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants