Repository navigation
feat(mcp)!: retire the full schema profiles and declare complete observations as a typed annotation - #10718
Conversation
…plied only on the wire
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[High impact] The reviewed changes appear safe to merge; no new blocking issue was established. SummaryThe PR replaces raw observation markers with typed annotations and retires the full schema profiles.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Canonical Zod contracts] --> B[Server input and output checks]
A --> C[Advertised input projection]
D[Typed observation annotations] --> C
C --> E[Compact input schemas and guidance]
A --> F[Canonical output projection]
F --> G{Output profile}
G -->|off| H[Omit output schemas]
G -->|compact| I[Bound output schemas]
E --> J[MCP tools/list]
H --> J
I --> J
Reviews (16) · Last reviewed commit: "Merge branch 'w3/10693' into w3/10718" · Reviewed by Greptile |
…complete-observation
…complete-observation
# Conflicts: # scripts/verify/architecture-guard-baselines.json
… keywords (#10725) * refactor(schema): couple Zod checks with their JSON Schema constraint keywords * refactor(schema): declare pattern approximations and object output roots as typed annotations (#10754) * refactor(schema): declare pattern approximations and object output roots as typed annotations * fix(schema): refuse pattern declarations JSON Schema cannot state * test(schema): select guided_workflows from its contract family
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83a8b669a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
* feat(mcp)!: retire the full input and output schema profiles The compact input presentation is now the only advertised input schema, and output schemas are either omitted (`off`, the default) or bounded (`compact`). Catalog identity, the build-recorded digests and the recorded startup catalog collapse to those presentations: two digest profiles instead of six, one recorded catalog instead of two, and no input dialect baseline. Tests and verifiers that validated replies against listed full output schemas now validate against the canonical output contract, which REA already enforces server-side; tests that asserted canonical input restrictions read the canonical input schema instead of a full listing. BREAKING CHANGE: `REA_MCP_INPUT_SCHEMA_PROFILE=full` and `REA_MCP_OUTPUT_SCHEMA_PROFILE=full` are refused at startup and by `rea setup` with a configuration error naming the setting. Remove the setting from the client registration (or rerun setup with `REA_MCP_INPUT_SCHEMA_PROFILE=compact` / `REA_MCP_OUTPUT_SCHEMA_PROFILE=compact`). `REA_MCP_INPUT_SCHEMA_PROFILE` still accepts `compact`. Server-side validation is unchanged. * test(mcp): validate replies against canonical output contracts at every listed-schema reader tools/list omits output schemas by default, so fixtures, verifiers and the Android analysis runners that read a listed outputSchema now bind the canonical contract instead. connectLocalToolsMcp and advertisedMcpToolSchemas hand the SDK a definition carrying the canonical output schema, so the SDK client and caller-supplied validators check every successful reply. * test(mcp): resolve Android runners' output contracts from the selected repository The Android efficiency runners imported the canonical output-schema helper from the harness checkout while --repository selects the revision under test. Import it from the selected repository, as the runners already do for the SDK and Ajv. * test(mcp): let Android runners compare revisions before the canonical output helper A selected revision without scripts/lib/canonical-output-schema.mjs could not start the Android runners. Choose the output contracts in one harness helper: the selected revision's canonical contracts when it has them, otherwise its listed schemas under the full output profile it still supports.
# Conflicts: # docs/development/testing.md # scripts/verify/architecture-guard-baselines.json # src/contracts/advertisedDialectBaseline.ts
…er builds its server environment The verifier deleted REA_VERIFY_SERVER_COMMAND and REA_VERIFY_SERVER_ARGS_JSON from process.env itself before reading them, so a caller selecting an installed REA command silently ran the checkout's dist/main.js. Copy the environment, as main does, so only the child's environment changes.
…wherever a listed definition is held tools/list omits output schemas by default and the full output profile is gone, so tests that handed the SDK a listed definition no longer checked complete replies. Attach the canonical output schema with withCanonicalOutputSchema at every held REA tool definition. Environment-served tools (not REA contracts), and the deferred-runtime and doctor tests that exercise per-profile listings, keep their listed definitions.
|
@greptileai Both summary points from review 12 are addressed; please re-review the current head.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…as typed annotations (#10693) * test(mcp): check advertised schemas against a portable dialect in every profile * fix(mcp): re-emit advertised patterns in a portable regex grammar * fix(mcp): present discover_tools input through the selected profile The hot-cold catalog registered discover_tools directly with the SDK, so the default compact input profile still advertised its canonical schema, including page-size defaults clients apply on their own (#5322). Route every listed input schema, transport discovery included, through one server-owned presentation, and pass the selected presentation to the deferred server, which serves recorded tool schemas but not discovery. * fix(mcp): keep the Evidence union on described borrowed inputs borrowEvidenceInput installed its advertised projection on one schema instance. A call site's .describe() rebuilds the schema from its definition, so match_native_functions advertised left and right as unconstrained values in every input profile. Install the projection in the borrowed parser's constructor so derived schemas keep it, for both borrowed inputs and borrowed arrays. * fix(mcp): validate advertised dialect by selected profile * fix(mcp): preserve schema widening through references * feat(mcp): project compact input schemas into the portable advertised dialect One projection (advertisedDialectProjection.ts) owns the compact input advertisement: one type per node, items on every array, string literals as enums, oneOf widened to anyOf, allOf merged, tuples as element unions, exclusive bounds made inclusive, and every keyword outside the dialect dropped. Each rewrite is exact or widening; server validation is unchanged. The root description and sentences for dropped cross-field constraints move to the tool description, which Codex and Zed keep. The compact baseline falls to nullable values only (29), which the dialect cannot express without narrowing an input. The gateway shape repairs (typeArrayItemUnions, hasGatewayIncompatibleShape), the second dependentRequired-to-prose copy and the strict-gateway test denylist are removed; the dialect checker gates the inline presentation instead. * feat(mcp): omit output schemas from tools/list by default No surveyed model API reads an output schema, MCP client validators repeat REA's own result validation, and complete output schemas were about 92% of the default tools/list. REA_MCP_OUTPUT_SCHEMA_PROFILE now resolves to off through one owner (resolveMcpOutputSchemaProfile); compact and full remain selectable. structuredContent is still delivered, and the deferred server serves both off and full from the recorded catalog with the matching recorded identity. Tests and artifact verifiers that validate results against complete advertised output contracts select full explicitly. * docs: describe omitted output schemas as the default in README translations * fix(mcp): select schemas in verification workflows * fix(mcp): refuse zero-padded repeat bounds and record host-specific path patterns * fix(mcp): keep projected schemas permissive * fix(mcp): keep references valid when presentation widens their targets * fix(mcp): keep a single union branch's closure scoped to its properties * fix(mcp): select complete output schemas in the Electron verifier * fix(mcp): select complete output schemas in standalone verifier probes * fix(mcp): keep an allOf member's tuple tail with its own positions * fix(mcp): relax references into negations and conditionals presentation may remove * refactor(contracts): declare root discriminators as typed schema annotations * test(mcp): select the borrowed Evidence contract from its family * fix(mcp): keep astral literals and dynamic references widening in every mode * fix(mcp): omit astral literals and relax untracked references when presentation widens * fix(mcp): select complete output schemas in every verifier transport * fix(mcp): read reference pointers by schema position, not segment spelling * fix(mcp): protect references into collapsing boolean unions and keep referencing branches out of the collapse * fix(mcp): keep reduced schemas open when their root admits names by pattern * test(mcp): keep the reduced-schema pattern case outside the size-limited block * fix(mcp): omit patterns whose classes name astral characters * fix(mcp): decide union collapse and pointer protection from canonical branches * docs(mcp): document non-u astral matching and pin BMP agreement across V8 modes * fix(mcp): keep prototype-named properties as own properties in the dialect projection * test(mcp): select full output schemas in packet and signal schema checks * test(mcp): expect the advertised base64 schema to omit the unbounded pad-bit probe * fix(mcp): protect references into unevaluated keywords lost evaluation removes * fix(mcp): validate the doctor probe reply against the canonical output contract (#10655) * fix(mcp): validate the doctor probe reply against the canonical output contract * test(mcp): replay doctor probe validation under every output profile * test(mcp): accept typed-branch nullable unions in the advertised dialect (#10649) * test(mcp): select full output schemas in HTTP session workflows * fix(mcp): emit stack-safe classes with non-ASCII members and protect draft-07 reference siblings * fix(mcp): protect references into literal siblings of relaxed draft-07 references * feat(mcp): omit output schemas from tools/list by default (#10646) * feat(mcp): omit output schemas from tools/list by default No surveyed model API reads an output schema, MCP client validators repeat REA's own result validation, and complete output schemas were about 92% of the default tools/list. REA_MCP_OUTPUT_SCHEMA_PROFILE now resolves to off through one owner (resolveMcpOutputSchemaProfile); compact and full remain selectable. structuredContent is still delivered, and the deferred server serves both off and full from the recorded catalog with the matching recorded identity. Tests and artifact verifiers that validate results against complete advertised output contracts select full explicitly. * fix(mcp): select schemas in verification workflows * fix(mcp): select complete output schemas in the Electron verifier * fix(mcp): select complete output schemas in standalone verifier probes * fix(mcp): select complete output schemas in every verifier transport * test(mcp): select full output schemas in packet and signal schema checks * fix(mcp): validate the doctor probe reply against the canonical output contract (#10655) * fix(mcp): validate the doctor probe reply against the canonical output contract * test(mcp): replay doctor probe validation under every output profile * test(mcp): accept typed-branch nullable unions in the advertised dialect (#10649) * test(mcp): select full output schemas in HTTP session workflows * fix(mcp): keep the Evidence union on described borrowed inputs (#10597) * fix(mcp): keep the Evidence union on described borrowed inputs borrowEvidenceInput installed its advertised projection on one schema instance. A call site's .describe() rebuilds the schema from its definition, so match_native_functions advertised left and right as unconstrained values in every input profile. Install the projection in the borrowed parser's constructor so derived schemas keep it, for both borrowed inputs and borrowed arrays. * test(mcp): select the borrowed Evidence contract from its family * docs(mcp): admit baseline growth only for restored contract declarations * fix(mcp): state reduced multi-type properties as typed branches, not type lists The reduced fallback derived a property's types and emitted them as a type list, which Gemini, Moonshot and Ark reject. A property whose canonical schema is anyOf string and number therefore traded a typed union for a rejected construct when the inline projection fell back. Emit one type, or anyOf typed branches, so [T, null] becomes the dialect's nullable union. * feat(mcp)!: retire the full schema profiles and declare complete observations as a typed annotation (#10718) * refactor(mcp): declare complete observations as a typed annotation applied only on the wire * test(mcp): compare complete-observation declarations with their owning text * refactor(schema): couple Zod checks with their JSON Schema constraint keywords (#10725) * refactor(schema): couple Zod checks with their JSON Schema constraint keywords * refactor(schema): declare pattern approximations and object output roots as typed annotations (#10754) * refactor(schema): declare pattern approximations and object output roots as typed annotations * fix(schema): refuse pattern declarations JSON Schema cannot state * test(schema): select guided_workflows from its contract family * feat(mcp)!: retire the full input and output schema profiles (#10841) * feat(mcp)!: retire the full input and output schema profiles The compact input presentation is now the only advertised input schema, and output schemas are either omitted (`off`, the default) or bounded (`compact`). Catalog identity, the build-recorded digests and the recorded startup catalog collapse to those presentations: two digest profiles instead of six, one recorded catalog instead of two, and no input dialect baseline. Tests and verifiers that validated replies against listed full output schemas now validate against the canonical output contract, which REA already enforces server-side; tests that asserted canonical input restrictions read the canonical input schema instead of a full listing. BREAKING CHANGE: `REA_MCP_INPUT_SCHEMA_PROFILE=full` and `REA_MCP_OUTPUT_SCHEMA_PROFILE=full` are refused at startup and by `rea setup` with a configuration error naming the setting. Remove the setting from the client registration (or rerun setup with `REA_MCP_INPUT_SCHEMA_PROFILE=compact` / `REA_MCP_OUTPUT_SCHEMA_PROFILE=compact`). `REA_MCP_INPUT_SCHEMA_PROFILE` still accepts `compact`. Server-side validation is unchanged. * test(mcp): validate replies against canonical output contracts at every listed-schema reader tools/list omits output schemas by default, so fixtures, verifiers and the Android analysis runners that read a listed outputSchema now bind the canonical contract instead. connectLocalToolsMcp and advertisedMcpToolSchemas hand the SDK a definition carrying the canonical output schema, so the SDK client and caller-supplied validators check every successful reply. * test(mcp): resolve Android runners' output contracts from the selected repository The Android efficiency runners imported the canonical output-schema helper from the harness checkout while --repository selects the revision under test. Import it from the selected repository, as the runners already do for the SDK and Ajv. * test(mcp): let Android runners compare revisions before the canonical output helper A selected revision without scripts/lib/canonical-output-schema.mjs could not start the Android runners. Choose the output contracts in one harness helper: the selected revision's canonical contracts when it has them, otherwise its listed schemas under the full output profile it still supports. * fix(scripts): keep caller launch settings when the real Hopper verifier builds its server environment The verifier deleted REA_VERIFY_SERVER_COMMAND and REA_VERIFY_SERVER_ARGS_JSON from process.env itself before reading them, so a caller selecting an installed REA command silently ran the checkout's dist/main.js. Copy the environment, as main does, so only the child's environment changes. * test(mcp): validate whole replies against canonical output contracts wherever a listed definition is held tools/list omits output schemas by default and the full output profile is gone, so tests that handed the SDK a listed definition no longer checked complete replies. Attach the canonical output schema with withCanonicalOutputSchema at every held REA tool definition. Environment-served tools (not REA contracts), and the deferred-runtime and doctor tests that exercise per-profile listings, keep their listed definitions. * test(mcp): record the advertised catalog summary without the retired full profiles Retiring the full input and output profiles leaves only the compact input and compact output listings, so the summary drops the full-profile digests and every pattern only the full listings carried. Regenerated with npm run verify:advertised-schemas -- --update-summary.
Summary
Breaking. This PR now carries two W3 slices: the typed complete-observation annotation (below) and #10841, which was collapsed into it and retires the
fullinput and output schema profiles. Whichever W3 PR finally squash-merges to main must keep the!title and theBREAKING CHANGE:footer at the end of this body.Typed complete observations
Second slice of plan W3 step 5. The four
x-rea-complete-observationmarkers become a typedcompleteObservationannotation insrc/domain/schemaAnnotations.ts. Zod'soverridehook applies it, and only inside the advertised MCP input projection. CLI--schemaand every otherz.toJSONSchemacaller now get the canonical schema without the private marker. Stacked on #10693.Refs #10389 (W3 dialect work; does not close it).
Retire the full schema profiles (#10841)
Retire the
fullinput schema profile and thefulloutput schema profile (decision D2 in the structural cleanup plan, Phase 5). Every MCP server now advertises the compact input presentation; output schemas are either omitted (off, the default) or bounded (compact). The presentation switches, catalog identity, the build-recorded digest profiles and the recorded startup catalog collapse to what remains.Refs #10509 (tracker under #10517). Stacked on #10718 (W3 advertised-dialect stack) because that stack owns the projector code this PR simplifies.
Problem and expected behavior
Typed complete observations
compare_web_capturesaccepts completenormalized_resultobjects frominspect_web_page,discover_webmcp_toolsandcapture_browser_scenario. Its advertised input shows each of them as an opaque object with an instruction, so agents are not sent the full producer schema again. That rule was written as raw.meta({ "x-rea-complete-observation": true }). The result:compare_web_captures.describeSchema) had to find a JSON keyword by spelling and rebuild the property description itself.Expected: the annotation is typed, is looked up by schema identity, and applies only in the advertised projection. Advertised MCP schemas stay byte-identical.
Retire the full schema profiles
Each schema change had to be correct in 2 input × 3 output presentations (× catalog profile × families).
fullinput is the only source of advertised constructs outside the portable dialect (#10389, a 30-key input baseline existed only for it), andfulloutput re-advertised what REA already validates server-side. Expected after this PR:tools/listinput schemas are always the compact presentation (13,312-byte budget, portable dialect, guidance appended to the tool description).REA_MCP_INPUT_SCHEMA_PROFILEaccepts onlycompact;REA_MCP_OUTPUT_SCHEMA_PROFILEacceptsoff(default) orcompact.fullfor either setting fails closed: server startup,rea mcp doctorandrea setuprefuse it with aConfigurationErrorwhosesettingsnames the setting and the accepted values.Change and scope
Typed complete observations
src/domain/schemaAnnotations.ts:completeObservation?: truepluspresentCompleteObservation(schema). It annotates a clone, so a shared result schema keeps its full form elsewhere, including the producer's output schema. The clone inherits the source's description.src/contracts/toolSchemaMetadata.ts: the advertised input projection passesoverride: presentAnnotatedInputto Zod. For an annotated schema, the override replaces the projected node with{ type: "object", description: <own description> + <instruction> }. A non-object annotated schema throws instead of being ignored.src/contracts/inputSchemaPresentation.ts: thex-rea-complete-observationbranch is removed fromdescribeSchema.webCaptureDiffSchemas.ts(inspection,webmcp) andbrowserScenarioDiffValues.ts(before_scenario,after_scenario).raw-json-schema-meta: 23 → 19.Property-name fallback description: the old branch prefixed the presenter's property-name fallback (
fallbackPropertyDescription) to the instruction. The projection now writes the schema's own description plus the instruction, so the fallback is never consulted for these nodes. No current site depends on it.inspection,before_scenarioandafter_scenariocarry their own descriptions. Thewebmcpproperty description is on its nullable wrapper, and its inner object had no fallback before either. The dump below shows identical output.Not included: the constraint
.meta()sites insrc/domain/src/contracts, which are the next slice, and the 8src/clisites, which belong to the CLI registration workstream.Retire the full schema profiles
src/config/mcpInputSchemaProfile.ts,mcpOutputSchemaProfile.ts): the enums shrink, and the refusal text lives on the schema so the environment parser and the direct parser report the same constraint.COMPACT_INPUT_SCHEMA_PRESENTATION/COMPACT_OUTPUT_SCHEMA_PRESENTATIONreplace thecompactPresentationFor…resolvers;mcpInputSchemaProfileis no longer carried inAppConfig.EvidenceMcpServerCore,EvidenceMcpServer,DeferredEvidenceMcpServerandcreateServertake a required input presentation (default compact) and default tooff; theundefined = fullrepresentation and the"full"transport branch are removed.CatalogDigestProfilesis keyed by output profile only (2 digests, was 6);FULL_CATALOG_IDENTITYis removed (scripts useDEFAULT_CATALOG_IDENTITY.counts).dist/mcp-catalog.json);mcp-catalog-full.jsonand the per-profile recorded SHA map are gone.src/contracts/advertisedDialectBaseline.tsis deleted; the input dialect is enforced at zero like outputs.REA_MCP_OUTPUT_SCHEMA_PROFILE=full,schemaVerifierEnvironment()and the local-tools fixture'sfulloverride are removed. Replies are validated against the canonical output contract (tests/fixtures/canonicalOutputSchema.ts,scripts/lib/canonical-output-schema.mjs,artifactMcpCallbinds it as the SDKtoolDefinitionoutput schema); tests that asserted canonical input restrictions readadvertisedInputJsonSchemainstead of a full listing. Per-profile test rows that only duplicated the compact row are removed; full-only checks either moved to the canonical schema or were deleted.Not included (intentionally):
src/main/deferredRuntime.ts) is kept. It now serves the only recorded catalog for the defaultoffoutput profile;compactoutput, HTTP, family scopes and Hopper targets still compose eagerly. Deleting it would move every default stdio start onto eager composition; that is a startup-time trade-off that needs measurement and maintainer buy-in, not part of this removal.rea setupdoes not strip a storedfullvalue; it fails closed and the migration below is documented. Stripping would mutate a caller-selected setting and touches the client table owned by another workstream.it.each(["compact"])tables left by the pruning are kept to limit churn.Contract and boundary impact
Typed complete observations
schemaAnnotations.tsdeclares the annotation, and the advertised input projection intoolSchemaMetadata.tsapplies it during Zod conversion. The presenter's JSON-keyword branch is removed.tools/listis byte-identical for all 255 tools in both thecompactandfullprofiles. Advertised output schemas are identical for 255/255. The plainz.toJSONSchema(inputSchema, { io: "input", unrepresentable: "any" }), the conversionjsonInputContentSchemauses for CLI JSON arguments, differs only forcompare_web_captures. The difference is the removal of its 6x-rea-complete-observationkeys; everything else is equal.rea compare-web-capturestakes its JSON documents as plain string arguments, so its--schemadoes not embed these schemas.Retire the full schema profiles
catalogIdentity.tsowns the digested presentation;EvidenceMcpServerCoreowns the listed presentation. Superseded: thefullbranches,compactPresentationFor…resolvers,FULL_CATALOG_IDENTITY, the full recorded catalog, the 6-way digest table, the input dialect baseline andschemaVerifierEnvironment.dist/mcp-catalog-full.json;dist/recordedCatalogDigests.jsrecords two profiles.Expected effects:
Evidence and regression coverage
Typed complete observations
Tests added or updated:
inputObservationPresentation.test.tsnow tests the realcompare_web_capturescontract instead of a handwritten JSON marker. It checks:inspection,webmcpandbefore_scenarionodes are opaque objects with their description plus the instruction.normalizationcontrols stay explicit.{}and rejects a string for an observation.z.toJSONSchemakeeps the full scenario declaration with nox-rea-key.inspect_web_page's output schema is unaffected.schemaAnnotations.test.tschecks that the annotation marks only the copy, that the canonical JSON Schema and parsing are unchanged, and that the source stays unannotated.Base reproduction: the new contract test fails against the previous production code with
expected '{"$schema":…' not to contain 'x-rea-'.Before/after dump (executed): a throwaway
tsxscript started the in-memory MCP server from source withREA_MCP_INPUT_SCHEMA_PROFILE=compactandfull, and recordedtools/list. It also recordedtoolOutputSchemaWithMetadata(...).output(draft-2020-12)and the plainz.toJSONSchemaof everyTOOL_CONTRACTSinput. Results on feat(mcp)!: retire the full schema profiles and declare schema facts as typed annotations #10693's head vs this branch:tools/listcompact: 255/255 identical.tools/listfull: 255/255 identical.compare_web_capturesis equal once its 6 marker keys are removed.User-visible CLI/MCP output: none changed.
Remaining proof gaps: CLI
--schemawas not run on a build. The no-change conclusion comes from source, since the command's arguments are plain strings.Retire the full schema profiles
tests/conformance/contracts/mcpInputSchemaProfile.test.tsandmcpOutputSchemaProfile.test.tsassertfullis refused (structuredsettings) by the parsers and byparseConfig;kimiClientConfiguration.test.tsasserts setup fails closed on a storedfulland leaves the file unchanged, and that an explicitcompactreplaces it (the migration path);advertisedDialect.test.tsenforces zero input dialect violations for every remaining output × catalog profile;serverIdentity.test.ts/mcpDoctor.test.tspin the two recorded digest profiles;outputSchemaProfile.test.tskeeps both remaining output profiles under the 1 MiB frame;deferredRuntime.test.tscompares deferred and eager listings for the single catalog.parseMcpInputSchemaProfile("full")andparseMcpOutputSchemaProfile("full")returnok, so the new conformance cases fail there (source-derived; not separately re-run on the base).REA_MCP_INPUT_SCHEMA_PROFILE=fullprintsREA configuration is invalid: REA_MCP_INPUT_SCHEMA_PROFILE accepts only "compact", the default. The "full" input profile was removed: remove the setting from the client registration, or set it to "compact". …and exits 1.connectLocalToolsMcpusers outside thelistTools+outputSchemaset were sampled rather than all run. Real-client verifiers (Copilot, Gemini, Claude) and real-provider verifiers were edited but not executed.Validation performed
Typed complete observations
npm run test:local -- src/contracts/toolSchemaMetadata.test.ts src/domain/browserScenarioDiff.test.ts src/domain/webCaptureDiff.network.test.ts src/domain/webCaptureDiff.resources.test.ts src/domain/schemaAnnotations.test.ts src/contracts/inputObservationPresentation.test.ts src/contracts/compactInputSchema.test.ts: 171 passednpm run test:local -- src/contracts/inputObservationPresentation.test.tswith the production change stashed: 1 failed (the new contract test), as expectednode scripts/verify/architecture-guards.mjs --shrink-baselines: passed; baseline 23 → 19npm run check:fast: passedRetire the full schema profiles
node scripts/run-typescript.mjs --noEmit— passes.npm run check:fast(typecheck + lint) — passes.npm run docs:check— passes.npm run test:focusedover 151 files (every directly changed test file plus a 1-in-12 sample ofconnectLocalToolsMcpusers and 1-in-4 ofadvertisedMcpTool/verifier-helper users), in 7 batches; every failing file was fixed and rerun. Final reruns: 44 files, 7 files, 21 files, 2 files and 5 files — all pass. OnemcpDoctor.test.tscase reported a child exit code ofnullunder concurrent load on one run and passed on rerun.npm run test:focusedover every test combininglistToolswithoutputSchema/toolDefinition(124 files, 5 batches) and the 24 tests that constructEvidenceMcpServerdirectly; the failures exposed were fixed and the final rerun (31 files) passed.npm run check:fastpasses.REA_MCP_INPUT_SCHEMA_PROFILE=full node scripts/rea.mjs mcp </dev/nulland the same withREA_MCP_OUTPUT_SCHEMA_PROFILE=full(built runtime) — each printsREA configuration is invalid: <constraint naming the setting>and exits 1.Stack update (main merge and review findings)
Merged current main through the stack (#10632 → #10658 → #10693 → this PR), kept the stack's newer owners in conflicts, kept the deleted input dialect baseline deleted, and lowered the
raw-json-schema-metabaseline for CLI.meta()sites main already removed. Review fixes:scripts/verify-real-hopper.mjscopiesprocess.envagain instead of deleting the caller'sREA_VERIFY_SERVER_*launch settings from it; every test that hands the SDK a held REA tool definition now attaches the canonical output schema withwithCanonicalOutputSchema(environment-served tools, and the deferred-runtime and doctor tests that exercise per-profile listings, keep their listed definitions).npm run check:fast: passed.npx oxfmt --check .: passed.node scripts/verify/architecture-guards.mjs: passed.npm run test:focusedover the 24 test files whose held definitions now carry the canonical output schema (3 batches: 15, 8 and 3 files): all pass (one batch first failed inenvironmentServeWritesMcp.test.ts, whose environment-served tools are not REA contracts; that file was reverted and is excluded).npm run test:focused -- tests/boundary/mcp/advertisedDialect.test.ts tests/boundary/mcp/deferredRuntime.test.ts tests/boundary/mcp/mcpDoctor.test.ts src/contracts/inputObservationPresentation.test.ts src/domain/schemaAnnotations.test.ts tests/boundary/mcp/evidenceInputContractsMcp.test.ts: 140 passed.scripts/verify-real-hopper.mjs) needs a real Hopper install; the fix is source-derived and restores main's{ ...process.env }.Compatibility, safety, and release
REA_MCP_INPUT_SCHEMA_PROFILE=full(complete advertised input guidance) orREA_MCP_OUTPUT_SCHEMA_PROFILE=full(complete output schemas intools/list).rea mcp doctorandrea setuprefuse either value with a configuration error naming the setting.env, or rerunREA_MCP_INPUT_SCHEMA_PROFILE=compact rea setup --client <id>(respectivelyREA_MCP_OUTPUT_SCHEMA_PROFILE=compact) so setup replaces the stored value. Clients that validated results against listed output schemas should rely on REA's server-side validation, which is unchanged.fullas an accepted alias would either advertise a different presentation (keeping the extra matrix this removes) or silently ignore an explicit caller choice; failing closed with the setting named is the documented fail-closed rule.dist/mcp-catalog-full.jsonremoved; breaking marker on the commit.The typed-observation slice itself changes no advertised schema; the canonical JSON Schema of
compare_web_capturesinput no longer carries the privatex-rea-complete-observationkey.Author readiness
Human owner:
Before merge
type(scope): outcome.BREAKING CHANGE:
REA_MCP_INPUT_SCHEMA_PROFILE=fullandREA_MCP_OUTPUT_SCHEMA_PROFILE=fullare removed. The server,rea mcp doctorandrea setuprefuse either value with a configuration error naming the setting. Migration: remove the setting from the client registration'senv, or rerun setup withREA_MCP_INPUT_SCHEMA_PROFILE=compact/REA_MCP_OUTPUT_SCHEMA_PROFILE=compactso it replaces the stored value.tools/listnow always advertises the compact input presentation and omits output schemas by default (compactbounds them); the package no longer shipsdist/mcp-catalog-full.json. Server-side input and output validation is unchanged, so clients that validated results against listed full output schemas should rely on it.