forked from farhoodlabs/paperclip
Batch inline comment wake payloads
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -7,7 +7,9 @@ import {
|
||||
buildRealizedExecutionWorkspaceFromPersisted,
|
||||
buildExplicitResumeSessionOverride,
|
||||
deriveTaskKeyWithHeartbeatFallback,
|
||||
extractWakeCommentIds,
|
||||
formatRuntimeWorkspaceWarningLog,
|
||||
mergeCoalescedContextSnapshot,
|
||||
prioritizeProjectWorkspaceCandidatesForRun,
|
||||
parseSessionCompactionPolicy,
|
||||
resolveRuntimeSessionParamsForWorkspace,
|
||||
@@ -357,6 +359,32 @@ describe("deriveTaskKeyWithHeartbeatFallback", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("comment wake batching", () => {
|
||||
it("preserves ordered wake comment ids when coalescing queued follow-up wakes", () => {
|
||||
const merged = mergeCoalescedContextSnapshot(
|
||||
{
|
||||
issueId: "issue-1",
|
||||
wakeReason: "issue_commented",
|
||||
wakeCommentId: "comment-1",
|
||||
wakeCommentIds: ["comment-1"],
|
||||
paperclipWake: {
|
||||
latestCommentId: "comment-1",
|
||||
},
|
||||
},
|
||||
{
|
||||
issueId: "issue-1",
|
||||
wakeReason: "issue_commented",
|
||||
wakeCommentId: "comment-2",
|
||||
},
|
||||
);
|
||||
|
||||
expect(extractWakeCommentIds(merged)).toEqual(["comment-1", "comment-2"]);
|
||||
expect(merged.commentId).toBe("comment-2");
|
||||
expect(merged.wakeCommentId).toBe("comment-2");
|
||||
expect(merged.paperclipWake).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildExplicitResumeSessionOverride", () => {
|
||||
it("reuses saved task session params when they belong to the selected failed run", () => {
|
||||
const result = buildExplicitResumeSessionOverride({
|
||||
|
||||
Reference in New Issue
Block a user