mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-18 11:40:39 +09:00
Batch inline comment wake payloads
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
e75960f284
commit
91e040a696
14 changed files with 1049 additions and 9 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue