Skip to content

MAINT: Updating CLI to use updated estimates - #2572

Draft
Richard Lundeen (rlundeen2) wants to merge 2 commits into
mainfrom
copilot/rlundeen2-cli-progress-units
Draft

MAINT: Updating CLI to use updated estimates#2572
Richard Lundeen (rlundeen2) wants to merge 2 commits into
mainfrom
copilot/rlundeen2-cli-progress-units

Conversation

@rlundeen2

@rlundeen2 Richard Lundeen (rlundeen2) commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What changed

The pyrit_scan progress bar counted techniques completed. It now uses the backend's execution-unit counts (completed_attacks / total_attacks on ScenarioRunSummary) and the label changes from techniques: to units:.

before:  [███████████████░░░░░░░░░░░░░░░] techniques: 2/4 (50%) | success rate: 30% | IN_PROGRESS
after:   [███████████████░░░░░░░░░░░░░░░] units: 5/10 (50%) | success rate: 30% | IN_PROGRESS

Techniques were a proxy. The server could not report a planned total, so an attacks-based bar would always read 100%. Since #2374, _calculate_progress_counts derives the total from the persisted run plan, so the CLI can just show the real numbers.

This also deletes the total_techniques / scenario_meta plumbing that existed only to compute the old ratio, and removes a mismatch where pyrit_shell ignored aggregate technique expansion and so disagreed with pyrit_scan.

The ScenarioRunSummary count descriptions still described persisted attack results; they now describe planned execution units.

Tests

uv run pytest tests/unit/cli tests/unit/models -q → 1740 passed.

pre-commit run --all-files: Check Memory Migrations and ty fail identically on a clean main checkout, so they are pre-existing.

The scan progress bar counted techniques completed / total because the server only knew about attacks already persisted, so an attacks-based bar always read 100%. The backend now persists a normalized run plan, so total_attacks is a real planned total.

Switch the bar to run.completed_attacks / run.total_attacks, relabel the output from 'techniques:' to 'units:', and delete the total_techniques / scenario_meta plumbing that only existed to compute the old ratio.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The counts are planned execution units from the persisted run plan, not attack results persisted so far.

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.

1 participant