fix: prevent DONE↔DONE infinite loop and add AGENT_LANGUAGE setting

- Fix source_ref mismatch: update to workspace HEAD on first owner run
  so change detection compares against the correct repo
- Treat hasNewChanges === null as "no changes" at finalize to prevent
  infinite re-review when source_ref is unresolvable
- Add AGENT_LANGUAGE env var: when set, appends language instruction to
  all paired room prompts (owner, reviewer, arbiter)
This commit is contained in:
Eyejoker
2026-03-31 13:55:41 +09:00
parent 47d532e869
commit 757e33c58e
3 changed files with 39 additions and 14 deletions

View File

@@ -115,6 +115,9 @@ export const ARBITER_SERVICE_ID = ARBITER_AGENT_TYPE
? getEnv('ARBITER_SERVICE_ID') || CODEX_REVIEW_SERVICE_ID
: null;
/** Language for agent responses. When set, a language instruction is appended to all paired room prompts. */
export const AGENT_LANGUAGE = getEnv('AGENT_LANGUAGE') || '';
/** Number of consecutive owner↔reviewer round trips before arbiter is auto-requested. */
export const ARBITER_DEADLOCK_THRESHOLD = parseInt(
getEnv('ARBITER_DEADLOCK_THRESHOLD') || '3',