Skip to content

fix(nras): adoption companion for #819 exponent overflow - #10

Draft
dinakarjs wants to merge 1 commit into
review/upstream-819-6c2c2eafrom
fix/819-finite-ear-numbers
Draft

dinakarjs wants to merge 1 commit into
review/upstream-819-6c2c2eafrom
fix/819-finite-ear-numbers

Conversation

@dinakarjs

Copy link
Copy Markdown
Owner

The agentrust-io#819 response parser rejects literal NaN/Infinity but allows numeric exponent overflow to become infinity in retained EAR evidence. Add a finite parse_float hook; overflow follows the existing NRASError boundary, and try_appraise returns None. Finite exponents remain accepted, including nested values. This addresses Carlos's public current-head review; it does not claim a signature or hardware-attestation bypass or contact live NRAS.

Based directly on upstream 6c2c2ea. Preserve the author's history when adopting.

Validation on Python 3.12.14 using unchanged hash-required requirements/dev.txt and an editable --no-deps install:

  • pytest tests/unit/test_nras_client.py -q: 53 passed.
  • Added four top-level/nested positive/negative overflow cases through each of appraise and try_appraise, plus three finite controls. Removing only the parse_float argument causes eight rejection assertions to fail while all three finite controls pass.
  • NO_PROXY='*' no_proxy='*' python -m pytest tests/unit -q: 2580 passed, 6 skipped. The first run before the editable install and test proxy isolation had 11 environment failures (missing package metadata/import and inherited SOCKS proxy); the final command above resolves those prerequisites without a source workaround.
  • Repository Ruff, mypy (63 source files), configured Bandit, pip check and diff whitespace pass.
  • Published tree 70b5ceeb9ca4d41d350554186047f433fabc5d5f equals the tested tree. No new credentials, network service, dependency or runtime policy selected.

Independent author adoption, hosted CI and the two-maintainer review rule for TEE paths remain. Draft companion, not an upstream approval or merge. Prepared with OpenAI Codex; DCO sign-offs included.

Keep finite values and reject overflow through the existing controlled failure boundary.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant