From 7b6b56d7613a4f698b4f320dd6b2be7b02162dd6 Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 21 Mar 2026 05:55:27 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20address=20review=20=E2=80=94=20restore?= =?UTF-8?q?=20+x,=20guard=20double=20comment,=20update=20stale=20docs=20(#?= =?UTF-8?q?352)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Restore executable bit on gardener/gardener-poll.sh (cron invokes it directly) - Add _BLOCKED_POSTED guard to prevent duplicate diagnostic comments when both _on_phase_change(PHASE:crashed) and the belt-and-suspenders exit handler both call post_blocked_diagnostic() - Update stale documentation: - gardener-run.sh: remove "CI escalation recipes" from issue body - AGENTS.md: update directory layout comment for gardener-poll.sh - gardener-poll.sh: remove recipe engine description from header Co-Authored-By: Claude Opus 4.6 (1M context) --- AGENTS.md | 2 +- dev/dev-agent.sh | 5 ++++- dev/phase-handler.sh | 1 + gardener/gardener-poll.sh | 8 -------- gardener/gardener-run.sh | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) mode change 100644 => 100755 gardener/gardener-poll.sh diff --git a/AGENTS.md b/AGENTS.md index 1b6480b..4f2fa7d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,7 +17,7 @@ disinto/ ├── dev/ dev-poll.sh, dev-agent.sh, phase-handler.sh — issue implementation ├── review/ review-poll.sh, review-pr.sh — PR review ├── gardener/ gardener-run.sh — files action issue for run-gardener formula -│ gardener-poll.sh, gardener-agent.sh — recipe engine + grooming +│ gardener-poll.sh, gardener-agent.sh — grooming ├── predictor/ predictor-run.sh — daily cron executor for run-predictor formula ├── planner/ planner-run.sh — direct cron executor for run-planner formula │ planner/journal/ — daily raw logs from each planner run diff --git a/dev/dev-agent.sh b/dev/dev-agent.sh index b436482..0725a3d 100755 --- a/dev/dev-agent.sh +++ b/dev/dev-agent.sh @@ -772,7 +772,10 @@ case "${_MONITOR_LOOP_EXIT:-}" in crashed) # Belt-and-suspenders: _on_phase_change(PHASE:crashed) handles primary # cleanup (diagnostic comment, blocked label, worktree, files). - post_blocked_diagnostic "crashed" + # Only post if the callback didn't already (guard prevents double comment). + if [ "${_BLOCKED_POSTED:-}" != "true" ]; then + post_blocked_diagnostic "crashed" + fi ;; done) # Belt-and-suspenders: callback in phase-handler.sh handles primary cleanup, diff --git a/dev/phase-handler.sh b/dev/phase-handler.sh index 07c4907..c343c33 100644 --- a/dev/phase-handler.sh +++ b/dev/phase-handler.sh @@ -93,6 +93,7 @@ ${tmux_output} -d "{\"labels\":[${blocked_id}]}" >/dev/null 2>&1 || true fi CLAIMED=false + _BLOCKED_POSTED=true } # --- Build phase protocol prompt (shared across agents) --- diff --git a/gardener/gardener-poll.sh b/gardener/gardener-poll.sh old mode 100644 new mode 100755 index 95a4ba4..d4dda19 --- a/gardener/gardener-poll.sh +++ b/gardener/gardener-poll.sh @@ -4,7 +4,6 @@ # # Cron: daily (or 2x/day). Handles lock management, escalation reply # injection, and delegates backlog grooming to gardener-agent.sh. -# Then processes dev-agent CI escalations via the recipe engine. # # Grooming (delegated to gardener-agent.sh): # - Duplicate titles / overlapping scope @@ -12,13 +11,6 @@ # - Stale issues (no activity > 14 days) # - Blockers starving the factory # - Tech-debt promotion / dust bundling -# -# CI escalation (recipe-driven, handled here): -# - ShellCheck per-file sub-issues -# - Generic CI failure issues -# - Chicken-egg CI handling -# - Cascade rebase + retry merge -# - Flaky test quarantine # ============================================================================= set -euo pipefail diff --git a/gardener/gardener-run.sh b/gardener/gardener-run.sh index 36ecb3d..8ee6493 100755 --- a/gardener/gardener-run.sh +++ b/gardener/gardener-run.sh @@ -51,7 +51,7 @@ model: opus --- Periodic gardener housekeeping run. The action-agent reads \`formulas/run-gardener.toml\` -and executes the steps: preflight, grooming, blocked-review, CI escalation recipes, +and executes the steps: preflight, grooming, blocked-review, AGENTS.md update, and commit-and-pr. Filed automatically by \`gardener-run.sh\`."