Skip to content

feat: add Netra.redteam.run_redteam() to trigger an existing red-team config - #386

Open
jithin23-kv wants to merge 2 commits into
mainfrom
feat/redteam-sdk-client
Open

feat: add Netra.redteam.run_redteam() to trigger an existing red-team config#386
jithin23-kv wants to merge 2 commits into
mainfrom
feat/redteam-sdk-client

Conversation

@jithin23-kv

Copy link
Copy Markdown
  • Netra.redteam.run_redteam(config_id, handler, max_concurrency=None) — fetches the run's prompt list once, drives every session's turns locally against a plain handler function, submits results, returns an aggregated RedteamResult (results/progress/risk_score/run_number)
  • Depends on the backend PR (KeyValueSoftwareSystems/combat-ai-core#1445) for the /redteam/sdk/* endpoints
  • Python port of feat: add Netra.redteam.runRedteam() to trigger an existing red-team config netra-sdk-js#134, following this repo's existing netra/simulation/ module conventions (sync httpx client, dataclass models, thread-per-session concurrency)
  • Adds netra/shutdown_hooks.py, a shared SIGINT/SIGTERM hook registry so an in-flight run is cancelled server-side on Ctrl-C — new capability, Python had no signal handling before this

625/625 tests passing (81 new). Verified against a real running backend + real Postgres (not just mocks) — full multi-turn attack loop across single-turn, multi-turn, and iterative-jailbreak evaluators, judge scoring, progress/risk_score aggregation, and cancellation via SIGINT (confirmed cancelled status + synthetic result backfill in the DB). Also cross-checked side-by-side against the JS SDK on the same config for both the completion and cancellation paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant