fix(queue): repair malformed regate-repair diff breaking main typecheck - #4023
Merged
Conversation
PR #3998 shipped a garbled hunk in sweepRepoRegate's job-dispatch block and regatePullRequest's signature/body -- an object literal spliced with a dangling recordAuditEvent's fields, no closing brace or JOBS.send call, and a required parameter (repoFullName) following an optional one (repairHeadSha). Reconstructed both regions from the parent commit plus the PR's stated intent: move the repair-attempt audit event from dispatch-time to execution-time (after rate-limit admission), so a deferred/dropped job no longer burns an attempt against REGATE_REPAIR_MAX_ATTEMPTS_PER_SHA. Also fixed a duplicate declaration of that same constant (value 5 shadowing the original 2, introduced by the same bad hunk) and an invalid "started" outcome literal that isn't part of the audit-event outcome enum.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
❌ 58 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
This was referenced Jul 7, 2026
JSONbored
added a commit
that referenced
this pull request
Jul 7, 2026
) #4023 fixed the syntax corruption #3998's own patch introduced and moved repair_attempt recording to execution time, but left REGATE_REPAIR_MAX_ATTEMPTS_PER_SHA at 2 -- #3998's stated intent was to raise it to 5 for resilience against transient failures (a single AI provider timeout no longer exhausts the budget). Bumps the constant and updates both orb-retry-storm regression tests' attempt counts to match; one of them was also still asserting the pre-#3998 dispatch-time recording behavior, never executing the fanned per-PR job.
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
origin/mainis currently RED:npm run typecheckfails atsrc/queue/processors.tsstarting ~line 1877, cascading through ~2143 (TS1005/TS1136/TS1128).sweepRepoRegate's per-PR job-dispatch object literal got spliced with a danglingrecordAuditEventcall's fields (no closing brace, noenv.JOBS.send), andregatePullRequestgained arepairHeadSha?: stringsecond parameter positioned before several required parameters (repoFullName,prNumber, ...) — a required parameter cannot follow an optional one.REGATE_REPAIR_MAX_ATTEMPTS_PER_SHA).const REGATE_REPAIR_MAX_ATTEMPTS_PER_SHAdeclaration (a stray= 5shadowing the real= 2, which had also overwritten a line of unrelated prose in a multi-line comment), and an invalidoutcome: "started"literal that isn't part of the audit-event outcome enum ("queued" | "error" | "success" | "completed" | "denied") — swapped to"completed"to match the existing convention for discrete recorded facts.Scope
wantedPaths(src/)Validation
npm run typecheck— clean (was failing onorigin/main)npx vitest run test/unit/queue.test.ts— 656 passed, 5 failed; all 5 confirmed pre-existing on a clean, unmodifiedorigin/main(Prometheus metric-label/disposition-audit assertions unrelated tosweepRepoRegate/regatePullRequest— independently corroborated by a separate concurrent fix's fulltest:coveragerun on the same base)Safety
site/,CNAME,lovable/, or the changelog