Skip to content

feat: repo-local verify gate + pr_wait primitive (#118) - #362

Merged
getappz merged 4 commits into
masterfrom
task/118
Jul 29, 2026
Merged

feat: repo-local verify gate + pr_wait primitive (#118)#362
getappz merged 4 commits into
masterfrom
task/118

Conversation

@getappz

@getappz getappz commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add mise run verify mirroring CI's fmt/clippy/test gate exactly (CONTRIBUTING.md previously documented a weaker local check that could pass while CI failed).
  • Add a pr_wait action to the flare_git MCP tool: a bounded server-side poll loop (default 60s, capped 120s) over PR check runs, replacing manual gh pr checks shell-loop polling.

Closes item #118 (both remaining open sub-items: P1 verify gate, P2a wait-for-checks primitive).

Test plan

  • mise run verify run end-to-end in an isolated worktree — clean exit, no failures
  • cargo test --bin agentflare github::mcp:: — 8/8 passing incl. 3 new checks_wait_summary tests
  • Full mise run verify re-run after the pr_wait change — clean exit

Summary by CodeRabbit

  • New Features
    • Added a pr_wait action to monitor pull request check runs until completion or a bounded timeout.
    • Introduced configurable wait_secs and poll_interval_secs controls for polling behavior.
    • Results now return a JSON summary of pending, successful, and failed checks.
  • Documentation
    • Updated the changelog with the new pull request check-waiting capability.
    • Added/updated local verification workflow guidance for contributors and the standard “verify” task.
  • Tests
    • Added unit tests covering the check-run summary logic and edge cases (e.g., neutral/skipped).

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds the flare_git pr_wait action with bounded PR check polling, configurable timing, JSON check summaries, unit tests, and a consolidated local verification command.

Changes

PR check waiting

Layer / File(s) Summary
Wait request and check summary contracts
src/mcp_server/types.rs, src/github/mcp.rs
GitHubRequest supports pr_wait timing fields, and checks_wait_summary reports pending, failed, successful, total, and elapsed check data with unit coverage.
Bounded pr_wait polling
src/mcp_server/flare_git.rs, CHANGELOG.md
flare_git_impl resolves the PR head SHA, polls check-runs within bounded timing limits, and returns the check summary with the PR number.
Local verification workflow
mise.toml, CONTRIBUTING.md
Adds mise run verify and documents equivalent workspace-wide formatting, clippy, and test commands plus CI-only checks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MCP caller
  participant flare_git_impl
  participant GitHub check-runs API
  participant checks_wait_summary
  MCP caller->>flare_git_impl: Send pr_wait request
  flare_git_impl->>GitHub check-runs API: Poll PR head check-runs
  GitHub check-runs API-->>flare_git_impl: Return CheckRun set
  flare_git_impl->>checks_wait_summary: Build elapsed check summary
  checks_wait_summary-->>flare_git_impl: Return JSON summary
  flare_git_impl-->>MCP caller: Return pr_wait result
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main changes: a repo-local verify gate and a new pr_wait primitive.
Description check ✅ Passed The summary and test plan are present and concrete, but the Notes for reviewers section is missing the required risk and compatibility details.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/118

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/mcp_server/flare_git.rs`:
- Around line 105-109: Update the polling loop around actions::list_check_runs
so each sleep is capped by the remaining wait_secs budget. Compute the elapsed
time before sleeping, derive the remaining duration, and sleep for the smaller
of poll_interval_secs and that remainder while preserving the existing timeout
and polling behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 812fcd5d-ccf4-4e79-b9f4-796b50f9d386

📥 Commits

Reviewing files that changed from the base of the PR and between f7eb1c4 and 59985cd.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • CONTRIBUTING.md
  • mise.toml
  • src/github/mcp.rs
  • src/mcp_server/flare_git.rs
  • src/mcp_server/types.rs

Comment thread src/mcp_server/flare_git.rs
@getappz getappz changed the title DX: repo-local verify gate + pr_wait primitive (#118) feat: repo-local verify gate + pr_wait primitive (#118) Jul 29, 2026
@getappz
getappz merged commit aa6c902 into master Jul 29, 2026
15 checks passed
@getappz
getappz deleted the task/118 branch July 29, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant