Repository navigation
Conversation
Codex Review SummaryThis 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. |
|
need to test this @N0zoM1z0 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3aa4796d0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
[Medium impact] The PR appears safe to merge based on the source review. SummaryAdds
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Read family selection"] --> B{"Valid IDs?"}
B -->|No| C["Reject startup"]
B -->|Yes| D{"Scope set?"}
D -->|Yes| E["Compose selected catalog eagerly"]
D -->|No| F["Keep complete catalog and existing startup choice"]
E --> G["Disable excluded tools"]
E --> H["Filter prompts and public status"]
E --> I["Compute scoped identity and doctor expectations"]
Reviews (21) · Last reviewed commit: "Merge remote-tracking branch 'upstream/m..." · Reviewed by Greptile |
…ing Hopper offer Review on morluto#3026 surfaced four defects in the family-scoping feature: - binary_session tool_availability was built from the full catalog without consulting the registration scope, so a scoped-out tool reported available:true while every call failed with the disabled-tool error. The status report is authoritative for agents, so it now filters through EvidenceMcpServer.advertisesTool and cannot direct a call that always fails. - Setup merged REA_MCP_TOOL_FAMILIES into providerEnvironment before discoverSetupState, and discovery treats a nonempty provider environment as a configured provider, suppressing the Hopper install offer on a fresh machine. The scope is a registration setting, so it now merges after discovery. - McpToolFamilies parsed to string[], letting TypeScript accept family names the runtime rejects. An enum over TOOL_FAMILY_IDS now drives the output type so the parsed result retains ToolFamilyId. - The --tool-families help claimed omit advertises every tool, but omission preserves a saved selection. The help text now says so and explains how to restore the full catalog. Verified with check:fast (typecheck+lint) and focused tests across the MCP boundary, conformance, and setup suites.
d993ffe to
d338046
Compare
…ing Hopper offer Review on morluto#3026 surfaced four defects in the family-scoping feature: - binary_session tool_availability was built from the full catalog without consulting the registration scope, so a scoped-out tool reported available:true while every call failed with the disabled-tool error. The status report is authoritative for agents, so it now filters through EvidenceMcpServer.advertisesTool and cannot direct a call that always fails. - Setup merged REA_MCP_TOOL_FAMILIES into providerEnvironment before discoverSetupState, and discovery treats a nonempty provider environment as a configured provider, suppressing the Hopper install offer on a fresh machine. The scope is a registration setting, so it now merges after discovery. - McpToolFamilies parsed to string[], letting TypeScript accept family names the runtime rejects. An enum over TOOL_FAMILY_IDS now drives the output type so the parsed result retains ToolFamilyId. - The --tool-families help claimed omit advertises every tool, but omission preserves a saved selection. The help text now says so and explains how to restore the full catalog. Verified with check:fast (typecheck+lint) and focused tests across the MCP boundary, conformance, and setup suites.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
I tested this PR at d993ffe on Linux with a local model. The results are in Show and tell #3098. The head has since moved to d338046, a rebase plus a status-report fix. I have not re-run on it. Short version: the families work as the PR says. Hidden tools stay out of For a 32K local model, families alone are not enough. Thanks, 0xLLVEL, for this PR. 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
…LIES Agents pay context for every advertised tool schema; clients that send catalog payloads per request can spend more context on the 191-tool advertisement than on the investigation. The MCP server now disables tools outside the selected families: tools/list omits them and calls fail with the SDK disabled-tool error. Select a scope through the REA_MCP_TOOL_FAMILIES environment variable or the new `rea setup --tool-families` flag, which writes it into the registration entry; doctor validates the selection against the published family ids. The tool-family grouping moves from the catalog build script into src/contracts/toolFamilies.ts so runtime advertising and the product catalog share one source; the regenerated catalog is byte-identical.
The scope flag is only useful when a reader can map their investigation to family ids. Add a workflow table covering firmware, web, Android, native, managed, and Electron analysis plus evidence-only sessions, verified against each family's actual inventory, with `session` called out as the near-universal base and the start-narrow add-on-disabled-tool strategy spelled out. Groupings describe coverage rather than frozen tool counts because the catalog inventory moves with new contracts.
…ing Hopper offer Review on morluto#3026 surfaced four defects in the family-scoping feature: - binary_session tool_availability was built from the full catalog without consulting the registration scope, so a scoped-out tool reported available:true while every call failed with the disabled-tool error. The status report is authoritative for agents, so it now filters through EvidenceMcpServer.advertisesTool and cannot direct a call that always fails. - Setup merged REA_MCP_TOOL_FAMILIES into providerEnvironment before discoverSetupState, and discovery treats a nonempty provider environment as a configured provider, suppressing the Hopper install offer on a fresh machine. The scope is a registration setting, so it now merges after discovery. - McpToolFamilies parsed to string[], letting TypeScript accept family names the runtime rejects. An enum over TOOL_FAMILY_IDS now drives the output type so the parsed result retains ToolFamilyId. - The --tool-families help claimed omit advertises every tool, but omission preserves a saved selection. The help text now says so and explains how to restore the full catalog. Verified with check:fast (typecheck+lint) and focused tests across the MCP boundary, conformance, and setup suites.
d338046 to
aaa9217
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
The Electron and browser-hosted workflow row omitted the browser family, which disables list_browser_targets, inspect_web_page, and analyze_web_bundle. Users starting from an HTTPS page therefore could not collect scripts with that scope. Add browser so the recommended scope covers page inspection, bundle analysis, and capture export without a follow-up setup change. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Thanks, @CassieFox23 — really appreciate you actually running this on Linux with a local model and going into the detail on multi-Node (22/24/26) and the 32K context findings. The bit about session,direct + compact schemas still being ~28.6K tokens, and that a 10-tool client allowlist is what finally let Qwen3.8-27B get 3/3, is exactly the kind of real-world signal this feature needs. I haven't re-run on the new head either; if you're up for another run or just a quick look after this lands, I'd rather know if anything changed. Thanks again for the review and the testing — and for the tip about the client-side allowlist being the real lever for constrained models, I'll keep that in mind for docs/next steps. |
Keep both MCP env entries and migrate the family scope onto upstream's refactored compact presentation and catalog identity.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Thanks for the kind words, 0xLLVEL! One small fix for the PR description: my handle is CassieFox23, and the model was Qwen3.8-27B, not Qwen3-27B. I'm re-running the checks on the newest head today and will post the results here. 🤖 Generated with Claude Code (Opus 5.5) 🦊 |
|
TL;DR: Scoping still works on the newest head, e28e01d. The status report now lists only advertised tools. Its Edit: I retested on the newest head, 24395c9. Results are here. The What changed since d993ffeThe branch was rebased onto main. 16c24d2 adds Results
One gap. The Sizes are tokens from the Qwen3.8-27B vocabulary. Only name, description and schema count. The window is 32,768.
The numbers moved because main moved, not because of this PR. Main added the tool Electron docs scope. Still not run
Thanks, 0xLLVEL, for the fixes and for asking for another run. My earlier results are in this comment. Sizes of single scopes and docs scopesTokens as above, against the earlier run.
Test setupCommands🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Hey @0xLLVEL, I took a closer look at the current head In I reproduced the inventory-comparison behavior with an isolated Node source-logic test, not a production REA/MCP run. I'd suggest a focused Happy to contribute a small regression to your existing PR if that fits your direction. I haven't changed or pushed any source for this. |
The upstream merge resolved three files against the branch side, silently undoing main's Flutter ABI selector escaping and the HTTP exchange snapshot taken before awaiting cancellation. Point the profile-digest experiment at the options-object identity API, keep doctor's identity remediation from naming binary_session outside the session scope, and describe the Electron docs scope without telling users to add a family it already includes. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]>
# Conflicts: # scripts/lib/catalog-builders.mjs
The previous merge resolved both files to the branch side. The lint-staged `oxlint --fix` hook rewrites the restored lines back, so this commit skips the hook to keep byte parity with upstream: the escaped solidus matches main, and draining awaits a snapshot of the exchange set rather than the live one. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]>
|
Thanks, @CassieFox23 — this round found two things I had missed, and both are fixed in The merge regression you foundYou were right that 82be5d6 changed the Dart AOT selector back. It was not the only one: the same merge also reverted One detail worth knowing if you re-run this: restoring the escaped form is not stable through the pre-commit hook. Electron docs rowFixed. The two open bot threads
Merge state and promptsI merged main's tip ( On the prompt text: diffing Validation on this head: If you are up for one more run, |
|
TL;DR: At 3f83509 my open items are fixed, and the 12 test files I ran pass on Node 22, 24 and 26. The one I could only read is the Edit: this comment first said I was retesting. The results are below. Thanks, 0xLLVEL, for the clear write-up and the fixes. My last run was on f6928c4, in this comment. This time I used built code on Linux, the My earlier findings
The other checks from last time still pass. Under Second opinion on
|
| Check | Node 22.23.1 | Node 24.18.0 | Node 26.11.1 |
|---|---|---|---|
| 12 focused test files, 118 tests | pass | pass | pass |
tsc --noEmit |
pass | pass | pass |
Last time I ran 7 files and 73 tests. The five new files cover the server identity. They cover the output and compact schema profiles, and the Flutter tools.
Not run
rea doctor,rea mcp doctorandrea setup --tool-families. Two test files call doctor, so I skipped them:Setup.configuration.test.tsandmcpDoctor.test.ts. So I could not repeat yourrea doctor --client cursorcheck. I readDoctor.tsonly.- A merged tree at main's tip, aa51e43. It conflicts.
- Token sizes for each scope.
- The live server on Node 22 and 26, and any real MCP client or model.
- Whether you also skipped the pre-push hook.
- CI. On this head I see only the author-declaration check and the Greptile check, both green.
Test setup
- Box: Nobara 44 (Fedora 44 base), Linux 7.2.11
- CPU: AMD Ryzen 9 5900X, 12 cores / 24 threads
- RAM: 32 GB DDR4-3600
- Node: 22.23.1, 24.18.0, 26.11.1
- Head / base: 3f83509 / aa53c06. Main at the end: aa51e43.
- Other: the live server runs used Node 24, an empty home folder and a clean environment. Oxlint 1.87.0 and oxfmt 0.72.0 came from the repo's lockfile. The box was shared with other test jobs, so I report no timings.
Commands
git archive 3f835092e | tar -x -C <head dir> # also aa53c0653 (base) and d8a9673fc (merge check)
npm ci --ignore-scripts; npm run prepare; npm run build:cached; npm run test:prepare # Node 24
tsc --noEmit # Node 22, 24, 26
npm run test:focused -- src/contracts/toolFamilies.test.ts \
tests/conformance/contracts/mcpToolFamilies.test.ts \
tests/boundary/mcp/toolFamiliesMcp.test.ts \
src/application/binary/BinarySessionStatus.test.ts \
tests/boundary/mcp/targetContentFramingMcp.test.ts \
tests/boundary/mcp/promptMcp.test.ts \
tests/boundary/filesystem/clientRegistrationStatus.test.ts \
tests/boundary/mcp/serverIdentity.test.ts \
tests/boundary/mcp/outputSchemaProfile.test.ts \
tests/boundary/mcp/compactInputSchemaMcp.test.ts \
tests/boundary/mcp/dartAotSummaryMcp.test.ts \
tests/boundary/mcp/flutterMcp.test.ts # Node 22, 24, 26
npm run lint; npm run format:check; npm run check:fast # Node 24
oxfmt <file>; oxlint --fix <file> # pre-commit commands, on copies of the two files
git apply --check <PR diff> # on main d8a9673fc (clean) and aa51e43 (two files fail)
The live server runs started rea mcp over stdio with REA_MCP_TOOL_FAMILIES unset, session, session,native, session,enhanced, direct and browser. Each ran initialize, tools/list, prompts/list, prompts/get, a binary_session call where it is listed, and an inspect_macho call. I also ran session,typo and session with the output profile off. I compared the unscoped tools/list with the merge base for the full and the compact input profile. None of the 12 test files mentions doctor; I checked with grep first.
🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
Resolve conflicts with morluto#5975's compact input schema default: - EvidenceMcpServer: keep the family-scoped catalog identity and use FULL_CATALOG_IDENTITY for the unscoped full profile. - mcpDoctor tests: carry the default-compact case into the shared profile table, and keep both the compiled-digest probe and the CLI inventory check. - Convert upstream's new positional createCatalogIdentity call sites (DirectAnalysisStatus, DEFAULT_CATALOG_IDENTITY, serverIdentity test) to the options object this branch introduced. Committed with --no-verify: the merge resolution must preserve upstream bytes in files the pre-commit oxlint --fix rewrite would otherwise change.
… clause The comment claimed the remediation avoids naming binary_session unconditionally, but the sentence deliberately covers both cases: doctor has no saved selection to branch on here.
|
Thanks, @CassieFox23 — the conflict you hit is resolved. Main's tip What the conflicts were
Your prediction about the digestsRight again: the unscoped digests did move, because compact is now the default advertisement. The post-merge build re-ran Scope behaviour on the merged treeLive
Those counts match what you measured on The
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6408ebfef8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| readonly promptContracts?: readonly PromptContract[] | undefined; | ||
| } | ||
|
|
||
| export const createCatalogIdentity = (options: CatalogIdentityOptions = {}) => { |
There was a problem hiding this comment.
Update the verifier for the options-object identity API
When npm run verify:claude-client runs in its default call mode, the still-current call at scripts/verify-claude-client.mjs:184-187 passes the compact presentation as the first positional argument and the output profile as the second. After this signature change, { budgetBytes: ... } is destructured as an options object with no compactPresentation and the second argument is ignored, so the verifier computes the full/full identity while the live server reports the default compact/full identity and the assertion fails; convert that caller to the named options form as well.
AGENTS.md reference: AGENTS.md:L25-L25
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in aced955e5 — this is the same defect as the Greptile thread on the same line, so one fix covers both.
Root cause. scripts/verify-claude-client.mjs still called createCatalogIdentity(compactPresentation, outputProfile) positionally after the signature moved to CatalogIdentityOptions. In default call mode the compact presentation landed in the options slot without a compactPresentation key and the profile argument was dropped, so the verifier compared the live server's compact/full identity against a full/full expectation and would fail on a healthy server.
Fix. Named options at that call site. No positional callers remain anywhere in src/, scripts/, tests/ or experiments/.
Validation. The verifier expectation recomputed from the built dist now equals the identity the default server reports (same combined digest, 213 tools / 6 prompts); an explicit full presentation still differs, so the assertion can still catch a real profile mismatch. npm run verify:claude-client itself was not run here because it requires the Claude Code CLI and a host account.
| advertisesFamily("jeb") | ||
| ? (probes.jebAnalysisAvailability?.(signal) ?? undefined) | ||
| : undefined, | ||
| probes.evmLimiterAvailability?.(signal) ?? undefined, |
There was a problem hiding this comment.
Gate the EVM probe on the artifact family
When a Linux x64 server advertises session but omits artifact, the new guards stop the Android/ADB/apktool/JEB probes but the next promise entry still invokes evmLimiterAvailability, whose production implementation performs access and stat on REA_EVM_PRLIMIT_COMMAND. If that configured path is on a slow or unresponsive mount, every binary_session request waits for a provider whose inspect_evm_interface tool is disabled; fresh remaining evidence after the reported probe-gating fix is this ungated EVM entry, so guard it with advertisesFamily("artifact") too.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in aced955e5.
Confirmed, and it is an ownership question rather than a slow-mount one. INSPECT_EVM_INTERFACE_CONTRACT is declared by EVM_TOOL_CONTRACTS, and src/contracts/toolFamilies.ts assigns those contracts to the artifact family. The production evmLimiterAvailability probes REA_EVM_PRLIMIT_COMMAND with access and stat, so a registration that omits artifact was starting work for a provider whose tool tools/list omits — the last ungated entry in probeSessionAvailability, exactly as you describe.
Fix. probes.evmLimiterAvailability is now gated on advertisesFamily("artifact"), matching the Android/ADB/apktool/JEB entries, so a session-only or session,native registration no longer touches that path at all.
Validation. tests/boundary/mcp/toolFamiliesMcp.test.ts — including "probes only advertised families for binary_session status" for session and session,android,adb — passes (8/8), and a packaged REA_MCP_TOOL_FAMILIES=session server answers binary_session successfully with 23 advertised tools and no probe of the EVM path. I have not measured this against a deliberately slow or unresponsive REA_EVM_PRLIMIT_COMMAND mount; the gate removes the call rather than bounding it.
Resolve the deferred-runtime split: EvidenceMcpServerCore now carries the family scope as plain ids plus an advertisesTool seam, and the canonical composition supplies the scoped identity through catalogIdentityForToolFamilies. Also fix what the merge surfaced: the family id inventory moves to a contract-free module so startup configuration stops loading the schema graph the deferred runtime avoids, and a scoped registration composes eagerly because the recorded catalog and its identity are build-owned and unscoped.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Merged Deferred-runtime split. Main now separates Two defects the merge surfaced, both fixed here.
Review threads. The verifier fix is in both the Greptile P1 and the Codex P2 reply; the EVM probe gate is answered on its own thread. Neither the settings-page remediation nor the pass/fail shape of the doctor report changed in this round. |
Carry the family scope in the shared MCP server core so the canonical and deferred paths agree: disabled out-of-scope registration and the availability seam live in the core, while the canonical composition supplies the tool mapping and a scope-derived catalog identity. Keep startup configuration off the canonical schema graph by validating REA_MCP_TOOL_FAMILIES against the contract-free family id inventory, and route a scoped registration through eager composition because the recorded catalog and its identity are build-owned and unscoped. Gate the EVM limiter probe on the artifact family that owns it, and update the Claude verifier to the named catalog-identity options.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Correction to my earlier summary, and the root cause of the four findings Greptile just filed: the two merge commits ( No behaviour claim in the PR body changes; only the commit the validation applies to, which now reads |
|
Thanks, 0xLLVEL, for the conflict fix, the later rounds and the correction. The head is now 5881a83, and GitHub shows the PR as conflicting with main again. I tried the merge on paper against main at b9ca37b, and three files conflict:
Edit (24 Oct): I re-read the PR's new commits on 36a6b07, without running anything. The follow-up is here. My last test run was on 3f83509, so I have not tested the newer commits. 🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
# Conflicts: # scripts/lib/catalog-builders.mjs # src/config/environment.ts # src/mcpDoctor.ts # tests/boundary/mcp/mcpDoctor.test.ts
|
Thanks, CassieFox. Head is now What I decided in each:
Verification, Windows x64 and Node 26.12.0: Two Windows-only failure groups, both reproduced on main
Two more tests only exceeded the 30 s default; the live identity case takes 36 s here and passes with a raised timeout. Not run: Linux and macOS, Node 22 and 24, a real MCP client, per-scope token sizes, |
|
TL;DR: The two open Codex items are fixed in the code I read. But main moved on again, GitHub shows the PR as conflicting, and eight files conflict in a text-level merge. Reading also shows a new gap on merge: main's new tool Thanks, 0xLLVEL, for fixing both Codex items and for merging main again. I only read code this time. My earlier findingsHead now is 36a6b07. The head I last tested was 3f83509.
Conflict stateGitHub showed this PR as conflicting. I tried a text-level merge of main d24ad4f with this head, from base 8c4f96e. Eight files conflict:
A gap that would show after the mergeMain's 02e0497 (#6946) adds
It has the same shape as the three artifact tools you added in the last merge. I read this from the code and did not run it. GitHub shows two checks on this head:
Both are green. No build or test job ran on this head, and I do not know why. Not run
Test setup🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
Scope MCP discovery, setup, doctor, status and recovery guidance by selected tool families using one contract inventory and shared catalog identity. Preserve default discovery, canonical validation and complete Evidence. Fixes #3246. Builds on #3026. Real libcrypto workflow verifies all 5,367 exports and identical complete Evidence. Static/source/build/docs/Windows/package/Greptile checks pass; ten assertions reproduced identically on clean main and feature across Node 24/22, with cancelled coverage explicitly unverified. Merge uses the user-authorized bypass for baseline failures and unchecked human-readiness declarations, without attesting human review. Co-authored-by: 0xLLVEL <[email protected]> Co-authored-by: Codebuff <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
|
Closing as superseded: the tool-families work has landed on Thanks to @CassieFox23 for the review rounds on this PR — the scoped-doctor, No further commits will be pushed to |
Summary
Closes #3246.
REA advertises its complete MCP tool catalog (200+ tools) to every client. Agents pay context for each advertised schema, which prices local models with small context windows out entirely. This PR scopes the advertised tool set by family through
REA_MCP_TOOL_FAMILIES(env var, orrea setup --tool-families <ids>persisted into the registration entry). Unset behavior is unchanged: the complete catalog is advertised exactly as before.Problem and expected behavior
A local 32K-context model driving REA over MCP gets a ~249K-token tool advertisement it cannot fit, so the investigation never starts (independent benchmark in discussion #3098: full list refused at once;
session,direct+ compact still 28K tokens and failed; only a 10-tool allowlist at 4.4K tokens succeeded 3 of 3). Users need a supported, server-side way to narrow the advertised set to the families their investigation needs, without client-side filtering hacks.Change and scope
REA_MCP_TOOL_FAMILIESselection (env var orrea setup --tool-families <ids>, persisted into the registration entry) omits out-of-scope schemas fromtools/listentirely.Tool ... disabledinvalid-params error.scripts/lib/catalog-builders.mjsintosrc/contracts/toolFamilies.ts, so runtime advertising and the product catalog derive from one grouping.sessionas the near-universal base; browser family included for Electron and browser-hosted apps.src/contracts/toolFamilyIds.ts, so startup configuration validates a scope without loading the canonical schema graph the deferred MCP runtime deliberately avoids;src/contracts/toolFamilies.tskeeps the contract ownership.scripts/verify-claude-client.mjscalls the named-options catalog identity API, and the EVM limiter probe is gated on theartifactfamily like the other provider probes.Follow the contribution scope. No target execution, injection, mutation, or protection recovery is introduced; scope decision: not applicable beyond the documented MCP advertisement contract.
Contract and boundary impact
src/contracts/toolFamilies.tsowns the grouping); earliest changed stage is server startup/registration.tools/listomits out-of-scope tools; direct out-of-scope calls return the SDK disabled-tool error;rea setup --tool-familiesand doctor validation added. Default (unset) output is unchanged.docs/public/product-catalog.json), package, or installation impact: catalog derives from the same grouping;metadata:checkvalidates the family inventory against everyTOOL_CONTRACTSentry. No build outputs committed.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
This change only filters which schemas are advertised and which calls are accepted; it adds no new target interaction:
Evidence and regression coverage
src/contracts/toolFamilies.test.ts(unit: every catalog tool resolves to a family; unknown names resolve undefined)tests/conformance/contracts/mcpToolFamilies.test.ts(family inventory covers everyTOOL_CONTRACTSentry)tests/boundary/mcp/toolFamiliesMcp.test.ts(tools/listomission + disabled-call error at the boundary)src/application/Setup.configuration.test.ts(scope persisted into the registration env; status reports honor scope)session,direct+compact failed, 10-tool allowlist succeeded 3 of 3. That benchmark used PR feat(mcp): scope advertised tools by family through REA_MCP_TOOL_FAMILIES #3026 atd993ffeb1plus a client-side allowlist; this PR provides the server-side half.tools/listwithREA_MCP_TOOL_FAMILIES=session,directreturns only in-scope tools; calling an out-of-scope tool returns the SDKTool ... disabledinvalid-params error.rea setup --tool-families <ids>persists the scope; an unknown id fails startup listing the complete valid ids.metadata:check(inventory coverage) passes on the merged tree.For evidence-bearing changes:
Validation performed
Commands below ran on
5881a830f(mergesupstream/mainatbd5d189a8, after an earlier merge of4a4bbab3c), Windows x64, Node.js v26.12.0. The merge commits alone did not carry the resolution for files that merged cleanly, so the family scope and its tests are committed separately in5881a830f; the tree it commits is the tree these commands ran against.npm ciandnpm run build:cached— clean; the build regenerated the catalog digests and the recorded MCP catalog without a changenpm run check:fast(typecheck + lint, includingverify:module-boundaries) — 2 tasks successful, 0 errorsnpm run test:focusedovertoolFamiliesMcpandmcpDoctor— 27 passednpm run test:focusedoverdeferredRuntimeandpromptMcp— 42 passed, including the new scoped-registration case and the phase test that keeps the deferred entry from loading the schema graphnpm run test:focusedoverserverIdentity,sessionMcp,compactInputSchemaMcp,outputSchemaProfile— 32 passed, 1 failed. The failure is the pre-existing win32 case atserverIdentity.test.ts:213: it comparesresolve("/packaged/rea.mjs")with the literal POSIX path, which resolves toC:\packaged\rea.mjs. I checked out unmodifiedupstream/mainat4a4bbab3c, built it, and the same case fails there identically, so it is not caused by this PR.npm run test:localoversrc/contracts/toolFamilies.test.tsandtests/conformance/contracts/mcpToolFamilies.test.ts— 12 passed, including the new assertion that the id inventory and the definitions stay one listnpm run docs:check— pass, including the family catalog read fromTOOL_FAMILY_DEFINITIONS; the builder throws when the families do not coverTOOL_CONTRACTSrea mcpover stdio: unset 213 tools / 6 prompts,session23/3,session,native46/3,session,enhanced37/3,direct41/0,browser12/0. No listed prompt names a hidden tool,inspect_machois refused with-32602outsidenative, andsession,typofails startup.REA_MCP_TOOL_FAMILIES=session: 23 tools listed andbinary_sessionsucceeds. Before the composition fix this path listed 213 tools and failed every call withMCP catalog identity does not match runtime.REA_MCP_TOOL_FAMILIES=session node scripts/rea.mjs mcp doctor --json— healthy, 23/23 tools, expected and observed catalog digest equalrea capabilities --json— unset andREA_MCP_INPUT_SCHEMA_PROFILE=compactshare digests;fulldiffers, so perf(mcp)!: default to compact input schema advertisements #5975's compact default survives the mergedist— equals the default server identity (213 tools / 6 prompts) and differs fromfull, matching whatscripts/verify-claude-client.mjsnow assertsnpm run verify:claude-client(needs the Claude Code CLI and a host account); a deliberately slow or unresponsiveREA_EVM_PRLIMIT_COMMANDmount (the probe is no longer attempted rather than bounded); real Hopper/Ghidra provider workloads (no installation available).Compatibility, safety, and release
!/BREAKING CHANGEmarker.Author readiness
Human owner: @0xLLVEL
Before merge
type(scope): outcome.