Skip to content

The Approver stage has no stage_timeouts/stage_inactivity override key — its backstop and watchdog fall back to the Implementor's shipped prior

Id: TD-PPagop-26081601 · Status: resolved · Filed: 2026-08-16 · Resolved: 2026-08-16 · Ref: https://github.com/Poetic-Poems/agent-ops/pull/473

D18 WI-5 (agent-ops#408) added the Approver stage’s own stage_budget_apply approver … call (agent-cycle.sh’s run_approver_stage), which resolves its backstop/inactivity caps through the same self-tuning derivation every other stage uses (lib/stage-budget.sh). That derivation falls back to STAGE_BUDGET_PRIORS[$actor] // $p.implementor for any actor with no shipped prior and no accumulated history — "approver" was added to the priors table ({"backstop": 30, "inactivity": 10}, a lighter figure than the Reviewer’s own 90/10, since the stage is read-only and never pushes), so the derivation itself is sound from the first cycle.

What was not added is a way for an installation to override either number: config.schema.json’s repos[].stage_timeouts/stage_inactivity objects, and the top-level timeout_<actor>/inactivity_<actor> keys, are each additionalProperties: false with an explicit enumerated property list per actor (coordinator, implementor, reviewer, enabler, refiner, project-reviewer) — "approver" is not among them, so a config setting stage_timeouts.approver or timeout_approver fails schema validation outright rather than being silently ignored.

Not a correctness or safety gap — the self-tuning derivation is exactly what every other stage already relies on for its steady-state number, and the shipped approver prior is a defensible starting point. The gap is operator control: unlike every other stage, nobody can raise or lower the Approver’s caps by hand for one repository (a slower CI checkout that makes even a read-only diff review take longer, say) without a schema change. stage_budget_resolve’s own config-override branch already reads whatever key is there; only the schema’s enumerated property lists are what stand in the way.

  • config.schema.json — repos[].stage_timeouts, repos[].stage_inactivity (the properties object under each), and the top-level required array’s neighbouring timeout_<actor>/inactivity_<actor> key definitions.
  • lib/stage-budget.sh — STAGE_BUDGET_PRIORS already carries "approver"; nothing here needs to change once the schema does.
  • README.md / docs/IMPLEMENTATION-PIPELINE-SPEC.md — both spec/readme config tables are generated (scripts/render-config-table.sh); adding the schema keys and re-running the generator is the whole doc-side fix.

Add "approver" to each of the four enumerated key lists (stage_timeouts, stage_inactivity, timeout_approver, inactivity_approver) in config.schema.json, following the existing reviewer/enabler entries’ exact shape ({"type": "integer", "minimum": 0}), then run scripts/render-config-table.sh to regenerate the tables. No test currently pins stage_budget_overrides’s handling of an "approver" key either way (the existing test/stage-budget.test.sh covers the mechanism generically, parameterised by actor name), so add one assertion there alongside the schema change.