Skip to content

fix(credential_pool): drop spurious model= arg breaking pool.select() (DAN-2503) - #150

Merged
github-actions[bot] merged 1 commit into
mainfrom
dan/DAN-2503-cron-model-nameerror
Aug 5, 2026
Merged

fix(credential_pool): drop spurious model= arg breaking pool.select() (DAN-2503)#150
github-actions[bot] merged 1 commit into
mainfrom
dan/DAN-2503-cron-model-nameerror

Conversation

@dizhaky

@dizhaky dizhaky commented Aug 5, 2026

Copy link
Copy Markdown
Owner

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() calls self._select_unlocked(model=model), but:

  • model is undefined in that scope, and
  • _select_unlocked(self, *, refresh=True) doesn't even accept a model kwarg.

So pool.select() raises NameError: name 'model' is not defined.

Call chain: cron/scheduler.py run_jobresolve_runtime_providerruntime_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(). The model= arg was leftover from an incomplete refactor in the upstream sync; nothing supplies model here and _select_unlocked has no model parameter. One-line surgical change.

Test plan

🤖 Generated with Claude Code

… (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>
@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

DAN-2503

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions
github-actions Bot merged commit 98880ae into main Aug 5, 2026
12 checks passed
@github-actions
github-actions Bot deleted the dan/DAN-2503-cron-model-nameerror branch August 5, 2026 22:15
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant