feat(cli): resolve persistent Runtime Host installation facts - #3816
Merged
Astro-Han merged 1 commit intoAug 26, 2026
Merged
Conversation
This was referenced Aug 25, 2026
Astro-Han
reviewed
Aug 25, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
Update on b3fec58ba5:
CODE GO — no P0-P2 (2×P3 non-blocking: canonicalCliPath depth check accepts non-CLI files; runNpmGlobalRoot ignores injected env). New resolver validates npm global npx vs direct probes with deterministic fixtures.
Checks on b3fec58ba56b16f386e6a1108031a9a37f8fe24a are test: IN_PROGRESS — awaits green.
简体中文
该头无阻断。
Astro-Han
approved these changes
Aug 26, 2026
Contributor
There was a problem hiding this comment.
I reviewed this head and found no blocking issues.
Resolver validates with green checks; non-blocking P3s noted.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
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
npxcache packages, and packages outside the active npm global prefixnpxprovenance check into the same helperWhy
The next #3243 adapter needs to distinguish a persistent installed CLI owner from a transient invocation before it can consume the local deployment handoff transaction.
A real isolated
npm install --globalcheck showed that npm does not persist a package lock ordist.integritybeside the installed global package. Registry metadata can identify the artifact published for a version, but it cannot prove that mutable local files are still that artifact. This PR therefore keeps two facts separate:Exact deployment identity remains the responsibility of later registry resolution, archive verification, and immutable staging. This resolver performs no network request, owner mutation, Host retirement, or user-policy decision.
This PR is merge-order independent from #3813. A later composition slice will consume both the stable installation facts here and the unified handoff transaction there.
Simplification and first-principles audit
GO. The final diff adds no durable state, lock, journal, deployment identity, or startup policy. It removes the duplicate
npxcache-path implementation from the managed service manager. The owner ID depends only on the canonical npm global slot, so package upgrades in one prefix retain ownership while distinct Node/npm prefixes remain distinct owners.Verification
origin/main19b47632be61b9116ae25d67e286f6a7878d6645npm --workspace maka-agent run buildnpm --workspace maka-agent run typecheckgit diff --checkThe broader Runtime workspace build still reports the unchanged local dependency-closure failures for missing
@slack/*/minisearchand the existinghttps-proxy-agenttype mismatch; the affected CLI and Runtime Host dependency builds used by this diff pass.Refs #3243
Refs #3231
Refs #3709
简体中文摘要
本 PR 为 #3243 提供 installed CLI 的 source facts:从 active npm global package slot 推导稳定的 CLI installation owner,并读取当前 package 的 version、package root 与 CLI entry point。
真实隔离的
npm install --global取证表明,全局安装旁不会保存 package-lock 或dist.integrity。因此 registry 对某个 version 的声明不能证明本机可变文件仍是那份 artifact。本 PR 明确区分:exact deployment identity 留给后续 registry 解析、archive integrity 校验与 immutable staging。本 resolver 不联网、不修改 owner record、不让 Host 退场,也不替用户选择 Restart / Wait / Cancel。
同时抽取并复用 service manager 既有的
npxcache 判断,删除一份重复实现。最终 diff 不增加 durable state、lock、journal、deployment identity 或 startup policy。该 PR 与 #3813 merge 顺序独立;后续 composition slice 再同时消费两者。验证:基于精确 current main;CLI build/typecheck 通过;installation facts 与完整 service-manager 测试 26/26;scoped Biome 与 diff-check 通过。
Generated-by: Codex