test(runner): end legacy question turn before resume
This commit is contained in:
parent
f4686d9faa
commit
c087cf6737
|
|
@ -121,11 +121,19 @@ describe("runner E2E catalog", () => {
|
|||
expect(localQuestion?.buildPrompt("nonce")).toContain(
|
||||
"refer to it only as “the terminal marker.”",
|
||||
);
|
||||
const legacyQuestionExitInstruction =
|
||||
"In a legacy runner, after those two writes succeed, end the current response and heartbeat immediately. Do not wait, sleep, poll, or fetch the interaction; `wake_assignee` will start a new heartbeat after the user answers.";
|
||||
expect(localQuestion?.buildPrompt("nonce")).toContain(
|
||||
legacyQuestionExitInstruction,
|
||||
);
|
||||
expect(restartQuestion).toMatchObject({
|
||||
flow: "question_resume_completion",
|
||||
expectedRunCount: 2,
|
||||
restartServerBeforeQuestionAnswer: true,
|
||||
});
|
||||
expect(restartQuestion?.buildPrompt("nonce")).toContain(
|
||||
legacyQuestionExitInstruction,
|
||||
);
|
||||
expect(plan).toMatchObject({
|
||||
flow: "plan_approval_completion",
|
||||
expectedRunCount: 2,
|
||||
|
|
|
|||
|
|
@ -589,6 +589,7 @@ const structuredQuestionResumeTask = {
|
|||
`Before the answer arrives, do not spell, quote, repeat, announce, or include PAPERCLIP_E2E_QUESTION_DONE_${nonce} in any visible response, comment, or tool payload; refer to it only as “the terminal marker.”`,
|
||||
`In a native runner, call request_human_input exactly once with idempotencyKey \`question-${nonce}\`, interactionKind \`questions\`, title \`Verification word\`, prompt \`Choose the verification word\`, continuationPolicy \`wake_assignee\`, and payload {version:1,questions:[{id:\`verification-word\`,prompt:\`Choose the verification word.\`,selectionMode:\`single\`,required:true,options:[{id:\`cobalt\`,label:\`Cobalt\`},{id:\`amber\`,label:\`Amber\`}]}]}.`,
|
||||
"In a legacy runner, POST /api/issues/$PAPERCLIP_TASK_ID/interactions with {kind:`ask_user_questions`,continuationPolicy:`wake_assignee`,payload:{version:1,questions:[{id:`verification-word`,prompt:`Choose the verification word.`,selectionMode:`single`,required:true,options:[{id:`cobalt`,label:`Cobalt`},{id:`amber`,label:`Amber`}]}]}} using Authorization and X-Paperclip-Run-Id, then move the issue to `in_review`.",
|
||||
"In a legacy runner, after those two writes succeed, end the current response and heartbeat immediately. Do not wait, sleep, poll, or fetch the interaction; `wake_assignee` will start a new heartbeat after the user answers.",
|
||||
`After the answer arrives, if it is Cobalt, publish exactly PAPERCLIP_E2E_QUESTION_DONE_${nonce} once as the complete visible response and mark the task Done.`,
|
||||
`In a native runner, after the answer arrives, call paperclip_finish exactly once with {reportedWorkDisposition:"done",summary:"PAPERCLIP_E2E_QUESTION_DONE_${nonce}",completionClaim:{contractRevision:"1",objectiveSatisfied:true,criteria:[{criterionId:"objective",status:"satisfied",evidenceRefs:[]}],remainingWork:[]},evidence:[],verification:[]}. Wait for that tool call to succeed, then emit exactly PAPERCLIP_E2E_QUESTION_DONE_${nonce} as the complete final response. Do not write a user-facing final response before paperclip_finish succeeds, and do not call another tool.`,
|
||||
`In a legacy runner, post exactly PAPERCLIP_E2E_QUESTION_DONE_${nonce} as the task comment body and mark the task Done through the public API.`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue