feat: replace linked worktrees with runtime clones

This commit is contained in:
2026-09-12 01:43:21 +09:00
parent f6ce1df766
commit ec5a403ec6
21 changed files with 258 additions and 518 deletions
@@ -9,9 +9,7 @@ export type Diagnostic = {
message: string;
};
export type WorkingDirectoryMaterializerKind =
| "runtime_git_cache"
| "local_git_worktree";
export type WorkingDirectoryMaterializerKind = "runtime_git_clone";
export type WorkingDirectoryStatusKind =
| "active"
@@ -11,9 +11,7 @@ export type Diagnostic = {
message: string;
};
export type WorkingDirectoryMaterializerKind =
| "runtime_git_cache"
| "local_git_worktree";
export type WorkingDirectoryMaterializerKind = "runtime_git_clone";
export type WorkingDirectoryStatusKind =
| "active"
@@ -114,8 +114,7 @@ export function parseWorkingDirectorySummary(
working_directory_id: stringField(record, "working_directory_id"),
repository_key: stringField(record, "repository_key"),
materializer_kind: enumField(record, "materializer_kind", [
"runtime_git_cache",
"local_git_worktree",
"runtime_git_clone",
]),
status: enumField(record, "status", [
"active",
@@ -282,10 +282,7 @@ function runtimeWorkingDirectory(
item.materializer_kind,
`${label}.materializer_kind`,
);
if (
materializerKind !== "runtime_git_cache" &&
materializerKind !== "local_git_worktree"
) {
if (materializerKind !== "runtime_git_clone") {
throw new Error(`${label}.materializer_kind is invalid`);
}
const status = string(item.status, `${label}.status`);
@@ -20,10 +20,10 @@ function workdir(
repository_key: "repository-1",
current_selector,
current_ref,
materializer_kind: "local_git_worktree",
materializer_kind: "runtime_git_clone",
status: "active",
cleanup_target: {
kind: "local_git_worktree",
kind: "runtime_git_clone",
working_directory_id: "workdir-1",
repository_key: "repository-1",
},
@@ -54,12 +54,12 @@ const options: WorkerLaunchOptionsResponse = {
creation_ref: "0123456789abcdef",
current_selector: null,
current_ref: "0123456789abcdef",
materializer_kind: "local_git_worktree",
materializer_kind: "runtime_git_clone",
status: "active",
cleanliness: "clean",
primary_worker_id: null,
cleanup_target: {
kind: "git_worktree",
kind: "runtime_git_clone",
working_directory_id: "wd-1-repo",
repository_key: "repo",
},
+1 -1
View File
@@ -11,7 +11,7 @@ import {
const summary = {
working_directory_id: "workdir-1",
repository_key: "main",
materializer_kind: "runtime_git_cache",
materializer_kind: "runtime_git_clone",
status: "active",
occupied_by: {
runtime_id: "arcadia",