Repository navigation
feat(cli): print the finding when mutiny run detects a violation - #172
Open
RupeshMaster wants to merge 1 commit into
Open
RupeshMaster wants to merge 1 commit into
RupeshMaster wants to merge 1 commit into
Conversation
`mutiny run` reported only a candidate id and "violation detected". To learn which rule broke, what the agent called, and what the attacker said, the saved regression JSON had to be opened by hand. When the violation does not reproduce on the minimizer's re-run (an agent that answers differently between runs), no regression is saved at all, so the run ended with "minimize did not re-verify" and no record of what was observed. The run now prints, for the violating candidate: - each violated rule id with its description, - the evaluator's evidence message, - the offending tool call, with credential-named arguments redacted, - the attacker turns as executed, one bounded line each. The finding is printed before minimization, so it is shown whether or not a regression ends up saved, and also when a later candidate crashes the campaign. The not-reproduced message now says what happened and why.
|
@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
mutiny runreported a violation as a candidate id and "violation detected". To see which rule broke, what the agent called and what the attacker said, you had to open the saved regression JSON. When the violation did not reproduce on the minimizer's re-run, which is common for an agent that answers differently between runs, no regression is saved, so the run ended with "minimize did not re-verify" and no record of what was observed.The run now prints the finding before minimizing:
rule/evidence/callgroup per violated rule; the attacker turns are the ones that were executed (before minimization).redact_secrets, and each value is kept to one line of at most 300 characters.stop_on_first_violation: false), where nothing was shown before.No behavior other than output changes: exit codes, saved artifacts and Hosted sync are the same. There is no linked issue; this is a small CLI output change, but if you would rather discuss the format first I can open one.
Type of change
Checklist
Fixes #N) or Discussion when applicable — none exists for thisuv run pytest tests/unit -q)Test plan
uv run --locked ruff check→ all checks passeduv run pytest tests/unit tests/integration tests/reliability -q→ 852 passed. Run locally on Python 3.12 only (macOS,OPENAI_API_KEYunset); 3.11 is left for CI. Two further runs of the suite on this branch died with the segfault described in [bug] Hosted: stopping the API during a campaign can segfault, and a campaign left running blocks all later campaigns #168, which this PR does not touch.examples/openai_support_agent,mutiny --help,mutiny init,mutiny runwithMUTINY_SAMPLE_OFFLINE=1and emptyOPENAI_API_KEY/FEATHERLESS_API_KEY→ violation found, finding printed as above, 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.py: the finding lists rule, evidence, call and attack; a finding that does not reproduce is still printed and no regression is saved; a credential-named argument is printed as[REDACTED]; long or multi-line text is cut to one bounded line. The existing crash-after-hit test now also checks that the finding is printed. All five fail onmain(ee7e898)..mutiny/tests/is not created.Notes
docs/assets/cli-run.pngshows the previous output. I did not regenerate it.docs/CLI.mdandCHANGELOG.mdare updated.