Problem
The expected.error_code field in workflow conformance fixtures (and other conformance suites) carries two distinct meanings:
- Validation error code (normative) - The code a validator MUST emit when rejecting invalid input (e.g.,
E_WORKFLOW_SELF_PARENT)
- Runtime error code (informational) - The code that might appear at runtime for edge cases that pass structural validation
This overload makes it ambiguous whether a test harness should assert on error_code for edge-case fixtures where expected.valid is true but an error_code is present for documentation.
Currently the JSON Schema enforces error_code is required when valid: false (via allOf/if/then), which is correct. But the field name itself suggests it's always a validation output, which could confuse cross-language implementors.
Proposal
Split into two distinct fields with a deprecation window:
Phase 1: Add new fields (next conformance version bump)
validation_error_code - Normative. Required when valid: false. Test harnesses MUST assert this.
meta.runtime_error_code - Informational. Optional. Documents what code might appear at runtime. Test harnesses MUST NOT assert this.
Phase 2: Deprecation (1 release cycle)
- Accept both
error_code (legacy) and validation_error_code (new) for 1 release
- Fixture schema validates either field is present when
valid: false
Phase 3: Remove legacy field
- Remove
error_code from fixture schema
- All conformance suites use
validation_error_code
Affected Fixture Suites
specs/conformance/fixtures/workflow/ (valid.json, invalid.json, edge-cases.json)
specs/conformance/fixtures/agent-identity/
specs/conformance/fixtures/attribution/
specs/conformance/fixtures/dispute/
specs/conformance/fixtures/bundle/
specs/conformance/fixtures/purpose/
Acceptance Criteria
Problem
The
expected.error_codefield in workflow conformance fixtures (and other conformance suites) carries two distinct meanings:E_WORKFLOW_SELF_PARENT)This overload makes it ambiguous whether a test harness should assert on
error_codefor edge-case fixtures whereexpected.validistruebut anerror_codeis present for documentation.Currently the JSON Schema enforces
error_codeis required whenvalid: false(viaallOf/if/then), which is correct. But the field name itself suggests it's always a validation output, which could confuse cross-language implementors.Proposal
Split into two distinct fields with a deprecation window:
Phase 1: Add new fields (next conformance version bump)
validation_error_code- Normative. Required whenvalid: false. Test harnesses MUST assert this.meta.runtime_error_code- Informational. Optional. Documents what code might appear at runtime. Test harnesses MUST NOT assert this.Phase 2: Deprecation (1 release cycle)
error_code(legacy) andvalidation_error_code(new) for 1 releasevalid: falsePhase 3: Remove legacy field
error_codefrom fixture schemavalidation_error_codeAffected Fixture Suites
specs/conformance/fixtures/workflow/(valid.json, invalid.json, edge-cases.json)specs/conformance/fixtures/agent-identity/specs/conformance/fixtures/attribution/specs/conformance/fixtures/dispute/specs/conformance/fixtures/bundle/specs/conformance/fixtures/purpose/Acceptance Criteria
oneOffor transition perioderror_coderemoved after 1 release cycle