fix(review): stop dirty-base PRs deferring forever on missing CI context - #7575
Merged
Merged
Conversation
prReadyForReview deferred a PR with a missing required CI context unconditionally, with no staleness escalation, unlike its sibling generic-stuck-CI branch which finalizes past a cap. A dirty base is terminal regardless of CI: the disposition planner's isConflict check already closes such a PR independent of gate conclusion or CI state, so waiting could never change the outcome -- it just left the PR stuck open and unlabeled indefinitely.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7575 +/- ##
==========================================
- Coverage 88.48% 88.46% -0.02%
==========================================
Files 720 720
Lines 75748 75749 +1
Branches 22558 22559 +1
==========================================
- Hits 67023 67013 -10
- Misses 7679 7686 +7
- Partials 1046 1050 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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
prReadyForReview(src/queue/processors.ts) deferred a PR with a missing required CI context forever, unlike its sibling "generic stuck CI" branch, which already finalizes past a cap. Live symptom: a real open pull request sat 40+ minutes with zero labels/gate check-run, repeating "Required CI context is still missing" every ~4 minutes, because its base was dirty and no required CI could ever arrive.mergeableStateis"dirty", skip the indefinite defer and fall through to the existing finalize-past-cap + per-head-SHA guard path, so the disposition planner (agent-actions.ts'sisConflict) can close it — the documented "base conflict → CLOSE" behavior that currently never gets a chance to run for this case.queue.test.tstests named#selfhost-ci-deferral-staleness) that made this defer unconditional for every OTHER missing-required-context PR — those regression tests, plus a related repair-budget test inqueue-2.test.ts, are unchanged and still pass. That earlier design's concern was a clean-base PR's gate reading "passed" before a required check might still come back red; that can't happen for a dirty base, sinceisConflictcloses the PR regardless of gate conclusion or CI outcome.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm 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=moderateIf any required check was skipped, explain why:
npm run ui:build/ui:test: this machine runs Node v26.5.0 (repo pins Node 22 via.nvmrc); everyapps/loopover-ui/apps/loopover-miner-uitest touchingwindow.localStoragefails locally withCannot read properties of undefined (reading 'clear'), reproducing on both UI workspaces and in isolation from this change — a vitest-jsdom/Node compatibility issue unrelated to this diff (those apps are untouched here). Every CI workflow pins Node via.nvmrc, so this isn't expected to reproduce in the real gate.npm run test:ciran clean throughui:typecheck, including the full unshardedtest:coverage, before hitting this pre-existing local-environment gap.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable — backend-only change (
src/queue/processors.ts,test/unit/queue.test.ts), no visible UI/frontend/docs surface.Notes