feat: add elapsed time and verdict count to live progress spinner - #30
Open
Karim-Ashraf1 wants to merge 1 commit into
Open
feat: add elapsed time and verdict count to live progress spinner#30Karim-Ashraf1 wants to merge 1 commit into
Karim-Ashraf1 wants to merge 1 commit into
Conversation
Show real-time progress during `probeagent attack` with format: Attacking Credential Exfiltration (3/12) · 0:47 elapsed 2C 5R 0B Changes: - Move on_progress callback to fire after each category completes - Add elapsed time counter (time.monotonic, formatted as M:SS) - Add running verdict counts (Compromised/Resisted/Blocked) - Keep progress on stderr so `-o json` output stays clean - Add tests for callback wiring and format helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Show live progress with elapsed time and verdict counts during
probeagent attack, so users can see how far along a scan is instead of just a spinning indicator.Changes
src/probeagent/core/engine.py: Movedon_progresscallback to fire after each category completes (was before), and extended signature to pass accumulated results list for verdict countingsrc/probeagent/cli.py: Added_format_elapsed()helper (formats seconds asM:SS),time.monotonic()timer at scan start, and verdict counting (Compromised/Resisted/Blocked) from results. Status line now shows:Attacking Credential Exfiltration (3/12) · 0:47 elapsed 2C 5R 0Btests/test_cli.py: AddedTestProgressCallback(verifies callback wiring and signature) andTestFormatElapsed(unit tests forM:SSformatting)Test plan
pytest tests/ -qpasses (497 passed, 2 skipped)ruff check src/ tests/clean (no new errors)python -c "from probeagent.cli import _format_elapsed; print(_format_elapsed(125))"outputs2:05Related issues
Closes #16