Skip to content

feat(runtime-host): add crash-safe managed workspace inspection - #5

Closed
zhiiw wants to merge 5 commits into
codex/managed-admission-cancellation-authorityfrom
codex/managed-dependency-production-composition
Closed

zhiiw wants to merge 5 commits into
codex/managed-admission-cancellation-authorityfrom
codex/managed-dependency-production-composition

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the first dedicated production consumer for the managed dependency execution profile: the read-only ManagedWorkspaceInspect task. Runtime Host owns packaged Git/npm admission, workspace admission, dependency provisioning, worker routing, cancellation, drain, and exact replay through one explicit composition.

Primary invariant

A replay-safe managed inspection is admitted once against one canonical workspace baseline and one attested dependency artifact. A Host crash after durable receipt publication must converge on reopen without duplicating baseline, artifact, or receipt state.

  • Owner: Runtime Host production execution composition
  • Atomicity boundary: durable managed admission + dependency receipt; the provider-facing result is emitted only after the read-only operation completes
  • Failure state: cancellation, source drift, invalid profile, unavailable authority, or packaged-resource delegation mismatch fails closed; there is no attached-checkout fallback
  • Rollback: remove the dedicated tool registration and composition consumer; lower capabilities remain dormant

Packaged resource trust boundary

The fd3/PID/path bootstrap is direct-parent application delegation, not a platform signature or cryptographic identity proof. The provenance trust root is the outer signed application and release/update chain. Public CLI input and ambient paths cannot claim bundled resources, but a malicious same-user process able to launch arbitrary Electron parents, manufacture inherited descriptors, and replace application resources is outside the v1 threat model. Covering that attacker requires a future platform-signature verification owner, not more PID/path fields.

Verification

  • Runtime Host and Storage builds passed.
  • Plan Mode excludes ManagedWorkspaceInspect.
  • Real development Electron cannot use the public issuer to claim bundled resources.
  • Source drift, dependency Glob routing, singleflight replacement, and baseline/scope cancellation tests passed.
  • The production composition runs actual bundled npm, installs pinned semver@7.7.3, verifies the generated platform .bin entry, and reads the leased dependency rather than attached node_modules.
  • A production-shaped child-process test kills the Host after the dependency receipt becomes durable, reopens the same task, and verifies one canonical baseline, artifact, receipt, and replay result.

Stack

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

本切片加入第一个生产消费者 ManagedWorkspaceInspect,把 packaged Git/npm、workspace admission、dependency provisioning、只读 worker 路由、取消、drain 与 crash replay 接成一条明确链路。

fd3/PID/path 只负责直接父子进程之间的应用委托,不是平台签名或密码学身份验证。真正的来源信任根是外层已签名应用与发布/更新链;能够启动任意 Electron 父进程并同时替换应用资源的同用户恶意进程不在 v1 威胁模型内。

验收使用真实 bundled npm 安装固定依赖并验证 .bin,同时在 dependency receipt durable 后杀死 Host,重开后证明 baseline、artifact、receipt 与只读结果均唯一收敛。

@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from 22b0bd2 to ba2ea90 Compare August 9, 2026 03:00
@zhiiw
zhiiw force-pushed the codex/managed-dependency-production-composition branch from e1ea1dd to 28a5f8c Compare August 9, 2026 03:00
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch 2 times, most recently from 81cc415 to 878b222 Compare August 9, 2026 06:05
@zhiiw
zhiiw force-pushed the codex/managed-dependency-production-composition branch from 45b3f01 to bc7693a Compare August 9, 2026 06:10
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from 878b222 to 2ba2499 Compare August 9, 2026 06:21
@zhiiw
zhiiw force-pushed the codex/managed-dependency-production-composition branch 2 times, most recently from afb4534 to 5f1fc76 Compare August 9, 2026 09:29
@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/managed-dependency-production-composition branch from 5f1fc76 to 8f01a30 Compare August 10, 2026 01:38
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from bda750e to 7f74b3d Compare August 10, 2026 06:59
@zhiiw
zhiiw force-pushed the codex/managed-dependency-production-composition branch from 8f01a30 to 60b9fc0 Compare August 10, 2026 06:59
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from 7f74b3d to f92c4c3 Compare August 10, 2026 07:14
@zhiiw
zhiiw force-pushed the codex/managed-dependency-production-composition branch from 60b9fc0 to 3bd3a9e Compare August 10, 2026 07:14
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from f92c4c3 to 30d982a Compare August 16, 2026 03:58
@zhiiw
zhiiw force-pushed the codex/managed-dependency-production-composition branch 3 times, most recently from 7f689cb to 6d6efb3 Compare August 16, 2026 04:11
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch 2 times, most recently from 9c25870 to 090035d Compare August 16, 2026 04:19
@zhiiw
zhiiw force-pushed the codex/managed-dependency-production-composition branch from 6d6efb3 to f037b70 Compare August 16, 2026 04:19
@zhiiw
zhiiw force-pushed the codex/managed-admission-cancellation-authority branch from 090035d to 6683551 Compare August 23, 2026 05:24
@zhiiw
zhiiw force-pushed the codex/managed-dependency-production-composition branch from f037b70 to 9f03ee6 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