fix(queue): wire lock-heartbeat onLost at both actuation and AI-review call sites - #10254
Conversation
…w call sites A holder whose transient lock renewal reports it no longer owns the key (TTL lapse + re-claim, or a maintainer's forced-re-run steal) never learned about it -- onLost was documented but no caller supplied it, so a losing pass kept running to completion: the actuation pass could still merge/close/comment after another pass took over, and the AI-review pass could still overwrite the winner's cached verdict. Both heartbeats now pass onLost, which aborts the publish-and-maintain unit before any further GitHub mutation and discards the AI-review result in favor of the lock-contended placeholder instead of persisting it.
Reindenting the fresh-verdict block under the new lock-lost guard exposed a few previously-untested lines: the escalation audit write's error path, and two type-level `??`/truthy fallbacks that are unreachable given the call site's actual invariants (mirroring the identical annotation already used elsewhere in this function for the same pattern).
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 14:38:03 UTC
Review summary Nits — 5 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 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 LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
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 #10254 +/- ##
==========================================
+ Coverage 80.60% 81.38% +0.77%
==========================================
Files 283 284 +1
Lines 59101 62578 +3477
Branches 7000 8279 +1279
==========================================
+ Hits 47641 50927 +3286
- Misses 11167 11235 +68
- Partials 293 416 +123
Flags with carried forward coverage won't be shown. Click here to find out more.
|
test(queue): cover the verdict-flip escalation audit failure path
Reindenting the fresh-verdict block under the new lock-lost guard exposed a
few previously-untested lines: the escalation audit write's error path, and
two type-level
??/truthy fallbacks that are unreachable given the callsite's actual invariants (mirroring the identical annotation already used
elsewhere in this function for the same pattern).
Closes #10019