test: isolate persisted violation traces from committed examples - #85
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 #72 / MUT-024 cleanly: persistence is asserted under pytest tmp_path, so unit runs no longer rewrite examples/traces/m4_refund_limit_violation.json. The committed example and annotated docs stay the hand-maintained fixture. GitHub Actions green on 3.11/3.12; ignoring Vercel auth.
|
Merged — thank you @fatihcvs. Exactly the kind of tests-hygiene lock Mutiny needs: the M4 persistence assertion still holds, and 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. |
Summary
Fixes #72. Persist the M4 violation artifact under pytest's
tmp_pathinstead of overwriting the tracked example on every run. Keep the existing tool-call assertion and verify the complete JSON round trip plus the violated refund rule.The committed example and its annotated documentation remain unchanged. I reproduced the random seed-ID change while running the previous unit suite; after this change the full unit suite leaves
examples/traces/clean.Type of change
Checklist
Test plan
pytest tests/unit -q --tb=short: 376 passed on Python 3.12.14, withMUTINY_SAMPLE_OFFLINE=1andPYTHONUTF8=1.git diff --exit-code -- examples/traces: clean after the suite.git diff --check: passed.Based independently on main; does not include #83.