Skip to content

Commit fe977ec

Browse files
refactor(server): trim redundant Scratch launch comments
1 parent 4ecd863 commit fe977ec

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎apps/server/src/orchestration-v2/ThreadLaunchService.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,9 +820,8 @@ const make = Effect.gen(function* () {
820820

821821
const launch: ThreadLaunchService["Service"]["launch"] = Effect.fn("ThreadLaunchService.launch")(
822822
function* (request) {
823-
// Scratch is a plain folder, not a Git repository, so a worktree there
824-
// can only fail. It launches at the root instead, which gives the thread
825-
// a folder of its own below, and its retries prepare that folder too.
823+
// Scratch has no Git repository. Normalize before folder allocation so
824+
// durable preparation and retries use the thread's own Scratch folder.
826825
const input: ThreadLaunchInput =
827826
request.workspaceStrategy.type === "worktree" &&
828827
(yield* managedFolders.isScratchProject(request.projectId))

‎apps/server/src/project/ManagedProjectFolders.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ export class ManagedProjectFolders extends Context.Service<
9191
{
9292
readonly scratchRoot: Effect.Effect<Option.Option<string>>;
9393
readonly ensureScratchProject: Effect.Effect<{ readonly projectId: ProjectId }, ScratchError>;
94-
/** Whether the project is Scratch, which is a plain folder rather than a Git repository. */
9594
readonly isScratchProject: (projectId: ProjectId) => Effect.Effect<boolean>;
9695
readonly folderForThread: (input: {
9796
readonly projectId: ProjectId;

‎apps/server/src/scheduledTasks/ScheduledTaskService.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,8 +1012,6 @@ export const layer = Layer.effect(
10121012
return { token, secret, secretChanged };
10131013
})
10141014
: { token: null, secret: null, secretChanged: true };
1015-
// Scratch has no Git repository to make a worktree in; its runs start
1016-
// at the root, which gives each run a folder of its own.
10171015
const workspaceStrategy: ScheduledTask["workspaceStrategy"] =
10181016
input.workspaceStrategy.type === "worktree" &&
10191017
(yield* managedFolders.isScratchProject(input.projectId))

0 commit comments

Comments
 (0)