Skip to content

TEST/FIX/DOC: Adding tests to ensure docs include scorers, scenarios, and attacks#2140

Open
rlundeen2 wants to merge 3 commits into
microsoft:mainfrom
rlundeen2:rlundeen2-doc-coverage-tests
Open

TEST/FIX/DOC: Adding tests to ensure docs include scorers, scenarios, and attacks#2140
rlundeen2 wants to merge 3 commits into
microsoft:mainfrom
rlundeen2:rlundeen2-doc-coverage-tests

Conversation

@rlundeen2

Copy link
Copy Markdown
Contributor

Summary

Adds doc-coverage guard tests (mirroring the existing test_converter_documentation.py) so newly added components must be documented, and closes the gaps the tests surfaced.

Each test enumerates components the same way the app does and fails when one is missing from the docs:

  • Scorers (ScorerRegistry) → must appear under doc/code/scoring/
  • Scenarios (ScenarioRegistry) → must appear in doc/scanner/<package> (adaptive → doc/code/scenarios/)
  • Attacks (AttackStrategy exports, alias-aware) → must appear under doc/code/executor/

Doc gaps closed

  • Scoring: AudioTrueFalseScorer, VideoTrueFalseScorer, DecodingScorer, StaticPromptInjectionScorer, AudioFloatScaleScorer, VideoFloatScaleScorer
  • Garak: Doctor scenario

Affected notebooks were re-executed so outputs are refreshed and .py/.ipynb stay in sync.

Tests

tests/unit/docs — 3 passed.

rlundeen2 and others added 3 commits July 8, 2026 11:13
… and attacks

Adds doc-coverage guard tests (mirroring the existing converter test) so that
new scorers, scenarios, and attacks must be documented:
- scorers -> doc/code/scoring
- scenarios -> doc/scanner/<package> (adaptive -> doc/code/scenarios)
- attacks -> doc/code/executor

Closes the current gaps the new tests surfaced (6 media/local scorers and the
garak Doctor scenario) and re-executes the affected notebooks to refresh outputs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PR microsoft#2111 removed the pyrit/identifiers package but left its API page entry in
doc/myst.yml, so gen_api_md no longer emits pyrit_identifiers.md and validate_docs
fails on the missing TOC reference. Drop the stale entry.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

2 participants