diff --git a/server/src/services/recovery/legacy-continuation-instruction.test.ts b/server/src/services/recovery/legacy-continuation-instruction.test.ts new file mode 100644 index 00000000000..a60ab05fcbe --- /dev/null +++ b/server/src/services/recovery/legacy-continuation-instruction.test.ts @@ -0,0 +1,15 @@ +import { describe, expect, it } from "vitest"; +import { LEGACY_DISPOSITION_REPAIR_INSTRUCTION } from "./legacy-continuation.js"; + +describe("LEGACY_DISPOSITION_REPAIR_INSTRUCTION", () => { + it("tells an owner with unblocked unfinished work to continue it before recording the disposition", () => { + expect(LEGACY_DISPOSITION_REPAIR_INSTRUCTION).toContain( + "If the task is unfinished and nothing blocks it, continue the work in this run, then record the disposition.", + ); + }); + + it("still requires a recorded disposition and respects gates", () => { + expect(LEGACY_DISPOSITION_REPAIR_INSTRUCTION).toContain("A final message alone does not record disposition."); + expect(LEGACY_DISPOSITION_REPAIR_INSTRUCTION).toContain("Respect Stop, pause, budget and approval gates."); + }); +}); diff --git a/server/src/services/recovery/legacy-continuation.ts b/server/src/services/recovery/legacy-continuation.ts index f84155340fe..e1161f097c0 100644 --- a/server/src/services/recovery/legacy-continuation.ts +++ b/server/src/services/recovery/legacy-continuation.ts @@ -28,6 +28,7 @@ export const LEGACY_DISPOSITION_REPAIR_INSTRUCTION = "The previous task run ended without a recorded disposition or an owned next execution path. " + "Re-read the current task state. Use Paperclip tools/API to record completion, a real blocker, " + "a question or approval request, or a supported next execution path. " + + "If the task is unfinished and nothing blocks it, continue the work in this run, then record the disposition. " + "A final message alone does not record disposition. Respect Stop, pause, budget and approval gates."; function record(value: unknown): Record {