Skip to content

Prove workspace-bound continuation crash convergence - #29

Closed
zhiiw wants to merge 19 commits into
codex/m3-managed-continuation-admission-v1from
codex/m3-managed-continuation-crash-v1
Closed

Prove workspace-bound continuation crash convergence#29
zhiiw wants to merge 19 commits into
codex/m3-managed-continuation-admission-v1from
codex/m3-managed-continuation-crash-v1

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the production-shaped crash proof for workspace-bound managed continuations and closes four durable seams exposed by that proof.

A real Runtime Host now starts a ContinuationClaimV2 against a real Gitoxide accepted head, is killed immediately after the durable continuation start, and is reopened against the same storage root and helper. Recovery closes the local Run as failed/app_restarted but keeps provider state parked as continuation_started_indeterminate; a new Turn retry does not invoke the provider.

Primary invariant

After a workspace-bound continuation start is durable, Host restart may only converge from the same v2 claim and exact accepted Gitoxide head. A local restart closure is not evidence that the provider never received the request. Recovery must not replay the provider and must not fall back to the v1 continuation authority.

  • Owner: SQLite workspace-bound continuation authority
  • Atomicity boundary: commitWorkspaceBoundContinuationStart() transaction
  • Failure state: exact-head mismatch, missing v2 capability, or unverifiable helper fails closed; durable-start uncertainty parks
  • Rollback: none for the immutable start fact; later policy must append a new explicit fact

Changes

  • Exposes the v2 continuation authority through the restricted execution-store facade, using the existing SQLite writer.
  • Adopts the durable storage-root binding when the packaged Gitoxide capability is admitted, before startup safety inspection.
  • Strictly persists the workspace-bound root descriptor's independent replayManifestDigest while retaining the legacy descriptor shape.
  • Validates continuation-start replay proof against the v2 descriptor rather than applying the v1 digest equality rule.
  • Keeps runtime_admission + app_restarted provider state indeterminate; claim-repair and real terminal outcomes retain their existing classification.
  • Adds a test-only continuation failpoint and a real Host/helper kill-and-reopen test with a durable provider-call oracle.
  • Runs the proof on Linux, macOS, and Windows in the Gitoxide helper matrix.

Verification

  • Core, Storage, Runtime, and Runtime Host builds pass.
  • Legacy continuation process-crash harness passes all five committed prefixes.
  • Workspace-bound AgentRun descriptor write/reopen regression passes.
  • Gitoxide helper admission run 32682738656: Linux, macOS, and Windows all pass the real Runtime Host crash/restart proof.
  • Provider invocation count remains zero before and after restart and after a new-Turn retry.

Stack

Depends on #28. This remains a stacked Draft and does not enable Desktop/CLI automatic continuation.

中文说明

摘要

本 PR 为 workspace-bound managed continuation 增加 production-shaped crash proof,并关闭该测试暴露出的四处 durable seam。

真实 Runtime Host 会针对真实 Gitoxide accepted head 提交 ContinuationClaimV2,在 durable continuation start 后立即被杀死,再使用同一个 storage root 和 helper 重启。Host 会把本地 Run 关闭为 failed/app_restarted,但这不能证明 provider 未收到请求,因此恢复仍停在 continuation_started_indeterminate;使用新的 Turn identity 重试也不会调用 provider。

主要不变量

workspace-bound continuation start 一旦持久化,Host 重启只能基于同一条 v2 claim 和同一个 accepted Gitoxide head 收敛;禁止重放 provider,也禁止回退 v1 continuation authority。

  • **Owner:**SQLite workspace-bound continuation authority
  • 原子性边界:commitWorkspaceBoundContinuationStart() transaction
  • **失败状态:**head 不一致、v2 capability 缺失或 helper 无法验证时 fail closed;durable start 后的不确定状态 park
  • **回滚:**不可变 start fact 不回滚;未来策略必须追加新的明确事实

三平台真实 crash gate 已通过:Linux、macOS、Windows 均验证 Host kill/reopen、exact Gitoxide head、app_restarted 本地关闭、continuation_started_indeterminate provider 状态以及零次 provider replay。

本 PR 仍是依赖 #28 的 stacked Draft,不会开启 Desktop/CLI 自动续跑。

@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-admission-v1 branch from 05db740 to 83d91db Compare August 24, 2026 03:44
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-crash-v1 branch 2 times, most recently from ff1052b to 0c43680 Compare August 24, 2026 04:02
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-admission-v1 branch from 0dd3fbb to 2bea7de Compare August 24, 2026 04:15
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-crash-v1 branch from 0c43680 to 95e184a Compare August 24, 2026 04:15
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-admission-v1 branch from 2bea7de to b2e6f0a Compare August 24, 2026 05:46
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-crash-v1 branch from 95e184a to 83f3d3e Compare August 24, 2026 05:49
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-admission-v1 branch from b2e6f0a to 51e4252 Compare August 24, 2026 06:33
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-crash-v1 branch 2 times, most recently from 9874078 to 1f9faca Compare August 24, 2026 06:47
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-admission-v1 branch from 51e4252 to 524459b Compare August 24, 2026 07:41
@zhiiw
zhiiw force-pushed the codex/m3-managed-continuation-crash-v1 branch from 1f9faca to db5a9d4 Compare August 24, 2026 07:41
@zhiiw

zhiiw commented Aug 30, 2026

Copy link
Copy Markdown
Owner Author

Closed as an obsolete extraction/integration slice. The current delivery path is the merged Gitoxide foundation followed by #40 -> #41 -> #42. This PR remains available as design and implementation history.

中文说明

该 PR 属于旧 extraction/integration 栈,现已失去独立合并价值。当前交付路径是已合并的 Gitoxide 基础,然后依次审查 #40#41#42。这里继续保留设计、实现与审查历史。

@zhiiw zhiiw closed this Aug 30, 2026
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