[PR #1988] [MERGED] perf(mcp)!: compact repeated session discovery facts #4953

Closed
opened 2026-10-31 00:57:19 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1988
Author: @N0zoM1z0
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @N0zoM1z0

Base: main ← Head: perf/session-discovery-dedup-723-20261012


📝 Commits (3)

  • a1764d0 perf(mcp)!: remove repeated session catalog descriptors
  • ff8f76b perf(mcp)!: group repeated session availability facts
  • 5d5a208 test(session): migrate provider health capability assertions

📊 Changes

30 files changed (+1449 additions, -289 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/SKILL.md (+8 -2)
📝 .agents/skills/reverse-engineer-anything/references/connection-and-recovery.md (+8 -8)
📝 .agents/skills/reverse-engineer-anything/references/native-and-artifacts.md (+13 -4)
📝 docs/mcp-contracts.md (+39 -8)
📝 scripts/lib/mcp-verifier-results.mjs (+56 -2)
📝 scripts/lib/native-value-e2e.mjs (+12 -5)
📝 scripts/lib/verify-package-core.mjs (+8 -5)
📝 scripts/verify-claude-client.mjs (+71 -14)
📝 scripts/verify-package-capabilities.mjs (+9 -3)
📝 scripts/verify-package-mcp.mjs (+14 -13)
📝 scripts/verify-packaged-ghidra-windows.mjs (+14 -9)
📝 scripts/verify-published-package.mjs (+26 -9)
📝 scripts/verify-real-hopper.mjs (+5 -2)
📝 scripts/verify/android/failure-recovery.mjs (+14 -9)
📝 src/application/CapabilityInventory.test.ts (+205 -17)
📝 src/application/CapabilityInventory.ts (+67 -5)
➕ src/application/binary/BinarySessionStatus.test.ts (+391 -0)
📝 src/application/binary/BinarySessionStatus.ts (+122 -24)
📝 src/catalogIdentity.ts (+0 -11)
📝 src/contracts/toolOutputSchemaPrimitives.ts (+144 -4)

...and 10 more files

📄 Description

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 5d5a208f50. 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 0f25fada510f3d3c74dcc26327f6fd17953bd5a3 combines current main 1f17ac8228 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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1988 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `perf/session-discovery-dedup-723-20261012` --- ### 📝 Commits (3) - [`a1764d0`](https://github.com/morluto/rea/commit/a1764d0b88d47057e63746f204b72ae3567a2066) perf(mcp)!: remove repeated session catalog descriptors - [`ff8f76b`](https://github.com/morluto/rea/commit/ff8f76b417e97b372bed23badca33e2e4536f066) perf(mcp)!: group repeated session availability facts - [`5d5a208`](https://github.com/morluto/rea/commit/5d5a208f50a242ff30e8ab232ab8e42616d1f5a0) test(session): migrate provider health capability assertions ### 📊 Changes **30 files changed** (+1449 additions, -289 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/SKILL.md` (+8 -2) 📝 `.agents/skills/reverse-engineer-anything/references/connection-and-recovery.md` (+8 -8) 📝 `.agents/skills/reverse-engineer-anything/references/native-and-artifacts.md` (+13 -4) 📝 `docs/mcp-contracts.md` (+39 -8) 📝 `scripts/lib/mcp-verifier-results.mjs` (+56 -2) 📝 `scripts/lib/native-value-e2e.mjs` (+12 -5) 📝 `scripts/lib/verify-package-core.mjs` (+8 -5) 📝 `scripts/verify-claude-client.mjs` (+71 -14) 📝 `scripts/verify-package-capabilities.mjs` (+9 -3) 📝 `scripts/verify-package-mcp.mjs` (+14 -13) 📝 `scripts/verify-packaged-ghidra-windows.mjs` (+14 -9) 📝 `scripts/verify-published-package.mjs` (+26 -9) 📝 `scripts/verify-real-hopper.mjs` (+5 -2) 📝 `scripts/verify/android/failure-recovery.mjs` (+14 -9) 📝 `src/application/CapabilityInventory.test.ts` (+205 -17) 📝 `src/application/CapabilityInventory.ts` (+67 -5) ➕ `src/application/binary/BinarySessionStatus.test.ts` (+391 -0) 📝 `src/application/binary/BinarySessionStatus.ts` (+122 -24) 📝 `src/catalogIdentity.ts` (+0 -11) 📝 `src/contracts/toolOutputSchemaPrimitives.ts` (+144 -4) _...and 10 more files_ </details> ### 📄 Description 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 5d5a208f50a242ff30e8ab232ab8e42616d1f5a0. 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 0f25fada510f3d3c74dcc26327f6fd17953bd5a3 combines current main 1f17ac82282dfda1ae2dc87d99e66a8a039c0259 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:57:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4953
No description provided.