Skip to content

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

Merged
rlundeen2 merged 4 commits into
microsoft:mainfrom
rlundeen2:rlundeen2-doc-coverage-tests
Jul 9, 2026
Merged

TEST/FIX/DOC: Adding tests to ensure docs include scorers, scenarios, and attacks#2140
rlundeen2 merged 4 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>
…e-tests

# Conflicts:
#	doc/scanner/garak.ipynb
@rlundeen2 rlundeen2 enabled auto-merge July 9, 2026 17:08
@rlundeen2 rlundeen2 added this pull request to the merge queue Jul 9, 2026
Merged via the queue into microsoft:main with commit e6b1368 Jul 9, 2026
53 checks passed
@rlundeen2 rlundeen2 deleted the rlundeen2-doc-coverage-tests branch July 9, 2026 17:35
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