Skip to content

refactor: remove dormant Git workspace write path - #4174

Merged
Astro-Han merged 1 commit into
apache:mainfrom
Astro-Han:refactor/managed-workspace-remove-write-path
Aug 29, 2026
Merged

refactor: remove dormant Git workspace write path#4174
Astro-Han merged 1 commit into
apache:mainfrom
Astro-Han:refactor/managed-workspace-remove-write-path

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the disconnected Git executable-backed workspace service, baseline receipt/write owner, execution authority, worker bridge, and dormant managed_worktree_v1 Runtime Host branch
  • remove the now-unreachable Dugite native environment adapter and the callerless store-root pathname/inode assertion that only supported the retired owner
  • remove the private tests/fixture, package export, storage stress planner entries, Windows workflow entries, test inventory rows, and architecture text that existed only for that path
  • keep attached-checkout read execution on the Runtime filesystem worker
  • keep the schema 9 reader/migration, immutable workspace RuntimeEvents, durable rootId binding, workspace projections and rebuild authority, git-worktree-child-executor, Gitoxide foundation/data plane, SSH/Remote Host behavior, and bundled-Git upgrade verification

The diff adds 144 lines and deletes 8,631 lines, for a net reduction of 8,487 lines.

UI/UX impact

None. This PR changes no renderer, styling, visual asset, product copy, or interaction flow, so screenshots are not applicable. It removes a production-unreachable internal executable/write path; attached-checkout read execution keeps its existing behavior.

Historical compatibility

The v0.1.10 and v0.1.11 Runtime Host compositions could construct ManagedWorkspaceOwner, but production code in both tags had no caller for openManagedWorkspaceBaseline, createManagedWorkspaceFromSource, or createManagedWorkspaceExecutionProfile. Those producer calls existed only in tests. The released path therefore could not create a receipt/worktree artifact for a user, so this PR does not retain an unconsumed artifact-only decoder.

Existing schema 9 databases remain readable: migration, canonical workspace RuntimeEvents, durable rootId binding, projections, head reader, and explicit projection rebuild are retained. A synthetic schema 9 database with baseline facts and root binding was upgraded with this head, then read and rebuilt successfully.

Breaking change

The dormant @maka/storage/managed-workspace-owner package subpath is removed. Runtime Host, Desktop, CLI, and repository scripts have no production consumer of it. Restoring managed workspace execution requires a new Gitoxide production composition rather than restoring the retired Git CLI-shaped API.

Open PR integration

Checked against the current heads after rebasing this PR onto main at 104d5fc4c3197ab04968947bd1b17bebd3b40b88:

Verification

  • clean Storage build; public-entrypoint, workspace authority, recovery authority, multi-process concurrency, and real-process crash tests: 73 passed
  • clean Runtime Host build; workspace and production execution composition tests: 16 passed
  • @maka/storage and @maka/runtime-host typecheck: passed
  • Biome lint and format checks for changed TypeScript: passed
  • Windows skip inventory check: 3 tests passed; 66 declarations current
  • CI test planner contracts: 47 passed
  • clean build confirms removed Storage modules are not emitted
  • synthetic schema 9 upgrade/read/rebuild check and released-DB focused migration checks: passed in internal review
  • git diff --check: passed

The repository-wide suite was not run.

Review

Six independent internal adversarial lanes reviewed history compatibility, Storage authority, Runtime Host composition, Gitoxide/open-PR integration, CI/release residue, and deletion completeness. Two focused re-reviews then checked the final cleanup delta. No P0-P3 finding remains. These are non-human reviews; a human contributor still owns the submission and merge decision.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex performed the live consumer/history audit, implementation, focused validation, merge-tree review, and internal non-human adversarial reviews. A human contributor must review the final diff and owns the submission and merge decision.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary and Breaking change above
  • No

@github-actions github-actions Bot added the effort/XL Over 1000 readable lines label Aug 29, 2026
Remove the disconnected Git executable workspace service, write owner, execution admission bridge, and their private tests and CI entries. Keep attached execution on the Runtime filesystem worker and preserve the schema 9 workspace event reader, migration, projections, and rebuild authority for historical databases.

The released v0.1.10 and v0.1.11 compositions constructed the owner but had no production caller for baseline open, artifact creation, or managed profile creation, so no artifact-only decoder remains.

Generated-by: Codex
@Astro-Han
Astro-Han force-pushed the refactor/managed-workspace-remove-write-path branch from 876dda2 to b2b202e Compare August 29, 2026 12:43
@Astro-Han
Astro-Han marked this pull request as ready for review August 29, 2026 12:47

@ARE404 ARE404 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving refactor: remove dormant Git workspace write path at head b2b202ef.

