Skip to content

ci: request AI review for risky pull requests - #527

Merged
mergify[bot] merged 5 commits into
mainfrom
ci/gitstream-required-approvals-518
Jul 10, 2026
Merged

ci: request AI review for risky pull requests#527
mergify[bot] merged 5 commits into
mainfrom
ci/gitstream-required-approvals-518

Conversation

@charliecreates

@charliecreates charliecreates Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • identify high-risk pull requests when a non-bot change has an estimated review time of at least 20 minutes or any change touches the critical server/runtime files
  • apply needs-ai-review to those changes so Greptile is requested, including bot-authored critical-file changes
  • keep the existing one-approval approved-by-team label behavior without imposing a formal approval gate that a sole maintainer cannot satisfy
  • preserve native boolean values in gitStream conditions

Why

This repository currently has one human maintainer. The configured AI reviewers submit comments and checks rather than formal APPROVED reviews, and pull request authors cannot approve their own changes. Requiring one or two formal approvals would therefore make maintainer-authored pull requests unmergeable.

The AI review remains an advisory extra-scrutiny signal; deterministic CI and security checks remain the enforceable merge-safety signals.

Validation

  • npm run check
  • npm run check:types
  • npm run build
  • npx vitest run --exclude 'tests/integration/**'
  • npm run check:changeset
  • focused gitStream configuration checks
  • successful gitStream.cm check without the prior condition warning

Integration tests were not run because they require a real HEVY_API_KEY in .env.

Refs #518

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.58%. Comparing base (fbc40b1) to head (7bbd0e1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #527   +/-   ##
=======================================
  Coverage   90.58%   90.58%           
=======================================
  Files          25       25           
  Lines        1115     1115           
  Branches      284      284           
=======================================
  Hits         1010     1010           
  Misses         46       46           
  Partials       59       59           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chrisdoc

Copy link
Copy Markdown
Owner

@CharlieHelps at the moment i am the only maintainer, so there is no other reviewers, besides the AI bots we have for reviewing

@charliecreates charliecreates Bot changed the title ci: require two reviews for risky pull requests ci: request AI review for risky pull requests Jul 10, 2026
@charliecreates

Copy link
Copy Markdown
Contributor Author

You're right—an approval gate would deadlock a sole-maintainer repository. The configured AI reviewers post comments/checks rather than formal APPROVED reviews, and authors can't approve their own pull requests.

I revised this PR so high-risk changes get needs-ai-review instead: non-bot PRs with an estimated review time of at least 20 minutes, plus any PR touching the critical runtime/server files (including bot-authored changes). The two-approval gate is removed, so AI review is advisory while CI and security checks remain enforceable.

All validation passed, including 293 unit tests, and the PR checks are green: bf7c486.

@chrisdoc chrisdoc added the queue Add to Mergify merge queue label Jul 10, 2026
@chrisdoc

Copy link
Copy Markdown
Owner

@Mergifyio refresh

@mergify

mergify Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

refresh

✅ Pull request refreshed

@mergify mergify Bot added the queued label Jul 10, 2026
@mergify

mergify Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-10 10:32 UTC · Rule: default · triggered by rule Queue pull requests labeled 'queue'
  • 🚫 Left the queue2026-07-10 10:43 UTC · at bf7c486bc9335d5737bd86246420e62d8493b962

This pull request spent 11 minutes 27 seconds in the queue, with no time running CI.

Reason

The pull request conflicts with the base branch

Hint

You should update or rebase your pull request.

If you want to requeue this pull request, you can post a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added dequeued and removed queued labels Jul 10, 2026
@charliecreates

Copy link
Copy Markdown
Contributor Author

Conflict repair is blocked. I re-fetched this branch and the current main head; they no longer have a common Git ancestor, so Git cannot perform a merge-based branch update.

The branch is ci/gitstream-required-approvals-518. Repair would require an unrelated-history merge, rebase, or recreating the branch, none of which is a safe mechanical conflict resolution for this daemon.

Please recreate or manually update the PR branch from current main while preserving the intended change, then push it for review.

— charlied/pr-merge-conflict-repair

@charliecreates

Copy link
Copy Markdown
Contributor Author

Charlie could not resolve this conflict safely.

  • Conflict: .cm/gitstream.cm overlaps the GitStream configuration now on main.
  • Attempted: refreshed the PR head and base, requested GitHub’s branch update, and evaluated a merge with main.
  • Blocker: selecting the combined bot-detection and high-risk approval rules would change CI behavior.
  • Next: a maintainer should resolve .cm/gitstream.cm against main and push the result.

— charlied/pr-merge-conflict-repair

@mergify mergify Bot added queued and removed dequeued labels Jul 10, 2026
@mergify

mergify Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-10 11:38 UTC · Rule: default · triggered by rule Queue pull requests labeled 'queue'
  • Checks passed · on draft merge queue: checking main (fbc40b1) and #527 together #541
  • Merged2026-07-10 11:45 UTC · at 7bbd0e1d5286365ba6e57e0d27236932cc8c9d40 · squash

This pull request spent 7 minutes 9 seconds in the queue, including 1 minute 20 seconds running CI.

Required conditions to merge
  • check-success = "Build and test (Node 24.x)"
  • check-success = "Build and test (Node 26.x)"

@github-actions

Copy link
Copy Markdown
Contributor

Unit Test Results

  1 files   23 suites   1s ⏱️
342 tests 342 ✅ 0 💤 0 ❌
343 runs  343 ✅ 0 💤 0 ❌

Results for commit 7bbd0e1.

@gitstream-cm

gitstream-cm Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
 /:\ gitStream DRY RUN 

gitstream/estimated_time_to_review

• add label 1 min review with color 0e8a16

Syntax warning: expected a boolean or a numeric value under if in estimated_time_to_review

To activate these actions - merge this PR into the main branch


Learn more on the gitStream Docs
See your automations on the Usage in LinearB
Create new rules on the gitSteam playground

mergify Bot added a commit that referenced this pull request Jul 10, 2026
@mergify
mergify Bot merged commit d0fa4e7 into main Jul 10, 2026
24 checks passed
@mergify
mergify Bot deleted the ci/gitstream-required-approvals-518 branch July 10, 2026 11:45
@mergify mergify Bot removed the queued label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cm-changes queue Add to Mergify merge queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants