Repository navigation
Conversation
float() accepts "nan", "inf" and "-inf", so PIXELMAP_STALL_WARN_S and PIXELMAP_RSS_WARN_MB took them as thresholds. NaN breaks every stall comparison, and +inf (or inf/nan for the RSS limit) silently disables the check. Treat them like any other non-number: warn and use the default. Finite zero and negatives are still returned as-is, since they deliberately switch a check off. Assisted-by: ClaudeCode:claude-opus-5-5
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #86 +/- ##
======================================
Coverage ? 83.25%
======================================
Files ? 21
Lines ? 3410
Branches ? 0
======================================
Hits ? 2839
Misses ? 571
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🤖 AI text below 🤖
Problem
The watchdog reads its thresholds with
float(), which also acceptsnan,infand-inf:PIXELMAP_STALL_WARN_S=nanPIXELMAP_STALL_WARN_S=infPIXELMAP_RSS_WARN_MB=nan/infA typo or a templated value can produce these, and nothing in the log says the watchdog has been neutered.
Fix
_env_floatinpixelmap/gui/watchdog.pynow treats non-finite values like any other non-number: it logs the existing warning and uses the default. Finite zero and negative values are still returned unchanged, because they deliberately switch a check off. Blank or unset values stay silent and use the default, as before.This came out of a review of the project's environment-variable parsers during PR #85. Merging those parsers into one helper was considered and rejected: they follow four different rules, so the shared helper would add code rather than remove it.
Tests
Written first; the six non-finite cases failed before the fix.
nan,NaN,inf,-inf,Infinityand paddedinfall fall back to the default and log a warning naming the variable.-0and exponent values are still accepted.Full suite: 941 passed, 1 xfailed.
ruff checkis clean on the changed files.🤖 Generated with Claude Code