feat(review): add opt-in one-shot synchronize-amendment close policy - #7715
Merged
Conversation
Adds settings.synchronizeClosePolicy ("off" | "close", default "off",
config-as-code only via .loopover.yml) so a repo can opt into closing a
contributor's PR immediately when they push an additional commit before
it is merged or closed, instead of letting a slow CI run grant unlimited
free re-push attempts. Mirrors draftPrClosePolicy's shape and reuses its
autoCloseExemptLogins/reviewEvasionLabel/reviewEvasionComment settings.
Only fires when the pusher is the PR's own author: the engine's own
rebase-if-behind push is attributed to the App's own bot identity on the
resulting synchronize webhook, so it never matches and the guard never
self-closes a PR it is rebasing.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | a5c1542 | Commit Preview URL Branch Preview URL |
Jul 21 2026, 10:42 AM |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Bundle ReportChanges will increase total bundle size by 1.25kB (0.02%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: loopover-uiAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7715 +/- ##
==========================================
- Coverage 88.57% 88.57% -0.01%
==========================================
Files 725 725
Lines 76360 76392 +32
Branches 22741 22754 +13
==========================================
+ Hits 67633 67661 +28
Misses 7681 7681
- Partials 1046 1050 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
settings.synchronizeClosePolicy("off"|"close", config-as-code only via.loopover.yml— no dashboard/DB column) that closes a contributor's own PR immediately if they push an additional commit before it's been merged or closed, instead of letting a slow CI run grant unlimited free re-push attempts.maybeCloseSynchronizeAmendmentguard insrc/queue/review-evasion.ts(a 6th sibling alongside the existing 5 close-enforcement guards there), dispatched fromhandlePullRequestWebhookEventright after settings resolve — before the automation-bot-skip check, thePromise.allfetch, andprReadyForReview's CI-wait — so it short-circuits ahead of that work instead of waiting on CI at all.prReadyForReview'sforceUpdateBranch) is attributed to the App's own bot identity on the resultingsynchronizewebhook, so it can never match, and the guard never self-closes a PR it's rebasing. Owner/admin/protected-automation-authors/autoCloseExemptLoginsare exempt, same as the sibling guards.autoCloseExemptLogins/reviewEvasionLabel/reviewEvasionCommentwith the existingreviewEvasionProtection/draftPrClosePolicyfamily. Deliberately does not record a moderation strike — this is a blanket repo policy choice against an otherwise-ordinary GitHub action (pushing a follow-up commit), not a detected abuse pattern, mirroringdraftPrClosePolicy's reasoning.RepositorySettingstype, DB-layer hardcoded default (config-as-code only), OpenAPI schema (+ regeneratedopenapi.json), the.loopover.ymlmanifest parser (packages/loopover-engine), and both example config files.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally; traced every changed line/branch against the lcov report by hand and iterated tests until only pre-existing, untouched lines remained uncoverednpm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateautoCloseExemptLogins, write-collaborator exemption, protected-automation-author exemption, third-party pusher, the engine's-own-rebase exclusion, no-sender/no-author/no-headSha defensive paths, paused-agent denial, comment/label unset-vs-explicit-false/null)Full
npm run test:cialso run locally end to end (1044 test files / 19,737 tests, 0 failures) before opening this.If any required check was skipped, explain why:
Safety
openapi.jsonregenerated;ui:openapi:settings-paritypasses)..loopover.yml.example/config/examples/loopover.full.yml, both off-by-default and documented); changelog untouched per house rule.UI Evidence
N/A — no UI/frontend changes.
Notes
draftPrClosePolicyis documented as.loopover.yml-settable in both example files and its own doc comment, but the manifest parser never actually reads it — currently a silent no-op via YAML..loopover.yml— a separate step after this merges and a new self-host image deploys.