Found by pyflakes while carving server.py (R3b). Pre-existing — not a regression from the carve, and deliberately left alone there so the carve stays provably behaviour-neutral.
server.py (currently ~line 429, in TuningProviderRegistry.get_merged()):
except Exception:
logger.exception("tuning provider %r raised during get_merged()", provider_id)
There is no logger in server.py — the module logger is log. So when a tuning provider actually does raise, the handler meant to swallow-and-report instead raises NameError: name 'logger' is not defined, which propagates out of get_merged().
The net effect is the opposite of what the handler is for: one misbehaving tuning provider takes down the merged-tunings call for everyone, and the exception you see names the wrong problem.
Fix
log.exception("tuning provider %r raised during get_merged()", provider_id)
Why it was never caught
Nothing exercises the failure path — no test has a tuning provider raise from get_merged(). A regression test should register a provider that throws and assert (a) get_merged() still returns the other providers' entries, and (b) the failure is logged.
Suggested guard
pyflakes catches this in one line (undefined name 'logger') and currently isn't in CI for server.py. Worth wiring in — this class of bug is invisible to the test suite precisely because it only lives on error paths.
Found by pyflakes while carving
server.py(R3b). Pre-existing — not a regression from the carve, and deliberately left alone there so the carve stays provably behaviour-neutral.server.py(currently ~line 429, inTuningProviderRegistry.get_merged()):There is no
loggerinserver.py— the module logger islog. So when a tuning provider actually does raise, the handler meant to swallow-and-report instead raisesNameError: name 'logger' is not defined, which propagates out ofget_merged().The net effect is the opposite of what the handler is for: one misbehaving tuning provider takes down the merged-tunings call for everyone, and the exception you see names the wrong problem.
Fix
Why it was never caught
Nothing exercises the failure path — no test has a tuning provider raise from
get_merged(). A regression test should register a provider that throws and assert (a)get_merged()still returns the other providers' entries, and (b) the failure is logged.Suggested guard
pyflakescatches this in one line (undefined name 'logger') and currently isn't in CI forserver.py. Worth wiring in — this class of bug is invisible to the test suite precisely because it only lives on error paths.