memorydetective 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +6 -2
  3. package/USAGE.md +29 -0
  4. package/dist/index.js +9 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/parsers/schemaDiscovery.d.ts +88 -0
  7. package/dist/parsers/schemaDiscovery.js +144 -0
  8. package/dist/parsers/schemaDiscovery.js.map +1 -0
  9. package/dist/parsers/xctraceXml.d.ts +5 -0
  10. package/dist/parsers/xctraceXml.js +3 -0
  11. package/dist/parsers/xctraceXml.js.map +1 -1
  12. package/dist/tools/analyzeAllocations.d.ts +5 -1
  13. package/dist/tools/analyzeAllocations.js +17 -1
  14. package/dist/tools/analyzeAllocations.js.map +1 -1
  15. package/dist/tools/analyzeAnimationHitches.d.ts +5 -1
  16. package/dist/tools/analyzeAnimationHitches.js +17 -1
  17. package/dist/tools/analyzeAnimationHitches.js.map +1 -1
  18. package/dist/tools/analyzeAppLaunch.d.ts +3 -0
  19. package/dist/tools/analyzeAppLaunch.js +17 -1
  20. package/dist/tools/analyzeAppLaunch.js.map +1 -1
  21. package/dist/tools/analyzeHangs.d.ts +63 -3
  22. package/dist/tools/analyzeHangs.js +143 -19
  23. package/dist/tools/analyzeHangs.js.map +1 -1
  24. package/dist/tools/analyzeNetworkActivity.d.ts +99 -0
  25. package/dist/tools/analyzeNetworkActivity.js +312 -0
  26. package/dist/tools/analyzeNetworkActivity.js.map +1 -0
  27. package/dist/tools/analyzeTimeProfile.d.ts +10 -1
  28. package/dist/tools/analyzeTimeProfile.js +63 -8
  29. package/dist/tools/analyzeTimeProfile.js.map +1 -1
  30. package/dist/tools/countAlive.d.ts +35 -1
  31. package/dist/tools/countAlive.js +124 -29
  32. package/dist/tools/countAlive.js.map +1 -1
  33. package/dist/tools/inspectTrace.js +112 -18
  34. package/dist/tools/inspectTrace.js.map +1 -1
  35. package/dist/tools/recordTimeProfile.d.ts +83 -0
  36. package/dist/tools/recordTimeProfile.js +135 -0
  37. package/dist/tools/recordTimeProfile.js.map +1 -1
  38. package/dist/tools/replayScenario.d.ts +4 -4
  39. package/dist/tools/summarizeTrace.d.ts +2 -2
  40. package/dist/tools/verifyFix.d.ts +27 -0
  41. package/dist/tools/verifyFix.js +78 -4
  42. package/dist/tools/verifyFix.js.map +1 -1
  43. package/dist/types.d.ts +28 -0
  44. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,39 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.14.0] - 2026-05-15
