Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/scripts/tool-version-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ get_installed_version() {
fi
local _ver_rc=0
# shellcheck disable=SC2086
timeout_sec "$VERSION_TIMEOUT" "$cmd" $ver_flag >"$_ver_log" 2>/dev/null || _ver_rc=$?
timeout_sec "$VERSION_TIMEOUT" "$cmd" $ver_flag >"$_ver_log" || _ver_rc=$?

if [[ "$_ver_rc" -eq 124 ]]; then
# timeout_sec killed the process — command hung
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/review-bot-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,26 @@ jobs:
# Gate logic: require at least ONE known bot to have reviewed
# This is intentionally lenient — not all repos have all bots.
# The goal is to catch the case where NO bots have reviewed at all.
#
# Race condition fix: on pull_request events (opened/synchronize/reopened),
# the workflow fires before bots have had time to analyze. If no bots are
# found and the PR is young, pass with a "pending" note — the check will
# re-run when a bot posts via pull_request_review or issue_comment triggers.
# Only hard-fail when the PR is old enough that bots should have posted.
if [[ -n "$FOUND_BOTS" ]]; then
echo ""
echo "PASS: At least one AI review bot has posted feedback."
echo "gate_passed=true" >> "$GITHUB_OUTPUT"
echo "found_bots=${FOUND_BOTS}" >> "$GITHUB_OUTPUT"
echo "missing_bots=${MISSING_BOTS}" >> "$GITHUB_OUTPUT"
elif [[ "$ELAPSED" -lt "$MIN_WAIT_SECONDS" ]]; then
echo ""
echo "PASS (pending): PR is ${ELAPSED}s old (< ${MIN_WAIT_SECONDS}s minimum)."
echo "Bots have not posted yet but the PR is too young to enforce the gate."
echo "This check will re-run when a bot posts a review or comment."
echo "gate_passed=true" >> "$GITHUB_OUTPUT"
echo "found_bots=" >> "$GITHUB_OUTPUT"
echo "missing_bots=${MISSING_BOTS}" >> "$GITHUB_OUTPUT"
else
echo ""
echo "WAITING: No AI review bots have posted yet."
Expand Down Expand Up @@ -186,14 +200,19 @@ jobs:
{
echo "## Review Bot Gate"
echo ""
if [[ "${{ steps.check.outputs.gate_passed }}" == "true" ]]; then
if [[ "${{ steps.check.outputs.gate_passed }}" == "true" && -n "${{ steps.check.outputs.found_bots }}" ]]; then
echo "**Status**: PASSED"
echo ""
echo "**Bots that reviewed**: ${{ steps.check.outputs.found_bots }}"
if [[ -n "${{ steps.check.outputs.missing_bots }}" ]]; then
echo ""
echo "**Bots not yet reviewed**: ${{ steps.check.outputs.missing_bots }}"
fi
elif [[ "${{ steps.check.outputs.gate_passed }}" == "true" ]]; then
echo "**Status**: PASSED (pending bot reviews)"
echo ""
echo "PR is too young to enforce the gate. Bots will re-trigger this"
echo "check when they post their reviews."
elif [[ "${{ steps.skip.outputs.skip }}" == "true" ]]; then
echo "**Status**: SKIPPED (skip-review-gate label)"
else
Expand Down