Template enum value `iterate.onDisagreement: accept-doer` is exposed in schema + cockpit UI but unimplemented in runner
Summary
The schema accepts iterate.onDisagreement: 'continue' | 'escalate' | 'accept-doer', and the cockpit's template-dialog form exposes all three values to users — but the daemon runner only honors 'continue'. Setting accept-doer (or escalate) on a template validates and persists, but has no effect on chat behavior.
Evidence (against main, also reflected in [email protected] on npm)
Schema + UI define the enum:
src/lib/template-schema.ts—onDisagreement: z.enum(['continue', 'escalate', 'accept-doer']).default('continue')src/components/template-dialog/emit.tscarries an explicit comment mapping:// fail → 'accept-doer' (drop reviewer veto, accept doer)src/components/template-dialog/{types,parse}.ts— form parses/emits the valuedocs/v05/SPEC-D-templates.md— schema documented
Runner never reads the field:
src/daemon/runner.tsround loop (for (let round = 1; round <= stdPhase.iterate.maxRounds; round++)) breaks on consensus, otherwise falls through tophase_failedwithreason: 'max_rounds_exhausted'→ finalemitChatDone({ status: 'failed', verdict: 'failed', error: 'doer_failed_all_rounds' }). No branch consultsiterate.onDisagreement.src/daemon/runner/review-only-phase.tsonly setsonDisagreement: 'continue'as a synthetic config for the wrapped reviewer call.- All
templates/*.yamlandtests/*.tsuse'continue'exclusively.
A repo-wide grep for accept-doer / acceptDoer shows zero callers outside the schema, the cockpit form, and the SPEC doc.
Reproduce
- Create a user template with
iterate.onDisagreement: accept-doer,agreementThreshold: 1, and a doer + reviewer that will disagree. - Submit a chat where the reviewer requests changes every round.
- Expected (per cockpit label "drop reviewer veto, accept doer"): chat ends successfully with the doer's last answer.
- Observed: chat ends
status: failed,error: doer_failed_all_rounds.
Impact
"Set it, nothing happens" trap. Users picking the option from the cockpit form (or writing it in YAML to match the schema) get silent no-op behavior. Particularly relevant for decision/recommendation-style templates where the doer's final draft is a legitimate fallback when reviewers can't agree.
Question
Is accept-doer (and escalate) planned but not yet wired into the runner, or has the runner regressed away from honoring it? Either way it'd be nice to ship the runner behavior — or, failing that, hide the unimplemented enum values from the cockpit form and schema so users aren't misled.