Skip to content

feat(want_lgtm): add PR and merge-group check run reconciler - #5182

Open
jtmcdole wants to merge 2 commits into
want-lgtm-08-check-writerfrom
want-lgtm-09-reconciler
Open

jtmcdole wants to merge 2 commits into
want-lgtm-08-check-writerfrom
want-lgtm-09-reconciler

Conversation

@jtmcdole

@jtmcdole jtmcdole commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Adds WantLgtmReconciler for disabled-repo waivers, GraphQL snapshot evaluation, and neutral merge-group waivers. Skips GraphQL fast-path checks when no directive is active or syntax is invalid.

WANT_LGTM Stack (RFC 610.0001)

Breaks the WANT_LGTM implementation into small, reviewable steps:

# PR Focus
1 #5174 Merge-group & check-run prep
2 #5175 Rollout flags & dynamic config
3 #5176 Directive, verdict & snapshot models
4 #5177 WANT_LGTM= body parser
5 #5178 Review cohort evaluator
6 #5179 Firestore state & review webhook models
7 #5180 Paginated GraphQL snapshot client
8 #5181 GitHub check-run writer & cache
9 #5182 PR & merge-group reconciler ← you are here
10 #5183 Webhook routing & Gold bypass
11 #5188 Firestore not-in query filter
12 #5184 Rollback check-run sweeper

Stack created with GitHub Stacks CLI • Give Feedback 💬

@jtmcdole
jtmcdole added this pull request to stack #5185 November 9, 2026 19:28

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces the WantLgtmReconciler class and its corresponding unit tests to orchestrate the atomic, race-free reconciliation of WANT_LGTM check runs on pull requests. Feedback suggests adding a guard condition in _handleDirectiveRemoved to avoid redundant GitHub API calls and Firestore writes if the check run is already completed and neutral.

@jtmcdole
jtmcdole force-pushed the want-lgtm-09-reconciler branch 2 times, most recently from 52fb22c to fb2863c Compare November 9, 2026 22:10
@jtmcdole
jtmcdole force-pushed the want-lgtm-09-reconciler branch 2 times, most recently from 60efdfe to cf9676b Compare November 9, 2026 23:39
- Adds WantLgtmReconciler orchestrating disabled, fast-path, and GraphQL snapshot flows.
- Short-circuits non-directive, closed, and invalid-directive PRs without GraphQL calls.
- Serializes concurrent in-process reconciliations per PR via withLock.
@jtmcdole
jtmcdole force-pushed the want-lgtm-09-reconciler branch from cf9676b to c221087 Compare November 10, 2026 00:07
… 'feature disabled'

- Remove in-process _locks and withLock in favor of PullRequestManager.runWithPrLock.
- Guard _handleDirectiveRemoved when existingState is already completed and neutral.
- Use 'feature disabled' instead of 'feature rolled back' when rollout flag is off.
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