10
+
11
+ Trace-side reliability + breadth release. v1.13 shipped `summarizeTrace`, the trace-to-summary-card-in-one-call play. v1.14 fixes two parser bugs that were causing it to return empty results against real Apple-produced traces, expands schema coverage to include hang risks + network activity, robustens the analyzer pipeline against future xctrace schema renames, and adds three opt-in UX paths around the macOS 26.x xctrace wedge regression (pre-flight probe, auto-open Instruments, README callout). Plus FLEX-inspired memgraph size view on `countAlive` and an MLeaksFinder + DebugSwift-inspired whitelist on `verifyFix`. 11 changes landed across one day. Suite 546 -> 626 (+80 tests). 37 MCP tools.
12
+
13
+ ### Fixed
14
+
15
+ - **`inspectTrace` + `summarizeTrace` now work against real Apple-produced `.trace` bundles.** The previous implementation ran `xctrace export --xpath '/trace-toc/run'`, which returns "This node has no content to export." against bundles produced by `xcrun xctrace record` (and by Instruments.app GUI saves). Cascaded into `summarizeTrace` reporting "No user-perceptible perf events detected" even when the trace had 35 hangs and 44k time-profile samples. Fix switches discovery to `xctrace export --toc` and adds async parallel xpath row-count queries for the 5 known analyzer schemas. `parseTraceToc` also now accepts self-closing `<table schema=X/>` (Apple's TOC shape) in addition to the open-close form (test fixtures), extracts device/OS from `<device>` attributes, and reads `<start-date>` for the recording timestamp. Validated end-to-end against a Time Profiler trace from a physical iPhone 17 Pro Max: 40 schemas detected, summarizeTrace headline becomes "1164ms hang at t=89.01s. Likely user-visible freeze." 8 new tests against the real Apple TOC fixture.
16
+ - **`analyzeTimeProfile` now returns real symbol names instead of the weight column.** Two cascading bugs: (1) the parser keyed cells by schema mnemonic, so the backtrace cell was at `row.stack`, not `row.backtrace`; (2) `XctraceValue` only captured `@_fmt`, dropping `@_name` from `<frame>` and `<binary>` elements where the symbol identity lives. Added an `XctraceValue.name` field and rewrote `analyzeTimeProfile` to walk `row.stack.nested.frame.name` with fallback to the leaf frame's binary name for unsymbolicated hex addresses. Validated end-to-end against the same Time Profiler trace: top symbol becomes `CFStringHashCString` (2429 samples), followed by `-[CoreTelephonyClientMux _computeNotificationSet_sync:completion:]` (2214). Unsymbolicated frames cluster by binary as `libsystem_kernel.dylib (0x24c0aacd5)` etc. 2 new tests.
17
+
18
+ ### Added
19
+
20
+ - **`analyzeNetworkActivity` MCP tool (37th, `[mg.trace]`).** Parses the `network-connections` schema from a `.trace` recorded with a Network template. Returns per-request URL / host / method / status code / response time / bytes in / bytes out, plus aggregates: total bytes in/out, longest + average response time, status-code buckets (2xx / 3xx / 4xx / 5xx / n/a), top-N by duration (which calls blocked the user), top-N by bytes (which calls bloated the budget), and per-host aggregates (which SDKs are chatty). The pure helper `analyzeNetworkActivityFromXml` accepts multiple plausible mnemonic names per field (time / event-time / start / connect-time, url / host / endpoint, bytes-in / response-bytes / received-bytes, etc.) so it survives xctrace column-name drift across iOS versions. Registered in `inspectTrace.SCHEMA_TO_ANALYZER` so the discovery path auto-suggests it when the trace has a Network schema. 15 new tests on the parser plus 4 on the host-extraction helper. Closes the "network is slow" / "chatty SDK" / "slow launch from one API call" coverage gap in the trace family.
21
+
22
+ ### `supportStatus[]` unified status surface (v1.14 item I)
23
+
24
+ - **New `SupportStatus` type in `src/types.ts`** with `kind` (one of `potential-hangs`, `hang-risks`, `animation-hitches`, `time-profile`, `allocations`, `app-launch`, `network-connections`), `status` (`available` / `partial` / `not_exportable` / `not_present` / `failed`), optional `reason`, optional `sourceSchemas`. Mirrors XcodeTraceMCP's surface shape so cross-tool LLM drivers can branch consistently. All 6 trace-side analyzers (`analyzeHangs`, `analyzeAnimationHitches`, `analyzeTimeProfile`, `analyzeAllocations`, `analyzeAppLaunch`, `analyzeNetworkActivity`) now return a populated `supportStatus[]` array. `analyzeHangs` returns 1 entry by default and 2 when hang-risks XML is also provided (one per schema). `analyzeTimeProfile`'s SIGSEGV path surfaces the workaround tip in `supportStatus[0].reason`. Old `status: DataStatus` and `notice?: string` aliases stay on each result with `@deprecated` JSDoc for backwards compatibility with v1.13 callers; both alias and new field always agree on the status value. 10 new cross-analyzer tests verifying the kind / status / reason / sourceSchemas surfacing per analyzer.
25
+
26
+ ### Pattern-matching schema discovery refactor (v1.14 item B)
27
+
28
+ - **New `src/parsers/schemaDiscovery.ts` module** with SCHEMA_FAMILIES (11 families: hangs, hang-risks, animation-hitches, time-profile, time-sample, allocations, app-launch, memory, network, energy, leaks), CANONICAL_SCHEMA_NAME fallbacks, and `discoverSchema` / `discoverSchemas` / `fetchDiscoveredSchemas` helpers. Each family maps to a list of case-insensitive RegExp patterns deliberately conservative so they don't false-positive on unrelated schemas. The async `fetchDiscoveredSchemas` runs `xctrace export --toc` once and bulk-resolves multiple families in one pass. Inspired by XcodeTraceMCP's pattern-matching approach.
29
+ - **All 5 trace-side analyzers refactored** (`analyzeAllocations`, `analyzeAnimationHitches`, `analyzeAppLaunch`, `analyzeTimeProfile`, `analyzeHangs`) to call `fetchDiscoveredSchemas` before their xpath query. Survives future Apple renames: when the trace uses a renamed schema name, discovery picks it up; when nothing matches, falls back to the canonical pre-v1.14 hardcoded name (preserves backwards compat). `analyzeHangs` bulk-discovers all three schemas it consumes (hangs + hang-risks + time-profile) in a single TOC pass.
30
+ - Cost: one extra `xctrace --toc` invocation per analyze call (~100-500ms on real traces).
31
+
32
+ - **`recordTimeProfile` auto-opens Instruments.app on timeout (opt-in).** Set `MEMORYDETECTIVE_AUTO_OPEN_INSTRUMENTS=1` to make a timed-out recording fire-and-forget invoke `open -a Instruments <tracePath>` so the partial `.trace` opens in the GUI. Instruments.app on macOS 26.x can still symbolicate and display traces the `xctrace export` CLI path rejects, giving a manual escape hatch. The response gains an `openedInInstrumentsApp: boolean` field reporting whether the open was invoked. Off by default to avoid spamming agent / CI runs. XcodeTraceMCP-inspired UX pattern. 4 new tests on the env-gated helper.
33
+ - **`recordTimeProfile` pre-flights the xctrace wedge on macOS 26.x simulator attach.** New 2-second probe runs before the user's actual recording. When the probe times out, recordTimeProfile bails fast with the same `workaroundNotice` instead of waiting the full `durationSec + 30s grace` on a wedge. Cuts user-visible failure latency from `~70s` (a 30s recording with the timeout wrapper firing) to `~8s` (probe wrapper window). Gated to the known-broken combo by default: macOS 26.x host + simulator target + attach mode. `--launch` mode is excluded so we never double-launch the app. New `MEMORYDETECTIVE_PREFLIGHT_XCTRACE=1` forces on; `0` forces off. 7 new tests covering the env-flag overrides, platform detection, target/mode gating, and `MEMORYDETECTIVE_SUPPRESS_PLATFORM_ADVISORY=1` propagation.
34
+ - **`countAlive` returns per-class `instanceSizeBytes` + `totalBytes` and accepts `sortBy: "count" | "totalBytes"`.** Inspired by FLEX's Live Objects "Size" sort column. The `.memgraph` format already carried per-class size data (cycle-side `[N]` annotations + reference-tree per-class totals); we just were not surfacing it. New `countByClassWithBytes` pure helper aggregates both. `sortBy: "totalBytes"` is FLEX-equivalent memory-budget rank; default `"count"` preserves v1.13 ranking. Per-instance size is the first non-null observed (cycle-side) or `round(totalBytes / count)` (reference-tree fallback). Validated against a real abandoned-memory memgraph: top by totalBytes surfaces 2 MB NSMutableDictionary, 1.3 MB CFString; `actionableCounts[]` (framework-noise filtered) leads with 800 KB Kernel Pointers, 460 KB CGDataProvider. 5 new tests.
35
+ - **`verifyFix` accepts `expectedAliveClasses[]` whitelist + curated default list.** Singletons, framework registrars, and persistent caches legitimately stay alive across before/after snapshots. Pre-v1.14 they landed in `regressionClasses[]` and could flip the verdict to FAIL on otherwise-clean fixes. New `expectedAliveClasses?: string[]` schema input (substring patterns, case-insensitive) + `disableDefaultWhitelist: boolean` (default false). Exported `DEFAULT_EXPECTED_ALIVE_CLASSES` constant: 11 entries sourced from DebugSwift's `Performance.LeakDetector.swift` curation (system VCs like `UICompatibilityInputViewController` + `UIPredictionViewController`, internal views like `PLTileContainerView`, OS-retained windows like `UIRemoteKeyboardWindow`). Whitelist hits are moved out of `regressionClasses[]` into a new `expectedAlive: string[]` field on the response for transparency, without affecting magnitude / verdict computation. MLeaksFinder + DebugSwift-inspired UX pattern. Validated against real notelet memgraphs: user whitelist of `[pthread_mutex_t, SwiftUI.ObjectCache, NSCache]` filtered 5 entries (including substring matches for both Font and Color ObjectCaches). 5 new tests.
36
+ - **`analyzeHangs` now reads the `hang-risks` schema alongside `potential-hangs`.** xctrace emits two complementary hang-related schemas in Time Profiler / Hangs templates: `potential-hangs` (measured durations) and `hang-risks` (runtime risk annotations like "Hang Risk" / "Severe Hang Risk" narrative events with backtraces). Pre-v1.14 we only read the former. The result schema gains optional `risks: HangRiskEntry[]` and `risksTotals: { rows, bySeverity }` populated when the second schema is exported, absent otherwise. New pure `analyzeHangRisksFromXml` helper. The async wrapper fires both exports in parallel via Promise.all; hang-risks failure is non-fatal. Diagnosis appends "N hang risk annotations from the iOS runtime" with severe count when the bySeverity bucket has any "Severe ..." entries. XcodeTraceMCP-inspired schema discovery extension. 9 new tests.
37
+
38
+ ### Documentation
39
+
40
+ - **README + USAGE.md gained a `macOS 26.x xctrace record` callout.** `xcrun xctrace record --time-limit Ns` against iOS simulator targets is broken on macOS 26.x. The recording wedges past the requested time limit, exits when SIGKILL fires, and produces a `.trace` bundle that fails template export. Apple-side regression; survives Xcode 26.5 (build 17F42, xctrace 16.0) per the 2026-05-15 re-validation. Hits every `xctrace`-based tool the same way. README highlights the issue near the top with `task_for_pid` callout; USAGE.md Troubleshooting gains a ranked recovery list (older macOS host, Instruments.app GUI, physical device, wait for Apple). Trace-side analyzers (`inspectTrace`, `summarizeTrace`, `analyzeHangs`, `analyzeTimeProfile`, `analyzeAnimationHitches`, `compareTracesByPattern`) all work normally against Instruments-recorded `.trace` bundles, so the workaround path stays automatable end-to-end after the recording step.
41
+
9
42
  ## [1.13.0] - 2026-05-14
10
43
 
11
44
  Trace-depth synthesis differentiator. v1.11 added `inspectTrace` (discovery), v1.12 added cross-schema correlation inside `analyzeHangs`. v1.13 ties everything together: one call returns a cross-schema summary card tuned for direct presentation to the user, instead of chaining 5-6 analyzers manually and reasoning over the JSON.
package/README.md CHANGED
@@ -17,12 +17,14 @@
17
17
  - **MCP-native.** Plugs into Claude Code, Claude Desktop, Cursor, Cline, and any other MCP client. The agent drives the full investigate → classify → suggest-fix loop without you opening Instruments.
18
18
  - **Honest about its limits.** No mocked outputs, no over-promises. Hangs analysis works clean from `xctrace`; sample-level Time Profile is parsed when `xctrace` symbolicates the trace and returns a structured workaround notice when it can't (the underlying `xctrace` SIGSEGV on heavy unsymbolicated traces is an Apple-side limitation we surface explicitly). Memory Graph capture works on Mac apps and iOS simulator; physical iOS devices still need Xcode.
19
19
 
20
- > **What's new in v1.13** (2026-05-14): trace-depth synthesis differentiator. New `summarizeTrace` MCP tool (36th tool) takes a `.trace` and returns BOTH structured per-area data AND a pre-rendered compact markdown card (<10 KB) in a single call. Chains inspectTrace + the 5 analyzers in parallel, builds cross-area correlations (hangs overlapping with hitches "main-thread block likely caused the dropped frames"), surfaces a 1-sentence headline ranked by user-impact, and suppresses empty sections to reduce noise. Counterpart `/summarize-trace` MCP prompt tells the agent to present the markdown verbatim instead of paraphrasing structured output. The "trace-to-summary-card-in-one-call" play vs trace MCPs that go deep on single-schema access. 523546 tests.
20
+ > **What's new in v1.14** (2026-05-15): trace-side reliability + breadth release. Fixes two parser bugs that were causing `inspectTrace` + `summarizeTrace` to return empty results against real Apple-produced traces (xpath now uses `--toc`; symbol extraction now reads frame name not weight column). New `analyzeNetworkActivity` MCP tool (37th) for the network family. Extended `analyzeHangs` to read the `hang-risks` schema alongside `potential-hangs`. Pattern-matching schema discovery refactor: all 5 trace analyzers now resolve schema names through a regex map so future xctrace renames degrade gracefully. Unified `supportStatus[]` surface across all 6 trace analyzers (XcodeTraceMCP-pattern). Three opt-in UX paths around the macOS 26.x xctrace `--time-limit` regression: a 2-second pre-flight probe (`MEMORYDETECTIVE_PREFLIGHT_XCTRACE`), auto-open of the partial `.trace` in Instruments.app (`MEMORYDETECTIVE_AUTO_OPEN_INSTRUMENTS`), and a README + USAGE callout naming the bug. FLEX-inspired `countAlive` size view (`sortBy: "totalBytes"`, `instanceSizeBytes` per class). MLeaksFinder + DebugSwift-inspired `verifyFix` `expectedAliveClasses[]` whitelist with curated default list. 546626 tests. 37 MCP tools.
21
21
  >
22
- > **Also recent**: v1.12 completed the reference-tree propagation across countAlive / findRetainers / verifyFix and added auto cross-schema correlation in analyzeHangs. v1.11 added inspectTrace, diffMemgraphs reference-tree, and CLI abandoned-memory mini-table. v1.10 closed the notelet retro feedback loop. v1.9 shipped analyzeAbandonedMemory, detectLeaksInXCTest, cleanupTraces, mainThreadViolations. Full notes in [CHANGELOG](./CHANGELOG.md).
22
+ > **Also recent**: v1.13 shipped `summarizeTrace` + `/summarize-trace` MCP prompt. v1.12 completed reference-tree propagation across countAlive / findRetainers / verifyFix and added auto cross-schema correlation in analyzeHangs. v1.11 added inspectTrace, diffMemgraphs reference-tree, and CLI abandoned-memory mini-table. v1.10 closed the notelet retro feedback loop. v1.9 shipped analyzeAbandonedMemory, detectLeaksInXCTest, cleanupTraces, mainThreadViolations. Full notes in [CHANGELOG](./CHANGELOG.md).
23
23
 
24
24
  > **Heads up for macOS 26.x users:** Apple shipped a `task_for_pid` kernel regression on macOS 26.x that blocks `leaks --outputGraph`, `heap`, AND `xctrace --template Allocations` against iOS simulator processes regardless of `MallocStackLogging`. Even Xcode's "View Memory Graph Hierarchy" hits it unless `Malloc Stack Logging` is enabled in the scheme's Diagnostics tab. memorydetective surfaces this as a proactive `platformAdvisory` on the first capture-class tool call, plus a `workaroundNotice` with `issue: "macos-26-task-for-pid-broken"` if `leaks` is invoked. **The most reliable workaround today is to target an iOS 18 simulator runtime** (install via Xcode > Settings > Platforms > +iOS 18.x). Empirically validated in the [notelet investigation](https://github.com/carloshpdoc/memorydetective/blob/main/CHANGELOG.md#unreleased) 2026-05-12 where three independent CLI memory-introspection paths all failed before iOS 18 was identified as the working escape hatch. Set `MEMORYDETECTIVE_SUPPRESS_PLATFORM_ADVISORY=1` to silence the notice once you have settled on a workaround.
25
25
 
26
+ > **Also on macOS 26.x: `xctrace record` is broken for simulator targets.** Independent from the `task_for_pid` regression above, `xcrun xctrace record --time-limit Ns` against iOS simulator processes wedges past the time limit, eventually exits when killed, and the resulting `.trace` bundle is missing template metadata. `xctrace export --toc` then fails with `Document Missing Template Error`. Re-validated against Xcode 26.5 (build 17F42, xctrace 16.0) 2026-05-15: regression survives the update. This hits the entire `xctrace`-based ecosystem the same way (`memorydetective.recordTimeProfile`, XcodeTraceMCP, and naked `xcrun xctrace record` calls all fail identically). **Workarounds:** (1) record from an older macOS host with Xcode 26.0 if you have one; (2) record via Instruments.app GUI which still works on macOS 26.x and produces a valid `.trace` that memorydetective's trace-side analyzers (`inspectTrace`, `summarizeTrace`, `analyzeHangs`, `analyzeTimeProfile`, `analyzeAnimationHitches`, `compareTracesByPattern`) read cleanly; (3) record against a physical device (the regression appears to be simulator-specific). USAGE.md > Troubleshooting has a step-by-step.
27
+
26
28
  ## Quickstart
27
29
 
28
30
  ```bash
@@ -290,6 +292,8 @@ Copilot's MCP integration moves fast. If this snippet is stale, see the [VS Code
290
292
  | `MEMORYDETECTIVE_TRACE_ROOT` | `~/Library/Application Support/memorydetective/traces` | Directory used when `recordTimeProfile.output` is a relative path. Absolute paths bypass this default for v1.8 backwards-compat. Also the default scan path for `cleanupTraces`. The directory is auto-created on first write. |
291
293
  | `MEMORYDETECTIVE_ALLOW_EXTERNAL_CLEANUP` | unset | Set to `1` to allow `cleanupTraces` to scan and delete `.trace` bundles OUTSIDE `MEMORYDETECTIVE_TRACE_ROOT`. Without it, requests that resolve outside the configured root return `ok: false` with the failure reason and delete nothing. Default-deny on destructive disk operations outside the configured boundary. |
292
294
  | `MEMORYDETECTIVE_SUPPRESS_PLATFORM_ADVISORY` | unset | Set to `1` to silence the macOS 26.x platform advisory that captureMemgraph, captureScenarioState, and bootAndLaunchForLeakInvestigation emit on first use. Useful once you have an iOS 18 sim runtime installed and do not need the reminder. |
295
+ | `MEMORYDETECTIVE_AUTO_OPEN_INSTRUMENTS` | unset | Set to `1` to make `recordTimeProfile` invoke `open -a Instruments <tracePath>` as a fire-and-forget escape hatch when xctrace times out (the macOS 26.x regression). The partial `.trace` opens in Instruments.app, which can still symbolicate + display traces the CLI export path rejects. Off by default so unattended agent runs and CI do not spam the user's GUI. The response's `openedInInstrumentsApp` field reports whether the open was invoked. |
296
+ | `MEMORYDETECTIVE_PREFLIGHT_XCTRACE` | unset (auto) | Controls the pre-flight probe in `recordTimeProfile` that detects the macOS 26.x xctrace wedge in ~3-5 seconds instead of paying the user's full `durationSec` plus 30s grace. `1` forces on regardless of platform / target. `0` forces off. When unset, the probe auto-enables on macOS 26.x simulator attach (the known-broken combo) and stays off elsewhere. Pre-flight is skipped for `--launch` mode to avoid double-launching the app. Side-effect of auto-enable: 2-second probe runs before the full recording starts. Set to `0` if you have already settled on a workaround and want maximum recording-start latency. |
293
297
 
294
298
  ---
295
299
 
package/USAGE.md CHANGED
@@ -398,6 +398,35 @@ Set `MEMORYDETECTIVE_SUPPRESS_PLATFORM_ADVISORY=1` to silence the proactive stde
398
398
 
399
399
  The `getInvestigationPlaybook({ kind: "memgraph-leak" })` response carries a `troubleshooting` field with these recovery paths inline so an LLM agent can branch deterministically.
400
400
 
401
+ ### `recordTimeProfile` times out / produces a 52K bundle that fails to export
402
+
403
+ `xcrun xctrace record --time-limit Ns` is broken on macOS 26.x for simulator targets. The recording wedges past the requested time limit, exits when SIGKILL fires, and produces a `.trace` bundle that contains only `Trace1.run/RunIssues.storedata` (no actual schema data). `xctrace export --toc` against the resulting bundle returns `Document Missing Template Error`. The bug is upstream (Apple) and survives Xcode 26.5 (build 17F42, xctrace 16.0) per the 2026-05-15 re-validation.
404
+
405
+ The symptom in memorydetective:
406
+
407
+ ```jsonc
408
+ {
409
+ "ok": false,
410
+ "recordingTimedOut": true,
411
+ "tracePath": "/tmp/x.trace",
412
+ "workaroundNotice": {
413
+ "issue": "macos-26-xctrace-record-broken",
414
+ "...": "..."
415
+ }
416
+ }
417
+ ```
418
+
419
+ It hits every `xctrace`-based tool the same way (this MCP, XcodeTraceMCP, raw `xcrun xctrace record` calls in a shell, third-party scripts wrapping the CLI). Not a memorydetective bug.
420
+
421
+ Recovery options, ranked by automation cost:
422
+
423
+ 1. **Record on an older macOS host with Xcode 26.0 if you have one available.** Pre-regression `xctrace record` produces clean traces. The 2026-05-15 validation used `~/Desktop/wishlist-tti-device.trace`, a Time Profiler trace captured this way: 91s recording, 35 hangs detected, 44 418 time-profile samples, fully analyzable by memorydetective's trace-side tools.
424
+ 2. **Record via Instruments.app GUI.** Instruments.app on macOS 26.x still produces valid `.trace` bundles. Open Instruments, pick a template, choose the simulator + app, hit Record, drive the scenario, Stop, Save. Then point `inspectTrace` / `summarizeTrace` / `analyzeHangs` / `analyzeTimeProfile` / `compareTracesByPattern` at the saved bundle. All trace-side analyzers work normally on Instruments-recorded `.trace` bundles.
425
+ 3. **Record against a physical device (USB or wireless).** The regression appears to be simulator-specific. `xctrace record --device <UUID> --launch <app>` against a real iPhone / iPad does NOT exhibit the same wedge. Use this when you have a physical target available.
426
+ 4. **Wait for Apple.** The Feedback assistant is the right escalation path. The regression has shipped through Xcode 26.4 + 26.5; expect a fix in 26.6 or later.
427
+
428
+ memorydetective's roadmap items `recordViaInstrumentsApp` (Group II-G) and the pre-flight probe (Group II-H) will narrow the manual-step surface as they land.
429
+
401
430
  ### `replayScenario` returns `workaroundNotice: { issue: "axe-not-found" }`
402
431
 
403
432
  The `axe` CLI is not on your `$PATH`. Install with:
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@ import { captureScenarioState, captureScenarioStateShape, } from "./tools/captur
22
22
  import { analyzeAnimationHitches, analyzeAnimationHitchesSchema, } from "./tools/analyzeAnimationHitches.js";
23
23
  import { analyzeAllocations, analyzeAllocationsSchema, } from "./tools/analyzeAllocations.js";
24
24
  import { analyzeAppLaunch, analyzeAppLaunchSchema, } from "./tools/analyzeAppLaunch.js";
25
+ import { analyzeNetworkActivity, analyzeNetworkActivitySchema, } from "./tools/analyzeNetworkActivity.js";
25
26
  import { renderCycleGraph, renderCycleGraphSchema, } from "./tools/renderCycleGraph.js";
26
27
  import { logShow, logShowSchema, logStream, logStreamSchema, } from "./tools/logShow.js";
27
28
  import { detectLeaksInXCUITest, detectLeaksInXCUITestSchema, } from "./tools/detectLeaksInXCUITest.js";
@@ -250,6 +251,14 @@ server.registerTool("analyzeAppLaunch", {
250
251
  const result = await analyzeAppLaunch(input);
251
252
  return formatMcpResponse(result, "analyzeAppLaunch", input.outputFormat);
252
253
  });
254
+ server.registerTool("analyzeNetworkActivity", {
255
+ title: "Analyze HTTP / connection activity from a Network trace",
256
+ description: "[mg.trace] Parse the `network-connections` schema from a `.trace` recorded with a Network template. Returns per-request URL/host, method, status code, response time, bytes in/out. Top-N rankings by duration (which calls blocked the user) and by bytes (which calls bloat the budget) plus per-host aggregates surfacing chatty SDKs. v1.14+.",
257
+ inputSchema: analyzeNetworkActivitySchema.shape,
258
+ }, async (input) => {
259
+ const result = await analyzeNetworkActivity(input);
260
+ return formatMcpResponse(result, "analyzeNetworkActivity", input.outputFormat);
261
+ });
253
262
  server.registerTool("renderCycleGraph", {
254
263
  title: "Render a retain cycle as Mermaid or DOT graph",
255
264
  description: "[mg.render] Read a `.memgraph`, pick a ROOT CYCLE by index, and emit the chain as a Mermaid graph definition (default — embeddable in markdown / GitHub) or a Graphviz DOT file. App-level classes are highlighted; CYCLE BACK terminators are styled distinctly. Use `cycleIndex` to render cycles other than the first.",
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,eAAe,EACf,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,4BAA4B,GAC7B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,YAAY,EACZ,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,iCAAiC,EACjC,sCAAsC,GACvC,MAAM,8CAA8C,CAAC;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IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Pattern-matching schema discovery for `.trace` bundles. v1.14 item B.
3
+ *
4
+ * Pre-v1.14 the trace-side analyzers hardcoded their schema names
5
+ * (`potential-hangs`, `time-profile`, etc.) into the xpath queries
6
+ * (`/trace-toc/run/data/table[@schema="X"]`). Robust as long as Apple
7
+ * never renames a schema. When they DO rename one (or split into
8
+ * `hang-risks` alongside `potential-hangs`, see item F), the analyzer
9
+ * silently returns "schema absent" against a trace that has the data
10
+ * just under a different name.
11
+ *
12
+ * XcodeTraceMCP solves this with a regex-pattern lookup: each schema
13
+ * "family" maps to a list of regex patterns; discovery walks the TOC,
14
+ * matches schema names against the patterns, returns the first hit.
15
+ * Falls through gracefully when nothing matches (callers fall back to
16
+ * the hardcoded canonical name).
17
+ *
18
+ * The patterns mirror XcodeTraceMCP's `SCHEMA_PATTERNS` plus the
19
+ * families memorydetective already analyzes:
20
+ * `hangs`, `animation-hitches`, `time-profile`, `allocations`,
21
+ * `app-launch`, `memory`, `network`, `energy`, `leaks`.
22
+ */
23
+ export declare const SCHEMA_FAMILIES: {
24
+ readonly hangs: [RegExp];
25
+ readonly "hang-risks": [RegExp];
26
+ readonly "animation-hitches": [RegExp, RegExp];
27
+ readonly "time-profile": [RegExp];
28
+ readonly "time-sample": [RegExp];
29
+ readonly allocations: [RegExp, RegExp, RegExp];
30
+ readonly "app-launch": [RegExp, RegExp];
31
+ readonly memory: [RegExp, RegExp, RegExp];
32
+ readonly network: [RegExp, RegExp, RegExp];
33
+ readonly energy: [RegExp, RegExp, RegExp, RegExp];
34
+ readonly leaks: [RegExp, RegExp];
35
+ };
36
+ export type SchemaFamily = keyof typeof SCHEMA_FAMILIES;
37
+ /** Canonical schema name we hardcoded before v1.14. Used as the fallback
38
+ * when discovery does not match anything in the TOC. */
39
+ export declare const CANONICAL_SCHEMA_NAME: Record<SchemaFamily, string>;
40
+ /**
41
+ * Pure: extract all `<table schema="X" .../>` names from a TOC XML
42
+ * string. Returns the names in document order, including duplicates
43
+ * (a trace can have the same schema appear with different filter
44
+ * attributes; the caller decides what to do with duplicates).
45
+ *
46
+ * Accepts both self-closing `<table schema="X"/>` (Apple's --toc shape)
47
+ * and open-close `<table schema="X">...</table>` (test fixtures).
48
+ */
49
+ export declare function extractSchemaNamesFromToc(tocXml: string): string[];
50
+ /**
51
+ * Pure: find the schema name in the TOC that matches the requested
52
+ * family. Returns the FIRST match in document order so deterministic
53
+ * across runs. Falls back to the canonical hardcoded name when no
54
+ * pattern matches; never returns null so callers can plug the result
55
+ * straight into an xpath query.
56
+ *
57
+ * The hardcoded fallback preserves pre-v1.14 behavior: if the trace
58
+ * uses the canonical name, the xpath still works because the canonical
59
+ * name itself matches its own family pattern.
60
+ */
61
+ export declare function discoverSchema(tocXml: string, family: SchemaFamily): string;
62
+ /**
63
+ * Pure: bulk variant. Resolves multiple families against the same TOC
64
+ * in one pass. Useful when an analyzer needs more than one schema
65
+ * (e.g. `analyzeHangs` reading both `hangs` and `hang-risks`).
66
+ */
67
+ export declare function discoverSchemas<F extends SchemaFamily>(tocXml: string, families: readonly F[]): Record<F, string>;
68
+ /**
69
+ * Async wrapper for the trace-side analyzers. Runs `xcrun xctrace
70
+ * export --input <trace> --toc` once and applies {@link discoverSchemas}
71
+ * to the result. Failures (xctrace error, parse glitch, missing trace)
72
+ * fall back to the canonical hardcoded names so the analyzer pipeline
73
+ * still works at pre-v1.14 behavior. v1.14 item B.
74
+ *
75
+ * `runCommand` is injected (not imported from runtime/exec) to keep
76
+ * this module dependency-free and unit-testable without spawning
77
+ * processes.
78
+ */
79
+ export interface SchemaDiscoveryRunner {
80
+ (cmd: string, args: string[], options: {
81
+ timeoutMs: number;
82
+ }): Promise<{
83
+ code: number;
84
+ stdout: string;
85
+ stderr: string;
86
+ }>;
87
+ }
88
+ export declare function fetchDiscoveredSchemas<F extends SchemaFamily>(runCommand: SchemaDiscoveryRunner, tracePath: string, families: readonly F[]): Promise<Record<F, string>>;
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Pattern-matching schema discovery for `.trace` bundles. v1.14 item B.
3
+ *
4
+ * Pre-v1.14 the trace-side analyzers hardcoded their schema names
5
+ * (`potential-hangs`, `time-profile`, etc.) into the xpath queries
6
+ * (`/trace-toc/run/data/table[@schema="X"]`). Robust as long as Apple
7
+ * never renames a schema. When they DO rename one (or split into
8
+ * `hang-risks` alongside `potential-hangs`, see item F), the analyzer
9
+ * silently returns "schema absent" against a trace that has the data
10
+ * just under a different name.
11
+ *
12
+ * XcodeTraceMCP solves this with a regex-pattern lookup: each schema
13
+ * "family" maps to a list of regex patterns; discovery walks the TOC,
14
+ * matches schema names against the patterns, returns the first hit.
15
+ * Falls through gracefully when nothing matches (callers fall back to
16
+ * the hardcoded canonical name).
17
+ *
18
+ * The patterns mirror XcodeTraceMCP's `SCHEMA_PATTERNS` plus the
19
+ * families memorydetective already analyzes:
20
+ * `hangs`, `animation-hitches`, `time-profile`, `allocations`,
21
+ * `app-launch`, `memory`, `network`, `energy`, `leaks`.
22
+ */
23
+ export const SCHEMA_FAMILIES = {
24
+ hangs: [/potential-hangs/i],
25
+ "hang-risks": [/hang-risks?/i],
26
+ "animation-hitches": [/animation-hitches?/i, /hitches?/i],
27
+ "time-profile": [/^time-profile$/i],
28
+ "time-sample": [/^time-samples?$/i],
29
+ allocations: [/^allocations?$/i, /\balloc\b/i, /\bmalloc\b/i],
30
+ "app-launch": [/app-launch/i, /launch-period/i],
31
+ memory: [/memory-footprint/i, /resident-memory/i, /\bvm-regions?\b/i],
32
+ network: [/network-connections?/i, /\bnetwork\b/i, /\bhttp\b/i],
33
+ energy: [/energy-impact/i, /power-draw/i, /\bwakeups?\b/i, /\bbattery\b/i],
34
+ leaks: [/^leaks?$/i, /leak-events?/i],
35
+ };
36
+ /** Canonical schema name we hardcoded before v1.14. Used as the fallback
37
+ * when discovery does not match anything in the TOC. */
38
+ export const CANONICAL_SCHEMA_NAME = {
39
+ hangs: "potential-hangs",
40
+ "hang-risks": "hang-risks",
41
+ "animation-hitches": "animation-hitches",
42
+ "time-profile": "time-profile",
43
+ "time-sample": "time-sample",
44
+ allocations: "allocations",
45
+ "app-launch": "app-launch",
46
+ memory: "memory-footprint",
47
+ network: "network-connections",
48
+ energy: "energy-impact",
49
+ leaks: "leaks",
50
+ };
51
+ /**
52
+ * Pure: extract all `<table schema="X" .../>` names from a TOC XML
53
+ * string. Returns the names in document order, including duplicates
54
+ * (a trace can have the same schema appear with different filter
55
+ * attributes; the caller decides what to do with duplicates).
56
+ *
57
+ * Accepts both self-closing `<table schema="X"/>` (Apple's --toc shape)
58
+ * and open-close `<table schema="X">...</table>` (test fixtures).
59
+ */
60
+ export function extractSchemaNamesFromToc(tocXml) {
61
+ const out = [];
62
+ // Self-closing form.
63
+ const selfClose = /<table\b[^>]*\bschema="([^"]+)"[^>]*\/>/g;
64
+ let m;
65
+ while ((m = selfClose.exec(tocXml)) !== null)
66
+ out.push(m[1]);
67
+ // Open-close form. Walk separately; the two regex passes can
68
+ // double-count if the same `<table>` is matched twice, but the
69
+ // patterns are mutually exclusive (`/>` vs `>...</table>`) so this is
70
+ // safe in practice.
71
+ const openClose = /<table\b[^>]*\bschema="([^"]+)"[^>]*>[\s\S]*?<\/table>/g;
72
+ while ((m = openClose.exec(tocXml)) !== null) {
73
+ if (!out.includes(m[1]))
74
+ out.push(m[1]);
75
+ }
76
+ return out;
77
+ }
78
+ /**
79
+ * Pure: find the schema name in the TOC that matches the requested
80
+ * family. Returns the FIRST match in document order so deterministic
81
+ * across runs. Falls back to the canonical hardcoded name when no
82
+ * pattern matches; never returns null so callers can plug the result
83
+ * straight into an xpath query.
84
+ *
85
+ * The hardcoded fallback preserves pre-v1.14 behavior: if the trace
86
+ * uses the canonical name, the xpath still works because the canonical
87
+ * name itself matches its own family pattern.
88
+ */
89
+ export function discoverSchema(tocXml, family) {
90
+ const names = extractSchemaNamesFromToc(tocXml);
91
+ const patterns = SCHEMA_FAMILIES[family];
92
+ for (const name of names) {
93
+ for (const pat of patterns) {
94
+ if (pat.test(name))
95
+ return name;
96
+ }
97
+ }
98
+ return CANONICAL_SCHEMA_NAME[family];
99
+ }
100
+ /**
101
+ * Pure: bulk variant. Resolves multiple families against the same TOC
102
+ * in one pass. Useful when an analyzer needs more than one schema
103
+ * (e.g. `analyzeHangs` reading both `hangs` and `hang-risks`).
104
+ */
105
+ export function discoverSchemas(tocXml, families) {
106
+ const out = {};
107
+ const names = extractSchemaNamesFromToc(tocXml);
108
+ for (const family of families) {
109
+ const patterns = SCHEMA_FAMILIES[family];
110
+ let matched = null;
111
+ for (const name of names) {
112
+ for (const pat of patterns) {
113
+ if (pat.test(name)) {
114
+ matched = name;
115
+ break;
116
+ }
117
+ }
118
+ if (matched)
119
+ break;
120
+ }
121
+ out[family] = matched ?? CANONICAL_SCHEMA_NAME[family];
122
+ }
123
+ return out;
124
+ }
125
+ export async function fetchDiscoveredSchemas(runCommand, tracePath, families) {
126
+ try {
127
+ const result = await runCommand("xcrun", ["xctrace", "export", "--input", tracePath, "--toc"], { timeoutMs: 60_000 });
128
+ if (result.code !== 0) {
129
+ // TOC fetch failed; return canonical fallback.
130
+ const out = {};
131
+ for (const f of families)
132
+ out[f] = CANONICAL_SCHEMA_NAME[f];
133
+ return out;
134
+ }
135
+ return discoverSchemas(result.stdout, families);
136
+ }
137
+ catch {
138
+ const out = {};
139
+ for (const f of families)
140
+ out[f] = CANONICAL_SCHEMA_NAME[f];
141
+ return out;
142
+ }
143
+ }
144
+ //# sourceMappingURL=schemaDiscovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaDiscovery.js","sourceRoot":"","sources":["../../src/parsers/schemaDiscovery.ts"],"names":[],"mappings":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`raw` is the underlying value (timestamp in ns, duration in ns, etc.).
16
16
  * `nested` is present when the value contains structured sub-elements
17
17
  * (e.g. a thread cell containing tid + process + pid).
18
+ *
19
+ * The `name` field carries the `@_name` attribute used by xctrace for
20
+ * `<frame name="..." />` and `<binary name="..." />` elements in stack
21
+ * backtraces. Without it, time-profile rows lose their symbol metadata.
18
22
  */
19
23
  export interface XctraceValue {
20
24
  raw?: string;
21
25
  fmt?: string;
26
+ name?: string;
22
27
  nested?: Record<string, XctraceValue>;
23
28
  }
24
29
  /**
@@ -49,6 +49,9 @@ function nodeToValue(node, byId, depth = 0) {
49
49
  const value = {};
50
50
  if (typeof resolved["@_fmt"] === "string")
51
51
  value.fmt = resolved["@_fmt"];
52
+ // Frame/binary elements carry the symbol/library name in @_name.
53
+ if (typeof resolved["@_name"] === "string")
54
+ value.name = resolved["@_name"];
52
55
  // Body text — appears as #text after parsing.
53
56
  const text = resolved["#text"];
54
57
  if (typeof text === "string" && text.trim())
@@ -1 +1 @@
1
- {"version":3,"file":"xctraceXml.js","sourceRoot":"","sources":["../../src/parsers/xctraceXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA2B5C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,gBAAgB,EAAE,KAAK;IACvB,mBAAmB,EAAE,IAAI;IACzB,mBAAmB,EAAE,KAAK;IAC1B,aAAa,EAAE,KAAK;IACpB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAAE,IAAI;CAC3B,CAAC,CAAC;AAMH;;;GAGG;AACH,SAAS,SAAS,CAAC,IAAa,EAAE,IAA6B;IAC7D,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;QAAE,OAAO;IAC9C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,KAAK,MAAM,IAAI,IAAI,IAAI;YAAE,SAAS,CAAC,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AAE,SAAS;gBACpB,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;oBAClC,CAAC,CAAE,IAAI,CAAC,CAAC,CAAgB;oBACzB,CAAC,CAAE,IAAmB,CAAC;gBACzB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YACrD,CAAC;YACD,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;QAED,MAAM,CAAC,IAAI,CAAC;YACV,MAAM,EAAE,UAAU;YAClB,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC;YACpC,IAAI,EAAE,SAAS;SAChB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,QAAQ,CAAC,CAA2B;IAClD,IAAI,CAAC,CAAC,EAAE,GAAG;QAAE,OAAO,SAAS,CAAC;IAC9B,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACxB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5C,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,WAAW,CAAC,CAA2B;IACrD,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;AAC1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import type { DataStatus } from "../types.js";
2
+ import type { DataStatus, SupportStatus } from "../types.js";
3
3
  export declare const analyzeAllocationsSchema: z.ZodObject<{
4
4
  tracePath: z.ZodString;
5
5
  topN: z.ZodDefault<z.ZodNumber>;
@@ -48,8 +48,12 @@ export interface AnalyzeAllocationsResult {
48
48
  /**
49
49
  * Disambiguates empty arrays into "no data in the trace" vs "trace could
50
50
  * not be exported" vs "data was exported partially". See {@link DataStatus}.
51
+ *
52
+ * @deprecated v1.14 item I. Use `supportStatus[]` instead.
51
53
  */
52
54
  status: DataStatus;
55
+ /** v1.14+. Unified per-area status. See {@link SupportStatus}. */
56
+ supportStatus: SupportStatus[];
53
57
  }
54
58
  /** Pure: turn parsed XML into the analyzed result. */
55
59
  export declare function analyzeAllocationsFromXml(xml: string, tracePath: string, topN?: number, minBytes?: number): AnalyzeAllocationsResult;
@@ -2,6 +2,7 @@ import { z } from "zod";
2
2
  import { existsSync } from "node:fs";
3
3
  import { resolve as resolvePath } from "node:path";
4
4
  import { runCommand } from "../runtime/exec.js";
5
+ import { fetchDiscoveredSchemas } from "../parsers/schemaDiscovery.js";
5
6
  import { parseXctraceXml, asNumber, asFormatted, } from "../parsers/xctraceXml.js";
6
7
  import { outputFormatField } from "../runtime/responseFormatter.js";
7
8
  export const analyzeAllocationsSchema = z.object({
@@ -41,6 +42,13 @@ export function analyzeAllocationsFromXml(xml, tracePath, topN = 15, minBytes =
41
42
  topByCount: [],
42
43
  diagnosis: "No allocations table found in the trace.",
43
44
  status: "not_present",
45
+ supportStatus: [
46
+ {
47
+ kind: "allocations",
48
+ status: "not_present",
49
+ reason: "Schema absent from the trace TOC.",
50
+ },
51
+ ],
44
52
  };
45
53
  }
46
54
  // The xctrace `allocations` schema has columns roughly like:
@@ -130,6 +138,13 @@ export function analyzeAllocationsFromXml(xml, tracePath, topN = 15, minBytes =
130
138
  topByCount,
131
139
  diagnosis,
132
140
  status: "available",
141
+ supportStatus: [
142
+ {
143
+ kind: "allocations",
144
+ status: "available",
145
+ sourceSchemas: ["allocations"],
146
+ },
147
+ ],
133
148
  };
134
149
  }
135
150
  function buildDiagnosis(rows, cumulativeBytes, topByBytes) {
@@ -145,13 +160,14 @@ export async function analyzeAllocations(input) {
145
160
  if (!existsSync(tracePath)) {
146
161
  throw new Error(`Trace bundle not found: ${tracePath}`);
147
162
  }
163
+ const { allocations: schemaName } = await fetchDiscoveredSchemas(runCommand, tracePath, ["allocations"]);
148
164
  const result = await runCommand("xcrun", [
149
165
  "xctrace",
150
166
  "export",
151
167
  "--input",
152
168
  tracePath,
153
169
  "--xpath",
154
- '/trace-toc/run/data/table[@schema="allocations"]',
170
+ `/trace-toc/run/data/table[@schema="${schemaName}"]`,
155
171
  ], { timeoutMs: 5 * 60_000 });
156
172
  if (result.code !== 0) {
157
173
  throw new Error(`xctrace export failed (code ${result.code}): ${result.stderr || result.stdout}`);