Files
executus/critic
steve e5cab5525e
executus CI / test (pull_request) Successful in 1m35s
Adversarial Review (Gadfly) / review (pull_request) Successful in 9m21s
P4: critic battery — two-tier timeout watchdog + Escalator seam
The last Tier-2 battery, plugging into run.Ports.Critic (executor call site is a
P2 follow-up). Clean split of concerns:
- executus owns the deterministic MECHANICS: System.Monitor returns a
  run.CriticHandle that tracks activity (RecordStep/RecordToolStart), and a
  watcher goroutine fires once per idle period a run crosses its soft timeout,
  applies the decision (queue Steer nudges / extend the Deadline / collapse it
  to now on Kill), and enforces a hard-kill backstop (softTimeout * mul).
- the POLICY is the Escalator seam (nudge/extend/kill/escalate). Mort plugs its
  LLM critic-agent in here; ExtendOnce is the zero-dependency default (extend
  once, then let the backstop kill a truly hung run).

Race-tested: escalate-once-per-idle-period with re-arm on fresh activity, Kill
collapses the deadline, ExtendOnce fires once, zero soft-timeout => nil handle.
Core imports ZERO from critic.

This completes the P4 battery set: audit, budget, persona, skill, checkpoint,
schedule, critic — each nil-safe, each with a default, each core-import-clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 23:04:29 -04:00
..