fix(credential_pool): drop spurious model= arg breaking pool.select() (DAN-2503) - #150
Merged
Merged
Conversation
… (DAN-2503) v0.20 regression from the fork sync: _select_under_lock() called self._select_unlocked(model=model), but `model` is undefined in that scope and _select_unlocked(self, *, refresh=True) does not accept a `model` kwarg at all. pool.select() therefore raised NameError: name 'model' is not defined. Call chain: cron run_job -> resolve_runtime_provider -> pool.select() -> _select_under_lock -> NameError. Every cron job that resolves a runtime provider failed (fusion-watchdog, Signal Scanner Unified, KB Research Unified, Config Integrity Watchdog, ...) — the whole cron fleet was down post-v0.20-deploy. Fix: return self._select_unlocked() (drop the dead kwarg). The model= arg was leftover from an incomplete refactor in the upstream sync; no code path supplies model here and _select_unlocked has no model parameter. Co-Authored-By: Claude <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
dizhaky
added a commit
that referenced
this pull request
Aug 5, 2026
…-2503) (#151) Second v0.20 regression in the same incomplete "model lockouts" feature as #150. _available_entries() referenced `if model_lockouts_active: continue` (line 1968) but model_lockouts_active is never defined anywhere in the codebase — like the `model` kwarg in #150, it was leftover from an incomplete refactor that never wired model-aware selection through select -> _select_under_lock -> _select_unlocked -> _available_entries (none of which take a model param). After #150 fixed the first NameError (model), pool.select() advanced one step and hit this one: NameError: name 'model_lockouts_active' is not defined. Same root cause, same fix class: drop the dead check. Restores pre-feature behavior (entries available; the lockout feature never worked, so nothing is lost). Verified on mfc1: hot-patched deployed checkout + restarted + triggered fusion-watchdog -> "Ran now: succeeded." (cron fleet unblocked). Co-authored-by: Claude <noreply@anthropic.com>
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.
Fixes DAN-2503
Problem
v0.20 regression from the fork sync (PR #148): the entire cron fleet is broken.
agent/credential_pool.py:1799—_select_under_lock()callsself._select_unlocked(model=model), but:modelis undefined in that scope, and_select_unlocked(self, *, refresh=True)doesn't even accept amodelkwarg.So
pool.select()raisesNameError: name 'model' is not defined.Call chain:
cron/scheduler.py run_job→resolve_runtime_provider→runtime_provider.py:1856 pool.select()→_select_under_lock→ NameError. Every cron job that resolves a runtime provider fails (fusion-watchdog, Signal Scanner Unified, KB Research Unified, Config Integrity Watchdog, …). Observed in hermes-gateway logs after the v0.20 deploy.Fix
Drop the dead kwarg —
return self._select_unlocked(). Themodel=arg was leftover from an incomplete refactor in the upstream sync; nothing suppliesmodelhere and_select_unlockedhas nomodelparameter. One-line surgical change.Test plan
git pull+systemctl --user restart hermes-gateway; confirm next cron tick runs clean (noNameError: name 'model')hermes cron listshows jobslast_statusmoving offerror🤖 Generated with Claude Code