Commit Graph

16 Commits

  • Deduplicate issue digest interactions by user (#22039)
    ## Summary
    
    The issue digest uses recent posts, comments, and reactions to decide
    which issues deserve attention. A single active user could previously
    raise an issue's apparent importance by commenting or reacting multiple
    times in the window.
    
    This changes `codex-issue-digest` so `user_interactions` counts unique
    human GitHub users per issue across new issue posts, new comments, and
    new reactions. Raw reaction/comment counts are still preserved for
    detail output, and the skill guidance now describes `Interactions` as a
    unique-human-user count.
  • [codex] Add Codex environment config (#20630)
    ## Why
    
    This adds a checked-in Codex environment configuration so the repo
    exposes a ready-to-run Codex action from the app environment metadata.
    
    ## What changed
    
    - Added `.codex/environments/environment.toml` with a generated `Run`
    action.
    - The action runs the `codex` binary from `codex-rs/Cargo.toml` with
    `mcp_oauth_credentials_store=file`.
    
    ## Verification
    
    - Not run; configuration-only change.
  • [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`
  • Refine Codex issue digest summaries (#20097)
    ## Why
    
    The `codex-issue-digest` skill was producing more detail than the daily
    digest needed, and broad all-area digests could miss active issues. In
    particular, issue #16088 had substantial recent comments and reactions
    but did not appear in the weekly all-areas output because GitHub search
    was using default relevance ranking and the collector could exhaust its
    candidate cap before later search queries got a fair sample.
    
    That made the digest look quieter than the underlying user activity and
    made threshold tuning misleading.
    
    ## What changed
    
    - Make the digest summary headline-first and summary-only by default.
    - Add an explicit opt-in flow for `## Details`, so the issue table is
    shown only when requested or when the prompt asks for details upfront.
    - Update the collector to request GitHub issue search results with
    `sort=updated` and `order=desc`.
    - Apply the search candidate cap per query instead of globally across
    all queries.
    - Bump the collector script version to `3`.
    - Add tests that cover updated sorting and per-query candidate limits.
    
    ## Verification
    
    - `pytest
    .codex/skills/codex-issue-digest/scripts/test_collect_issue_digest.py`
    - `ruff check
    .codex/skills/codex-issue-digest/scripts/collect_issue_digest.py
    .codex/skills/codex-issue-digest/scripts/test_collect_issue_digest.py`
    - `git diff --check`
    - Reran the all-areas weekly collector and confirmed #16088 is now
    included with `55` interactions.
  • Add Codex issue digest skill (#19779)
    Problem: Maintainers need a shared way to run Codex GitHub issue digests
    without copying large prompts or relying on manual GitHub page
    summaries.
    
    Solution: Add a reusable codex-issue-digest skill with a deterministic
    GitHub collector, owner/all-label windows, reaction-aware activity
    metrics, scaled attention markers, and focused tests.
  • Split DeveloperInstructions into individual fragments. (#18813)
    Split DeveloperInstructions into individual fragments.
  • [codex] Tighten code review skill wording (#18818)
    ## Summary
    
    This updates the code review orchestrator skill wording so the
    instruction explicitly requires returning every issue from every
    subagent.
    
    ## Impact
    
    The change is limited to `.codex/skills/code-review/SKILL.md` and
    clarifies review aggregation behavior for future Codex-driven reviews.
    
    ## Validation
    
    No tests were run because this is a markdown-only skill wording change.
  • Add Code Review skill (#18746)
    Adds a skill that centralizes rules used during code review for codex.
  • Attribute automated PR Babysitter review replies (#18379)
    ## Summary
    PR Babysitter can reply directly to GitHub code review comments when
    feedback is non-actionable, already addressed, or not valid. Those
    replies should be visibly attributed so reviewers do not mistake an
    automated Codex response for a message from the human operator.
    
    This updates the skill instructions to require GitHub code review
    replies from the babysitter to start with `[codex]`.
    
    ## Changes
    - Adds the `[codex]` prefix requirement to the core PR Babysitter
    workflow.
    - Repeats the requirement in the review comment handling guidance where
    agents decide whether to reply to a review thread.
  • feat: introduce codex-pr-body skill (#18033)
    ## Motivation
    
    Codex needs a repeatable workflow for updating PR metadata after a pull
    request already exists. This is more specific than generic GitHub
    handling: the assistant needs to preserve author-provided body content,
    explain why the PR exists before listing implementation details, and
    describe only the net change under review, including when Sapling stacks
    put a PR on top of another PR instead of `main`.
    
    ## Changes
    
    - Adds `.codex/skills/codex-pr-body/SKILL.md`.
    - Documents how to infer the target PR from the current branch or
    commit, including Sapling-specific PR metadata and `sl sl` output.
    - Defines the expected PR body update behavior: inspect the existing
    body, preserve key content such as images, avoid local absolute paths,
    use Markdown formatting, include relevant issue/PR references, and call
    out developer docs follow-up only when applicable.
    - Captures stacked-PR handling so generated PR text describes the change
    between the PR's base and head, rather than unrelated ancestor changes.
    
    ## Verification
    
    Not run; this is a Codex skill documentation addition.
  • Add project-local codex bug triage skill (#17064)
    Add a `codex-bug` skill to help diagnose and fix bugs in codex.
  • 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
  • Update PR babysitter skill for review replies and resolution (#16112)
    This PR updates the "PR Babysitter" skill to clarify that non-actionable
    review comments should receive a direct reply explaining why no change
    is needed, and actionable review comments should be marked "resolved"
    after they are addressed.
  • Add remote test skill (#15324)
    Teach codex to run remote tests.
  • 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.