Repository navigation
fix(cli): do not report a clean mutiny run when nothing was tested (#169) - #171
Open
RupeshMaster wants to merge 1 commit into
Open
RupeshMaster wants to merge 1 commit into
RupeshMaster wants to merge 1 commit into
Conversation
Two cases ended with "No violation this run" and exit 0 although the agent was never checked against the policy: - Every candidate timed out. A candidate whose agent step exceeds the step timeout is scored as non-violating, with nothing in the output to tell it apart from a candidate that behaved. An agent that hangs on every request (bad credentials with retries, an unreachable backend, a tool that blocks) therefore produced a clean run. - The policy had no rules (`rules: []` or no `rules` key), so there was nothing to violate. Now: - a policy without rules exits 2 before the adapter runs; - a timed-out candidate is marked `DID NOT FINISH` with the reason, and a warning counts them; - when no candidate finished, the run says so and exits 1. A run where only some candidates timed out still exits 0.
|
@RupeshMaster is attempting to deploy a commit to the priyanshu's projects Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #169.
mutiny runended with "No violation this run" and exit 0 when every candidate timed out, or when the policy had no rules. In both cases the agent was never checked against the policy.rules: []or noruleskey) exits 2 before the adapter runs, with a hint to add a rule.seed-0-…: fitness=0.000 · DID NOT FINISH (adapter_step_timeout: exceeded 60s). A warning on stderr counts them.A run where only some candidates timed out still exits 0, with the warning.
Behavior to be aware of
status="completed"for timed-out candidates, as the test from PR [RELIABILITY] Bound adapter steps and campaign wall clock (MUT-022, MUT-045) #96 expects, and Hosted is not touched.Not in this PR
The step timeout (60 s) cannot be set from
mutiny.yaml, and the minimizer andmutiny testalways use the default. Making it configurable needs one change across run, minimize and replay, so I left it out; I can open an issue for it if you want it.Type of change
Checklist
Fixes #N) or Discussion when applicableuv run pytest tests/unit -q)Test plan
uv run --locked ruff check→ all checks passeduv run pytest tests/unit tests/integration tests/reliability -q→ 853 passed. Run locally on Python 3.12 only (macOS,OPENAI_API_KEYunset); 3.11 is left for CI.examples/openai_support_agent,mutiny --help,mutiny init,mutiny runwithMUTINY_SAMPLE_OFFLINE=1and emptyOPENAI_API_KEY/FEATHERLESS_API_KEY→ violation found, regression saved.apps/webis not touched.tests/unit/test_package_release.pypassed as part of the unit run;./scripts/verify_release_artifacts.shnot run.Extra:
tests/unit/test_mutiny_cli_run_untested.py: all candidates timed out (exit 1, three marked lines, error), some timed out (exit 0, warning), none timed out (no warning), and a policy withrules: []or noruleskey (exit 2). Four of the five fail onmain(ee7e898)._run_localwith a 0.05 s step timeout, because the CLI cannot set it. I did not wait out a real 60 s timeout throughmutiny run.mutiny runon the sample project withrules: []now printserror: policy.yaml has no rules, so a campaign has nothing to checkand exits 2.Notes