Skip to content

test(mcp): add strict live schema codec - #1

Merged
barbatdev merged 1 commit into
mainfrom
feat/mcp-contract-baseline-01-schema-codec
Aug 31, 2026
Merged

test(mcp): add strict live schema codec#1
barbatdev merged 1 commit into
mainfrom
feat/mcp-contract-baseline-01-schema-codec

Conversation

@barbatdev

Copy link
Copy Markdown
Owner

🔗 Linked Issue

Upstream issue: Gentleman-Programming#717 (status:approved).

This is a fork-first staging PR and intentionally does not close the upstream issue.


🏷️ PR Type

  • type:bug — Bug fix
  • type:feature — New feature
  • type:docs — Documentation only
  • type:refactor — Code refactoring (no behavior change)
  • type:chore — Maintenance, dependencies, tooling
  • type:breaking-change — Breaking change

📝 Summary

  • Add a strict test-only codec for the live MCP tool input-schema contract.
  • Normalize the bounded v1 vocabulary with deterministic JSON Pointer diagnostics.
  • Reject duplicate JSON members, trailing values, unsupported facts, and lossy number handling.

📂 Changes

File Change
internal/mcp/tool_contract_test.go Adds fixture-independent schema decoding, normalization, live-registry observation, and focused tests.

🧪 Test Plan

  • Focused MCP schema-codec tests pass.
  • go test ./internal/mcp -count=1 passes with 88.8% package coverage.
  • go build ./... passes.
  • Fixture-isolated focused and package tests pass.
  • go test ./... is fully green locally: two known macOS /var versus /private/var assertions fail outside internal/mcp.

🤖 Automated Checks

Fork-first note: the upstream issue is approved, but the fork-local governance job may not resolve an upstream issue through context.repo. The final upstream PR will use the canonical issue-closing reference.


✅ Contributor Checklist

  • The approved upstream issue is linked above.
  • Exactly one PR type is selected.
  • A matching type:feature label is requested.
  • Commits follow conventional-commit format.
  • No Co-Authored-By trailers are present.
  • No runtime behavior or fixture dependency is introduced.

💬 Notes for Reviewers

Fork-first stack, PR 1 of 3. This slice is intentionally fixture-independent and changes one file with 329 additions. PR 2 adds the versioned fixture and exact guard; PR 3 adds directional compatibility, the guarded writer, and inventory de-duplication.

@barbatdev barbatdev added the type:feature New feature label Aug 31, 2026
@barbatdev
barbatdev merged commit de085fa into main Aug 31, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant