Skip to content

feat(runtime-host): attest managed npm runtime - #21

Closed
zhiiw wants to merge 4 commits into
codex/m1-3-managed-npm-producer-rebuildfrom
codex/m1-3-npm-attestation-rebuild
Closed

feat(runtime-host): attest managed npm runtime#21
zhiiw wants to merge 4 commits into
codex/m1-3-managed-npm-producer-rebuildfrom
codex/m1-3-npm-attestation-rebuild

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • build a pinned npm@12.0.2 runtime tree for Desktop release resources
  • bind the fixed producer to a package-internal, owner-issued runtime capability
  • verify every runtime file, the Host Node executable, platform/architecture, npm identity, and approved dependency patches before admission and before each invocation
  • add release preparation, audit, packaging, and packaged-resource gates

Primary invariant

Given a resources root already authorized by the packaged-product owner, managed npm provisioning can execute only the exact declared npm tree with the exact current Host Node. A structurally similar caller object or a modified runtime tree cannot acquire execution authority.

The colocated manifest is an integrity declaration, not a standalone cryptographic trust root. The later product composition must supply the packaged-resource authority.

Validation

  • Core, Storage, Runtime, and Runtime Host builds
  • bundled runtime attestation tests: 6 passed
  • managed producer tests: 13 passed, 3 Windows platform skips
  • preparation and packaged-resource tests: 21 passed, 1 platform skip
  • real prepare + verify + isolated production audit: 0 vulnerabilities
  • generated npm runtime size on Windows: 14,582,119 bytes

This remains a stacked Draft on #20. It has no production consumer yet. The final M1.3 composition must consume Gitoxide admission/import/projection capabilities and must not reintroduce the Git CLI owner.

中文说明

摘要

  • 为 Desktop 发布物生成固定的 npm@12.0.2 runtime tree;
  • 用 package-internal、owner-issued capability 把 producer 绑定到该 runtime;
  • admission 与每次 invocation 前完整校验 npm 文件树、Host Node 可执行文件、平台架构、npm 身份和固定安全补丁;
  • 接入 release preparation、audit、packaging 与 packaged-resource 检查。

主要不变量

在 packaged-product owner 已经证明 resources root 的前提下,managed npm 只能运行发布物中声明的 exact npm tree 与当前 exact Host Node。伪造结构体或修改 runtime tree 都不能获得执行权。

同目录 manifest 只提供完整性声明,不是独立密码学 trust root;后续 product composition 必须提供 packaged-resource authority。

验证

  • Core、Storage、Runtime、Runtime Host 构建通过;
  • attestation 6 项通过;producer 13 项通过、Windows 条件跳过 3 项;
  • preparation/release contract 21 项通过、条件跳过 1 项;
  • 真实 prepare + verify + production audit:0 vulnerabilities;
  • Windows 生成的 npm runtime 为 14,582,119 bytes。

本 PR 继续作为 #20 之上的 stacked Draft;尚无生产消费者。最终 M1.3 composition 只能消费 Gitoxide admission/import/projection capability,不得重新引入 Git CLI owner。

@zhiiw
zhiiw force-pushed the codex/m1-3-npm-attestation-rebuild branch from a080809 to f83bbec Compare August 23, 2026 16:27
@zhiiw
zhiiw force-pushed the codex/m1-3-managed-npm-producer-rebuild branch from 8b1ec34 to df6b670 Compare August 23, 2026 16:31
@zhiiw
zhiiw force-pushed the codex/m1-3-npm-attestation-rebuild branch from f83bbec to bb616c5 Compare August 23, 2026 16:31
@zhiiw
zhiiw force-pushed the codex/m1-3-managed-npm-producer-rebuild branch from 2b746b3 to f0253cd Compare August 24, 2026 02:28
@zhiiw
zhiiw force-pushed the codex/m1-3-npm-attestation-rebuild branch from 78095a4 to d6ca1fe Compare August 24, 2026 02:35
@zhiiw
zhiiw force-pushed the codex/m1-3-managed-npm-producer-rebuild branch from ebcf598 to 4d2d798 Compare August 24, 2026 04:05
@zhiiw
zhiiw force-pushed the codex/m1-3-npm-attestation-rebuild branch from ce52c3a to dd18177 Compare August 24, 2026 04:06
@zhiiw

zhiiw commented Aug 30, 2026

Copy link
Copy Markdown
Owner Author

Closed because managed npm provisioning is no longer on the pure Write/Edit critical path. Rebuild this capability from then-current main as an M5 toolchain/external-effects PR when Bash/build/test execution has a production consumer.

中文说明

managed npm provisioning 已不再属于纯 Write/Edit 的关键路径,因此关闭当前旧实现。等 M5 的 Bash/构建/测试能力出现真实生产消费者时,再从届时最新 main 重建 toolchain/external-effects PR。

@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