Repository navigation
feat(contract): v1 envelope and kind schemas, OpenAPI document, conformance kit (AFDEV-9) - #1
Merged
Merged
Conversation
…rmance kit (AFDEV-9) JSON Schema 2020-12 files for the submission envelope and the friction and review kinds; an OpenAPI 3.1.1 document for every v1 route; a conformance kit (decode fixtures, hash vectors, warning list) with a standard-library Python reference implementation that CI checks every fixture against; a Go-free CI job, `just contract`, and the develop.md entries.
… relocation, public write-path rules (AFDEV-9) A body nested deeper than 512 levels is rejected; schema_version spellings longer than 16 digits default without conversion; the RFC 3339 parser takes ASCII digits only, matches the whole string and keeps four-digit years; warnings follow content that inference moved, collapse onto coerced members and are dropped with discarded duplicates; the envelope schema states the schema_version maximum and no longer constrains context.git_dirty; kind schemas may use format: date-time and the guide checks every keyword at load. conformance/README.md now states the write-path rules, and manifest.json lists every fixture. The contract check validates examples under components.responses, discovers schema files, compares keyword_codes and the /meta limits with the reference. OpenAPI: create example without processing fields, byte limits as x-max-bytes, import warnings, MCP 202 and event-stream responses, Cache-Control on errors.
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.
What
The v1 contract as repository files, before any Go code reads them:
schemas/envelope.v1.json,schemas/kinds/friction.v1.json,schemas/kinds/review.v1.json: JSON Schema 2020-12 with the customx-keywords (x-max-bytes,x-trim,x-normalize,x-recommended,x-unique-by,x-on-violation).docs/openapi.yaml: OpenAPI 3.1.1 for every v1 route, both auth schemes, the error and warning shapes; response types$refthe schema files.conformance/: the executable contract. 19 decode fixtures (one per inference rule), 29 interaction fixtures, 23 canonical-JSON/content_hashvectors, the closed warning list, and a standard-library Python reference implementation of the write path that every fixture is checked against.README.mdinside documents the format and comparison rules.scripts/contract-check.py(PEP 723 deps,uv run --locked --script): validates the schemas against the 2020-12 metaschema, lints thex-keywords, validates every example in the schemas and the OpenAPI document, and runs the fixtures through the reference.@redocly/clilints the OpenAPI document.contract;just contract;docs/develop.mdLayout, Commands, rules and Verification;.gitattributeskeeps fixture bytes exact.Notes for review
docs/api.md; that document is rewritten in a later change.identity/,export/andimport/fixture sets are a follow-up.just check, race tests, e2e 55/55, shellcheck, skill tests 124/124,just contract.