docs(spec): RFC 10008 QUERY binding + response envelope (S-05/S-06) - #88
Open
dotnetcadet wants to merge 3 commits into
Open
docs(spec): RFC 10008 QUERY binding + response envelope (S-05/S-06)#88dotnetcadet wants to merge 3 commits into
dotnetcadet wants to merge 3 commits into
Conversation
Complete §4 Protocol Bindings (RFC 10008 QUERY primary read binding, media types + vendor-tree registration, 400/415/422 status taxonomy, Accept-Query discovery, caching/conditionals, Location/Content-Location re-fetch, CORS-preflight note, GET fallback profile) and §6 Communication (response envelope: $nodes/$edges, per-edge $status/$errors partial failure, paging metadata). Add the committed response-envelope JSON Schema (draft 2020-12) and 12 golden request/response fixtures with a manifest; all 10 envelope-bearing fixtures validate against the schema. Closes #22 Closes #23 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fix follow-up from adversarial review. Positions in the syntax-error
golden fixtures seed the N-03 conformance suite and are asserted,
deterministic fields (the README exempts only server-assigned identity).
The schema declares positions zero-based, but:
- 06 asserted column 22 (offset 38, the 'q') while offset 40 is the ')';
corrected to column 24 so line/column/offset agree.
- 08 asserted one-based line 2 alongside zero-based column 8; corrected
to zero-based line 1 to match offset 24 ('s' of 'salary').
Add docs/fixtures/validate_fixtures.py, which runs schema validation plus
a position-consistency check (recompute line/column from offset against
request.body) and exits non-zero on failure, so this can't regress.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
RFC 9651 obsoletes RFC 8941 and is what RFC 10008 references normatively. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Completes the two W01 communication specification features on one branch: §4 Protocol Bindings (the RFC 10008 QUERY binding per ratified decision D2) and §6 Communication (the response envelope), plus the committed response-envelope JSON Schema and the golden request/response fixtures that seed the N-03 conformance suite.
This is documentation/spec + committed artifacts only — no library code changes. Every normative point of roadmap §2 D2 (the 8 ratified binding changes) is reflected in §4, and issue #22's registration-path decision is made (vendor tree).
Changes
docs/specification.md§4 Protocol Bindings — expanded from skeleton into §4.1–§4.11:<Binding>/<Map>element contracts (attributes + rules); routing rules (§4.2).application/vnd.ograph.query(request, UTF-8-fixed) andapplication/vnd.ograph+json(response), with the vendor-tree registration decision per RFC 6838 §3.1/§3.2 (§4.4).Accept-Queryas an RFC 8941 List without media-type parameters, path-scoped, advertised incl. on OPTIONS (§4.6).no-transformnote, 304 semantics (§4.7).Location/Content-Locationre-fetch (§4.8); CORS-preflight note delegating enforcement host-side per D5 (§4.9); OPTIONALGET ?query=fallback profile (§4.10).$.queryplacement marker left to S-07 (§4.11).docs/specification.md§6 Communication — response envelope: result shape (§6.1),$nodessingle/collection composition (§6.2), recursive$edges(§6.3), per-edge$status/$errorspartial-failure semantics (§6.4),$urire-fetch (§6.5),$count/$total/cursor paging metadata (§6.6), and a table of deliberate deviations from the legacy sketch.designing/_old/responses/response.json(§6.7).docs/specification.mdAppendix A — one supersession row for the legacy response sketch.docs/schemas/ograph-response.schema.json— self-contained JSON Schema draft 2020-12 for the envelope.docs/fixtures/— 12 golden request/response fixtures +README.mdmanifest.Work items resolved
Closes #22
Closes #23
Testing & verification
jsonschema4.26 (draft 2020-12):Draft202012Validator.check_schema(valid metaschema).$count, single with$count, missing$status, error missingmessage, unknown top-level member, out-of-range status).docs/fixtures/README.md: basic project, filter+sort+page, edge traversal with nested project, per-edge partial failure (edge 500 / root 200), empty result, 400 syntax, 415 wrong media type, 422 policy violation, conditional 304, GET-fallback — plus Accept-Query/OPTIONS and cursor-paging fixtures.🤖 Generated with Claude Code