disinto/formulas
openhands 61c44d31b1 fix: refactor: replace escalation JSONL with blocked label + diagnostic comment (#352)
Replace the unreliable escalation JSONL system (supervisor/escalations-*.jsonl
consumed by gardener) with direct blocked label + diagnostic comment on the
original issue.

When a dev-agent or action-agent session fails (PHASE:failed, idle timeout,
crash, CI exhausted):
- Capture last 50 lines from tmux pane via tmux capture-pane
- Post a structured diagnostic comment on the issue (exit reason, timestamp,
  PR number, tmux output)
- Label the issue "blocked" (instead of restoring "backlog")
- Remove in-progress label

Removed:
- Escalation JSONL write paths in dev-agent.sh, phase-handler.sh, dev-poll.sh,
  action-agent.sh
- is_escalated() helper in dev-poll.sh
- Escalation triage (P2f section) in supervisor-poll.sh
- Escalation processing + recipe engine in gardener-poll.sh
- ci-escalation-recipes step from run-gardener.toml formula
- escalations*.jsonl from .gitignore

Added:
- post_blocked_diagnostic() shared helper in phase-handler.sh
- ensure_blocked_label_id() helper (creates label via API if not exists)
- is_blocked() helper in dev-poll.sh (replaces is_escalated)
- Blocked issues listing in supervisor/preflight.sh

Kept:
- Matrix notifications on failure (unchanged)
- CI fix counter logic (still tracks attempts)
- needs_human injection in supervisor/gardener (not escalation-related)
- Gardener grooming (gardener-agent.sh still invoked)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 04:18:43 +00:00
..
add-rpc-method.toml fix: address review findings on formula templates and BOOTSTRAP docs 2026-03-17 16:52:49 +00:00
groom-backlog.toml fix: feat: gardener formula — groom-backlog.toml with verify loop, remove timeouts (#183) 2026-03-18 18:42:30 +00:00
review-pr.toml fix: feat: migrate review-agent to formula architecture (#267) 2026-03-20 22:59:02 +00:00
run-gardener.toml fix: refactor: replace escalation JSONL with blocked label + diagnostic comment (#352) 2026-03-21 04:18:43 +00:00
run-planner.toml fix: planner formula — MEMORY.md should be committed in PR, not gitignored (#397) 2026-03-20 15:25:28 +00:00
run-predictor.toml fix: address review — WOODPECKER_SERVER var, update AGENTS.md for new predictor 2026-03-20 18:00:21 +00:00
run-publish-site.toml fix: address review — cross-step var persistence, atomic symlink, verify guards 2026-03-19 21:41:46 +00:00
run-supervisor.toml fix: address review — phase signal quoting, issue count limits, reply comment 2026-03-21 00:39:58 +00:00
upgrade-dependency.toml fix: address review findings on formula templates and BOOTSTRAP docs 2026-03-17 16:52:49 +00:00