perf: add savings audit output - #1211
Conversation
PR governanceThis PR does not yet satisfy the required template fields:
Please update the PR body, or move the PR back to draft while it is still in progress. |
JerrettDavis
left a comment
There was a problem hiding this comment.
Code review looks good. The savings audit separates raw prompt reduction from logged savings, makes accounting deltas explicit, and surfaces suspicious rows without changing the existing summary behavior. The CSV additions and focused tests cover the new accounting fields well.
Only governance checks have run on GitHub, so this still needs the normal CI path before merge, but I do not see a code blocker.
…-audit # Conflicts: # tests/test_cli_perf_format.py
JerrettDavis
left a comment
There was a problem hiding this comment.
Re-reviewed after refreshing onto current main and resolving the perf-format test import conflict with #1212's overhead summary work. The combined analyzer now keeps both the savings audit and overhead summary surfaces, and I fixed the merged list-price savings total to avoid the untyped dict arithmetic that mypy caught.
Local validation on the updated head:
uvx --from ruff==0.15.17 ruff check headroom/cli/perf.py headroom/perf/analyzer.py tests/test_cli_perf_format.py
uvx --from ruff==0.15.17 ruff format --check headroom/cli/perf.py headroom/perf/analyzer.py tests/test_cli_perf_format.py
uv run mypy headroom/perf/analyzer.py
uv run pytest tests/test_cli_perf_format.py -q
17 passed
GitHub CI is still queued from the push, but I do not see a code blocker in the refreshed branch.
JerrettDavis
left a comment
There was a problem hiding this comment.
Re-reviewed after the branch was updated from main.
Validated locally:
uv run --frozen --extra dev ruff check headroom/cli/perf.py headroom/perf/analyzer.py tests/test_cli_perf_format.pyuv run --frozen --extra dev ruff format --check headroom/cli/perf.py headroom/perf/analyzer.py tests/test_cli_perf_format.pygit diff --check upstream/main...HEADuv run --frozen --extra dev mypy headroom/perf/analyzer.pyuv run --frozen --extra dev python -m pytest tests/test_cli_perf_format.py -q
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
# Conflicts: # headroom/perf/analyzer.py
JerrettDavis
left a comment
There was a problem hiding this comment.
Re-reviewed at the latest head after the upstream-main refresh. Normalizing away diff metadata shows the contributed patch content is byte-for-byte unchanged from the previously approved revision; current checks have no failures.
# Conflicts: # headroom/cli/perf.py # headroom/perf/analyzer.py
JerrettDavis
left a comment
There was a problem hiding this comment.
Re-reviewed exact head e6e057e after the main sync. The savings-audit delta remains unchanged in substance and current checks are green.
Description
Testing
Test Output
Type of Change
Changes Made
Test Output
Real Behavior Proof
Review Readiness