feat: lock complete tool annotations and output schemas (v4) - #110
Merged
Merged
Conversation
ernestprovo23
marked this pull request as ready for review
October 2, 2026 03:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What & why
MCP tool annotations and output schemas could change without invalidating an approved lock. This adds schema level 4 commitments to their complete objects, so a hint flip, schema removal, or output constraint relaxation triggers drift. Python and TypeScript share 111 conformance vectors, and the existing notification-triggered runtime tools/list gate compares the new fields for v4 locks.
DSE-1539. Existing v1–v3 locks remain readable and self-consistent; a v4 re-pin requires review rather than silently inheriting approval. SDK capture validates each tool while preserving raw fields that SDK models would discard, including extensions and explicit nested nulls. Annotation hints never grant authority; raw annotations are excluded from reports.
Type of change
Validation
pip-audit==2.9.0 --skip-editablepass without exclusions.2e7c3aa7bbca44230a306125b682ad2d83311910after closing both findings. Release-only delta review also APPROVED final head8eb8393f12ef968d660e8e0c68c3f89d7ff1a29d(read-only / git clean; 23 example tool digests independently reproduced; PyJWT hashes match PyPI).Release validation repairs
The existing CI audit rejected PyJWT 2.13.0. Both dev/CI and Action locks now pin 2.15.1 with regenerated artifact hashes; other package pins stay unchanged. Primary source: PyJWT advisory and patched versions. The three example locks were re-captured from unchanged pinned server versions at v4; their synthetic example approvals are explicitly documented. No CI gates were disabled.
Notes for reviewers
Review
capture.py,drift_tool_metadata.py, the v4 strict reader, and the Python/TypeScript migration paths first. Fixture lock and generated vector changes are intentional. Historical v3 bytes are frozen in a separate fixture.The protocol-neutral Warden/human-checkpoint design in
docs/plans/2026-10-02-tool-integrity-upgrade.mdis proposal-only. This PR adds no signing keys, new protocol adapters, kernel runtime wiring, fleet service, or changed guard fail-open/block defaults. Hashes/signatures establish commitments and provenance; they do not certify safe behavior or malicious-content freedom.Security-specific release classification: merge remains subject to the existing exact-head human receipt for
6237658374ed41b335e2f6e92b0e177d9f2f2538. No package version bump or publication is included.