Skip to content

[ Bounty $4k ] [ Metrics ] Reject non-finite gauge values - numeric safety#4127

Open
MyTH-zyxeon wants to merge 1 commit into
orchestration-agent:mainfrom
MyTH-zyxeon:codex/finite-gauge-3873
Open

[ Bounty $4k ] [ Metrics ] Reject non-finite gauge values - numeric safety#4127
MyTH-zyxeon wants to merge 1 commit into
orchestration-agent:mainfrom
MyTH-zyxeon:codex/finite-gauge-3873

Conversation

@MyTH-zyxeon
Copy link
Copy Markdown

Summary

  • reject NaN and infinite gauge values before they reach snapshots/exporters
  • add regression coverage for NaN, +inf, and -inf without leaving rejected values in gauge state
  • unblock full local pytest by exporting AgentStatus and using an RLock for timer observations

Root cause

MetricsCollector.gauge() trusted callers and stored non-finite floats directly. Those values then appeared in snapshot(), which can break JSON-compatible exporters or cause them to drop a metrics batch.

Validation

  • ./.venv/bin/python -m pytest tests/test_metrics.py -q
  • ./.venv/bin/python -m pytest tests/test_metrics.py tests/test_agent_registry.py -q
  • ./.venv/bin/python -m pytest -q
  • ./.venv/bin/python -m flake8 src/common/metrics.py src/agent/__init__.py tests/test_metrics.py
  • ./.venv/bin/python -m compileall -q src tests
  • git diff --check
  • gh repo view orchestration-agent/AgentOrchestration --json viewerHasStarred --jq .viewerHasStarred -> true

Bounty issue: #3873

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