Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): agent-scheduled tasks start from the project's default branch, not "main" #26465

Closedapratxxm(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/26465/headopened View on GitHub

Showing 2 changed files with 120 additions and 10 deletions.

x
0 of 2 viewed, 2 left
103 additions and 0 deletionsapps/server/src/mcp/OrchestratorMcpService.test.tsModified
View file
@@ -2413,6 +2413,109 @@
+​
+ describe("unbound scheduled task worktree base", () => {
+ const projectId = ProjectId.make("project:scheduled-base");
+ const workspaceRoot = "/repos/scheduled-base";
+ const client: McpInvocationScope = {
+ environmentId: EnvironmentId.make("environment:scheduled-base"),
+ requestNamespace: "client:scheduled-base",
+ thread: undefined,
+ client: { sessionId: "scheduled-base", label: "Claude Code", access: "full-access" },
+ capabilities: new Set(["orchestration"]),
+ issuedAt: 1,
+ };
+ const rootTask = {
+ id: ScheduledTaskId.make("scheduled-task:root"),
+ title: "Nightly",
+ prompt: "Check the build",
+ enabled: true,
+ schedule: { type: "interval", everyMs: 3_600_000 },
+ projectId,
+ threadId: null,
+ workspaceStrategy: { type: "root" },
+ modelSelection: { instanceId: ProviderInstanceId.make("codex"), model: "gpt-5" },
+ runtimeMode: "approval-required",
+ interactionMode: "default",
+ createdBy: "agent",
+ creationSource: "mcp",