Skip to content

Add roborev wait Command #226

@jeremyjordan

Description

@jeremyjordan

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 HEAD

I'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 canceled
  • 3: Timeout exceeded
  • 4: 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions