Skip to content

refactor(schema): couple Zod checks with their JSON Schema constraint keywords - #10725

Merged
morluto merged 9 commits into
refactor/typed-complete-observationfrom
refactor/typed-schema-constraints
Nov 15, 2026
Merged

morluto merged 9 commits into
refactor/typed-complete-observationfrom
refactor/typed-schema-constraints

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

Third slice of plan W3 step 5. Eight constraint sites in src/domain and src/contracts wrote a JSON Schema keyword through raw .meta() next to a separately written runtime check. They now use helpers in a new owner, src/domain/schemaConstraints.ts, which add the check and its keyword together. Each declared keyword now comes from the same rule the parser enforces. Advertised MCP schemas and canonical JSON Schemas are byte-identical. The raw-json-schema-meta baseline goes from 19 to 11. Stacked on #10718.

Refs #10389 (W3 dialect work; does not close it).

Problem and expected behavior

Zod has no native check for uniqueItems, not: { enum }, code-point maxLength, dependentRequired, or value-keyed if/then requirements. Each site therefore paired a hand-written refine/superRefine with a hand-written .meta({...}) declaring the same rule. Nothing kept the two in step: a changed field list or value in one would silently disagree with the other. That leaves the advertised schema accepting what parsing rejects, or the reverse.

Expected: one helper per constraint kind owns both halves. A test proves that Ajv on the declared JSON Schema and Zod parsing accept the same samples.

Change and scope

  • src/domain/schemaConstraints.ts (new owner):
    • distinctItems(array, message): uniqueItems.
    • excludedValues(schema, values, message): not: { enum }.
    • maxCodePoints(string, max, message): maxLength, counting code points as JSON Schema does (aborting, as before).
    • requirePresence(object, rules): dependentRequired for presence rules, plus if/then for value-keyed rules (allOf when there are several). Issues follow rule order, with a per-rule message and path.
  • Sites migrated:
    • environmentManifestView.ts (template_rules), artifactToolContracts.ts (occurrence_ids) and managedToolContracts.ts (type_names): distinctItems.
    • appBuild.ts (bundle setting names): excludedValues. The now-unused isBundleSettingVariable predicate is removed from buildComputerSettings.ts.
    • flutterBuildAnalysis.ts (ABI selector): maxCodePoints.
    • sqliteDatabase.ts (row_limit/columns/row_offset require table; schema_scope: selected_table requires table), il2cppMetadata.ts (binary_architecture/generic_instances: true require binary_path) and functionDossier.ts (Swift literals and omissions together): requirePresence.
  • Guard: src/domain/schemaConstraints.ts is the exempt owner of raw-json-schema-meta. Baseline 19 → 11.

Small runtime differences, no change to which values are accepted:

  • appBuild.ts: a setting name that fails BUNDLE_SETTING_VARIABLE no longer also gets the misleading "Build host control names are reserved." issue. The old refine(isBundleSettingVariable) re-tested the regex.
  • sqliteDatabase.ts: when several selection fields lack table, issues now come in SQLITE_TABLE_REQUIRED_SELECTION_FIELDS order (row_limit, columns, row_offset), which is also the declared dependentRequired order. Before, row_offset came before columns. The messages and paths are unchanged.

Not included (remaining 11 baseline sites):

  • src/domain/stringPatterns.ts (canonicalBase64Schema allOf/not pattern) and src/domain/portableBundleName.ts (allOf/not pattern). These declare a pattern-only approximation of a broader runtime predicate; the hostname check in portableBundleName.ts is wider than its declared pattern. Coupling them needs a pattern-complement design together with the portable-pattern projector, so they are left for a separate slice.
  • src/contracts/guidedWorkflowSchemas.ts (type: "object" on a discriminated-union output root for older MCP codecs). This is a presentation fact and a candidate for a typed annotation in the output projection. It needs a check of which codecs read the canonical output schema directly.
  • The 8 src/cli sites (captureCommands.ts 2, il2cppCommands.ts 1, jsonInputArgument.ts 2, signalCommands.ts 2, utilityCommands.ts 1), left to the CLI registration workstream.

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/domain/schemaConstraints.ts owns constraint checks that Zod cannot declare natively, together with their JSON Schema keywords. The superseded paired refine + .meta() copies and isBundleSettingVariable are removed.
  • Contribution scope fit and linked maintainer decision: within the approved W3 cleanup plan (step 5); no new capability.
  • CLI and MCP/tool-catalog contract: byte-identical. The same source dump as feat(mcp)!: retire the full schema profiles and declare complete observations as a typed annotation #10718 (in-memory MCP server from source, tools/list for compact and full, advertised output schemas, and plain z.toJSONSchema(inputSchema, { io: "input" }) for every TOOL_CONTRACTS entry) shows 0 of 255 tools differing in every category, compared as serialized bytes.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: functionDossierSchema output validation is unchanged (same rule, message and path).
  • Target selection, authority, upstream behavior, and cleanup details: not applicable.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: src/domain/schemaConstraints.test.ts (new). For each helper it asserts the emitted keyword and compiles the Zod schema's JSON Schema with Ajv 2020. It then checks that Ajv and safeParse agree on accepting and rejecting each sample, including astral strings for maxCodePoints and a multi-rule allOf for requirePresence. It also checks issue order, paths and messages.
  • Before/after evidence: executed source dump described above, byte-identical.
  • User-visible CLI/MCP output: none changed, apart from the two error-issue details noted above.
  • Remaining proof gaps: no real-provider run. The change is limited to schema construction, and the existing service tests for SQLite, IL2CPP, desktop export and Ghidra function values pass.

