Skip to content

feat(runtime): bind dependency identity before managed observation - #73

Draft
zhiiw wants to merge 1 commit into
codex/m5-dependency-snapshot-authorityfrom
codex/m5-dependency-observation-binding
Draft

feat(runtime): bind dependency identity before managed observation#73
zhiiw wants to merge 1 commit into
codex/m5-dependency-snapshot-authorityfrom
codex/m5-dependency-observation-binding

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • add managed_observation_v2, which freezes an explicit no-dependency mode or one exact opaque dependency snapshot identity before T1
  • bind dependency environment/content, Node ABI, platform, toolchain, accepted Git tree, and observed test files into one exact RuntimeEvent dispatch
  • reject dependency paths, caller-asserted digests, unknown fields, profile mismatches, and all post-T1 fallback
  • retain the v1 decoder for already-written dependency-free observation events

Primary invariant

A dependency-aware ManagedNodeTest may cross T1 only after Runtime receives one exact owner-issued dependency identity: explicit none, or the opaque environmentId + contentTreeSha256 + Node ABI/platform from a snapshot lease. Paths and checkout fallback are not part of the durable protocol.

Owner and atomic boundary

The Host admission owner chooses and holds the lease before T1. Runtime validates that the tool profile and full dispatch protocol agree, then the existing RuntimeEvent writer atomically commits the entire T1. This slice introduces no dependency projection and does not expose the lease path to Runtime.

Verification

  • Core build and RuntimeEvent decoder suite: 26/26 passed
  • Runtime build and durable ToolRuntime boundary suite: 46/46 passed
  • exact profile digest test: passed
  • malformed dependency/platform/profile cases: rejected
  • Biome and git diff --check: passed

This is a stacked Draft over #72. The next slice consumes the opaque lease inside the platform sandbox; until then v2 is an enabling durable boundary, not a dependency-running product claim.

中文说明

摘要

  • 新增 managed_observation_v2,在 T1 前冻结显式无依赖模式,或一个 exact opaque dependency snapshot identity;
  • 将 dependency environment/content、Node ABI、platform、toolchain、accepted Git tree 和测试文件观察结果放进同一个 exact RuntimeEvent dispatch;
  • 拒绝 dependency path、调用者自报 digest、未知字段、profile 不匹配和 T1 后 fallback;
  • 保留 v1 decoder,用于读取已经写出的 dependency-free observation event。

主要不变量

依赖感知的 ManagedNodeTest 只有在 Runtime 收到一种 exact owner-issued dependency identity 后才能跨过 T1:显式 none,或 snapshot lease 的 environmentId + contentTreeSha256 + Node ABI/platform。durable protocol 不携带路径,也不允许回退 checkout。

Owner 与原子边界

Host admission owner 在 T1 前选择并持有 lease。Runtime 验证 tool profile 与完整 dispatch protocol 一致,然后由既有 RuntimeEvent writer 原子提交完整 T1。本切片不新增 dependency projection,也不向 Runtime 暴露 lease path。

这是 #72 之上的 stacked Draft。下一切片才会在平台 sandbox 内消费 opaque lease;在那之前,v2 只是 durable boundary,不声称已经能运行带依赖测试。

@zhiiw
zhiiw force-pushed the codex/m5-dependency-observation-binding branch from e04801b to af533c0 Compare August 31, 2026 00:15
@zhiiw
zhiiw force-pushed the codex/m5-dependency-snapshot-authority branch from 51518dd to b5b9b10 Compare August 31, 2026 00:19
@zhiiw
zhiiw force-pushed the codex/m5-dependency-observation-binding branch from af533c0 to ff1c113 Compare August 31, 2026 00:19
@zhiiw
zhiiw force-pushed the codex/m5-dependency-snapshot-authority branch from b5b9b10 to 0e9fd03 Compare August 31, 2026 01:02
@zhiiw
zhiiw force-pushed the codex/m5-dependency-observation-binding branch from ff1c113 to 06cf779 Compare August 31, 2026 01:02
@zhiiw
zhiiw force-pushed the codex/m5-dependency-snapshot-authority branch from 0e9fd03 to cf3d66f Compare August 31, 2026 02:05
@zhiiw
zhiiw force-pushed the codex/m5-dependency-observation-binding branch from 06cf779 to f9103c2 Compare August 31, 2026 02:05
@zhiiw
zhiiw force-pushed the codex/m5-dependency-snapshot-authority branch from cf3d66f to a53544a Compare August 31, 2026 03:36
@zhiiw
zhiiw force-pushed the codex/m5-dependency-observation-binding branch from f9103c2 to 5bccd84 Compare August 31, 2026 03:36
@zhiiw
zhiiw force-pushed the codex/m5-dependency-snapshot-authority branch from a53544a to 81a3117 Compare August 31, 2026 03:42
@zhiiw
zhiiw force-pushed the codex/m5-dependency-observation-binding branch from 5bccd84 to d520c63 Compare August 31, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant