-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Proposal: Add roborev wait Command
Summary
Add a roborev wait command to wait for an existing review job to complete, without enqueueing a new job. This enables better integration with external tools and avoids duplicate jobs.
Motivation
Currently, roborev review --wait enqueues a new job and then waits for it to complete. There's no way to wait for an already-running job that was enqueued by the post-commit hook or another process.
Use Cases
External orchestration: Claude Code/Codex skills that implement review-fix loops
# Make changes, commit
git add -A && git commit -m "Address findings"
# Wait for re-review (from post-commit hook)
sleep 1
roborev wait --for HEADI'm interested in this functionality because I essentially want the roborev refine functionality while treating roborev as a read-only reviewer and letting an external coding agent steer the fixes. This could be valuable in cases where you want the coding agent to run in a specific (e.g. sandboxed) environment.
Proposed API
Command Syntax
roborev wait [job_id]
roborev wait --sha <ref>
roborev wait --job <id>Flags
--sha <ref>: Wait for the most recent job matching this commit ref (HEAD, SHA, etc.)--job: Wait for the specified job--quiet, -q: Suppress output, only return exit code--timeout <seconds>: Maximum time to wait (0 = no timeout, default: 0)
Exit Codes
0: Review passed (verdict: PASS)1: Review failed (verdict: FAIL - has findings to address)2: Job failed or was canceled3: Timeout exceeded4: Job not found
Examples
# Wait for specific job ID
roborev wait 42
# Wait for most recent job for HEAD
roborev wait --sha HEAD
# Wait for job for a specific commit
roborev wait --sha abc123
# Quiet mode (just exit code)
roborev wait --sha HEAD --quiet
# With timeout
roborev wait --sha HEAD --timeout 300 # 5 minute timeout
# Force numeric value as job ID (not SHA)
roborev wait --job 123456 # Treats as job ID, not commit SHA
# In a script
git commit -m "Fix"
sleep 1 # Let post-commit hook fire
if roborev wait --sha HEAD --quiet; then
echo "✓ Review passed"
else
echo "✗ Review failed"
roborev show HEAD # Show findings
fi