Skip to content
Source
Sign inSign up
pingdotgg/t3code

server, docs: hold auto-settle while a background command runs #18062

Closeddominic-r(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/18062/headopened View on GitHub

Showing 3 changed files with 52 additions and 11 deletions.

x
0 of 3 viewed, 3 left
42 additions and 3 deletionsapps/server/src/orchestration-v2/ThreadSettlementService.test.tsModified
View file
@@ -151,17 +151,18 @@
).toBe(false);
});
​
- it("settles a thread whose only background work is a command left running", () => {
+ it("holds a thread whose only background work is a live command", () => {
+ // The agent may be waiting on the command, which wakes it when it exits.
expect(
ThreadSettlementService.isAutoSettlementCandidate(
shell({
pendingBackgroundTasks: [
- { taskId: "dev", kind: "command", description: "vp run dev --share" },
+ { taskId: "ci", kind: "command", description: "gh run watch --exit-status" },
}),
NOW_MS,
- ).toBe(true);
+ ).toBe(false);
});
​
it("keeps snoozed threads parked until they wake early on error or completion", () => {
@@ -357,6 +358,44 @@
).toBeNull();
});
​
+ it("does not settle on merge or inactivity while a background command runs", () => {
+ const idle = shell({
+ latestUserMessageAt: at(-4 * DAY_MS),