fix(cli): exit non-zero when tests have skipped cases unless --allow-skip (#71) - #88
Conversation
|
@littfed 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 @littfed — I reviewed this against #71 / MUT-023.
The core diagnosis is right: PASS + SKIPPED currently exits 0, and your tests (corrupt JSON mixed with a passing fixture, skip-only, and CLI --allow-skip wiring) would lock the intended CI behavior. GitHub Actions were green on 3.11/3.12.
We're landing the same default in #87: any skip → exit 1, without a new public flag. #71 allowed either treating load errors as failure or adding --allow-skip; #87 also documents the exit rule in CLI.md and covers extra corrupt encodings. Adding --allow-skip without a CLI.md / flag-table update would leave the new switch undocumented.
I'll close this as a duplicate of #87 so you don't keep rebasing against a conflicting test_cmd.py. The --allow-skip escape hatch is a reasonable follow-up if you want it later, with docs — not required for #71.
|
Closing as a duplicate of #87, which is now on Thank you @littfed — the diagnosis and the mixed PASS + corrupt-JSON tests were correct. We merged the no-new-flag path because it was documented and already covered the extra corrupt encodings; your 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. |
CodewithJha
left a comment
There was a problem hiding this comment.
Thanks @littfed — this hits #71 / MUT-023 cleanly: mutiny test exits 1 on any unexpected skip (including PASS + corrupt JSON), skip-only stays non-zero, and --allow-skip is the explicit hatch for mixed suites. CLI wiring and unit tests cover both paths. We reverted #87 in #90 so this equally valid approach can be the landed fix. GitHub Actions from the original run were green on 3.11/3.12; re-approving the fork workflow after reopen. Ignoring Vercel auth.
|
Merged — thank you @littfed. Exactly the kind of CLI fail-closed fix Mutiny needs: mixed PASS + SKIPPED can no longer leave CI green, skip-only stays non-zero, 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. |
Record --allow-skip on the mutiny test flag table so CLI.md matches main. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Fixes #71 (MUT-023).
Changes
run_testsinpackages/mutiny_cli/src/mutiny_cli/test_cmd.pyto treat skipped test cases as non-zero exit unless--allow-skipis explicitly enabled.--allow-skipargument tomutiny testsubcommand inpackages/mutiny_cli/src/mutiny_cli/main.py.tests/unit/test_mutiny_cli_test.pycovering PASS + corrupt JSON fixture with and without--allow-skip, as well as skip-only suites and summary line formatting.