-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
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 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)
- Accept both
error_code(legacy) andvalidation_error_code(new) for 1 release - Fixture schema validates either field is present when
valid: false
Phase 3: Remove legacy field
- Remove
error_codefrom 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
- New field names documented in fixture README
- JSON Schema updated with
oneOffor transition period - All test harnesses (TS, Go) updated to read new field
- Legacy
error_coderemoved after 1 release cycle - Cross-language test harnesses updated
Metadata
Metadata
Assignees
Labels
No labels