refactor(release): stop distributing bundled Git - #3457
Conversation
Astro-Han
left a comment
There was a problem hiding this comment.
Thanks for moving the product to a single external Git-runtime contract and removing the bundled distribution, licenses, and preparation paths together. The current Windows package check exposed one deterministic verifier contradiction, and I noted one persisted-identity compatibility point inline.
AI-assisted review disclosure: OpenAI Codex performed an independent exact-head packaging and compatibility review. I verified the failed Windows check, the corresponding macOS path, the persisted runtime identity change, and the live PR state, and I made the final review decision.
jackwener
left a comment
There was a problem hiding this comment.
Summary
This PR correctly stops ASF convenience artifacts from shipping a Git runtime: Dugite, prepare:bundled-git*, extraResources git/ / bundled-git.json / GPL notices, and the Runtime Host bundled-Git resolver are gone, and packaged-app verification now forbids those paths. Ordinary Host/attached startup no longer depends on Git; managed-workspace owner composition is skipped unless an explicit VerifiedGitRuntimeInput is injected, and managed profiles fail closed instead of falling back to PATH Git. The remaining risks are merge onto current main (notices/ci-test-plan overlap), a license-agnostic injection seam, and a Host-without-Git test that mocks composition rather than exercising admission.
Issue counts by severity
- bugs: 1
- suggestions: 2
- nits: 0
54999ac to
b61437c
Compare
e48e927 to
fce583b
Compare
|
Addressed in the rebuilt head I accepted the owner/scope finding and resolved both comments with one simplification:
Future Gitoxide work will introduce its own broker protocol and artifact authority in a PR that includes a real production consumer and production-shaped crash tests. This release PR now proves only the package/Host absence invariant. Verification after the rebuild:
中文说明已在重建后的 head 我接受 owner/scope 结论,并用一次收缩同时解决两个问题:
未来 Gitoxide 会在带真实生产消费者与 production-shaped crash tests 的独立 PR 中建立自己的 broker protocol 和 artifact authority。本 release PR 现在只证明 package/Host 的 Git absence 不变量。 重建后验证结果:
|
# Conflicts: # packages/cli/src/pi-tui-runner.ts
The rebase conflict on verify-windows-sandbox-e2e.mjs was resolved with the branch's own 'unchecked' variant, which would have reverted the #3457 hardening (the script now captures a real T0 identity via stat and passes it). Restore the main version: the script verifies relay AND the packaged CAS path; 'unchecked' would silently skip the identity comparison on the release lane. Generated-by: DSv4F-AstroHan
…he filesystem worker (#3487) * fix(runtime): distinguish unchecked writes from T0-missing races in the filesystem worker Fixes #3484. expectedIdentity was optional, so a caller without a T0 snapshot was indistinguishable from a T0-missing target that appeared while queued; every write to an existing file without an identity failed with path_changed, breaking verify-windows-sandbox-e2e and blocking the Release Windows check on four PRs. - FilesystemWorkerExpectedIdentity is now required: {dev,ino} | 'missing' | 'unchecked'. Every caller must decide explicitly which CAS contract it participates in. - The wire request carries the T0 marker explicitly (protocol v7) so the worker can tell 'created while queued' from 'no CAS snapshot'. - Worker: t0 'missing' + existing target fails path_changed; t0 'existing' without identity fails invalid_request (buggy caller); t0 'unchecked' skips CAS. Identity-present targets still CAS. - openStableTarget opens an existing target without an identity when the caller is 'unchecked' (no comparison), keeping the create path exclusive (wx) unchanged. - Callers: FilesystemExecutor passes its captured identity or 'missing' for mutations and 'unchecked' for reads; the runtime-host read-only adapter and verify-windows-sandbox-e2e pass 'unchecked'. - Tests: unchecked write to an existing target passes and carries no identity; 'missing' with an existing target still fails path_changed; CAS mismatch still fails; T0-missing marker is preserved on the wire. Generated-by: DSv4F-AstroHan * fix(runtime): forward the apply_patch identity through the executor's worker branch The T0 marker computation in the executor aligned with `mutates` (write/edit/format_json) instead of the worker client's `operationAccess` (write/apply_patch/edit/format_json). apply_patch therefore fell into the 'unchecked' branch, silently dropping the identity captured by applyPatch() and disabling the queue-window CAS on the main editing channel (create/update/delete). Add apply_patch to the mutation list, point the comment at operationAccess as the authority, and cover the forwarding with an executor-level regression test. Generated-by: DSv4F-AstroHan * refactor(runtime): collapse the wire identity contract to one required three-state field Review finding (P2, Opus5 + Muse converged): the previous wire carried a required `t0` enum plus an optional `identity` plus two cross-field superRefines — two models for one concept, with the looser wire able to express illegal combinations that only runtime constraints rejected. The wire now carries a single required three-state `identity` ({dev,ino} | 'missing' | 'unchecked') mirroring the client input, so an illegal state cannot be expressed on the wire at all. The worker treats 'missing' with an existing target as created-while-queued (path_changed), CASes objects, and skips everything for 'unchecked'. The "buggy caller omitted identity" invalid_request guard disappears because the wire can no longer express that state. Generated-by: DSv4F-AstroHan * fix(runtime): single-source the write-kind set and add apply_patch CAS behavior tests Review follow-ups (#3487, Opus5/Luna): - `operationAccess` (write | apply_patch | edit | format_json) now lives once in the shared protocol module; the client, the worker and the executor's T0-marker decision all call it, so the set cannot drift — the executor previously hand-copied a third list that silently dropped apply_patch onto 'unchecked'. - Worker-level behavior tests: an apply_patch update against a swapped inode fails path_changed and leaves the replacement content untouched (delete and edit already had such tests; update was the gap). - Format the smoke-test fixtures so the exact-head format check passes. Generated-by: DSv4F-AstroHan * fix(release): keep the sandbox e2e participating in CAS after rebase The rebase conflict on verify-windows-sandbox-e2e.mjs was resolved with the branch's own 'unchecked' variant, which would have reverted the #3457 hardening (the script now captures a real T0 identity via stat and passes it). Restore the main version: the script verifies relay AND the packaged CAS path; 'unchecked' would silently skip the identity comparison on the release lane. Generated-by: DSv4F-AstroHan * fix(runtime): close the maintainer-review gaps on the identity contract (#3487) Three findings from the external maintainer review: 1. JavaScript callers were not migrated and the required-field argument gave them no protection. The client now auto-generates the wire 'unchecked' identity for reads (callers cannot get reads wrong, even from plain .mjs that bypass TypeScript) and enforces at runtime that write operations carry an explicit identity contract — a JS caller that omits it fails loudly instead of silently skipping the queue-window CAS. verify-macos-arm64-dmg.mjs's raw v7 write request gains the required identity: 'missing'. 2. Creation diff was lost: the truthy 'missing' string made the old `!expectedTarget?.identity` test fail, collapsing new-file writes into unknown and hiding the `--- /dev/null` diff. The worker now derives "approved missing" from targetType, with a behavior test asserting a missing-target write reports a creation diff. 3. mutates() removed; the executor's mutation gate and the T0-marker decision now use the single operationAccess authority. Verification: runtime+runtime-host typecheck clean; focused suites 71/71; full @maka/runtime test:dist 3080 pass / 0 fail; format:check clean; request shapes for both verifier scripts validated against the worker's schema (write/'missing' and read/'unchecked' parse; the pre-fix no-identity shape is rejected). The packaged Release Windows verifier and the macOS DMG verifier cannot run on this machine (no Windows runner, no packaged artifacts); their request construction is covered by the schema checks above. Generated-by: DSv4F-AstroHan * fix(release): give the sandbox e2e negative cases a truthful T0 identity The client now rejects a write without an explicit expectedIdentity at runtime (#3487). Two intentionally-failing cases in verify-windows-sandbox-e2e.mjs wrote without one, so they were rejected by the parameter validation with invalid_request instead of reaching the sandbox path they were meant to exercise (parent-entry fail-closed, and the workspace-boundary path_denied). Pass 'missing' — the truthful T0 state for targets that do not exist — so the intended checks run again. Generated-by: DSv4F-AstroHan
Summary
mainContext: #3411
Primary invariant
Official ASF convenience artifacts must not distribute or implicitly discover a Git CLI. Its absence is explicit and safe: ordinary Host/attached execution remains available, while managed-workspace execution is unavailable before durable admission/T1 and cannot silently fall back to PATH or a caller-injected executable.
The future Gitoxide integration is deliberately outside this PR. Because Gitoxide is a Rust library, that integration will use a thin Maka-owned Rust broker with a versioned protocol and its own artifact/provenance authority rather than reuse the retired Git-CLI-shaped Host seam.
Scope boundary
Runtime Host, Desktop, and CLI have no production path to
ManagedWorkspaceOwner. The dormant Storage Git adapter, its executable/distribution identity behavior, and its binding, repository, epoch, receipt, and quarantine schemas remain byte-for-byte identical to currentmain. Replacing or deleting that subsystem belongs in a later PR with a real Gitoxide production consumer and production-shaped crash tests.Verification
upstream/main@2e8cd03bagitis present on PATH, then rejects a managed profile withmanaged_workspace_profile_unavailable中文说明
变更摘要
main完全一致。背景讨论:#3411
主要不变量
ASF 官方 convenience artifact 不分发、也不隐式发现 Git CLI。Git CLI 缺失是明确且安全的状态:普通 Host/attached execution 继续可用;managed workspace 在 durable admission/T1 前不可用,并且不能静默回退 PATH 或 caller 注入的 executable。
未来 Gitoxide 集成不属于本 PR。Gitoxide 是 Rust library,因此后续会使用一层 Maka 自有的薄 Rust broker,提供带版本协议和独立 artifact/provenance authority,而不是复用已经删除的 Git CLI 形状 Host seam。
范围边界
Runtime Host、Desktop 和 CLI 已经没有通往
ManagedWorkspaceOwner的生产路径。Dormant Storage Git adapter、executable/distribution identity 语义,以及 binding、repository、epoch、receipt 和 quarantine schema 均与当前main字节级一致。替换或删除该子系统,应放到后续具备真实 Gitoxide 生产消费者和 production-shaped crash tests 的独立 PR。验证
upstream/main@2e8cd03ba重建。git时仍能无 Git runtime 启动,并以managed_workspace_profile_unavailable拒绝 managed profile。