feat: auto-trigger reviewer after owner completion with round trip limit

- Owner finishes → auto mark review_ready → reviewer executes
- Reviewer finishes → task back to active → owner can respond
- Automatic ping-pong until consensus or round trip limit
- PAIRED_MAX_ROUND_TRIPS env var (default 10, 0 = unlimited)
- round_trip_count tracked per task in DB
This commit is contained in:
Eyejoker
2026-03-29 18:57:16 +09:00
parent 338c1f6a1d
commit a1e5418a2f
10 changed files with 105 additions and 45 deletions

View File

@@ -91,6 +91,12 @@ export const RECOVERY_CONCURRENT_AGENTS = parseInt(
10,
);
// ── Paired review ─────────────────────────────────────────────────
// Max owner↔reviewer round trips per task. 0 = unlimited.
const rawMaxRoundTrips = getEnv('PAIRED_MAX_ROUND_TRIPS') || '10';
export const PAIRED_MAX_ROUND_TRIPS =
rawMaxRoundTrips === '0' ? Infinity : parseInt(rawMaxRoundTrips, 10) || 10;
// ── Container isolation ───────────────────────────────────────────
export const REVIEWER_CONTAINER_IMAGE =
getEnv('REVIEWER_CONTAINER_IMAGE') || 'ejclaw-reviewer:latest';