Recognize new-task confirmation cards as onboarding proposals

Preserve the explicit confirmation semantics without requiring proposal keywords in the visible text. Cover the recorded Claude false failure and retain the rebased model recovery test.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-15 22:45:56 -05:00
1 parent bf0e7556ea
commit e6619d3f5e
3 files changed
+19 -1

No files matched your search

@@ -58,7 +58,7 @@ describe("ACPX runtime sandbox", () => {
for (let attempt = 0; attempt < 2; attempt += 1) {
const sandbox = await prepareAcpxRuntimeSandbox({ binding, agent: "claude" });
const settings = JSON.parse(await readFile(join(sandbox.agentHomeDirectory, "settings.json"), "utf8"));
expect(settings).toEqual({ model, availableModels: [model] });
expect(settings).toMatchObject({ model, availableModels: [model] });
}
}
});
+6
View File
@@ -269,6 +269,12 @@ export function gradeFirstTask(e: FirstTaskEvidence): FirstTaskCheck[] {
.join("\n"),
),
].join("\n"),
) || first.interactions.some((i) =>
["request_confirmation", "request_checkbox_confirmation"].includes(i.kind) &&
/\b(?:(?:new|child)\s+task|subtask)\b/i.test(
[i.title, i.summary, i.payload?.prompt, i.payload?.detailsMarkdown]
.filter(Boolean).join("\n"),
),
),
"Propose a task for the concrete request",
[first.id],
+12
View File
@@ -403,6 +403,18 @@ describe("first-task fixtures and state grading", () => {
expect(failed(e)).toEqual([]);
});
it("recognizes the recorded Claude confirmation that offers a new task without proposal jargon", () => {
const e = recording("clear-task-first-response");
e.checkpoints = e.checkpoints.slice(0, 2);
e.checkpoints[1].comments.pop();
e.checkpoints[1].interactions.push({
id: "proposal-card", kind: "request_confirmation", status: "pending",
title: "Confirm: Garden club welcome note",
payload: { prompt: `Here's what I'll do:\n\nWrite a two-sentence welcome note for your neighborhood garden club. It will invite beginners to the free Saturday meetup and include the phrase "${e.nonce}". I'll save the finished note as a document attached to a new task.\n\nShall I go ahead?` },
});
expect(failed(e)).toEqual([]);
});
it("recognizes a Proposal heading introducing the task, as in the Claude verification recording", () => {
const e = recording("clear-task-first-response");
e.checkpoints = e.checkpoints.slice(0, 2);