fix(queue): reject stale gate overrides#1427
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (87.50%) is below the target coverage (97.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1427 +/- ##
==========================================
- Coverage 95.39% 95.39% -0.01%
==========================================
Files 193 193
Lines 20929 20933 +4
Branches 7564 7565 +1
==========================================
+ Hits 19966 19969 +3
Misses 383 383
- Partials 580 581 +1
🚀 New features to boost your workflow:
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 43b4aa3 | Commit Preview URL Branch Preview URL |
Jun 26 2026, 07:05 AM |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review — blocked
🛑 Blocked
Nits — 2 non-blocking
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.
|
|
Closing — this silently reverses a recently-audited security decision rather than fixing a bug. The current "override the Gate on the live PR head, not the stale cached SHA" behavior was shipped deliberately as #1408 ( |
Motivation
@gittensory gate-overridecould be applied to a newer, unreviewed commit pushed after the comment was issued.Description
resolveOverrideHeadShato return a structuredOverrideHeadResolutionwithheadSha,stale, andliveHeadShaso callers can detect a live-vs-cached mismatch.maybeProcessGateOverrideCommand) skip the override whenstale === true, record astale_pr_headskip audit event, and only build the advisory / create the neutral Gate check when the cached head is still current.Testing
npm test -- --run test/unit/resolve-override-head-sha.test.ts test/unit/queue.test.ts -t "gate-override|resolveOverrideHeadSha", and the targeted suites passed.npm run typecheckwhich completed successfully.npm run test:coverage; tests passed but coverage remapping failed in this environment withTypeError: jsTokens is not a function(environmental/tooling issue during Vitest V8 remapping).npm audit --audit-level=moderatefailed in this environment due to the registry audit endpoint returning403 Forbidden(environment limitation, not related to code changes).Codex Task