Skip to content

fix(protocol): make tool contract assertions reviewable - #259

Merged
ihor-sokoliuk merged 1 commit into
mainfrom
codex/test/reviewable-tool-contract
Aug 25, 2026
Merged

fix(protocol): make tool contract assertions reviewable#259
ihor-sokoliuk merged 1 commit into
mainfrom
codex/test/reviewable-tool-contract

Conversation

@ihor-sokoliuk

Copy link
Copy Markdown
Owner

Replaces the opaque whole-definition SHA-256 assertions with reviewable structural contract assertions. Exact served-versus-source equality remains for full and Lite tool catalogs, explicit snapshots retain names, annotations, required fields, property order, types, bounds, enums, and defaults, and a focused regression proves description-only wording changes are structurally inert. Verification: targeted MCP handler suite 51/51; full coverage suite 765/765 at 96.01% lines and 91.95% branches; lint and build passed; no-live built E2E 23/23; git diff --check passed.

Coverage: 96.01% lines, 91.95% branches
Copilot AI lite review requested due to automatic review settings August 25, 2026 02:57
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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

The changes are confined to test assertions, improve reviewability of the contract checks, and align with the stated intent without introducing behavioral risk.

Pull request overview

This PR updates the MCP integration tests to replace opaque whole-object SHA-256 “frozen” assertions with explicit, reviewable structural contract snapshots for tool schemas, while preserving strict served-vs-source equality checks for full and lite tool catalogs.

Changes:

  • Replace SHA-256 structural digest assertions with explicit per-tool structural snapshots (including required fields, property order, types, bounds, enums, defaults).
  • Add a regression assertion proving that description-only wording changes do not affect the structural snapshot contract.
  • Extend snapshots to include explicit propertyOrder assertions for schema properties.
File summaries
File Description
tests/integration/mcp-handlers.test.ts Reworks tool contract assertions from SHA digests to explicit structural snapshots, adding propertyOrder and a description-only invariance regression.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ihor-sokoliuk
ihor-sokoliuk merged commit 179e3fc into main Aug 25, 2026
7 checks passed
@ihor-sokoliuk
ihor-sokoliuk deleted the codex/test/reviewable-tool-contract branch August 25, 2026 03:09
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.

2 participants