Skip to content

perf(mcp)!: compact repeated session discovery facts - #1988

Merged
N0zoM1z0 merged 3 commits into
mainfrom
perf/session-discovery-dedup-723-20261012
Oct 11, 2026
Merged

N0zoM1z0 merged 3 commits into
mainfrom
perf/session-discovery-dedup-723-20261012

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Session status repeats complete catalog descriptors and many identical tool/provider facts. Group those facts once while preserving every availability decision, effect, annotation, client requirement, provider identity, and ordered limitation. The complete Claude Code result drops from 179,054 to 41,074 UTF-8 bytes (77.06%) and stays inline.

Keep catalog counts and full-schema digests in session identity. Update named-contract consumers, verifiers, and migration guidance; complete tools/list schemas, Evidence, and text/structured parity remain validated.

BREAKING CHANGE: server_identity.catalog.tools is removed; tool_availability becomes {client_requirements, groups}; provider capabilities become {provider, shared_limitations, groups} sets. Migration examples are in docs/mcp-contracts.md.

Validation:

  • All 31 CI jobs pass at PR head 5d5a208. Focused source checks cover 104 passing tests and 2 provider-condition skips, full typechecking, lint, generated docs, and all 172 SDK-converted tool schemas. Three composition health/reset/observer matchers now assert the grouped provider shape. Resource-stopped local check:fast wrappers are retained as failures; the independent single-threaded full typecheck and standard CI gate pass.
  • Fresh integration build/test source 0f25fad combines current main 1f17ac8 and the PR head. Actual Claude Code 2.1.109 loads the authored skill, complete inline session status, and JavaScript Evidence and finishes, with zero pending server waits. The loopback model fixture establishes client behavior; live LLM token billing is unmeasured.
  • Real headless Linux Hopper 6.4.2 passes semantic queries, strings/calls/CFG, ephemeral comment readback, failed-query recovery, close/reopen, and unchanged 23,264-byte ELF checks.
  • Native headless Windows Ghidra 12.1.4/JDK21 passes 16 public MCP calls on a 1,536-byte PE: known return/call edge, mapped bytes, recovery, P0 mutation denial, close/ping, unchanged target, empty TEMP, and zero owned Job processes. Its cold overview completes in 165.3 s with real progress notifications, a 60 s inactivity timeout reset on progress, and a 280 s total cap. Peak owned family RSS is 1,002,405,888 bytes under the 2304 MiB guard. This validates the opt-in reset path; a fixed default 60 s deadline is unverified in this run. The timing is an unpaired observation, not a provider speedup claim.

Refs #723. Broader discovery/schema and Evidence repetition work remains open.

N0zoM1z0 and others added 2 commits October 12, 2026 05:36
Keep catalog identity as exact counts and full-schema digests. Preserve all
static tool facts and dynamic availability inline, and complete definitions
through tools/list. Validate the result through the native Claude client.

Use canonical contracts in published-package verification and require the
complete tool set. Deduplicate shared missing navigation operations.

Refs #723

BREAKING CHANGE: server_identity.catalog.tools is removed from binary_session
and CLI capabilities/providers. MCP consumers should use tool_availability
for names, surfaces, effects and annotations, and tools/list for full schemas.

Co-authored-by: Kaoru0822 <[email protected]>
Group equal tool availability facts with explicit inherited client requirements.
Group provider capability facts by exact provider identity and preserve ordered
limitations as a shared prefix followed by each group's suffix. Keep canonical
tools/list schemas and complete Evidence inline, and migrate shared verifiers
and authored skill documentation to the new public representation.

Refs: #723
BREAKING CHANGE: binary_session tool_availability is an inventory object with
groups and explicit client_requirements; provider capabilities use provider
sets with groups and shared_limitations across session and CLI projections.

Co-authored-by: Kaoru0822 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T23:13:10.763012Z 5d5a208 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.

@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: ff8f76b417

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

Comment on lines +227 to +229
providers.set(key, {
identity: descriptor.provider,
descriptors: [descriptor],

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 Use the resolved provider identity in capability groups

When Ghidra or Hopper is selected, its capability descriptors still contain the static identity whose version is null, while profile resolution supplies a concrete version in analysis_provider_binding (and the selected candidate's outer provider). Grouping directly on descriptor.provider therefore emits top-level and selected-candidate capability sets under a stale identity, so consumers expanding the new representation lose known provider provenance or observe contradictory identities. Rebind selected-provider descriptors to the resolved profile identity before grouping them.

AGENTS.md reference: AGENTS.md:L17-L17

Useful? React with 👍 / 👎.

Match grouped capabilities within their exact provider identity when checking health failures, target-switch resets, and observer isolation. Preserve the operation-level reasons, availability, and dispatch counts.

Co-authored-by: Kaoru0822 <[email protected]>
@N0zoM1z0
N0zoM1z0 merged commit 6395e8d into main Oct 11, 2026
31 checks passed
@N0zoM1z0
N0zoM1z0 deleted the perf/session-discovery-dedup-723-20261012 branch October 11, 2026 23:40
@github-actions github-actions Bot mentioned this pull request Oct 11, 2026
3 tasks done
larinyo added a commit to larinyo/rea that referenced this pull request Oct 12, 2026
Resolved src/catalogIdentity.ts by keeping upstream's code-point name
ordering (compareUnicodeCodePoints) inside this branch's exported
createCatalogDigests, which still digests returns_target_content per
tool. Upstream removed CATALOG_IDENTITY.tools (morluto#1988), so this branch's
returns_target_content addition to that list is dropped together with
the test assertion that read it; the digest coverage test remains.

Resolved docs/mcp-contracts.md by taking upstream's reorganized guide
and re-inserting the "Untrusted target content" section at the end of
"Tool results". Nothing was superseded; upstream has no untrusted
content marker or server instruction.
@morluto morluto added performance Performance regressions, scaling limits, and bounded-resource work area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added the area: mcp MCP server, transport, and tool registration label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp MCP server, transport, and tool registration area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior performance Performance regressions, scaling limits, and bounded-resource work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants