Skip to content

test(conformance): retire 13 body-less scenarios, pin README (#749) - #992

Merged
tommasobolis merged 4 commits into
developfrom
chore/749-conformance-matrix
Oct 6, 2026
Merged

tommasobolis merged 4 commits into
developfrom
chore/749-conformance-matrix

Conversation

@tommasobolis

Copy link
Copy Markdown
Collaborator

Summary

  • Cuts the internal matrix (python/tests/conformance/suite.py) from 21 CONFORMANCE_SCENARIOS to 8. The 13 retired names (tools, registry, governance, publication) need a per-adapter surface that still raises _verify.blocked(...): MCP binding in tools/session.py, and Exchange discovery, publication and introspection in registry/. No adapter can run a scenario against a surface that always refuses. The pure logic beneath them (ToolFilter, collision prefixes, criteria, digests) is already unit-tested in tests/unit/test_pure_logic.py.
  • Adds SCENARIO_BODIES, which maps each remaining scenario to the pytest node ids that run it. test_every_scenario_has_an_executable_body checks that the map's keys equal CONFORMANCE_SCENARIOS and that every listed test function exists, so a name can't outlive its body.
  • Adds tests/conformance/test_readme_exemptions_table.py. It checks the "Conformance exemptions" table in both the repo README.md and python/README.md (PyPI) against KNOWN_LIMITATIONS, in both directions. The one public-only row (budget refusal not retried) is checked against examples/crewai/main.py.
  • CONTRIBUTING: a new scenario lands together with the tests that run it.

Closes #749

Done-when amended (maintainer decision)

  • KNOWN_LIMITATIONS keys may stay internal scenario names (CrewAI's gateway_identity_observed, jwt_token_refreshed and typed_refusal_bridged, ADK's typed_refusal_bridged), as long as each has an executable body.
  • Exemptions are asserted-inverse tests rather than strict xfails. Each one asserts the exempt behaviour: the correlation header is not the run id, last_call reports UNAVAILABLE, CrewAI raises ConfigError in jwt mode. One exception: typed_refusal_bridged for ADK model() and CrewAI is asserted only through the typed_refusals capability flag, with no call run.
  • The 13 retired scenarios are tracked in test(conformance): restore the 13 retired scenarios once their surfaces are verified #991.

Test plan

  • pytest -q: 2328 passed, 199 skipped, 13 deselected
  • pytest -q -m local_gateway: 9 passed, 5 skipped
  • mypy (strict): no issues in 79 source files; per-example mypy (adk, agent_framework, anthropic, crewai, llamaindex, openai_agents, quickstart, strands) all clean
  • ruff check .: all checks passed
  • lint-imports: 9 contracts kept, 0 broken
  • vulture, scripts/check_verification_claims.py, scripts/check_doc_links.py, scripts/scrub_fixtures.py --check: exit 0
  • scripts/check_new_dependencies.py --base <develop pyproject>: no new direct dependencies
  • Mutation checks, each of which made the matching test fail:
    • pointing a SCENARIO_BODIES entry at a missing test
    • removing a KNOWN_LIMITATIONS entry
    • deleting a README table row

Post-deploy steps

  • None at runtime: this is a test and docs-only change, with no published surface touched and no acceptance sync needed.
  • Follow-ups:

🤖 Generated with Claude Code

tommasobolis and others added 2 commits October 5, 2026 21:43
…ons (#749)

Trims CONFORMANCE_SCENARIOS from 21 to 8 names, keeping only the ones with a
real executable body (proven by the adapter contract suite, #742, and
test_typed_refusal_bridge.py) and retiring the 13 that described
registry/tools/governance/publication surfaces still blocked by
_verify.blocked(...) per the verification discipline (§0.3) — there is no
defensible scenario body to write for a surface that unconditionally refuses.

Adds a lock test (test_conformance_scenarios_are_exactly_the_executable_set)
so the retired names can't silently drift back in without a real body, and a
new test_readme_exemptions_table.py that cross-checks every README
"Conformance exemptions" row against KNOWN_LIMITATIONS in both directions, so
the published table can't drift from the code it claims to summarize.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replaces the review-time prose mapping and the self-referential set check
with SCENARIO_BODIES: each CONFORMANCE_SCENARIOS name lists the pytest
node ids that run it, and test_every_scenario_has_an_executable_body
checks the keys match and that every listed test function exists. A
renamed or deleted body now fails CI instead of leaving a bare name.

Corrects the mapping: jwt_token_refreshed runs in
tests/unit/test_adapter_jwt_mode.py (per-send JWT, CrewAI refusal), not
the shared-client kwargs test; simple_completion is the buffered async
call plus the sync call. Narrows the retirement note to the per-adapter
surfaces that are blocked and points at the unit-tested pure logic.

The README exemptions test now checks both READMEs (repo and PyPI), and
the parsing is in one helper. CONTRIBUTING notes that a scenario lands
with its body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Oct 5, 2026
tommasobolis and others added 2 commits October 6, 2026 17:31
…#749)

Plain pytest does not put python/ on sys.path, so importing
examples.crewai.main failed in CI's test job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tommasobolis
tommasobolis merged commit e394475 into develop Oct 6, 2026
33 checks passed
@tommasobolis
tommasobolis deleted the chore/749-conformance-matrix branch October 6, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(conformance): implement or retire the internal 20-scenario conformance matrix

1 participant