Bundle and verify a hermetic Git runtime for managed workspaces - #2199
Merged
Conversation
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.
What changed
Why
Managed workspaces cannot rely on an arbitrary system Git installation: PATH lookup, user/repository configuration, helper substitution, and runtime replacement would make the workspace authority depend on mutable host state. This change gives the workspace service one explicit Git artifact and one fail-closed execution profile.
The current manifest intentionally authenticates the entry executable and complete source-archive provenance, rather than hashing the helper tree before signing. On macOS, nested Mach-O signing changes helper bytes after preparation. A later publication slice will generate a final tree manifest after inner signing and bind that manifest into the outer application signature.
User and developer impact
Validation
@maka/storagebuild@maka/runtime-hostbuildOne unrelated test newly present on
maincompares Windows paths against POSIX separators inwindows-x64-release.test.mjs; it is outside this diff and was not folded into this PR.中文说明
修改内容
原因
Managed workspace 不能依赖任意系统 Git。PATH、用户/仓库配置、helper 替换和运行时文件变化,都会让 workspace authority 依赖可变的宿主机状态。本 PR 为 workspace service 提供唯一、显式、fail-closed 的 Git artifact 与执行 profile。
当前 manifest 有意验证入口 executable 和完整 source archive provenance,而没有在签名前固定 helper tree hash。macOS nested Mach-O 签名会在准备阶段之后改变 helper 字节;后续独立发布切片会在 inner signing 后生成最终 tree manifest,并由 outer application signature 保护该 manifest。
影响
验证
最新 main 另有一个 Windows release 测试使用 POSIX 分隔符断言 Windows 路径;它不在本 PR diff 中,因此没有混入本切片修复。