feat: add completion_reason to paired_tasks (done/escalated/stopped/arbiter_escalated)

- owner can summon arbiter via BLOCKED/NEEDS_CONTEXT verdict
- completion_reason tracks why task ended: done (success), escalated
  (reviewer gave up), stopped (/stop), arbiter_escalated
This commit is contained in:
Eyejoker
2026-03-31 04:10:33 +09:00
parent b02c509eb8
commit e1b9501e87
9 changed files with 43 additions and 3 deletions

View File

@@ -112,6 +112,7 @@ function buildPairedTask(overrides: Partial<PairedTask> = {}): PairedTask {
status: 'active',
arbiter_verdict: null,
arbiter_requested_at: null,
completion_reason: null,
created_at: '2026-03-28T00:00:00.000Z',
updated_at: '2026-03-28T00:00:00.000Z',
...overrides,
@@ -202,6 +203,7 @@ describe('paired execution context', () => {
status: 'review_ready',
arbiter_verdict: null,
arbiter_requested_at: null,
completion_reason: null,
created_at: '2026-03-28T00:00:00.000Z',
updated_at: '2026-03-28T00:00:00.000Z',
});
@@ -236,6 +238,7 @@ describe('paired execution context', () => {
status: 'review_ready',
arbiter_verdict: null,
arbiter_requested_at: null,
completion_reason: null,
created_at: '2026-03-28T00:00:00.000Z',
updated_at: '2026-03-28T00:00:00.000Z',
});
@@ -273,6 +276,7 @@ describe('paired execution context', () => {
status: 'active',
arbiter_verdict: null,
arbiter_requested_at: null,
completion_reason: null,
created_at: '2026-03-28T00:00:00.000Z',
updated_at: '2026-03-28T00:00:00.000Z',
});
@@ -316,6 +320,7 @@ describe('paired execution context', () => {
status: 'in_review',
arbiter_verdict: null,
arbiter_requested_at: null,
completion_reason: null,
created_at: '2026-03-28T00:00:00.000Z',
updated_at: '2026-03-28T00:00:00.000Z',
});