Title: mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes) · Issue #1482 · developing-today/code · GitHub
Open Graph Title: mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes) · Issue #1482 · developing-today/code
X Title: mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes) · Issue #1482 · developing-today/code
Description: Phase 1 of design #1481 (JSON Schema validation of tool input and output). Design doc: files/designs/code-mcpx-json-schema-validation.md in the keep-the-four-repos-healthy goal workspace. Origin gap: dezren39/darwin-nix#254 — its accepta...
Open Graph Description: Phase 1 of design #1481 (JSON Schema validation of tool input and output). Design doc: files/designs/code-mcpx-json-schema-validation.md in the keep-the-four-repos-healthy goal workspace. Origin ga...
X Description: Phase 1 of design #1481 (JSON Schema validation of tool input and output). Design doc: files/designs/code-mcpx-json-schema-validation.md in the keep-the-four-repos-healthy goal workspace. Origin ga...
Opengraph URL: https://github.com/developing-today/code/issues/1482
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes)","articleBody":"Phase 1 of design #1481 (JSON Schema validation of tool input and output). Design doc: `files/designs/code-mcpx-json-schema-validation.md` in the keep-the-four-repos-healthy goal workspace. Origin gap: dezren39/nix#254 — its acceptance requires the validator decision recorded before implementation; that decision is recorded on #1481 (adopt `github.com/santhosh-tekuri/jsonschema/v6` behind `internal/schemaval`; `internal/mcpspec` stays the test-only protocol-frame validator).\n\n## Scope\n\nBuild the validator core only — **no call-path changes, nothing enforces yet**:\n\n- New package `internal/schemaval` (name indicative; settle at triage) wrapping `github.com/santhosh-tekuri/jsonschema/v6`; it is the **only** package importing the dependency. Add the dependency to `pkgs/mcpx/go.mod` (cause recorded on #1481: full 2020-12 support is a MUST row in mcpx's own conformance matrix; the library passes the JSON-Schema-Test-Suite and covers drafts 4/6/7/2019-09/2020-12).\n- Dialect policy: a schema with no `$schema` compiles as 2020-12; a declared `$schema` must name 2020-12, 2019-09, draft-07, draft-06 or draft-04 — anything else returns a distinct, typed `UnsupportedDialect` error.\n- **No network, ever:** the compiler's loader resolves only inline/already-registered resources. An external `$ref` is a typed `UnresolvedRef` compile error; an internal unresolvable `$ref` is likewise a compile error. Fetching is not an option the API exposes.\n- Compilation is bounded: a maximum schema size (settle the number at triage against real catalog schemas) — an oversized or pathological schema fails compilation as invalid rather than consuming the daemon.\n- Validation API: compile once from `json.RawMessage`, validate decoded instances; instances must be decoded the way the library requires (`jsonschema.UnmarshalJSON`) so >2^53 integers keep numeric fidelity. Validation errors flatten to a concise path-carrying form, e.g. `$.count: expected integer, got string`.\n- Formats are annotations, not assertions, in v1 (`format: email` alone never fails validation).\n- Dialect document: add the supported-dialect list + the policies above to `pkgs/mcpx/docs/`, and note in `internal/conformance/coverage_messages.go` that the validator mechanism exists (row closures land with Phases 2–3, not here).\n- Package comment in `schemaval` must state the division of labour plainly: `mcpspec` = protocol frames, tests only; `schemaval` = tool/elicitation schemas, in the binary.\n\nOut of scope: any change to `ListTools`, `CallTool`, `Client.answer`, codegen, or the daemon; enforcement of any kind; format assertion.\n\n## Acceptance\n\n- Defining tests pass: (a) 2020-12 keyword corpus incl. `prefixItems`, `unevaluatedProperties`, boolean schemas, `$defs` internal refs; (b) declared draft-07 schema compiles and validates per draft-07; (c) unsupported `$schema` dialect → `UnsupportedDialect` error, distinct from a generic compile error; (d) unresolvable `$ref` → compile error; (e) schema with a remote `$ref` → compile error and **zero** HTTP requests observed by a counting test server; (f) integer `9007199254740993` (2^53+1) validates as `integer` and fails a `maximum: 9007199254740992` check correctly; (g) a value violating a nested required/type rule returns the path-qualified error form.\n- `go.mod` gains exactly one new direct dependency; `internal/mcpspec` is untouched and `TestNotImportedByBinary` still passes.\n- Dialect document exists in `pkgs/mcpx/docs/` stating supported dialects, the no-network rule, and formats-as-annotations.\n- Full suite passes: `cd pkgs/mcpx && go test ./...` (via CI on the PR per fleet policy).\n\n---\nagent-note:v1 — filed by the repo design architect (dedicated code job, pass 3, 2026-10-27) as a sub-issue of design #1481. Filed as `task/triage`: triage confirms scope against current main (package name, schema-size bound) and enqueues the implementation packet; do not implement in the triage task.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-27T17:47:05Z","url":"https://github.com/developing-today/code/issues/1482"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c9b7f00d-b42b-083f-f7e9-31c5e469320f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C26E:6AD3D:8C3C1D:B65015:6B062FB1 |
| html-safe-nonce | 97cd6895526ff0148aa655be3e243249991cfabc441d73ec56606ba71c79d04c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjZFOjZBRDNEOjhDM0MxRDpCNjUwMTU6NkIwNjJGQjEiLCJ2aXNpdG9yX2lkIjoiNzcxNTgyMjkwMTI1MzI1NTA4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4fe0685f21300835dc6c6e93f21d0360a42c75990350ca2894c644e6299625be |
| hovercard-subject-tag | issue:6064668857 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/1482/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ee9214a7562b64eaef09ba094ce79a2d0b3a6528a365e5c1f68bb230403013ea/developing-today/code/issues/1482 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ee9214a7562b64eaef09ba094ce79a2d0b3a6528a365e5c1f68bb230403013ea/developing-today/code/issues/1482 |
| og:image:alt | Phase 1 of design #1481 (JSON Schema validation of tool input and output). Design doc: files/designs/code-mcpx-json-schema-validation.md in the keep-the-four-repos-healthy goal workspace. Origin ga... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width