Skip to content

Normalize decimal-string inputs in authority ceiling checks - #9

Merged
rudimentall1 merged 8 commits into
ANNAfrom
fix/authority-ceiling-decimal-strings
Oct 19, 2026
Merged

rudimentall1 merged 8 commits into
ANNAfrom
fix/authority-ceiling-decimal-strings

Conversation

@rudimentall1

Copy link
Copy Markdown
Owner

Why

The PortalDot local integration demo reaches /v1/actions/authorize, but authority ceiling validation raises TypeError when a JSON-backed capability limit or requested amount is a decimal string.

Change

  • Normalize the static limit, dynamic multiplier, and requested amount with Decimal(str(value)).
  • Keep the comparison in Decimal arithmetic rather than converting financial amounts to float.
  • Fail closed for booleans, invalid values, non-finite values, negatives, and multipliers above 1.
  • Add regression tests for string inputs, exact decimal boundaries, and invalid values.

Validation

The branch contains focused unittest coverage. CI should run before merge. The PortalDot integration demo has not yet been rerun against this branch.

@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.

@rudimentall1
rudimentall1 merged commit b028990 into ANNA Oct 19, 2026
3 checks passed
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