[bench] audit follow-up: shared fixtures, meta constant, unpinned viewer assertions#9
Merged
Conversation
typing.Any in five test modules and unittest.mock.call in test_runner were imported but never used. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ssertions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 321e098b6e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex review on PR #9: the bare `from _ledger_fixtures import ...` only resolved under discovery-style runs, breaking the repo's established `python -m unittest tests.test_x -v` style. Import via `tests._ledger_fixtures` instead, and add tests/__init__.py so the package resolves to this repo even when an unrelated `tests` package exists on sys.path (regular packages outrank namespace portions). Includes the governance ledger entries for these edits. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Follow-up cleanup from the repo-wide audit session, applying the three findings its four-reviewer cleanup pass (reuse, simplification, efficiency, altitude) marked as apply:
_META_FILENAMEto publicMETA_FILENAMEinledger/chain.pyand import it inledger/verify.py, so the writer and the independent verifier cannot drift on the meta-anchor filename.test_verify.pyandtest_viewer.pyinto a sharedtests/_ledger_fixtures.py(single source of truth for the entry shape; underscore prefix keeps unittest discovery from collecting it).test_viewer.pybanner assertions from HTML template markup (2 <span class="pct">(66.7%)</span>) to computed values ((66.7%), embedded"status": "VALID"), so restyling the viewer no longer breaks value-correct tests.Reviewer findings deliberately skipped, with reasons recorded in the audit session:
api.pyprovider-wrapper dedup (two provider-specific bodies, extraction would abstract two lines), runner defensive guards (deliberate in governance paths), verify tuple cosmetics, and a tmpdir mixin (too small to justify).Test plan
python -m unittest discover -s tests -p test_viewer.py(5 tests) ✅python -m unittest discover -s tests -p test_verify.py(23 tests) ✅python -m unittest discover -s tests -p test_chain.py(28 tests) ✅ruff check ledger testsclean ✅python -m cli verifyreports the chain VALID with meta anchor verified ✅