Skip to content

feat(runtime-host): own Plan runtime state - #2082

Merged
M4n5ter merged 1 commit into
mainfrom
feat/runtime-host-plan-authority
Aug 4, 2026
Merged

M4n5ter merged 1 commit into
mainfrom
feat/runtime-host-plan-authority

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 4, 2026

Copy link
Copy Markdown
Member
English

Summary

  • Move durable Plan state behind a lease-authenticated Runtime Host writer, with bounded v0 query/control operations and typed client helpers.
  • Compose planning and execution tools from Host-owned Plan state, and route approval, revision, resume, cancellation, recovery, and collaboration-mode transitions through the Runtime authority.
  • Make Plan controls retry-safe across disconnects and Host restarts with durable operation receipts, revision-pinned queries, continuity refresh, and multi-client serialization.
  • Preserve pre-Host embedded Plan ledgers through an explicit bounded legacy projection. Lossy projected proposals and executions cannot continue as ordinary work; they can only be revised, abandoned, cancelled, or replanned.
  • Cover the production Host composition with two UDS clients, successor recovery, exact replay, and safe cancellation after restart.

Scope

This is the non-serving M3 authority extraction tracked by #1167. Production Client adapter wiring and the atomic ownership cutover remain tracked by #2010 and M5; existing production entrypoints are unchanged.

Validation

  • Core: 769 passed
  • Runtime: 3,095 passed, 9 skipped
  • Runtime Host: 632 passed
  • Storage Plan workflow and legacy-projection tests
  • Workspace typecheck, lint, format, and diff checks

Part of #1167

简体中文

摘要

  • 将持久 Plan 状态收归经过 lease 认证的 Runtime Host writer,并提供有界 v0 query/control operation 与类型化 Client helper。
  • 基于 Host-owned Plan state 组合规划与执行工具,并通过 Runtime authority 统一处理审批、修订、恢复执行、取消、恢复流程与 collaboration mode 切换。
  • 通过持久 operation receipt、绑定 revision 的查询、continuity refresh 与多 Client 串行化,让 Plan control 在断线和 Host 重启后仍可安全重试。
  • 通过显式且有界的 legacy projection 保留 Host 迁移前的 embedded Plan ledger。有损投影后的 proposal/execution 不会被当作普通任务继续执行,只允许修订、放弃、取消或重新规划。
  • 使用生产 Host composition 覆盖双 UDS Client、successor recovery、精确重放,以及重启后的安全取消。

范围

这是 #1167 追踪的非 serving M3 authority extraction。Production Client adapter wiring 与原子 ownership cutover 仍由 #2010 和 M5 追踪;现有 production entrypoint 保持不变。

验证

  • Core:769 项通过
  • Runtime:3,095 项通过,9 项跳过
  • Runtime Host:632 项通过
  • Storage Plan workflow 与 legacy projection 测试
  • 全仓 typecheck、lint、format 与 diff 检查

#1167 的一部分

@M4n5ter
M4n5ter force-pushed the feat/runtime-host-plan-authority branch from 461573e to 55dd931 Compare August 4, 2026 05:46
@M4n5ter

M4n5ter commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

CI note: the failing test_headless check, and therefore the aggregate test check, are unrelated to this PR.

The single Headless failure is caused by MAKA_AHE_CURRENT_COMPONENTS still referencing apps/desktop/src/main/workspace-instructions.ts, which was removed by #2081. The shared implementation now lives at packages/runtime/src/system-prompt/workspace-instructions.ts. I reproduced the same failure locally after rebasing onto the latest main: 1 failure out of 1,339 Headless tests.

The checks relevant to this Runtime Host change all pass: typecheck, test_workspaces, test_runtime_host, and e2e.

@M4n5ter
M4n5ter marked this pull request as ready for review August 4, 2026 05:51
@M4n5ter
M4n5ter merged commit f392101 into main Aug 4, 2026
8 of 10 checks passed
@M4n5ter
M4n5ter deleted the feat/runtime-host-plan-authority branch August 4, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant