Replies: 5 comments
|
Thanks for raising this. The near-term implementation plan will be:
For the first ASF release, we therefore propose treating managed workspace as a high-value optional capability rather than a prerequisite for the baseline Desktop artifact. This is an engineering/release plan, not a legal conclusion; mentor/IPMC/Legal guidance is still welcome, especially for any future download-based approach. 中文版本感谢提出这个问题。近期我们准备按以下顺序处理:
因此,首个 ASF 版本暂时把 managed workspace 定位为高价值的可选能力,而不是 Desktop 基础发布物的硬前提。这是工程和发布计划,不是法律结论;对于未来可能的自动下载方案,我们仍欢迎 mentors/IPMC/Legal 的意见。 |
|
One implementation detail is worth making explicit: if we use gitoxide as an out-of-process broker, Maka will need a thin layer of Rust code. The reason is practical rather than architectural preference:
The proposed Rust layer is therefore intentionally small. It is not a rewrite of Maka in Rust and it is not a general Git CLI. Its surface should remain limited to the managed-workspace primitives that we can prove, such as repository admission, exact object import/read/write, exact-base ref CAS, projection materialization, and bounded drift observation. SHA-256 repositories will initially fail closed behind an explicit capability seam rather than being partially supported. Ordinary users will not need Rust installed. Rust is only a build/test dependency for producing the broker; release artifacts would contain the compiled executable. The Node/TypeScript application remains the control plane, SQLite remains the accepted-truth owner, and the Rust broker is only the local Git data-plane adapter. This thin wrapper is the smallest credible way to obtain a stable protocol and fault boundary while using gitoxide. If we do not want to maintain any Rust code at all, then gitoxide is not a realistic broker choice and we would need to return to a separately supplied Git CLI or another executable implementation. 中文说明这里需要明确一个实现事实:如果把 gitoxide 作为独立进程 broker 使用,Maka 就必须引入一层很薄的 Rust 代码。 原因不是我们偏好 Rust,而是实际边界决定的:
因此,这层 Rust wrapper 会被刻意保持得很薄。它不是把 Maka 重写成 Rust,也不是重新实现一个通用 Git CLI。它只暴露我们能证明的 managed-workspace 原语,例如 repository admission、精确 object 导入/读写、exact-base ref CAS、projection 物化,以及有资源上限的 drift observation。SHA-256 repository 初期会通过明确的 capability seam fail closed,而不是提供不完整支持。 普通用户不需要安装 Rust。Rust 只是在构建和测试 broker 时使用;发布包中只包含编译后的可执行文件。Node/TypeScript 应用仍是控制面,SQLite 仍是 accepted truth 的 owner,Rust broker 只承担本地 Git data plane adapter。 从 gitoxide 获得稳定协议和故障隔离时,这层薄 wrapper 是最小而可信的实现。如果完全不愿维护 Rust 代码,那么 gitoxide 就不适合作为 broker,只能重新考虑由用户提供并经过验证的 Git CLI,或其他已有的可执行实现。 |
EnglishI agree with the core direction: Maka should own a thin Rust wrapper around the specific I do not think that wrapper necessarily needs to be an out-of-process broker, though. A stable product boundary and a process boundary are separate decisions. Using N-API—practically, something such as
The Node side would only see Maka-owned DTOs and stable error codes; no This also preserves a verifiable runtime identity. Instead of hashing a Git executable, the backend manifest can identify a An independent broker does provide stronger crash isolation, but it also introduces an IPC protocol, process startup and supervision, cancellation and shutdown semantics, diagnostic forwarding, executable discovery, and another lifecycle to reconcile. Merely moving code into another process also does not create a narrower permission boundary unless we actually run it under a different OS principal or sandbox. My preference would therefore be:
That keeps the architecture small without closing the door on a broker later. The thin Maka-owned Rust wrapper is the important part; the extra process should have to justify itself separately. 简体中文我赞同核心方向:Maka 应当围绕实际需要的 不过,我不认为这层 wrapper 必须一开始就做成独立进程 broker。“稳定的产品边界”和“进程边界”是两个不同的设计决策。 通过 N-API——实际可以使用
Node 侧只接触 Maka 自有的 DTO 和稳定错误码,不会直接依赖任何 这也不会妨碍保留可验证的 runtime identity。backend manifest 可以定义 独立 broker 确实能够提供更强的崩溃隔离,但它同时会引入 IPC protocol、进程启动与监督、取消和 shutdown 语义、诊断转发、可执行文件定位,以及另一套需要收敛的生命周期。仅仅把代码移动到另一个进程,也不会自然形成更窄的权限边界;除非我们确实使用不同的 OS principal 或 sandbox 运行它。 因此,我更倾向于:
这样既能保持架构简单,也不会阻止以后升级为 broker。真正重要的是那层 Maka 自有的薄 Rust wrapper;额外的独立进程应当单独证明其必要性。 |
|
The N-API suggestion is useful because it separates two decisions that we had previously coupled too early:
I compared the three plausible topologies against Maka's current requirements:
A separate process is not automatically a stronger filesystem permission boundary. Unless it runs under a different OS principal or sandbox, it has essentially the same filesystem authority as the Host. Its immediate value is fault containment, hard termination, resource observation, and a clearer crash-test seam. For Maka's current managed-workspace operations, the first integration should therefore be a short-lived helper executing one coarse-grained operation per invocation, not one process per object and not a resident daemon. Candidate capture, exact-base ref CAS, or projection materialization should each be internally complete helper operations. TypeScript writes the durable intent before spawning; SQLite remains the sole accepted-truth authority; abnormal exit is reconciled from Git artifacts rather than blindly retried. This is the smallest topology that directly supports Maka's current cancellation and production-shaped crash requirements. It avoids committing to a resident broker lifecycle before measurements justify it. If profiling later shows that process startup and repeated repository opening are material bottlenecks, the same Maka-owned DTO/error contract can move behind a resident broker. N-API remains viable if we can prove that cooperative cancellation is sufficient and that Host-wide native failure is an acceptable blast radius. The shared Rust core should remain transport-neutral so this topology decision does not leak into object/ref semantics. SHA-256 repositories should initially return an explicit unsupported capability, and all variants still require the same three-platform build matrix, runtime identity, resource bounds, path policy, and transitive-license audit. 中文说明N-API 的建议很有价值,因为它把之前过早绑定的两个决策拆开了:
结合 Maka 当前需求,三种形态的主要权衡如下:
独立进程不会自动获得更窄的文件权限。除非使用不同 OS 身份或 sandbox,否则它和 Host 基本拥有相同的文件系统权限。它当前真正提供的是故障隔离、硬终止、资源观测和更清晰的崩溃测试边界。 因此,Maka 首次接入更适合采用一次调用执行一个粗粒度操作的短生命周期 helper,而不是每个 object 启一个进程,也不是立刻建设常驻 daemon。candidate capture、exact-base ref CAS、projection materialization 应分别由一次 helper 调用内部完成。TypeScript 在 spawn 前写 durable intent;SQLite 继续是唯一 accepted-truth owner;异常退出后根据 Git artifact reconciliation,而不是盲目重跑。 这是当前最小且能直接满足取消与 production-shaped crash 要求的形态。它避免在性能数据出现以前建设常驻 broker 生命周期。如果以后 profiling 证明进程启动和重复打开 repository 是实际瓶颈,同一套 Maka-owned DTO/error contract 可以迁移到常驻 broker。只有在证明协作式取消足够、且能够接受 native 故障带走 Host 时,N-API 才更适合作为默认实现。 共享 Rust core 应保持 transport-neutral,避免进程形态渗入 object/ref 语义。SHA-256 repository 首版应明确返回 unsupported capability;三种方案都仍然需要三平台构建矩阵、runtime identity、资源限制、路径策略和完整的传递依赖许可证审计。 |
EnglishI agree with this decision. A short-lived helper keeps the first integration small while providing the hard cancellation and fault-isolation boundary needed by the managed-workspace recovery tests. Keeping the Rust core transport-neutral also preserves a clean path to N-API or a resident broker later if measurements justify it. 简体中文我赞同这个决定。短生命周期 helper 在保持首个实现足够小的同时,提供了 managed workspace 恢复测试所需的硬取消和故障隔离边界;共享 Rust core 保持 transport-neutral,也为后续基于实测数据迁移到 N-API 或常驻 broker 留出了清晰路径。 |
Uh oh!
There was an error while loading. Please reload this page.
Problem
Every Maka Desktop artifact ships a Git executable.
apps/desktop/electron-builder.config.mjscopiesnode_modules/dugite/gitintoextraResources, about 141 MB of Git distribution.Git is GPLv2, which is Category X under ASF third-party licence policy. The artifact currently carries
resources/licenses/git/SOURCE_OFFER.txt(added in #2235). That satisfies GPLv2's written-offer obligation, but it does not make Category X material distributable by the ASF, andDISCLAIMER-WIPcannot waive it.Dugite itself is MIT. The problem is the Git distribution it vendors, not the npm package.
This blocks G9 in the first-release tracker (#2974, implementation in #3276). It is currently the longest open path there, and no issue tracks the removal yet. Maka Desktop cannot be published as an ASF convenience binary until this is resolved.
What any replacement has to preserve
packages/runtime-host/src/server/bundled-git-runtime.tsdoes more than locate a binary. It verifies amaka_bundled_git_runtime_v1manifest, checks platform and arch, resolvesrealpath, rejects symlinks and out-of-root paths, comparesexecutableSha256, and derives aruntimeIdentitySha256.packages/storage/src/git-workspace-service.tsconsumes that verified identity for owner-bound managed workspaces (#1742, #2129).So a replacement has to keep:
runtimeIdentitySha256, which today comes from a manifest the build produces.bundled-git-workspace-smoke.test.ts.BundledGitRuntimeErrorcodes reach users.The good news is that
distribution.kind('dugite_native_v1') and the manifestproviderfield are already the seam for this. Adding a distribution kind is an extension, not a rewrite.Options
A. Require Git on the user's machine. Resolve from
PATH. Smallest change, smallest artifact. Cost: no hermetic guarantee, no trustworthyexecutableSha256, version drift across users, and first-run failure for the many Windows users without Git. The owner-binding identity would need a redesign.B. Fetch the Git runtime on first use, outside the release artifact. Keep the manifest, the verification, and the
distribution.kindmodel as they are; verify after download instead of after unpacking. All three constraints survive and the artifact carries no Category X material. Cost: first run needs network access, offline and air-gapped installs degrade, and we would have to decide on a download host. Whether an unbundled runtime download is acceptable under ASF policy is exactly what we need mentor and Legal guidance on — we are not assuming it is.C. Replace Git with a non-GPL implementation.
gitoxideis Apache-2.0/MIT and removes the problem at the root, but its feature coverage would have to be checked against what managed workspaces actually call.libgit2is GPLv2 with a linking exception; we would rather have its ASF status confirmed than assume it. Cost: the largest engineering effort here, with possible behaviour changes in managed workspaces.D. Reduce managed-workspace scope for the first release. Ship Desktop without the features that need a Git runtime and restore them later. Cost: user-visible capability loss, and it needs a product decision about what Desktop is without managed workspaces.
These are not mutually exclusive. B as the near-term path with C as the direction seems plausible to us, but we would rather hear that judged than assert it.
What we are asking
libgit2's GPLv2 linking exception change its Category X status for a bundled desktop application?Anyone with experience shipping a Git-dependent desktop application under ASF policy — we would like to hear how you solved this.
References
This analysis was prepared with Claude Code against current
mainand must be reviewed by a human contributor of record. Licensing conclusions remain with the PPMC, mentors, and ASF Legal Affairs.All reactions