fix(review): keep regate sweep drift backstop - #4492
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - fixes requiredReview updated: 2026-07-10 07:17:47 UTC
🛑 Suggested Action - Manual Review
Review summary Blockers
Nits — 4 non-blocking
Why this is blocked
CI checks failing
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 4a9ecc5 | Commit Preview URL Branch Preview URL |
Jul 10 2026, 07:00 AM |
|
Closing — this reverts the fail-closed fix from 4a86e8e (2026-07-09, same day), which stopped the confirmed-live incident where the regate sweep endlessly re-checked already-reviewed, permanently-red owner PRs on every tick, driving the primary GitHub rate limit to zero twice in two hours. This PR's own CI fails the regression guard added alongside that fix: The "drift backstop" concern in the new comment (catching a moved base / merged sibling / changed manifest without a new push) is legitimate, but 4a86e8e traded it off deliberately: re-review now happens via the real-time webhook path or an explicit maintainer re-run, not the sweep, specifically to stop the rate-limit exhaustion. If we still want a same-head drift backstop, it needs a bounded/rate-limited re-check (e.g. re-include only after N hours, or cap re-checks per tick) — not unconditional re-inclusion that reopens the exact failure mode the incident fix closed. |
Motivation
lastRegatedAtmarker, allowing stale successful gate checks to persist.Description
lastRegatedAtas a progress/sort marker rather than a permanent deny-list inselectRegateCandidates(src/settings/agent-sweep.ts).oldest-firstinitial-drain semantics by narrowing the ordering pool only during the initial drain and otherwise cycling the full staleness pool; implement anorderingPoolthat filters only for the initial-drain case.test/unit/agent-sweep.test.tsto assert that already-regated PRs can be reselected after the freshness window in both staleness andoldest-firstmodes.Testing
npx vitest run test/unit/agent-sweep.test.ts, and all tests passed.npx vitest run test/unit/queue.test.ts -t "agent re-gate sweep recomputes stale open PR verdicts", which passed for the scoped test(s).npx vitest run --coverage test/unit/agent-sweep.test.ts; tests passed but the local coverage remapper errored withTypeError: jsTokens is not a functionso coverage reporting was not produced locally.npm audit --audit-level=moderate; the registry audit endpoint returned403 Forbidden, so the audit step did not complete locally.Codex Task