Skip to content

feat(storage): bind and cancel managed dependency admission - #4

Closed
zhiiw wants to merge 10 commits into
codex/bundled-npm-runtime-attestationfrom
codex/managed-admission-cancellation-authority
Closed

feat(storage): bind and cancel managed dependency admission#4
zhiiw wants to merge 10 commits into
codex/bundled-npm-runtime-attestationfrom
codex/managed-admission-cancellation-authority

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Binds attested dependency environments to managed workspace execution and makes admission lifecycle authoritative across storage owners. This slice owns dependency binding, canonical node_modules routing, dependency singleflight, abandoned-publication replacement, baseline admission cancellation, and owner drain.

Primary invariant

Only an owner-bound, cancellable, and drainable managed admission may issue an execution scope. Cancellation or Host drain must prevent scope issuance or revoke the abandoned acquisition, and a new caller must never inherit a previous caller's aborted singleflight publication.

  • Owner: managed workspace storage owner
  • Atomicity boundary: root admission lock + validated source baseline + dependency lease + revocable execution scope
  • Failure state: source drift, abort, invalid dependency routing, or cancelled publication fails closed; there is no managed-worktree fallback
  • Rollback: remove dependency-mode admission while preserving canonical-tree managed execution

Verification

Focused tests cover source HEAD/tree drift on reopen, shared publications, last-waiter abort/new-waiter races, baseline lock cancellation, immediate cancellation before scope issuance, owner drain, and canonical node_modules routing. Glob coverage now uses the real worker contract: dependency Glob results are relative to the routed cwd and are reconstructed under the caller's logical node_modules/** root.

Stack

  1. durable dependency artifact authority
  2. constrained npm producer
  3. bundled npm runtime attestation
  4. This PR: owner-bound and cancellable managed admission authority
  5. production managed inspection task + crash/replay proof
中文说明

本切片把 dependency execution binding 与 admission cancellation 收敛到同一个 storage owner:只有经过 canonical source baseline、dependency lease 和取消检查后,才能签发可撤销 execution scope。

本轮补齐了真实 worker 的 Glob 相对路径映射、baseline 锁与 Git 操作的取消传播,以及 scope 签发前的最后一次取消检查。source drift、非法 dependency 路径和已撤销 singleflight publication 都会 fail closed,不会回退到 managed worktree 的同名目录。

@zhiiw
zhiiw force-pushed the codex/bundled-npm-runtime-attestation branch from f57dd31 to c400560 Compare August 9, 2026 03:00
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from 22b0bd2 to ba2ea90 Compare August 9, 2026 03:00
@zhiiw zhiiw changed the title feat(storage): make managed dependency admission cancellable feat(storage): bind and cancel managed dependency admission Aug 9, 2026
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch 3 times, most recently from 878b222 to 2ba2499 Compare August 9, 2026 06:21
@zhiiw
zhiiw force-pushed the codex/bundled-npm-runtime-attestation branch from a656397 to e642020 Compare August 10, 2026 01:38
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from 91091a6 to bda750e Compare August 10, 2026 01:38
@zhiiw
zhiiw force-pushed the codex/bundled-npm-runtime-attestation branch from e642020 to 78b0150 Compare August 10, 2026 06:59
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch 2 times, most recently from 7f74b3d to f92c4c3 Compare August 10, 2026 07:14
@zhiiw
zhiiw force-pushed the codex/bundled-npm-runtime-attestation branch 2 times, most recently from c4fa57b to b6a9d2f Compare August 16, 2026 03:58
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch 3 times, most recently from 9c25870 to 090035d Compare August 16, 2026 04:19
@zhiiw
zhiiw force-pushed the codex/bundled-npm-runtime-attestation branch from 59f8384 to 9f1418b Compare August 23, 2026 05:24
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from 090035d to 6683551 Compare August 23, 2026 05:24
@zhiiw

zhiiw commented Aug 30, 2026

Copy link
Copy Markdown
Owner Author

Closed as an obsolete extraction/integration slice. The current delivery path is the merged Gitoxide foundation followed by #40 -> #41 -> #42. This PR remains available as design and implementation history.

中文说明

该 PR 属于旧 extraction/integration 栈,现已失去独立合并价值。当前交付路径是已合并的 Gitoxide 基础,然后依次审查 #40#41#42。这里继续保留设计、实现与审查历史。

@zhiiw zhiiw closed this Aug 30, 2026
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