I reviewed the 38 changed files and verified the removal of the dormant Git workspace write path is reachable-clean:

  • The deleted modules (git-workspace-service.ts, dugite-native-environment.ts, managed-workspace-owner.ts, managed-workspace-worker-bridge-internal.ts, managed-workspace-execution-authority-internal.ts, managed-baseline-receipt-authority-internal.ts) and the corresponding tests have no surviving references in retained code, CI workflows, or scripts at this head (grep across packages/scripts/apps/github).
  • The retained read-side surfaces (workspace-execution-composition.ts, workspace-version-authority-internal.ts) were trimmed consistently with the removed write semantics, so nothing retained calls a deleted symbol.
  • Remaining dugite mentions are license-dir paths in verify-packaged-app.mjs (packaged-app license verification), not imports of the deleted module.
  • test (23m04s), package (23m08s), and the addon/validate builds are green on this exact head; no unresolved review threads.

No P0–P2; nothing warrants an inline P3. The deletion is consistent and the read path stays intact.

简体中文

批准 refactor: remove dormant Git workspace write path,head b2b202ef
审查 38 个改动文件,确认删除休眠的 Git workspace 写路径是可达性干净的:被删模块(git-workspace-service.ts/dugite-native-environment.ts/managed-workspace-owner.ts/managed-workspace-worker-bridge-internal.ts/managed-workspace-execution-authority-internal.ts/managed-baseline-receipt-authority-internal.ts)及对应测试在保留的代码/CI/脚本里均无残留引用(packages/scripts/apps/github 全仓 grep)。保留的读侧(workspace-execution-composition.ts/workspace-version-authority-internal.ts)已同步裁剪掉写语义,没有保留代码调用被删符号。剩余的 dugite 提及是 verify-packaged-app.mjs 里的许可证目录路径(打包应用许可证校验),不是对删除模块的 import。test(23m04s)/package(23m08s)/addon/validate 构建均在 exact head 绿,无未解决线程。无 P0–P2,也无值得行内的 P3;删除自洽、读路径完好。

@zhiiw zhiiw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at exact head b2b202ef (verified unchanged at review time; all checks completed/success on this head, including test 23m and package 23m).

Dormant-path removal, verified rather than assumed:

  • Zero remaining references: whole-tree search at this head finds no code reference to ManagedWorkspaceOwner, openManagedWorkspaceBaseline, createManagedWorkspaceFromSource, createManagedWorkspaceExecutionProfile, git-workspace-service, managed-workspace-owner, dugite-native, managed_worktree_v1, or the removed internal modules. The single surviving textual mention is an architecture doc sentence stating this path must not be restored.
  • The deleted authority seam leaves no dangling caller: assertWorkspaceBaselineAuthorityStoreRootInternal (the pathname/inode assertion) has zero references anywhere; registerWorkspaceBaselineAuthorityWriter call sites are updated consistently, and the seam's own comment now states honestly that no production baseline writer is composed while the schema-9 reader/migration/rebuild remain supported.
  • Runtime Host composition keeps the live path intact: the attached_checkout_v1 profile is unchanged; the removed managed_worktree_v1 branch was unreachable without a composed managedOwner. The read-only operation types are re-derived locally from FilesystemWorkerClient (Extract on read/glob/grep) instead of importing the deleted storage module — same shape, no new abstraction.
  • Clean build confirms the removal: after deleting packages/storage/dist and rebuilding, the removed modules and their tests are not emitted.

Executed on a real Windows machine at this head: storage public-entrypoint / workspace-authority / recovery-authority suites 67/68 (the one failure is a pre-existing environment case — the test shells out to tar, and Windows bsdtar misparses the C: path as a remote host; the test file is untouched by this PR), SQLite recovery-concurrency 12/12, runtime-crash 10/10, managed-dependency crash 5/5, and the new workspace-execution-composition 3/3. One honest limitation: execution-composition.test.js hangs on this specific machine (it hangs before reporting, in a long-running production-composition fixture); the hosted test job runs that exact suite green on this head, and the PR's edit to that file only removes assertions about the deleted composition branch.


Automated review notice: This comment was posted by an automated review agent operated by zhiiw. It is not an independent human review and does not replace one.

简体中文

休眠路径删除,全部核实而非假设:全树搜索确认被删模块/符号零残留(唯一存活的是架构文档里「不得恢复」的告诫句);被删的 pathname/inode 断言无残留调用方,baseline writer 注册的调用点一致更新,注释如实写明当前无生产 writer;Runtime Host 侧 attached_checkout_v1 活路径不动,managed_worktree_v1 分支本来就没有 composed owner 不可达;干净重建确认被删模块不再产出。本机真 Windows:storage 各套件 67/68(唯一失败是 tar 把 C: 盘符当远程主机的既有环境坑,该测试文件 PR 未触碰)、并发 12/12、崩溃 10/10+5/5、新组合套件 3/3。如实声明:execution-composition.test.js 在本机挂起(环境性,hosted test job 在同一 head 全绿跑过该套件)。

@Astro-Han
Astro-Han merged commit f689c34 into apache:main Aug 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Over 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants