test: phase 0 conformance harness — typed parser for all 68 fixtures#7
Merged
Merged
Conversation
Phase 0 of the v0.4 → v0.8 implementation plan: the conformance test
harness loads every YAML fixture under
openarmature-spec/spec/<capability>/conformance/ into a typed
pydantic config. Phases 1+ add runtime interpretation under
harness/runtime/ without re-touching parsing.
Bumps the spec submodule to v0.8.0 (8 accepted proposals: foundation,
explicit subgraph mapping, observer hooks, llm-provider, middleware,
fan-out, OTel, checkpointing).
Harness package layout (tests/conformance/harness/):
- fixtures.py Three top-level discriminated variants
(LlmProviderFixture | CasesFixture |
GraphFixture). Discriminator picks by presence
of `mock_provider` / `cases:` keys.
- directives.py Node directive sub-models with mutual-exclusion
validator on the 13 primary directives.
Middleware discriminated union over the 5 types
in fixtures.
- expectations.py Per-capability expected-block discriminator
(graph_engine | llm_provider |
pipeline_utilities | observability) chosen by
which assertion keys appear.
- loader.py Auto-discovers NNN-*.yaml across all four
capability directories.
- skip.py Structured SkipReason with capability +
directive list + phase mapping.
- runtime/ Empty stub package + README locking in the
Phase 0 boundary.
Strictness contract: strict (extra="forbid") at the structural
skeleton (top-level fixture, StateSchema, NodeSpec primary directive
set, ObserverSpec, MiddlewareConfig). Permissive (extra="allow") for
payload-shape models (LLM mock responses, middleware params, flaky
config, case shapes) — those evolve frequently in the spec without
restructuring the directive surface.
Tests added (test_fixture_parsing.py): every fixture parses (68)
AND round-trips (parse → model_dump → re-parse → equal). 137
assertions total. Phase 0 exit criterion.
test_conformance.py: existing graph-engine runtime tests still pass
for fixtures the legacy adapter can translate. Fixtures using the
v0.6 pair model or new node directives (fan_out, flaky variants,
calls_llm, update_pure*, emits_log, etc.) skip with phase-tagged
reasons.
Result: 204 pass, 7 skip, 0 fail.
There was a problem hiding this comment.
Pull request overview
Adds Phase 0 of the conformance harness by introducing typed (Pydantic v2) parsing for all spec fixtures and a parsing/round-trip stability test suite, while updating the existing graph-engine runtime conformance test to skip fixtures that require later-phase runtime support.
Changes:
- Introduces
tests/conformance/harness/with discriminated fixture root models, directive/expected-block submodels, discovery/loading utilities, and structured skip-reason formatting. - Adds
test_fixture_parsing.pyto ensure every discovered spec fixture parses into a typed variant and round-trips viamodel_dump()stably. - Updates
test_conformance.py(graph-engine runtime conformance) with Phase 0 skips for fixtures needing the pair-model or unsupported node directives.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/conformance/test_fixture_parsing.py | New Phase 0 tests for fixture discovery, parsing, and round-trip stability. |
| tests/conformance/test_conformance.py | Adds Phase 0 skip logic for runtime fixtures requiring later-phase support. |
| tests/conformance/harness/init.py | Exposes the public harness surface (discover/load/Fixture/SkipReason). |
| tests/conformance/harness/loader.py | Implements deterministic discovery and typed parsing via TypeAdapter. |
| tests/conformance/harness/fixtures.py | Defines the three top-level discriminated fixture variants. |
| tests/conformance/harness/directives.py | Adds typed models for fixture directives (nodes, edges, middleware, etc.). |
| tests/conformance/harness/expectations.py | Adds typed models for per-capability expected: blocks + discriminator. |
| tests/conformance/harness/skip.py | Adds structured skip reasons and directive→phase mapping for later phases. |
| tests/conformance/harness/runtime/README.md | Documents the Phase 0 boundary and future runtime home. |
| tests/conformance/harness/runtime/init.py | Introduces the runtime package stub (empty). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Strictness contract
Test plan
What's next
Phase 1 — graph-engine retrofit to the v0.6 pair model (started/completed events, attempt_index, fan_out_index, phase). The 7 currently-skipped graph-engine fixtures (012-018) turn back on as Phase 1 lands.