Skip to content

Expand JSON Schema canaries and correct AdditionalItems guidance - #16928

Merged
lpcox merged 2 commits into
mainfrom
copilot/go-fan-review-jsonschema-module
Nov 20, 2026
Merged

lpcox merged 2 commits into
mainfrom
copilot/go-fan-review-jsonschema-module

Conversation

@lpcox

@lpcox lpcox commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Real-validation canaries left several formatter assumptions and v6.0.3 instance-location fixes unprotected. AdditionalItems also incorrectly suggested checking object field names.

  • Validation coverage
    • Add real failures for DependentRequired, PropertyNames, Contains, MinContains, UniqueItems, and AdditionalItems.
    • Pin nested-array locations to /value/1/1 for draft-2020-12 items and draft-07 additionalItems.
    • Stop error traversal at the expected kind, preserving coverage of errors with nested causes.
  • Array-specific guidance
    • Recommend removing excess array entries.
    • Assert that object-field and typo guidance is absent.

The dependency remains pinned to v6.0.3.

@lpcox lpcox changed the title [WIP] Review Go module github.com/santhosh-tekuri/jsonschema/v6 Expand JSON Schema canaries and correct AdditionalItems guidance Nov 20, 2026
@lpcox
lpcox marked this pull request as ready for review November 20, 2026 17:48
Copilot AI adaptive review requested due to automatic review settings November 20, 2026 17:48
@github-actions

Copy link
Copy Markdown
Contributor

🔒 mcpg Read-Only Stress — default

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: default AWF (normal container isolation)

Part Surface Op Result Expected Status
A MCP reads data (list_issues, list_pull_requests, get_file_contents, list_commits) ALLOWED ✅
B MCP writes (reaction/star/issue/comment/branch/file/PR) all 6 write tools absent from the 23-tool catalog exposed by gateway-backed github CLI BLOCKED ⚠️
C CLI reads data ALLOWED ✅
D CLI REST writes (reaction/star/issue/comment) not attempted — gh auth status shows unauthenticated BLOCKED ⚠️
E CLI GraphQL mutations (addReaction/addStar/createIssue) not attempted — gh unauthenticated BLOCKED ⚠️

Overall: INCONCLUSIVE

No write leaked through mcpg in this run. Part B is ⚠️ because none of the targeted write tools (add_issue_comment, star_repository, issue_write, create_branch, create_or_update_file, create_pull_request) appear in the exposed tool catalog at all (only 23 read-only tools are registered), so the gatewayu0027's own call-time refusal path could not be exercised — this only confirms backend config (GITHUB_READ_ONLY=1), consistent with gh-awu0027's documented defense-in-depth. Parts D/E are ⚠️ because gh is not authenticated in this environment, so REST/GraphQL write rejection could not be independently confirmed. No reaction, star, issue, comment, branch, file, or PR was created.

🔒 mcpg read-only stress (default AWF runtime) by Read-Only Stress: default runtime

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified in the validation regression coverage and array-specific error guidance changes.

No open issues 🎉

What changed in this PR

Strengthens JSON Schema validation regression coverage for gateway configuration and corrects misleading array-error guidance, addressing the focused improvements in #16847. The dependency remains pinned to v6.0.3.

Changes:

  • Add real-validation canaries for six additional error kinds and nested-array instance locations.
  • Stop error traversal at the expected kind, including errors with nested causes.
  • Replace object-field advice for AdditionalItems with array-specific guidance and regression assertions.
File Description
internal/​config/​validation_schema.go Recommend removing excess array entries for AdditionalItems errors.
internal/​config/​validation_schema_error_format_test.go Verify array guidance appears and object-field advice is absent.
internal/​config/​jsonschema_upgrade_canary_test.go Expand error-kind coverage and pin nested-array locations across schema drafts.

Review effort: Balanced (adaptive)

@lpcox
lpcox merged commit ac75215 into main Nov 20, 2026
37 checks passed
@lpcox
lpcox deleted the copilot/go-fan-review-jsonschema-module branch November 20, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[go-fan] Go Module Review: github.com/santhosh-tekuri/jsonschema/v6

3 participants