Uh oh!
There was an error while loading. Please reload this page.
feat(runtime): establish the managed mutation acceptance kernel - #4265
feat(runtime): establish the managed mutation acceptance kernel#4265zhiiw wants to merge 6 commits into
Conversation
cc194db to
a6bf8f3Comparezhiiw
commented
Aug 30, 2026
Thanks — I agree with the ownership diagnosis, but I have kept the delivery at two PRs rather than splitting it into four smaller protocol fragments. The stack is now organized as follows:
I also corrected the recovery claim: a pure transform is invoked at most once per live Runtime execution, but it may be deterministically recomputed after a pre-T2 process loss. The durable guarantee is at most one accepted successor, not exactly-once invocation of a pure function. Once T2/successor is durable, recovery adopts the receipt and does not recompute the transform. Both branches were rebuilt together from current 中文说明感谢这轮审查。我同意 owner 边界的判断,但没有继续机械拆成四个 PR,而是收敛为两个可独立证明、同时又不会过度碎片化的交付:
同时修正了恢复合同:pure transform 在一次 live Runtime execution 中最多调用一次,但 pre-T2 进程退出后可以基于同一 durable operation 做确定性重算。真正的 durable 保证是“最多一个 successor 被接受”,不是“纯函数 exactly once”。T2/successor 一旦持久化,恢复只采用 receipt,不再重算 transform。 两个分支已经一起从最新 |
Summary
Establish the managed mutation kernel that owns the durable boundary from T1 reservation through terminal settlement and atomic SQLite successor acceptance.
This PR intentionally stops before Gitoxide candidate reopening and accepted-ref repair. Those recovery and projection responsibilities now live in a second stacked delivery so this PR has one primary invariant:
Ownership
Atomic boundary
For a successful mutation, SQLite commits the tool outcome, workspace successor fact, canonical head CAS, and reservation release in one transaction. For no-change or a proven no-effect business failure, SQLite commits the terminal outcome and reservation release without advancing the head.
Failure and retry states
The no-effect bearer is now bound to its issuing owner, concrete execution store, and durable storage-root identity. Runtime also constructs the terminal outcome once and uses that same immutable event for live publication and durable settlement.
Follow-up boundary
The stacked Gitoxide recovery PR owns durable candidate receipt reopening, accepted-ref projection, active-reservation recovery state, and production-shaped helper crash evidence. It does not widen this PR's SQLite or Runtime authority.
Verification
upstream/main.git range-diffpreserved all six extracted commits exactly.git diff --checkpasses.中文说明
摘要
本 PR 只建立 managed mutation kernel,负责从 T1 reservation 到 terminal settlement 与 SQLite 原子 successor acceptance 的 durable 边界。
Gitoxide candidate 重开与 accepted-ref 修复已经移到第二个 stacked PR。本 PR 只证明一个主要不变量:
Owner
原子性与失败状态
成功 mutation 在一个 SQLite transaction 中提交 tool outcome、workspace successor fact、canonical head CAS 与 reservation release。no-change 或已证明无副作用的业务失败只提交 terminal outcome 并释放 reservation,不推进 head。
缺少证明或证明冲突时 fail closed,禁止 generic fallback。no-effect capability 已绑定签发 owner、具体 execution store 与 durable storage-root identity;Runtime 只构造一次 terminal outcome,live publication 与 durable settlement 使用同一 immutable event。
后续边界
第二个 stacked Gitoxide recovery PR 负责 durable candidate receipt 重开、accepted-ref projection、active reservation recovery state 与真实 helper crash evidence,不会扩大本 PR 的 SQLite/Runtime 权限。
验证
本分支已从最新
upstream/main重建;六个 extraction commits 经range-diff全部精确保留;Core、Storage、Runtime、Runtime Host 构建通过;mutation/settlement/persistence 定向测试通过;跨 store 伪造 no-effect capability 会被拒绝;git diff --check通过。