How adichaudhary/x402-conformance-lab works
This is an x402 V2 interoperability and conformance lab. Its main workflow is to load an implementation config and role-specific catalog tests, send test steps to the implementation, evaluate responses against assertions, then print and optionally write a report. The README also describes mock server/facilitator capabilities and local-chain testing; some of these are planned or undersampled, so their links are documented rather than inferred from unseen code.
Main entry points: run.ts Test runner · index.ts Conformance CLI · schemas.ts Schema validation · catalog.ts Catalog loader
Components 18
CLI entry
- Conformance CLI
src/cli/index.ts
Test execution
- Implementation config
src/runner/config.ts - Catalog loader
src/runner/catalog.ts - Schema validation
src/runner/schemas.ts - Test runner
src/runner/run.ts - Assertion evaluation
src/runner/assertions.ts - Expectation checks
src/runner/expect.ts - Suite and spec version
src/version.ts
Test definitions
- Role-based test catalog
tests/catalog - Schema definitions
schemas
Results and reports
- Text report
src/report/text.ts - JSON report writer
src/report/json.ts - Compatibility grid
src/report/markdown.ts
Other components
- Suite operator
- Target implementation
- Mock resource server
src/mocks/server - Mock facilitator
src/mocks/facilitator - Local chain harness
Connections 22
- Suite operator → Conformance CLI: invokes
README.md - Conformance CLI → Implementation config: loads config
src/cli/index.ts - Conformance CLI → Catalog loader: loads catalog
src/cli/index.ts - Catalog loader → Role-based test catalog: reads tests
src/runner/catalog.ts - Catalog loader → Schema validation: validates tests
src/runner/catalog.ts - Implementation config → Schema validation: validates config
src/runner/config.ts - Schema validation → Schema definitions: loads definitions
src/runner/schemas.ts - Conformance CLI → Test runner: runs tests
src/cli/index.ts - Test runner → Target implementation: sends HTTP steps
src/runner/run.ts - Test runner → Assertion evaluation: evaluates assertions
src/runner/run.ts - Assertion evaluation → Expectation checks: checks expectations
src/runner/assertions.ts - Test runner → Implementation config: checks features
src/runner/run.ts - Test runner → Suite and spec version: records version
src/runner/run.ts - Conformance CLI → Suite and spec version: displays version
src/cli/index.ts - Conformance CLI → Text report: formats output
src/cli/index.ts - Conformance CLI → JSON report writer: writes report
src/cli/index.ts - JSON report writer → Schema validation: validates report
src/report/json.ts - Test runner → Text report: provides results
src/report/text.ts - Test runner → Compatibility grid: provides results
src/report/markdown.ts - Mock resource server → Target implementation: can serve as target
README.md - Mock facilitator → Test runner: supports mock-facilitator tests
README.md - Local chain harness → Test runner: supports chain tests
README.md