Move paired handoff enqueue into backend

This commit is contained in:
ejclaw
2026-04-08 10:09:23 +09:00
parent 6efe0a77f9
commit d996d5ff10
5 changed files with 366 additions and 20 deletions

View File

@@ -105,6 +105,39 @@ describe('message-runtime-rules', () => {
).toEqual({ kind: 'none' });
});
it('dispatches reviewer and arbiter delivery success through paired follow-up enqueue when a handoff is pending', () => {
expect(
resolveFollowUpDispatch({
source: 'delivery-success',
nextTurnAction: { kind: 'owner-follow-up' },
completedRole: 'reviewer',
}),
).toEqual({
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
expect(
resolveFollowUpDispatch({
source: 'delivery-success',
nextTurnAction: { kind: 'finalize-owner-turn' },
completedRole: 'reviewer',
}),
).toEqual({
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
expect(
resolveFollowUpDispatch({
source: 'delivery-success',
nextTurnAction: { kind: 'owner-follow-up' },
completedRole: 'arbiter',
}),
).toEqual({
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
});
it('dispatches delivery retry follow-ups through either generic message checks or paired follow-up enqueue', () => {
expect(
resolveFollowUpDispatch({
@@ -132,7 +165,10 @@ describe('message-runtime-rules', () => {
nextTurnAction: { kind: 'finalize-owner-turn' },
completedRole: 'reviewer',
}),
).toEqual({ kind: 'none' });
).toEqual({
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
});
it('dispatches bot-only follow-ups through inline finalize or paired enqueue', () => {