Skip to content

test: prove managed coding v2 Host crash convergence - #71

Draft
zhiiw wants to merge 38 commits into
codex/m5-managed-coding-v2-compositionfrom
codex/m5-managed-coding-v2-crash-gate
Draft

test: prove managed coding v2 Host crash convergence#71
zhiiw wants to merge 38 commits into
codex/m5-managed-coding-v2-compositionfrom
codex/m5-managed-coding-v2-crash-gate

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

Add the production-shaped gate required before managed-coding-v2 can be enabled on a supported Desktop platform.

The gate launches the repository-pinned Electron runtime as the real Runtime Host, admits the packaged Gitoxide helper and managed command toolchain, executes a real accepted-world ManagedNodeTest, kills the Host after the provider has observed the durable tool result, and starts a second Host over the same SQLite/Git state.

Primary invariant

Once a managed observation result is durable, Host death and automatic continuation must not execute that observation again.

The successor Host must continue from the exact accepted Git tree and immutable RuntimeEvents, leaving exactly one ManagedNodeTest call/response pair.

Atomic boundary and owner

  • Runtime owns the managed observation T1/T2 boundary.
  • Gitoxide owns the accepted input tree.
  • The command sandbox owns the physical Node test process.
  • SQLite owns the immutable call/result and continuation facts.
  • Runtime Host startup recovery owns the second-run continuation.

The failpoint is external: the fake provider hangs only after it receives the already-durable tool result, then the test kills the actual Host process.

Failure and rollback

  • Missing/corrupt packaged capability: Host/profile fails closed before T1.
  • Host dies after T2: the next Host consumes durable facts; no tool replay.
  • Incomplete or divergent continuation: park/fail rather than re-run the side effect.
  • Windows Electron is not treated as a proven AppContainer Node toolchain. Windows therefore refuses managed-coding-v2 before T1 until an independently admitted standalone Node artifact exists; it never falls back to PATH or an unsandboxed process.

Platform evidence

  • Ubuntu: real Bubblewrap + packaged Electron Node-mode runtime, including kill/reopen.
  • macOS: real Seatbelt + packaged Electron Node-mode runtime, including kill/reopen.
  • Windows: production Host gate proves explicit managed_workspace_profile_unavailable; the existing Windows AppContainer/Job protocol remains tested independently. Full Node-test support is intentionally not claimed.

Local verification

  • Runtime Host typecheck/build: passed.
  • Managed command owner/admission: 5/5 passed.
  • Current-process toolchain: Windows fail-closed case passed; unsupported tamper case skipped explicitly.
  • CI planner and diff checks: passed.
中文说明

摘要

新增受支持 Desktop 平台启用 managed-coding-v2 前必须通过的真实 crash gate。

Linux/macOS 使用仓库锁定的 Electron 启动真实 Runtime Host,加载 packaged Gitoxide 与 managed command toolchain,执行 accepted-world ManagedNodeTest。provider 看到已经持久化的工具结果后挂起,测试强杀 Host;第二个 Host 再从相同 SQLite/Git 状态自动 continuation。

主要不变量

managed observation 结果一旦持久化,Host 崩溃与自动 continuation 都不得再次执行该 observation。重启后只能从 exact accepted Git tree 与 immutable RuntimeEvents 继续,最终全库只能存在一对 ManagedNodeTest call/response。

平台边界

Runtime 拥有 observation T1/T2;Gitoxide 拥有 accepted input;sandbox 拥有物理 Node 进程;SQLite 拥有不可变结果;Host startup recovery 拥有新 Run。

Ubuntu 使用真实 Bubblewrap、macOS 使用真实 Seatbelt,均执行 Host kill/reopen。Windows 当前不会把 Electron.exe 误当成已证明的 AppContainer Node toolchain,而是在 T1 前明确返回 managed_workspace_profile_unavailable。后续 Windows 支持必须引入独立校验的 standalone Node artifact,禁止从 PATH 借用或退化成非沙箱执行。

zhiiw added 30 commits August 31, 2026 05:06
@zhiiw
zhiiw force-pushed the codex/m5-managed-coding-v2-crash-gate branch 9 times, most recently from 078daf3 to 6dda20a Compare August 31, 2026 03:26
@zhiiw
zhiiw force-pushed the codex/m5-managed-coding-v2-crash-gate branch from 6dda20a to b4060f0 Compare August 31, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant