状态:Accepted 适用范围:Desktop foundation;CLI 仅实验性 opt-in;@maka/headless 暂不纳入 目的:定义 stacked PR 不可破坏的合同与验证门。
外部证据参考(不属于本仓库):
codex-computer-use-lab/docs/08-wrapper-policy-and-toctou.md:canonical app approval、pre-await snapshot、approval 与 action freshness 分离;codex-computer-use-lab/docs/13-policy-error-state-machine.md:policy → approval → fresh observation → action,以及 intervention/lock/blocked URL 状态;codex-computer-use-lab/docs/16-service-process-lifecycle-and-retention.md:exact executable ownership、client/idle lifecycle、connection-loss cleanup;codex-computer-use-lab/docs/19-electron-presentation-and-mcp-event-contract.md:presentation 与 native action transport 分离。上述文件位于独立逆向实验仓库。本文只记录由 Maka 测试锁定的合同, 不把外部路径声明为本仓库内链接。
Observation authority
frameId + epoch、截图尺寸、pid + windowId、capture-local 坐标信息,以及适用时的 Electron page identity。Action binding
Exact target validation
user_intervened。物理介入和 terminal host state 必须来自明确事件。Execution ownership
session + turn + generation + pid + windowId + page/frame,并在失败、stale、新 observation、intervention、service generation 变化、turn/session 结束时撤销。Postcondition
verified:true 必须由 action-specific effect/readback 支撑。supported:true, ok:false 为本次 terminal failure;仅 side-effect-free 的 supported:false 可进行一次显式允许的 fallback。Service lifecycle
healthy / degraded / unavailable,不能只检查 binary path。Approval and privacy
Presentation isolation
readyForInteraction 只能通过有界 fail-open 策略影响 dispatch 时机;finished 不阻塞 native dispatch 或 postcondition。PASS:当前证据直接覆盖;PARTIAL:组件证据存在但 production 闭环不足;FAIL:当前实现违反合同;UNKNOWN:缺少足够证据。
本矩阵记录 #857 拆分链建立时的基线状态,用于界定各 stacked PR 的验证责任。拆分链合入后,各领域当前状态以源码与合同测试为准。
| Contract area | 状态 | 当前证据 | 拆分链需要的证据 |
|---|---|---|---|
| Frame/window binding、duplicate rejection | PASS | frame state、bound-action、stale/duplicate tests | 在 Runtime slice 保留 focused tests |
| Capture-local coordinate authority | PASS | window-local transform、scale/geometry、Retina/negative-origin tests | decoy window 下的 cumulative Desktop E2E |
| Page identity、driver-only executor | PARTIAL | PID-owned CDP/page resolution,无 direct executor bypass | document replacement test;填充 documentFingerprint |
| Semantic identity refetch | PARTIAL | unique refetch、missing/ambiguous rejection | token mismatch 不得接受 replacement control |
| Occlusion、no foreground/pixel fallback | PASS | coordinate/semantic occlusion 与 fail-closed tests | real-window safety sentinel |
| Fresh postcondition、effect verification | PARTIAL | mutation 后要求 fresh observation,部分 readback | 所有 advertised mutation 的 cross-layer tests |
| Per-session queue、generation lease | PARTIAL | session queue/frame claim;lease 修复尚在本地 | concurrent-session 与 intervention-before-dispatch tests |
| Physical intervention、lock、stop | FAIL | 有状态机原型,无 Desktop production event producer | 真实 host wiring 与 transition tests |
| Service recovery、unknown outcome | PARTIAL | 本地 service abstraction 与 unit tests | restart reset、attestation、child-crash、cleanup E2E |
| Approval semantics | FAIL | 旧实现是整 turn scope | 分级 lease、脱敏 permission event、sensitive-target tests |
| Privacy、telemetry | FAIL | 旧 observation/tool args 可含敏感内容 | persistence/redaction tests;allowlist report schema |
| Presentation lifecycle | PARTIAL | 本地 candidate 存在;远端 #777 与 #699 相同 | 重建 presentation-only PR 与 cumulative E2E |
| Provider/model compatibility | PARTIAL | Desktop 默认走统一 function harness | vision gate;每个准入 model 的 real-runtime evidence |
| Binary provenance | PASS | source/archive/binary/license pinning | 独立 supply-chain verifier |
| Signed packaged app | UNKNOWN | 无 .app signing/notarization/Gatekeeper 证据 | nested helper、TCC chain、cold-start package smoke |
每个 stacked PR 必须写清:负责的 contract 条款、non-goals、exported interface、focused verifier 和 cumulative verifier。重建从最终已验证 tree 按目标文件/hunk 提取,不机械重放旧 73-commit 历史。