← Back to Pull requests

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

Closed
unknown closed this pull request without merging on Oct 10, 2026 10:53 UTC
View on GitHub
unknown unknown commented on Sep 30, 2026 05:45 UTC
Author

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 (e6db75689) 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
  • Diff: 440 lines (+330 / -110) across 5 files Reviewer: hqhq1025 Review duration: 14707m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 440 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.364
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5867"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.3% (MEDIUM) · Higher = larger blast radius
    45.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.6% · Safe to merge
    19.6%
    Repository