Add fast review-gate wait subcommand (VOI-28)#4
Conversation
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).
|
@codex review |
There was a problem hiding this comment.
💡 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".
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).
|
@codex addressed the P1 ("Wait for a fresh Codex response before declaring clean") in 5c40d9a: |
There was a problem hiding this comment.
💡 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".
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.
|
@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 |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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— achatgpt-codex-connectorPR comment with CI settled and zero open threadsTIMEOUT— ceiling reached (default 360s)CLAUDE.md+.claude/commands/review-gate.mdnow usereview-gate.sh waitinstead of ad-hoc sleeps.scripts/orchestration is Claude-authored (not a Codex packet).Evidence
bash -n scripts/review-gate.shcleannpx tsc -bclean (no TS changed; CI runs vitest+build)review-gate.sh wait 3 60on merged PR Fix codex-exec worker invocation + add phylogeny tests #3 →REVIEWED-CLEANin 1.3s (vs. minutes of old polling)Dogfood: this PR's own gate is driven by the new
wait.