4 Commits

  • [codex] Ignore pending PR review comments (#27080)
    ## Why
    
    The PR babysitter could surface inline comments from a GitHub review
    that was still in the `PENDING` state. That allowed Codex to start
    acting on feedback before the reviewer submitted it.
    
    ## What changed
    
    - Correlate inline comments with their parent review and ignore pending
    reviews and their comments.
    - Remove pending review IDs from saved watcher state so the feedback
    surfaces normally after publication.
    - Update the skill instructions and add regression coverage for the
    draft-to-published transition.
    
    ## Validation
    
    - `python3 -m pytest
    .codex/skills/babysit-pr/scripts/test_gh_pr_watch.py`
    - Skill package validation with `quick_validate.py`
    - Live verification on #26835: the draft comment stayed hidden and
    surfaced after the review was submitted.
  • [codex] Improve PR babysitter CI diagnostics and guardrails (#20484)
    ## Summary
    
    - Surface failed GitHub Actions jobs in the PR babysitter watcher so
    Codex can fetch job logs as soon as a job fails, instead of waiting for
    the overall workflow run to complete.
    - Update babysit-pr skill instructions, GitHub API notes, and heuristics
    to prefer direct job log archives before falling back to `gh run view
    --log-failed`.
    - Add guardrails requiring explicit user confirmation before posting
    replies to human-authored review comments.
    - Add guardrails preventing Codex from patching unrelated flaky tests,
    CI infrastructure, runner issues, dependency outages, or other failures
    not caused by the PR branch.
    
    ## Validation
    
    - `python3 -m pytest
    .codex/skills/babysit-pr/scripts/test_gh_pr_watch.py`
  • Fix PR babysitter review comment monitoring (#16363)
    ## Summary
    - prioritize newly surfaced review comments ahead of CI and mergeability
    handling in the PR babysitter watcher
    - keep `--watch` running for open PRs even when they are currently
    merge-ready so later review feedback is not missed
  • Add PR babysitting skill for this repo (#12513)
    ## PR Notes
    
    This PR adds a project-scoped `babysit-pr` skill for ongoing PR
    monitoring (CI, reviews, mergeability).
    
    Simply invoke this skill after creating a PR, and codex will do its best
    to get it to a mergeable state:
    
    ### What the skill does
    * Fixes CI failures related to the PR
    * Retries CI failures due to flaky tests
    * Addresses code review comments if it agrees with them
    * Addresses merge conflicts on main branch
    
    ### How the skill works
    - Polls PR status on a loop (CI checks, workflow runs, review activity,
    mergeability, and review decision).
    - Detects new review feedback (including inline comments and automated
    Codex review comments) and prompts/handles follow-up work.
    - Distinguishes pending vs failed vs passed CI and identifies likely
    flaky failures.
    - Can retry failed checks/workflows when appropriate.
    - Prioritizes actionable code review feedback over flaky CI retries (to
    avoid rerunning CI on a SHA that is about to be replaced).
    - Continues monitoring after fixes are applied and pushed, rather than
    stopping after a progress update.
    - Uses a slower backoff polling cadence once CI is green, while still
    watching for new review feedback or state changes.
    - Treats required review/approval as a blocking condition and keeps
    watching until the PR is actually merge-ready (or merged/closed, or
    human intervention is needed).
    
    ### Intended outcome
    
    Keep the PR moving with minimal manual babysitting by continuously
    watching for CI failures, reviewer feedback, and merge blockers, and
    responding in the right order until the PR is ready to merge.