rea/src/server
Kaoru0822 9680da76c8
perf(evidence): reuse sealed bundle reads in compare and export (#2715)
* perf(evidence): reuse sealed bundle reads in compare and export

`rea compare`, the compare_bundles MCP tool and `rea evidence-export`
read bundles through the mutable reader, so each consumer
re-authenticated every record again: compareBundles parsed both bundles
a second time and bundleDigest's serializeEvidenceBundle a third time;
export's writer parsed the source once more before serializing.

These consumers only read the bundle, so read it through the existing
sealed reader (readImmutableEvidenceBundle). Later parses hit the
immutable bundle cache. Ordinary mutable reads, kept deliberately by
#1721, are unchanged. Output is byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(process): report no remaining time after a provider deadline fires

Node timers can fire while performance.now() is still a fraction of a
millisecond short of the monotonic deadline. ProviderStartupDeadline then
reported interruption "timeout" and an aborted signal while remainingMs()
returned ceil(0.x) = 1, so polling loops guarded by remainingMs() > 0
(Hopper and Ghidra startup) could run past an elapsed deadline, and the
real-timer test "aborts a bounded wait when its real monotonic deadline
expires" failed intermittently in CI (expected 1 to be 0).

Once the deadline's own timer has classified a timeout, report zero
remaining time. A deterministic regression test fires the timer with the
monotonic clock 0.4 ms short of the deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-13 21:50:25 +08:00
..
registerApplicationTools feat(harmony): project HarmonyOS package inventory evidence (#1447) 2026-10-11 20:09:21 +08:00
registerInvestigationTools fix: order remaining outputs independently of host locale (#1867) 2026-10-12 01:10:01 +08:00
registerManagedWorkflowTools refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
EvidenceMcpServer.ts feat(server): frame analysis-target content as untrusted data (#1908) 2026-10-13 06:06:02 +09:00
admittedToolOperation.ts feat(server): frame analysis-target content as untrusted data (#1908) 2026-10-13 06:06:02 +09:00
analysisAdmission.ts fix(mcp): admit composed analysis through result bookkeeping 2026-10-10 00:35:17 +08:00
contractToolHandler.ts fix(mcp): preserve target provenance on retained partial errors 2026-10-13 05:25:15 +08:00
createServer.ts fix(artifacts): retain read cleanup ownership through CLI and MCP shutdown 2026-10-13 16:08:41 +08:00
lifecycleProgress.ts fix(hopper): add bounded analysis recovery 2026-07-24 00:33:29 +09:00
mcpClientMetadata.ts fix(server): report 2025-era client identity and features in binary_session 2026-10-09 03:20:43 +00:00
mcpProgress.ts fix(ghidra): report progress while startup is pending (#1877) 2026-10-11 23:55:39 +08:00
promptCompletion.ts fix(mcp): keep prompt completion within ready provider sessions 2026-10-12 16:27:51 +08:00
recordDerivedEvidence.ts refactor: remove forwarding exports and redundant aliases 2026-10-09 22:46:09 +08:00
registerAdbTools.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerAnalysisViewTool.ts feat(browser): inspect retained aioquic qlog JSON captures 2026-10-13 03:24:05 +00:00
registerAndroidTools.ts feat(android): add opt-in package summaries and retained manifest views 2026-10-13 10:21:53 +08:00
registerApktoolTools.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerApplicationTools.ts refactor: remove forwarding exports and redundant aliases 2026-10-09 22:46:09 +08:00
registerArtifactComparisonTool.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerArtifactTools.ts perf(native): add opt-in Mach-O summary delivery and retained pages (#2634) 2026-10-13 00:13:12 -07:00
registerBinaryDiagnosticsTools.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerBrowserScenarioTool.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerBrowserTools.ts refactor(mcp): trust validated inputs and tighten contract fixtures 2026-10-12 05:57:35 +08:00
registerBundleComparisonTool.ts perf(evidence): reuse sealed bundle reads in compare and export (#2715) 2026-10-13 21:50:25 +08:00
registerCaptureTools.ts feat(captures): discover installed protocol and field definitions (#2496) 2026-10-13 15:55:25 +09:00
registerCloseLifecycleTool.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerElectronTools.ts feat(server): frame analysis-target content as untrusted data (#1908) 2026-10-13 06:06:02 +09:00
registerEnhancedTools.ts fix(mcp): admit composed analysis through result bookkeeping 2026-10-10 00:35:17 +08:00
registerEvidenceTools.ts perf(native): add opt-in Mach-O summary delivery and retained pages (#2634) 2026-10-13 00:13:12 -07:00
registerEvmTools.ts feat(evm): add retained interface summary delivery (#2308) 2026-10-13 03:09:32 +08:00
registerFirmwareTools.ts refactor: prune obsolete provider and verification code 2026-10-12 08:59:14 +08:00
registerFlutterTools.ts perf(flutter): add opt-in retained AOT summary and string pages 2026-10-13 11:39:30 +08:00
registerFridaTools.ts fix(frida): name the argument each Frida input error rejects (#2217) 2026-10-12 23:00:59 +08:00
registerFunctionComparisonTool.ts fix(evidence): preserve call coverage in function comparisons 2026-10-13 04:12:34 +08:00
registerGoTools.ts feat(go): inspect embedded binary build metadata (#1363) 2026-10-12 11:34:02 +08:00
registerInvestigationTools.ts perf(evidence): reuse authenticated comparisons through aggregation 2026-10-13 14:39:49 +08:00
registerJavaScriptRecoveryTool.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerJavaScriptRuntimeObservationTools.ts refactor(mcp): trust validated inputs and tighten contract fixtures 2026-10-12 05:57:35 +08:00
registerJebTools.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerManagedTools.ts feat(managed): add retained metadata overview and pages (#2413) 2026-10-13 07:41:20 +08:00
registerManagedWorkflowTools.ts refactor: remove forwarding exports and redundant aliases 2026-10-09 22:46:09 +08:00
registerNativeTools.ts perf(native): add opt-in Mach-O summary delivery and retained pages (#2634) 2026-10-13 00:13:12 -07:00
registerOfficialTools.ts fix(analysis): preserve relationship coverage across evidence and replay 2026-10-12 05:57:35 +08:00
registerPcapTools.ts feat(pcap): add bounded capture summaries through CLI and MCP 2026-10-13 04:53:03 +00:00
registerPeResourcesTool.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerProcessComparisonTool.ts fix(process): align capture Evidence provider admission 2026-10-11 16:14:42 +08:00
registerPrompts.ts refactor: remove forwarding exports and redundant aliases 2026-10-09 22:46:09 +08:00
registerRecordedCrashTools.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerSessionRecordTools.ts fix(evidence): admit bundle imports across session transitions (#2303) 2026-10-13 14:45:03 +08:00
registerSessionStatusTool.ts perf(mcp)!: compact repeated session discovery facts (#1988) 2026-10-12 07:40:19 +08:00
registerSessionTools.ts fix(io): retain cleanup ownership and honor cancellation 2026-10-12 14:12:44 +08:00
registerSignalTools.ts feat(signals): discover installed decoders and option help (#2487) 2026-10-13 15:58:19 +09:00
registerSqliteTools.ts feat(sqlite): inspect offline snapshots with selective evidence (#2271) 2026-10-12 18:33:23 +00:00
registerWasmTools.ts feat(wasm): add opt-in first-call summary delivery (#2193) 2026-10-12 22:01:47 +08:00
registerWebModuleTool.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerWebNetworkCaptureTool.ts feat(browser): inspect retained aioquic qlog JSON captures 2026-10-13 03:24:05 +00:00
registerWebRuntimeTools.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
registerWebScriptTool.ts fix(publication)!: retain cleanup owners across export workflows 2026-10-11 05:17:10 +08:00
registerWebSourceLocationTool.ts refactor(server): admit complete evidence workflows and share handlers 2026-10-11 00:03:24 +08:00
runDerivedOperation.test.ts fix(ghidra): report progress while startup is pending (#1877) 2026-10-11 23:55:39 +08:00
runDerivedOperation.ts fix(contracts): preserve local inputs and comparison uncertainty 2026-10-09 06:49:02 +08:00
sessionAvailabilityPolicy.ts feat(signals): decode recordings with bounded sigrok output (#2339) 2026-10-12 20:59:02 +00:00
sessionEvidence.ts refactor: compose investigation record ownership (#845) 2026-10-07 12:10:45 +08:00
toolLogging.ts refactor: remove forwarding exports and redundant aliases 2026-10-09 22:46:09 +08:00
toolRegistrationOptions.ts feat(browser): inspect retained aioquic qlog JSON captures 2026-10-13 03:24:05 +00:00
toolResult.ts feat(server): frame analysis-target content as untrusted data (#1908) 2026-10-13 06:06:02 +09:00
toolResultEncoding.test.ts feat(server): frame analysis-target content as untrusted data (#1908) 2026-10-13 06:06:02 +09:00
toolResultEncoding.ts feat(server): frame analysis-target content as untrusted data (#1908) 2026-10-13 06:06:02 +09:00