Serialize merge-ready owner finalize handoff

This commit is contained in:
ejclaw
2026-04-05 20:11:14 +09:00
parent b6c8546f25
commit 4b7618896e
4 changed files with 132 additions and 1 deletions

View File

@@ -391,6 +391,27 @@ describe('paired execution context', () => {
// Should not throw; just logs.
});
it('ignores late completions after the paired task is already completed', () => {
vi.mocked(db.getPairedTaskById).mockReturnValue(
buildPairedTask({
status: 'completed',
completion_reason: 'done',
}),
);
completePairedExecutionContext({
taskId: 'task-1',
role: 'owner',
status: 'succeeded',
summary: 'DONE',
});
expect(db.updatePairedTask).not.toHaveBeenCalled();
expect(
pairedWorkspaceManager.markPairedTaskReviewReady,
).not.toHaveBeenCalled();
});
it('completes owner finalize when only the commit object changed after approval', () => {
const repoDir = createCanonicalRepoWithCommit('reviewed');
const approvedSourceRef = resolveTreeRef(repoDir);