Validation performed

  • npm run test:local -- src/domain/schemaConstraints.test.ts src/application/desktop/DesktopApplicationExport.test.ts src/application/sqlite/SqliteDatabaseService.test.ts src/application/il2cpp/Il2cppMetadataService.test.ts src/domain/analysisView/il2cppMetadataView.test.ts src/domain/absoluteAnalysisInputPaths.test.ts src/domain/analysisView/analysisView.test.ts src/domain/functionComparison.test.ts src/ghidra/GhidraFunctionValues.test.ts src/contracts/toolSchemaMetadata.test.ts: 394 passed
  • npm run typecheck: passed
  • node scripts/verify/architecture-guards.mjs --shrink-baselines: passed; baseline 19 → 11
  • npm run check:fast: passed
  • Before/after schema dump: 255/255 identical in tools/list compact, tools/list full, output schemas and plain input schemas

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Accepted and rejected inputs are unchanged; see the two issue-detail notes above.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none affected.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T05:58:23.842890Z c5d7676 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge.

Summary

This PR moves paired runtime checks and JSON Schema keywords into schemaConstraints.ts. The latest changes also move pattern declarations into that owner and keep the object-root hint for guided_workflows in its advertised output.

  • Selector lists reject repeats through one shared schema rule.
  • Related fields share one check for what must appear together.
  • Bundle settings check reserved names after checking their format.
  • Flutter ABI labels use the same code-point limit in parsing and JSON Schema.
  • Base64 and portable-name schemas build pattern declarations from their checks.
  • Guided-workflow output keeps its object root only in the advertised MCP schema.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  C[Constraint declaration] --> H[schemaConstraints helpers]
  H --> Z[Zod runtime checks]
  H --> J[Canonical JSON Schema]
  A[Typed presentation annotations] --> P[Advertised schema presenter]
  J --> P
  P --> M[MCP tools/list]
Loading

Reviews (8) · Last reviewed commit: "refactor(schema): declare pattern approx..." · Reviewed by Greptile

…ots 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
@morluto
morluto merged commit 83a8b66 into refactor/typed-complete-observation Nov 15, 2026
1 check passed
@morluto
morluto deleted the refactor/typed-schema-constraints branch November 15, 2026 05:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5d7676705

ℹ️ 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".

z.string().min(1, ABI_SELECTOR_MESSAGE),
ABI_SELECTOR_MAX_CHARACTERS,
ABI_SELECTOR_MESSAGE,
).regex(/^[^\x2f]*$/u, ABI_SELECTOR_MESSAGE);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply the ABI regex before attaching maxLength metadata

Calling .regex() after maxCodePoints() creates a new Zod schema without the helper's maxLength metadata, although its runtime refinement remains. Consequently, the CLI --schema and MCP input schema for inspect_dart_aot admit ABI labels longer than 1010 code points that runtime parsing rejects. Previously, .meta({ maxLength: ... }) followed .regex(), preserving agreement. Move the regex into the schema passed to maxCodePoints() so the declaration survives; the existing Flutter CLI/MCP grammar tests cover these oversized inputs.

AGENTS.md reference: AGENTS.md:L39-L39

Useful? React with 👍 / 👎.

morluto added a commit that referenced this pull request Nov 15, 2026
…rvations 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.
morluto added a commit that referenced this pull request Nov 15, 2026
…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.
@morluto morluto added the area: domain Domain logic, errors, and pure functions label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant