Skip to content

feat(runtime-host): add managed Node workspace transform kernel - #83

Draft
zhiiw wants to merge 1 commit into
codex/m5-hermetic-node-command-product-v1from
codex/m5-managed-node-transform-v1
Draft

feat(runtime-host): add managed Node workspace transform kernel#83
zhiiw wants to merge 1 commit into
codex/m5-hermetic-node-command-product-v1from
codex/m5-managed-node-transform-v1

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the owner-controlled M5 workspace-transform kernel on top of the managed Node command product profile.

Main invariant

A ManagedNodeTransform may only compute one bounded UTF-8 output from an immutable accepted Git tree. It cannot mutate the managed worktree or user checkout directly. Gitoxide freezes the exact output as a candidate, and SQLite is the only authority that accepts the successor and releases the durable mutation reservation.

Ownership and atomic boundary

  • Runtime owns the linear operation capability and immutable provider result.
  • The Host owns accepted-tree materialization, the verified toolchain, sandbox process, and one physical output path.
  • Gitoxide owns candidate construction and accepted-ref projection.
  • SQLite RuntimeEvents and the workspace-successor transaction own accepted truth.
  • managed_mutation_v2 and managed_mutation_v3 are payload shapes for Write/Edit and Node transform, respectively; both bind the same canonical mutation execution-profile v2 digest.
  • The unused mutation profile v1 and transitional profile-set fallback were removed. Experimental Draft data is intentionally not migrated.

Failure and convergence

  • Before T1: dispose execution roots and reject admission.
  • After T1 without terminal evidence: keep the reservation and park; never use generic T2.
  • Candidate published before SQLite acceptance: exact retry/recovery revalidates operation, path, profile, and receipt.
  • SQLite accepted before ref promotion: replay projection only; never rerun the transform.
  • Cleanup failures affect disposable execution artifacts, not accepted truth.

Scope

This is enabling infrastructure. It intentionally does not advertise a packaged Desktop/Runtime Host profile yet. Packaged profile v4, pre-Session negotiation, and a real Host kill/reopen test belong to the next composition slice.

Verification

  • Builds: core, storage, runtime, runtime-host
  • Focused kernel suite: 128 passed, 1 expected helper-dependent skip
  • Biome lint and git diff --check
中文说明

摘要

本 PR 在 managed Node command 产品 profile 之上加入 M5 workspace-transform kernel。

主要不变量

ManagedNodeTransform 只能从 immutable accepted Git tree 计算一个有界 UTF-8 输出,不能直接改 managed worktree 或用户 checkout。Gitoxide 把 exact output 固化为 candidate;只有 SQLite workspace-successor transaction 可以接受新版本并释放 durable mutation reservation。

Owner 与原子边界

  • Runtime 拥有线性 operation capability 和 immutable provider result;
  • Host 拥有 accepted-tree materialization、已验证 toolchain、sandbox process 和唯一物理输出路径;
  • Gitoxide 拥有 candidate 与 accepted-ref projection;
  • SQLite RuntimeEvents 与 successor transaction 是 accepted truth;
  • managed_mutation_v2managed_mutation_v3 只区分 Write/Edit 和 Node transform 的 payload 字段,二者统一绑定 canonical mutation execution profile v2 digest;
  • 未使用的 mutation profile v1 和过渡 profile-set fallback 已删除;Draft 实验数据不迁移。

失败与收敛

  • T1 前失败:回收 execution roots,拒绝 admission;
  • T1 后没有 terminal evidence:保留 reservation 并 park,绝不走 generic T2;
  • candidate 已发布、SQLite 未接受:重试时重验 operation/path/profile/receipt;
  • SQLite 已接受、ref 未 promotion:只重放 projection,不重跑 transform;
  • cleanup 失败只影响 disposable artifact,不改变 accepted truth。

范围

这是 enabling infrastructure,暂不让 packaged Desktop/Runtime Host 宣告该 profile。下一切片再加入 packaged profile v4、Session 前 negotiation 和真实 Host kill/reopen 测试。

验证

  • core/storage/runtime/runtime-host 构建通过;
  • 定向 kernel suite:128 通过,1 个依赖真实 helper 的预期跳过;
  • Biome lint 与 git diff --check 通过。

@zhiiw
zhiiw force-pushed the codex/m5-managed-node-transform-v1 branch from 4a4d840 to 343beb7 Compare August 31, 2026 06:02
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