Skip to content

feat(mcp)!: harden contracts and Evidence references - #274

Merged
morluto merged 21 commits into
mainfrom
codex/rea-2-mcp-contract-hardening
Jul 16, 2026
Merged

morluto merged 21 commits into
mainfrom
codex/rea-2-mcp-contract-hardening

Conversation

@morluto

@morluto morluto commented Jul 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add a network-free direct-dependency freshness gate before builds, checks, packing, and publication
  • make all 88 MCP contracts strict and self-describing with canonical effect-derived annotations
  • project safe actionable validation issues through MCP and CLI-compatible error envelopes
  • replace authoritative embedded Evidence inputs with session-owned references and compact structured results
  • align installed skill identity with generated version, tool count, and catalog digest metadata
  • keep complete schemas while preferring capability- and session-scoped tool advertisement over schema truncation

Root cause and implementation

SDK prevalidation produced text-only failures, runtime and advertised object closure could drift, side-effect hints were distributed across contract declarations, and several comparison workflows accepted caller-owned Evidence payloads. Dependency and installed-skill drift were also not checked against canonical local identity.

REA now owns one typed validation boundary, derives wire metadata from ToolEffects, resolves Evidence IDs against the session ledger with operation and predicate checks, serializes text exactly from structured content, and exposes immutable Evidence through resource links. Managed workflows added on current main were integrated into the same reference and capability model and are hidden when no session ledger exists.

This is a breaking contract release and includes BREAKING CHANGE metadata for Release Please.

Verification

  • npm run check — 138 files, 955 tests passed
  • npm run knip
  • npm run jscpd
  • npm run verify:package — isolated package, 88 MCP tools and 6 prompts
  • Codex autoreview — dependency-path, schema-closure, sessionless-registration, and byte-gate-removal commits reviewed clean

Real Hopper, Ghidra, browser, and replay verification was not run because provider operation behavior was not changed.

Closes #261
Closes #264
Closes #265
Closes #266
Refs #24
Refs #101

@morluto
morluto marked this pull request as ready for review July 16, 2026 11:49
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto force-pushed the codex/rea-2-mcp-contract-hardening branch from 438b020 to 2b06433 Compare July 16, 2026 12:17
@morluto
morluto merged commit 4df42ab into main Jul 16, 2026
13 checks passed
@morluto
morluto deleted the codex/rea-2-mcp-contract-hardening branch July 16, 2026 12:48
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…hardening

feat(mcp)!: harden contracts and Evidence references
@morluto morluto added enhancement New feature or request area: mcp MCP server, transport, and tool registration labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration enhancement New feature or request

Projects

None yet

1 participant