fix: recognize currency-formatted numeric policy arguments - #83
Conversation
|
@fatihcvs is attempting to deploy a commit to the priyanshu's projects Team on Vercel. A member of the Team first needs to authorize it. |
CodewithJha
left a comment
There was a problem hiding this comment.
Thanks @fatihcvs — this hits #66 / MUT-017 cleanly: _as_number now accepts a leading $ and validated thousands groups ($250, 1,000.50) for inequality operators, while $context. refs, equality, and malformed grouping (1,00, 250$) stay fail-closed. The unit matrix covers all four inequalities plus the refund_limit path, and SYSTEM_DESIGN documents the contract. GitHub Actions green on 3.11/3.12; ignoring Vercel auth.
|
Merged — thank you @fatihcvs. Exactly the kind of focused Core policy fix Mutiny needs: LLM-style If you'd like to continue working on Mutiny, these would be good related areas to look at:
No pressure — only if you want another one. |
Keep the contributor-facing audit index accurate now that MUT-017/020/023/024/025/037 shipped. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Fixes #66. Numeric inequalities now accept a leading
$and valid comma-separated thousands groups, so$250and1,000.50reach the same policy boundary as JSON numbers. Validate grouping before removing separators, so malformed values such as1,00remain non-numeric. Equality and$context.references are unchanged.Document the contract in SYSTEM_DESIGN and cover all four inequality operators, malformed formats, context/equality behavior and actual refund-policy violations.
Type of change
Checklist
Test plan
pytest tests/unit tests/integration tests/reliability -q --tb=short: 555 passed, one existing smoke script failed printing a Unicode character under the Windows default encoding.PYTHONUTF8=1,pytest tests/reliability/test_smoke_gate.py -q --tb=short: both tests passed, including that failing case.MUTINY_SAMPLE_OFFLINE=1, isolated database/cache/temp paths, and uv available on PATH (the initial unit run could not locate uv for its wheel-build test).git diff --checkpassed. No live model or hosted service was used.