Harden receipt and CLI test coverage#17
Draft
aniketh-maddipati wants to merge 1 commit into
Draft
Conversation
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.
This PR hardens the test suite around the current public Notary and CLI behavior so regressions in receipt signing, chain verification, schema shape, and command-line flows fail fast.
The user-visible problem was that the repository had good targeted coverage in a few areas, but it still had gaps around shared test setup, cryptographic known-answer regressions, invariant-style receipt verification, and end-to-end CLI flows. That made it easier for behavioral drift to slip in without a tight, realistic test catching it.
The root cause was mostly fragmentation. Some coverage existed already, but it lived in separate test files with duplicated setup, and the rebased upstream branch had also changed the CLI surface and already introduced overlapping
tests/test_aerf_conformance.pyandtests/cli/test_e2e.pyfiles. Rebasing this work cleanly therefore required resolving those overlaps instead of just adding duplicate files.This change adds shared pytest fixtures in
tests/conftest.pyfor a persistent-keyNotary, a recording sink, a reusable plan, and the checked-in AERF schema. It adds deterministic case generators intests/strategies.py, cryptographic regression tests intests/test_crypto_kat.py, invariant-oriented receipt and chain tests intests/test_invariants.py, and broader integration coverage intests/test_integration.py. It also expandstests/test_aerf_conformance.pyfrom a single schema check into multiple receipt-shape and chain-shape validations using the upstream schema file.On the CLI side, this PR resolves the upstream conflict by rewriting
tests/cli/test_e2e.pyagainst the Typer-based CLI that actually ships onorigin/main. The new E2E coverage exercisesinit,doctor,privacy,verify, andshow, including a real generated receipt round-trip, rather than relying on older commands and entrypoints that are no longer present on the rebased branch.Validation on the rebased branch:
python3 -m pytest -q->207 passedpython3 -m pip install -e .-> passedagentmint --help-> passedpython3 -m pytest tests/test_aerf_conformance.py tests/test_crypto_kat.py tests/test_invariants.py tests/test_integration.py tests/cli/test_e2e.py -q->26 passedOne documented follow-up check could not be run on the rebased branch:
python3 -m agentmint.demo.healthcarefails becauseorigin/maindoes not contain that module.