Skip to content

tests/interaction: era-axis machinery for the requirements manifest#2909

Draft
maxisbey wants to merge 4 commits into
mainfrom
requirements-era-axis
Draft

tests/interaction: era-axis machinery for the requirements manifest#2909
maxisbey wants to merge 4 commits into
mainfrom
requirements-era-axis

Conversation

@maxisbey

@maxisbey maxisbey commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Adds the (transport, spec_version) matrix machinery to the interaction test suite's requirements manifest, with no behaviour change yet (SPEC_VERSIONS has a single entry; 411 connect-parametrized cells keep byte-identical node ids).

Work in progress — further changes (lifting stateless into the matrix, threading protocol_version into Client, the 2026 annotation pass) will land on this branch.

maxisbey added 4 commits June 18, 2026 16:29
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.
@maxisbey maxisbey force-pushed the requirements-era-axis branch from 0c09063 to 0a5be73 Compare June 18, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant