Recover Codex compaction failures in paired owner flow

This commit is contained in:
ejclaw
2026-04-15 03:11:14 +09:00
parent c76902a84b
commit 2ab3bddc0e
20 changed files with 449 additions and 18 deletions

View File

@@ -133,7 +133,7 @@ describe('message-runtime-rules', () => {
).toEqual({ kind: 'none' });
});
it('dispatches owner delivery success through a paired follow-up enqueue only for reviewer turns', () => {
it('dispatches owner delivery success through a paired follow-up enqueue for reviewer or arbiter turns', () => {
expect(
resolveFollowUpDispatch({
source: 'owner-delivery-success',
@@ -143,6 +143,15 @@ describe('message-runtime-rules', () => {
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
expect(
resolveFollowUpDispatch({
source: 'owner-delivery-success',
nextTurnAction: { kind: 'arbiter-turn' },
}),
).toEqual({
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
expect(
resolveFollowUpDispatch({
source: 'owner-delivery-success',
@@ -151,6 +160,21 @@ describe('message-runtime-rules', () => {
).toEqual({ kind: 'none' });
});
it('dispatches failed owner recovery through a paired follow-up when execution escalated to arbiter', () => {
expect(
resolveFollowUpDispatch({
source: 'executor-recovery',
nextTurnAction: { kind: 'arbiter-turn' },
completedRole: 'owner',
executionStatus: 'failed',
sawOutput: false,
}),
).toEqual({
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
});
it('dispatches reviewer and arbiter delivery success through paired follow-up enqueue when a handoff is pending', () => {
expect(
resolveFollowUpDispatch({