feat(storage): import immutable dependency snapshots - #72
Draft
zhiiw wants to merge 4 commits into
Draft
Conversation
zhiiw
force-pushed
the
codex/m5-dependency-snapshot-authority
branch
from
August 31, 2026 00:09
c443ffa to
edce746
Compare
zhiiw
force-pushed
the
codex/m5-dependency-snapshot-authority
branch
3 times, most recently
from
August 31, 2026 02:05
0e9fd03 to
cf3d66f
Compare
zhiiw
force-pushed
the
codex/m5-managed-coding-v2-crash-gate
branch
10 times, most recently
from
August 31, 2026 03:33
6dda20a to
b4060f0
Compare
zhiiw
force-pushed
the
codex/m5-dependency-snapshot-authority
branch
from
August 31, 2026 03:36
cf3d66f to
a53544a
Compare
zhiiw
force-pushed
the
codex/m5-dependency-snapshot-authority
branch
from
August 31, 2026 03:42
a53544a to
81a3117
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
node_modulestree into fresh Maka-owned inodesPrimary invariant
An existing dependency tree may receive a managed read-only lease only when the bounded source observation, the Maka-owned copy, and the durable receipt all identify the exact same bytes. This slice never starts npm, accesses the network, reads
PATH, or publishes source-owned inodes.Owner and atomic boundary
ManagedDependencySnapshotAuthorityowns source observation and source-to-staging copy. The existing storage-root authority exclusively owns artifact publication, receipt commit, lease lifetime, cross-process exclusion, and GC.The filesystem and SQLite are not presented as one transaction: an artifact without a receipt is removed and rebuilt; a durable matching receipt is reopened and revalidated; any artifact/receipt/content mismatch fails closed.
Verification
git diff --check: passedThis remains a stacked Draft. Its base is the packaged managed-coding-v2 crash gate; the next slice binds this opaque lease into T1 before a sandbox may consume it.
中文说明
摘要
node_modules导入到全新的 Maka-owned inode;主要不变量
只有当有界 source observation、Maka-owned copy 和 durable receipt 都指向完全相同的依赖字节时,现有依赖树才能获得 managed read-only lease。本切片不会启动 npm、访问网络、读取
PATH,也不会直接发布 source inode。Owner 与原子边界
ManagedDependencySnapshotAuthority只拥有 source observation 与 source-to-staging copy。底层 storage-root authority 唯一拥有 artifact publication、receipt commit、lease lifecycle、跨进程互斥和 GC。文件系统与 SQLite 不伪装成单事务:有 artifact 无 receipt 时删除并重建;receipt 已持久化且匹配时重开并重验;artifact、receipt 或内容任一不一致都 fail closed。
当前仍为 stacked Draft。下一切片会先在 T1 中绑定 opaque dependency lease,再允许 sandbox 消费,缺失时不回退 checkout
node_modules。