Skip to content

Add fast review-gate wait subcommand (VOI-28)#4

Merged
VoidAxiom merged 3 commits into
mainfrom
sk/VOI-28-review-gate-polling
May 17, 2026
Merged

Add fast review-gate wait subcommand (VOI-28)#4
VoidAxiom merged 3 commits into
mainfrom
sk/VOI-28-review-gate-polling

Conversation

@VoidAxiom
Copy link
Copy Markdown
Owner

Fixes VOI-28.

Problem

The review-gate convergence loop was hand-rolled at 30s intervals against a long fixed deadline. A clean Codex review lands in ~1–2 min, so PR #3 idled ~5.5 min before merging. (User feedback.)

Change

  • scripts/review-gate.sh wait <pr> [maxSec]: polls every 15s, prints a status line each tick, and exits the instant Codex acts:
    • FINDINGS — a new unresolved review thread (Codex re-reviews via new threads)
    • REVIEWED-CLEAN — a chatgpt-codex-connector PR comment with CI settled and zero open threads
    • TIMEOUT — ceiling reached (default 360s)
  • CLAUDE.md + .claude/commands/review-gate.md now use review-gate.sh wait instead of ad-hoc sleeps.
  • Per CLAUDE.md division of labor, scripts/ orchestration is Claude-authored (not a Codex packet).

Evidence

  • bash -n scripts/review-gate.sh clean
  • npx tsc -b clean (no TS changed; CI runs vitest+build)
  • Functional dry-run: review-gate.sh wait 3 60 on merged PR Fix codex-exec worker invocation + add phylogeny tests #3REVIEWED-CLEAN in 1.3s (vs. minutes of old polling)
  • Inspection harness N/A — no sim/visual change

Dogfood: this PR's own gate is driven by the new wait.

Fixes VOI-28. The convergence loop was hand-rolled at 30s ticks against
a long fixed deadline, so a clean Codex review (lands in ~1-2min) cost
~5.5min of idle polling. New 'scripts/review-gate.sh wait <pr> [maxSec]':
polls every 15s and returns the instant Codex acts — FINDINGS (new
unresolved thread) or REVIEWED-CLEAN (chatgpt-codex-connector comment +
CI settled, zero open threads) — else TIMEOUT at the ceiling. CLAUDE.md
and /review-gate now point at it.

Evidence: bash -n clean; npx tsc -b clean; functional dry-run on merged
PR #3 returned REVIEWED-CLEAN in 1.3s (vs. minutes of old polling).
@VoidAxiom
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 43b4049346

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/review-gate.sh Outdated
Addresses Codex P1 on PR #4: REVIEWED-CLEAN counted any prior
chatgpt-codex-connector comment, so in the resolve->re-review loop a
stale earlier clean comment could declare clean before the fresh
re-review landed (merge without required re-review). Now baselines the
Codex comment count at wait invocation; REVIEWED-CLEAN requires
fresh_codex>0 (a new comment since waiting began).
@VoidAxiom
Copy link
Copy Markdown
Owner Author

@codex addressed the P1 ("Wait for a fresh Codex response before declaring clean") in 5c40d9a: wait now baselines the chatgpt-codex-connector comment count at invocation and only declares REVIEWED-CLEAN when fresh_codex>0 (a NEW comment since waiting began), so a prior clean comment can no longer short-circuit the re-review. Resolving the thread; please re-review.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c40d9a29b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/review-gate.sh Outdated
Addresses second Codex P1 on PR #4: a failed/transient/non-JSON
baseline fetch previously fell back to BASE_CODEX=0, so a later
successful poll made historical Codex comments look fresh and could
print REVIEWED-CLEAN before the required re-review. Now retries the
baseline up to 5x and ABORTS (exit 3) if it can't be established —
fail loud rather than risk a stale-clean shortcut.
@VoidAxiom
Copy link
Copy Markdown
Owner Author

@codex addressed the P1 ("Do not treat baseline fetch failures as zero comments") in e9033f4: baseline acquisition now retries the GraphQL fetch up to 5x and parses an explicit OK <n> sentinel; on persistent failure it ABORTS with exit 3 instead of defaulting BASE_CODEX=0, so a transient error can no longer make historical comments look fresh. Resolving; please re-review.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@VoidAxiom VoidAxiom merged commit b6b9bc2 into main May 17, 2026
1 check passed
@VoidAxiom VoidAxiom deleted the sk/VOI-28-review-gate-polling branch May 17, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant