Files
agentic_security/tests
Ankit1478 457bf4cf24 Guard the environment the detector baselines were recorded in
baselines.json records what the bundled OneClassSVM answers. That model
is three .joblib files committed to the repo, pickled with scikit-learn
1.9.1, so the recorded sets only hold under that release. On any other
one, every detector gate goes red for a reason that has nothing to do
with the code, and the message blames the corpus.

Three checks now run before the gates:

  - the three .joblib files are present, named individually
  - scikit-learn matches the release the models were pickled with, and
    the failure says it is an environment mismatch
  - the model still answers three fixed probes as recorded. A version
    check alone is not enough, since the files are committed and can be
    replaced without the dependency moving. One probe answers False, so
    a model degenerated to a constant is caught too

Pins that the ML plugin returns numpy.bool_ while annotated -> bool.
Harmless through the manager's any(), wrong for any caller using
`is True`.
2026-11-09 13:12:51 +05:30
..
2026-10-18 18:09:43 +03:00
2025-03-02 18:37:38 +02:00
2025-12-09 19:51:47 +02:00