mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 01:24:30 +01:00
feat: return completed handoffs to Agent Chat (#14408)
Return completed Agent Chat handoffs through a durable outbox and scope each generated update to its supplied tasks. Add recovery, browser delivery, result access, and calibrated quality coverage. Validated with two consecutive ten-case Claude/Codex campaigns, all CI checks, and a 5/5 review. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
3b4b270650
commit
83076d7e7c
59 files changed
+2696
-83
No files matched your search
@@ -3,6 +3,7 @@ import { renderCaseOutcome } from "./case-outcome.js";
|
||||
import { renderRunnerE2EDashboard } from "./dashboard.js";
|
||||
import {
|
||||
firstTaskTranscript,
|
||||
firstTaskUserRequest,
|
||||
renderFirstTaskTranscript,
|
||||
} from "./first-task-transcript.js";
|
||||
import type {
|
||||
@@ -129,6 +130,27 @@ function result(): RunnerE2EResult {
|
||||
}
|
||||
|
||||
describe("first-task conversation report", () => {
|
||||
it("grounds requirements in submitted user comments and resolved form answers", () => {
|
||||
const e = recording();
|
||||
for (const checkpoint of e.checkpoints) {
|
||||
for (const row of [...checkpoint.comments, ...checkpoint.interactions]) row.issueId = "task";
|
||||
Object.assign(checkpoint.interactions[0], { resolvedByUserId: "board" });
|
||||
}
|
||||
e.checkpoints.at(-1)!.comments.push({ id: "user-scope", issueId: "task", authorUserId: "board", body: "Invite beginners explicitly." });
|
||||
const request = firstTaskUserRequest(e);
|
||||
expect(request).toContain("[comment:task:user-scope] Invite beginners explicitly.");
|
||||
expect(request).toContain("[answer:question] Make a plan\nUse our garden club facts");
|
||||
expect(request.match(/Use our garden club facts/g)).toHaveLength(1);
|
||||
expect(request).not.toMatch(/Shall I proceed|Welcome|GARDENtest|two-sentence/);
|
||||
});
|
||||
it("does not infer requirements from scenario defaults, agent answers, or unrelated tasks", () => {
|
||||
const e = recording();
|
||||
for (const checkpoint of e.checkpoints) {
|
||||
for (const row of checkpoint.interactions) Object.assign(row, { issueId: "task", resolvedByAgentId: "agent" });
|
||||
checkpoint.comments.push({ id: "foreign", issueId: "other-task", authorUserId: "board", body: "Foreign requirement" });
|
||||
}
|
||||
expect(() => firstTaskUserRequest(e)).toThrow("Missing recorded user request");
|
||||
});
|
||||
it("deduplicates observations, keeps first-observed time, and includes answers and each document revision", () => {
|
||||
const entries = firstTaskTranscript(recording());
|
||||
expect(entries.filter((e) => e.kind === "comment")).toHaveLength(2);
|
||||
|
||||
Reference in new issue
Block a user