fix: address review — guard grooming in gardener-poll.sh, doc fixes

- Add --recipes-only flag to gardener-poll.sh to skip grooming call when
  invoked by the formula's ci-escalation-recipes step (prevents double-run)
- Update formula step to pass --recipes-only
- Add lib/file-action-issue.sh to AGENTS.md shared helpers table
- Clarify TOML arg scope in gardener trigger description
- Fix log prefixes in gardener-run.sh (poll: → run:)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-20 13:02:33 +00:00
parent 59b6d76afa
commit cc6a958245
4 changed files with 23 additions and 8 deletions

View file

@ -25,8 +25,16 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
FACTORY_ROOT="$(dirname "$SCRIPT_DIR")"
# --recipes-only: skip grooming (used by formula ci-escalation-recipes step
# to avoid double-running grooming which the formula handles as its own step)
RECIPES_ONLY=0
if [ "${1:-}" = "--recipes-only" ]; then
RECIPES_ONLY=1
shift
fi
# Load shared environment (with optional project TOML override)
# Usage: gardener-poll.sh [projects/harb.toml]
# Usage: gardener-poll.sh [--recipes-only] [projects/harb.toml]
export PROJECT_TOML="${1:-}"
# shellcheck source=../lib/env.sh
source "$FACTORY_ROOT/lib/env.sh"
@ -108,8 +116,13 @@ Instructions:
done
# ── Backlog grooming (delegated to gardener-agent.sh) ────────────────────
log "Invoking gardener-agent.sh for backlog grooming"
bash "$SCRIPT_DIR/gardener-agent.sh" "${1:-}" || log "WARNING: gardener-agent.sh exited with error"
# Skipped with --recipes-only (formula's grooming step handles this)
if [ "$RECIPES_ONLY" -eq 0 ]; then
log "Invoking gardener-agent.sh for backlog grooming"
bash "$SCRIPT_DIR/gardener-agent.sh" "${1:-}" || log "WARNING: gardener-agent.sh exited with error"
else
log "Skipping grooming (--recipes-only mode)"
fi
# ── Recipe matching engine ────────────────────────────────────────────────