GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect policy (#1482) by dezren39 · Pull Request #1570 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 28, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Implements #1482 (Phase 1 of #1481), as triaged in queue task 1513. The schemaval core only — no call-path changes, nothing enforces yet.

What

  • New package pkgs/mcpx/internal/schemaval wrapping github.com/santhosh-tekuri/jsonschema/v6 (v6.0.3, pinned at implementation time). It is the only import site; go.mod gains exactly that one new direct dependency (plus the golang.org/x/text indirect version bump jsonschema v6 itself requires).
  • Dialect policy: no $schema = 2020-12; a declared $schema must name 2020-12, 2019-09, draft-07, draft-06 or draft-04, else a typed UnsupportedDialectError (distinct from generic compile errors).
  • No network, ever: the compiler loader refuses every URL. An unresolvable $ref — missing internal pointer or any external reference — is a typed UnresolvedRefError at compile time. A schema's own absolute $id is registered so self-references still resolve offline.
  • 1 MiB schema-size bound (settled at triage: >5x the largest legitimate schema documents in the repo), enforced as a typed SchemaTooLargeError.
  • Integer fidelity: instances decode via jsonschema.UnmarshalJSON; 2^53+1 validates exactly (tested against a maximum: 2^53 bound).
  • Flattened errors: validation failures return one line per problem, path-qualified ($.count: got string, want integer).
  • Formats are annotations in v1 (the library default, deliberately not asserted; covered by a test).
  • Dialect document at pkgs/mcpx/docs/schema-validation.md, and a mechanism note in internal/conformance/coverage_messages.go. The conformance matrix is regenerated in the same commit because it hashes the coverage files (TestMatrix).
  • internal/mcpspec is untouched; no changes to ListTools, CallTool, Client.answer, codegen, or the daemon.

Tests

Defining tests in internal/schemaval cover the full acceptance list: 2020-12 corpus (prefixItems, unevaluatedProperties, boolean schemas, $defs refs), draft-07 positional items, typed UnsupportedDialect, unresolved internal $ref, remote $ref with a counting test server observing zero HTTP requests, 2^53+1 fidelity, path-qualified flattened errors, oversize rejection, formats-as-annotations.

Verified on the laptop worktree (fleet policy: full suite via CI on this PR):

  • go test ./internal/schemaval/ — pass
  • go test ./internal/mcpspec/ — pass (includes TestNotImportedByBinary)
  • go test ./internal/conformance/ -run TestMatrix — pass

Closes #1482.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect …
a77f981
…policy (#1482)
@dezren39
dezren39 requested a review from a team as a code owner October 28, 2026 02:47
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 77a51ba3-38b1-4d77-9606-007750b7c5e4
Commits

Reviewing files that changed from the base of the PR and between db6f7d0 and d38cfb4.

Files ignored due to path filters: 1
  • pkgs/mcpx/go.sum is excluded by !**/*.sum
Files selected for processing: 8
  • pkgs/mcpx/docs/schema-validation.md
  • pkgs/mcpx/docs/spec/conformance-matrix.md
  • pkgs/mcpx/go.mod
  • pkgs/mcpx/internal/conformance/coverage_messages.go
  • pkgs/mcpx/internal/schemaval/schemaval.go
  • pkgs/mcpx/internal/schemaval/schemaval_test.go
  • pkgs/mcpx/package.nix
  • treefmt.toml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T03:35:03.912829Z d38cfb4 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 28, 2026
mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes) #1482
Closed
@dezren39

dezren39 commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · state: parked

  • Agent: repo-queue worker lane C (task 1614, small_fix)
  • Session / ID: repo-queue-worker-shift-c, 2026-10-28T03:14Z
  • Found via: queue claim
  • Task: mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes) #1482 implemented — PR feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect policy (#1482) #1570 opened; parked awaiting CI.
  • Expectation: resume = read PR feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect policy (#1482) #1570 checks fresh; merge when green (Closes mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes) #1482), then complete the task and clean the labels.
  • Links: PR feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect policy (#1482) #1570 · branch queue/1614-1482-schemaval-core · laptop worktree ~/git/fleet/1614-1482-schemaval-core

State at park

  • New package pkgs/mcpx/internal/schemaval (santhosh-tekuri/jsonschema v6.0.3, sole import site; go.mod gains exactly that one direct dependency + the x/text indirect bump the library itself requires).
  • Dialect policy (2020-12 default; 2019-09/draft-07/06/04 declared; typed UnsupportedDialectError), offline-only refs (typed UnresolvedRefError), 1 MiB bound (typed SchemaTooLargeError), path-flattened validation errors, formats as annotations.
  • Defining tests all pass on the laptop worktree: go test ./internal/schemaval/ ✓, go test ./internal/mcpspec/ ✓ (incl. TestNotImportedByBinary), conformance TestMatrix ✓ (matrix regenerated — it hashes the coverage file the mechanism note landed in).
  • Dialect doc: pkgs/mcpx/docs/schema-validation.md; mechanism note in internal/conformance/coverage_messages.go. No call-path changes; mcpspec untouched.
  • CI on PR feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect policy (#1482) #1570: all checks still pending after ~5 minutes (runner backlog) — parked rather than held.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned dezren39 Oct 28, 2026
@dezren39
fix(mcpx): vendorHash for jsonschema dep; exclude generated conforman…
d38cfb4
…ce matrix from treefmt (byte-for-byte golden, cf. parity.md); prettier the dialect doc
@dezren39

dezren39 commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · state: parked

  • Agent: repo-queue worker lane C (task 1614, small_fix — resume)
  • Session / ID: repo-queue-worker-shift-c, 2026-10-28T03:38Z
  • Found via: queue claim (resume from checkpoint awaiting_ci)
  • Task: First CI round on PR feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect policy (#1482) #1570: 13 pass, 2 real failures — both diagnosed from the job logs and fixed in d38cfb4c, pushed. Parked on the new CI round.
  • Expectation: resume = read PR feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect policy (#1482) #1570 checks fresh at head d38cfb4c; merge when green (Closes mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes) #1482), then complete the task and clean the labels.
  • Links: PR feat(mcpx): schemaval core — JSON Schema 2020-12 validator + dialect policy (#1482) #1570

Fixes in d38cfb4

  1. nix build — vendorHash. The mcpx go-modules fixed-output derivation hash changed with the new dependency; updated pkgs/mcpx/package.nix vendorHash to the value CI itself reported (sha256-Nn3r2jL1K3swJRhTJUxhbHKeQ2cDfphW6IVuAwBP8do=). (The same run also showed FlakeHub auth / GitHub rate-limit noise before the hash error — the hash mismatch was the terminal failure.)
  2. treefmt check — generated matrix. The check formats only changed files, and prettier's table padding can never be applied to docs/spec/conformance-matrix.md: TestMatrix compares it byte-for-byte with the generator (the regenerated matrix in this PR differs from main only by the input-hash line). The repo already excludes pkgs/mcpx/docs/parity.md from treefmt for exactly this reason, so the matrix gets the same exclusion in treefmt.toml (taplo-realigned comments included). My own new doc docs/schema-validation.md was prettier-formatted normally — only the generated file is excluded.
  • Local re-verification after the fixes: go test ./internal/conformance/ -run TestMatrix still passes (matrix untouched by the formatter).
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 28, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d38cfb4c53

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/schemaval/schemaval.go
Comment on lines +256 to +259
out := ve.DetailedOutput()
problems := make([]Problem, 0, len(out.Errors))
for _, u := range out.Errors {
problems = append(problems, Problem{Path: jsonPath(u.InstanceLocation), Message: u.Error.String()})

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 28, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Traverse nested validation errors before reading their messages

When an instance fails a compound schema such as {"anyOf":[{"type":"string"},{"type":"integer"}]} with input true, DetailedOutput() contains a non-leaf output unit whose Error is nil and whose failures are in Errors. Calling u.Error.String() therefore panics instead of returning a ValidationError. The upstream output implementation only populates Error on leaves in detailed mode. Recursively collect those leaves, or use the flat output API with appropriate filtering, and add a compound-schema failure test.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/schemaval/schemaval.go
Comment on lines +172 to +173
c := jsonschema.NewCompiler()
c.UseLoader(offlineLoader{})

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 28, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disable format assertions for the supported older drafts

For schemas declaring draft-04, draft-06, or draft-07, leaving the compiler at its defaults does not implement the documented formats-as-annotations policy. The upstream compiler enables format assertions whenever draftVersion < 2019, so a draft-07 string schema with "format":"email" rejects "not-an-email", despite this package promising that it validates. Explicitly suppress format assertions for those dialects as well, and extend TestFormatsAreAnnotations to cover each supported draft.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/schemaval/schemaval.go
Comment on lines +229 to +233
var ptrErr *jsonschema.JSONPointerNotFoundError
if errors.As(err, &ptrErr) {
return &UnresolvedRefError{Ref: ptrErr.URL, Err: err}
}
return &CompileError{Err: err}

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 28, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Classify missing anchor targets as unresolved references

For a schema such as {"$ref":"#missing"}, the upstream reference resolver returns *jsonschema.AnchorNotFoundError, which neither classification branch handles. Compilation therefore returns *CompileError rather than the documented *UnresolvedRefError, preventing callers from consistently identifying unresolved references using errors.As. Handle AnchorNotFoundError alongside missing JSON Pointer targets, using its Reference field, and add a missing-anchor test.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39 dezren39 mentioned this pull request Oct 28, 2026
mcpx: Phase 2 of #1481 — validate tool arguments at CallTool (enforce, -32602) + structuredContent against outputSchema (warn-only) #1483
Closed
@dezren39
dezren39 merged commit 1da6d84 into main Oct 28, 2026
19 of 20 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/1614-1482-schemaval-core branch October 28, 2026 04:51
This was referenced Oct 28, 2026
feat(mcpx): validate CallTool arguments against inputSchema (-32602), warn on output mismatch (#1483) #1596
Merged
mcpx: Phase 3 of #1481 — validate elicitation form answers against requestedSchema in client.answer #1484
Closed
feat(mcpx): validate elicitation form answers against requestedSchema (#1484) #1606
Merged
@dezren39
dezren39 restored the queue/1614-1482-schemaval-core branch November 1, 2026 07:50
@dezren39
dezren39 deleted the queue/1614-1482-schemaval-core branch November 1, 2026 16:44
This was referenced Nov 3, 2026
design(mcpx): JSON Schema validation of tool input and output — one validator at the client choke point #1481
Closed
Preserved branch: queue/1614-1482-schemaval-core — decision needed (merge / cherry-pick / drop) #3610
Closed
pm-dispatch: POST /v1/sessions and /v1/tasks answer HTTP 502 — daily upstream sync dead since 2026-11-04 #6992
Open
@dezren39 dezren39 mentioned this pull request Nov 11, 2026
fleet-stalling: Drew's expedite set has no active worker #7030
Open
5 tasks
This was referenced Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 27, 2026
Stray work audit: PRs and issues not tied to a design or roadmap item #13874
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

mcpx: Phase 1 of #1481 — schemaval core: a real JSON Schema 2020-12 validator + dialect policy (no call-path changes)

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.