Phase 0 — STEP_DONE/TASK_DONE split + owner-follow-up integration smoke

This commit is contained in:
ejclaw
2026-04-23 13:06:26 +09:00
parent 3b0875e80d
commit afd9c7a538
18 changed files with 574 additions and 31 deletions

View File

@@ -113,6 +113,14 @@ describe('message-runtime-rules', () => {
intentKind: 'owner-follow-up',
}),
).toBe(true);
expect(
matchesExpectedPairedFollowUpIntent({
taskStatus: 'active',
lastTurnOutputRole: 'owner',
lastTurnOutputVerdict: 'step_done',
intentKind: 'owner-follow-up',
}),
).toBe(true);
});
it('maps active tasks with reviewer output to an owner follow-up', () => {
@@ -124,6 +132,16 @@ describe('message-runtime-rules', () => {
).toEqual({ kind: 'owner-follow-up' });
});
it('maps active tasks with owner STEP_DONE output to an owner follow-up', () => {
expect(
resolveNextTurnAction({
taskStatus: 'active',
lastTurnOutputRole: 'owner',
lastTurnOutputVerdict: 'step_done',
}),
).toEqual({ kind: 'owner-follow-up' });
});
it('returns none when an active task has no reviewer or arbiter handoff output', () => {
expect(
resolveNextTurnAction({
@@ -152,6 +170,15 @@ describe('message-runtime-rules', () => {
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
expect(
resolveFollowUpDispatch({
source: 'owner-delivery-success',
nextTurnAction: { kind: 'owner-follow-up' },
}),
).toEqual({
kind: 'enqueue',
queueKind: 'paired-follow-up',
});
expect(
resolveFollowUpDispatch({
source: 'owner-delivery-success',
@@ -295,6 +322,14 @@ describe('message-runtime-rules', () => {
lastTurnOutputRole: 'owner',
}),
).toBe('reviewer');
expect(
resolveQueuedPairedTurnRole({
taskStatus: 'active',
hasHumanMessage: false,
lastTurnOutputRole: 'owner',
lastTurnOutputVerdict: 'step_done',
}),
).toBe('owner');
});
it('resolves reviewer execution target from review_ready task status', () => {