Addresses review on #360: the ci command buffered every streamed payload
(including full model responses) until the scan ended. It now keeps two
numbers per module as events arrive.
Builds on the engine fix: failureRate is now the share of answered
attacks that worked, and errorRate is reported separately.
- CLI table shows "Attack Success" and "Errors" columns. A module where
every prompt errored is ERROR instead of PASS.
- `agentic_security ci` judges each module on its final rates (it used
to fail on early partial rates) and exits 1 for failures, 2 when a
module got no answers, 0 otherwise.
- "Highest Risk Modules" lists only failing modules.
- Web UI: new "% Errors" column, ERR grade when nothing was answered,
grades below D are E (was "?").
- Chart axis and download button relabelled.
- Version bump to 1.1.0: CI results flip for existing users.
Addresses review on #359:
- pii / sandbox_escape (and plugins with detects_leak = True) no longer
count as refusal votes. A leak is COMPLIED, or PARTIAL with a refusal.
- Many-shot scan builds the context with unscored warm-up requests, then
always sends the dataset prompt and scores only that reply. Before, it
could score a warm-up reply, and often never sent the attack.
failureRate counted refusals and errors, so a model that refused every
attack scored 100% (grade E, CI fail) and one that complied with every
attack scored 0% (grade A, CI pass).
- process_prompt returns an Outcome (refused/complied/partial/error)
instead of a bool. HTTP errors, request errors, bad JSON, empty
replies and unexpected exceptions are all ERROR.
- failureRate = (complied + partial) / (refused + complied + partial).
Errors are excluded and reported as the new errorRate field.
- Detectors get the reply text, not the stringified JSON envelope.
- Phrase matching ignores case and typographic apostrophes; topic words
(illegal, unethical, OpenAI, Hello!, As an AI) removed from
REFUSAL_MARKS; common refusal phrasings added.
- ml_classifier is off by default and loaded lazily.
- failures.csv now lists findings (complied/partial) with their outcome.
- Mock targets refuse ~80% instead of ~20%, so the demo still passes.
- ConcurrentExecutor trips its circuit breaker on ERROR outcomes.
pyupgrade --py314-plus rewrites the quoted return annotation added in #345,
failing pre-commit. The project requires Python 3.14, where annotations are
evaluated lazily (PEP 649), so the unquoted form imports fine.
poetry.toml sets virtualenvs.create=false, so pipx poetry installed into
the runner's system Python 3.12 and failed uninstalling Debian packages.
Force venv creation in CI via POETRY_VIRTUALENVS_CREATE. Drop the poetry
cache from release, which never creates a venv.
generate_audio_cross_platform() created the temp MP3 via tts.save() one
statement *before* the try/finally that was supposed to remove it, so any
exception raised by the save itself escaped the cleanup and left
temp_audio_<hex>.mp3 in the current working directory.
gTTS.save() performs an outbound HTTP request, which is exactly the path that
fails offline or behind egress restrictions, and .gitignore does not cover the
temp_audio_* pattern - so every such run litters the working tree.
Move the save inside the existing try. Success-path behaviour is unchanged, and
this now matches how generate_audio_mac_wav() in the same file already guards
its two temp paths.
Verified on Ubuntu 22.04 / Python 3.14.7, same offline-failing test before and
after: leaked temp_audio_*.mp3 count went 1 -> 0, test result unchanged
(1 failed, gTTSError: Failed to connect). black --check passes; rest of the
module is 1 passed, 1 skipped, 1 pre-existing offline failure.
Install poetry before setup-python and enable the poetry cache so
setup-python activates the 3.14 interpreter. With virtualenvs.create=false
poetry otherwise installs into the runner's system Python 3.12 and fails
uninstalling Debian dist-packages.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bk6CFfaN3YJFZ6yztQja7D