tests/interaction: era-axis machinery for the requirements manifest#2909
Draft
maxisbey wants to merge 4 commits into
Draft
tests/interaction: era-axis machinery for the requirements manifest#2909maxisbey wants to merge 4 commits into
maxisbey wants to merge 4 commits into
Conversation
Adds the type machinery for parametrizing the interaction suite over (transport, spec_version) cells, with no behaviour change yet: - SpecVersion / SPEC_VERSIONS / CONNECTABLE_TRANSPORTS / TRANSPORT_SPEC_VERSIONS constants; SPEC_REVISION now derived from SPEC_VERSIONS[-1] - ArmExclusionReason literal + ArmExclusion / KnownFailure dataclasses - Requirement gains note / added_in / removed_in / supersedes / superseded_by / arm_exclusions / known_failures (all defaulted, no manifest entry edited) - Connect protocol + the three connect_* factories accept a protocol_version kwarg (currently ignored) 534 tests collected (unchanged); pyright/ruff clean.
…_ self-tests compute_cells() expands a test's stacked @requirement marks into the (transport, spec_version) pytest.param list with intersection semantics: a cell is dropped if any requirement's [added_in, removed_in) window or arm_exclusions excludes it, and marked xfail-strict if any requirement's known_failures matches it. Requirement.transports is intentionally not consulted (descriptive metadata only). cell_id() keeps node-id suffixes as bare transport names while SPEC_VERSIONS has a single entry. test_coverage.py gains pytest.raises self-tests for every new __post_init__ validation branch on ArmExclusion / KnownFailure / Requirement. 12 passed; pyright/ruff clean; conftest not yet wired.
pytest_generate_tests now reads each connect-taking test's stacked @requirement marks, looks them up in REQUIREMENTS, and parametrizes the connect fixture with compute_cells() output. The fixture body unpacks the (transport, spec_version) tuple and returns the bare factory. 411 connect-parametrized cells with byte-identical [transport] node ids; no behaviour change while SPEC_VERSIONS has a single entry. test_coverage.py gains 10 unit tests for compute_cells/cell_id covering intersection semantics, wildcard arm-exclusion / known-failure matching, TRANSPORT_SPEC_VERSIONS gating, and the transports-field-is-metadata-only guarantee. _requirements.py is at 100% line+branch coverage from test_coverage.py alone.
test_coverage.py gains five manifest-level invariants (vacuously green until entries start using the new fields): - SPEC_VERSIONS subset of KNOWN_PROTOCOL_VERSIONS and includes LATEST - CONNECTABLE_TRANSPORTS == conftest._FACTORIES keys - supersedes / superseded_by links are bidirectional and versioned - every arm_exclusion / known_failure targets a reachable cell README.md: the requirements-manifest field list documents the new fields, and the spec-revision section is rewritten as 'Spec versions and the era axis' covering compute_cells() intersection semantics, the transports-is-metadata-only rule, and the checklist for landing a new revision. Full gate: 2299 passed, 100.00% coverage, pyright/ruff clean, 411 connect cells with unchanged ids.
0c09063 to
0a5be73
Compare
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.
Adds the (transport, spec_version) matrix machinery to the interaction test suite's requirements manifest, with no behaviour change yet (
SPEC_VERSIONShas a single entry; 411 connect-parametrized cells keep byte-identical node ids).Work in progress — further changes (lifting stateless into the matrix, threading
protocol_versionintoClient, the 2026 annotation pass) will land on this branch.