test(queue): assert repair-attempt recording at execution time, not dispatch#4031
test(queue): assert repair-attempt recording at execution time, not dispatch#4031JSONbored wants to merge 1 commit into
Conversation
…ispatch The #orb-retry-storm regression test checked the repair_attempt audit count immediately after the sweep dispatched the job, without ever processing it -- passing only under the OLD (buggy) dispatch-time recording the fix in #3998/#4023 deliberately replaced. Process the fanned-out agent-regate-pr job before asserting the count, matching the actual execution-time design: a queued-but-not-yet-run job must not count against REGATE_REPAIR_MAX_ATTEMPTS_PER_SHA.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Superseded by #4030, which landed on main with an equivalent fix to this same test (plus a deliberate REGATE_REPAIR_MAX_ATTEMPTS_PER_SHA 2→5 bump this PR didn't include). Closing rather than resolving the conflict. |
❌ 51 Tests Failed:
View the top 3 failed test(s) by shortest run time
View the full list of 48 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
Summary
#orb-retry-stormregression test intest/unit/queue.test.tschecked therepair_attemptaudit-event count immediately aftersweepRepoRegatedispatched the fanned-out job — without ever processing it. That only passes under the OLD dispatch-time recording that fix(queue): prevent regate repair exhaustion from premature attempt counting #3998/fix(queue): repair malformed regate-repair diff breaking main typecheck #4023 deliberately replaced with execution-time recording (a queued-but-not-yet-run job must not count againstREGATE_REPAIR_MAX_ATTEMPTS_PER_SHA).main: the test was failing there, tracing back to this stale assumption, not a code regression.agent-regate-prjob before asserting the count, matching the actual (and intended) execution-time design.Scope
wantedPaths(test/)Validation
npm run typecheck— cleannpx vitest run test/unit/queue.test.ts— 661/661 passed (was 1 failing before this fix)Safety
site/,CNAME,lovable/, or the changelog