memorydetective 1.12.0 → 1.13.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.
- package/CHANGELOG.md +32 -1
- package/README.md +11 -5
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/runtime/prompts.js +49 -0
- package/dist/runtime/prompts.js.map +1 -1
- package/dist/tools/captureScenarioState.d.ts +2 -2
- package/dist/tools/summarizeTrace.d.ts +147 -0
- package/dist/tools/summarizeTrace.js +424 -0
- package/dist/tools/summarizeTrace.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,36 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.13.0] - 2026-05-14
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`summarizeTrace` MCP tool (36th tool, `[mg.synthesize]`).** Single call that:
|
|
16
|
+
1. Inspects the TOC via the existing inspectTrace path.
|
|
17
|
+
2. Chains `analyzeHangs` (with `includeStackClassification: true` to auto-classify main-thread violations), `analyzeAnimationHitches` (with Apple's 100ms perceptible threshold), `analyzeTimeProfile`, `analyzeAllocations`, `analyzeAppLaunch` in parallel via Promise.all guards.
|
|
18
|
+
3. Builds cross-area correlations (Phase 2: hangs+hitches timestamp overlap detection with HIGH/MEDIUM/LOW confidence tiers).
|
|
19
|
+
4. Returns BOTH a structured per-area result AND a pre-rendered compact markdown card (< 10 KB at default settings, validated by a card-size guard in the unit tests).
|
|
20
|
+
|
|
21
|
+
The card layout: H1 title, device/OS/template metadata, headline (1-2 sentences naming the biggest user-impact finding ranked by hang>=250ms > launch>1s > perceptible hitches > short hang), per-area sub-sections (suppressed when empty to reduce noise), cross-correlations section with confidence badges, suggested next calls from inspectTrace.
|
|
22
|
+
|
|
23
|
+
Optional inputs: `focus: "hangs" | "hitches" | "allocations" | "launch" | "all"` to bias the summary toward one area; `verbose: true` to expand each section's top-N from 5 to 15+ and surface low-confidence correlations inline.
|
|
24
|
+
|
|
25
|
+
Failed analyzers (e.g. xctrace SIGSEGV on time-profile) surface their workaround notice inline; other sections unaffected. Empty schemas don't fail the call.
|
|
26
|
+
|
|
27
|
+
- **`correlateHangsAndHitches()` pure cross-correlation helper.** Detects hangs whose time windows overlap with animation hitches. When a user sees a hang AND a hitch in the same window, they almost certainly perceived the impact (main-thread block delayed render commits). Confidence tiers: `high` when both events >= 250ms AND overlap span >= 100ms; `medium` when at least one event >= 250ms; `low` when both sub-250ms but touching. Results sorted by `atSec` ascending so the markdown card lists correlations in trace order. Allocation-based correlations (hangs+allocations, hitches+allocations) are deferred to v1.14+ because the existing `analyzeAllocations` doesn't expose per-timestamp allocation rows.
|
|
28
|
+
|
|
29
|
+
- **`/summarize-trace` MCP prompt (6th prompt).** Counterpart to the `summarizeTrace` tool. Unlike the existing 5 prompts (which wrap multi-step playbooks), `/summarize-trace` wraps a single tool call. The brief tells the agent to (1) call `summarizeTrace`, (2) present `result.markdown` verbatim instead of paraphrasing, (3) offer drill-ins via `suggestedNextCalls`. Surfaces the "present the result; don't re-summarize" pattern that agents often get wrong with structured data.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `package.json` + `server.json`: 1.12.0 → 1.13.0.
|
|
34
|
+
|
|
35
|
+
### Test count
|
|
36
|
+
|
|
37
|
+
523 → 546 (+23): 14 buildHeadline/buildMarkdownCard tests in Phase 1, 9 correlation tests in Phase 2, +0 in Phase 3 (the prompts test was updated, not extended).
|
|
38
|
+
|
|
9
39
|
## [1.12.0] - 2026-05-14
|
|
10
40
|
|
|
11
41
|
Four-phase patch completing the v1.10 retro §7.2 propagation (`countAlive`, `findRetainers`, `verifyFix` reference-tree integrations) and internalizing the v1.9 cross-schema correlation (`analyzeHangs` auto-classification). The agent chain `analyzeAbandonedMemory` → `findRetainers` → `countAlive` → `verifyFix` no longer falls off a cliff after the first call.
|
|
@@ -448,7 +478,8 @@ When called with no arguments it starts the MCP server over stdio.
|
|
|
448
478
|
- **`captureMemgraph`** does not work on physical iOS devices — `leaks(1)` only attaches to processes on the local Mac (which includes iOS simulators). Memory Graph capture from a physical device still requires Xcode.
|
|
449
479
|
- **`detectLeaksInXCUITest`** is flagged experimental: orchestration logic is implemented but not yet validated against a wide set of production XCUITest runs.
|
|
450
480
|
|
|
451
|
-
[Unreleased]: https://github.com/carloshpdoc/memorydetective/compare/v1.
|
|
481
|
+
[Unreleased]: https://github.com/carloshpdoc/memorydetective/compare/v1.13.0...HEAD
|
|
482
|
+
[1.13.0]: https://github.com/carloshpdoc/memorydetective/compare/v1.12.0...v1.13.0
|
|
452
483
|
[1.12.0]: https://github.com/carloshpdoc/memorydetective/compare/v1.11.0...v1.12.0
|
|
453
484
|
[1.11.0]: https://github.com/carloshpdoc/memorydetective/compare/v1.10.0...v1.11.0
|
|
454
485
|
[1.10.0]: https://github.com/carloshpdoc/memorydetective/compare/v1.9.0...v1.10.0
|
package/README.md
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
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.
|
|
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. 523 → 546 tests.
|
|
21
21
|
>
|
|
22
|
-
> **Also recent**: v1.11 added
|
|
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).
|
|
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
|
|
|
@@ -295,7 +295,7 @@ Copilot's MCP integration moves fast. If this snippet is stale, see the [VS Code
|
|
|
295
295
|
|
|
296
296
|
## API
|
|
297
297
|
|
|
298
|
-
**
|
|
298
|
+
**36 MCP tools + 34 Resources + 6 Prompts**, grouped by purpose. Tool descriptions are tagged with a category prefix (`[mg.memory]`, `[mg.trace]`, `[mg.build]`, `[mg.scenario]`, `[mg.code]`, `[mg.log]`, `[mg.render]`, `[mg.ci]`, `[mg.discover]`, `[ops]`, `[meta]`) so related tools are visible at a glance.
|
|
299
299
|
|
|
300
300
|
Many tools include a `suggestedNextCalls` field in their response. A typed list of `{ tool, args, why }` entries pre-populated from the current result, so the orchestrating LLM can chain calls without re-reasoning. Start with `getInvestigationPlaybook(kind)` for the canonical sequence. Or just type `/investigate-leak` (one of the [Prompts](#prompts-5)) in any client that exposes MCP slash commands.
|
|
301
301
|
|
|
@@ -352,6 +352,12 @@ These three tools combine into a single deterministic verify-fix loop: launch th
|
|
|
352
352
|
| `listTraceTemplates` | Parse `xcrun xctrace list templates` (standard + custom). |
|
|
353
353
|
| `inspectTrace` | Orientation tool for `.trace` bundles. Returns schemas present + row counts + device/OS/template metadata + `suggestedNextCalls[]` mapping each populated known schema to its analyzer. Use this as the FIRST call on any `.trace`. New in v1.11. |
|
|
354
354
|
|
|
355
|
+
### Synthesize (1)
|
|
356
|
+
|
|
357
|
+
| Tool | What |
|
|
358
|
+
|---|---|
|
|
359
|
+
| `summarizeTrace` | Single call that chains `inspectTrace` + the 5 analyzers in parallel + cross-correlates findings (hangs overlapping with hitches, etc.) + pre-renders a compact (<10 KB) markdown summary card with a 1-sentence headline, per-area sub-sections, and suggestedNextCalls. The "trace-to-summary-card-in-one-call" play. Use this when you want one synthesis pass instead of chaining 5-6 analyzers manually. New in v1.13. |
|
|
360
|
+
|
|
355
361
|
### Render (1)
|
|
356
362
|
|
|
357
363
|
| Tool | What |
|
|
@@ -490,7 +496,7 @@ The `tool` subcommand dispatches to any registered MCP tool by name, reading inp
|
|
|
490
496
|
git clone https://github.com/carloshpdoc/memorydetective
|
|
491
497
|
cd memorydetective
|
|
492
498
|
npm install
|
|
493
|
-
npm test #
|
|
499
|
+
npm test # 546 unit tests
|
|
494
500
|
npm run build # build → dist/
|
|
495
501
|
npm run dev # tsx, stdio mode (dev mode)
|
|
496
502
|
./scripts/demo.sh # full demo against a real .memgraph (set MEMGRAPH=path)
|
|
@@ -501,7 +507,7 @@ npm run dev # tsx, stdio mode (dev mode)
|
|
|
501
507
|
Contributions are welcome. Bug reports, feature requests, new cycle patterns, all of it.
|
|
502
508
|
|
|
503
509
|
- **Bugs / feature requests**: [open an issue](https://github.com/carloshpdoc/memorydetective/issues).
|
|
504
|
-
- **PRs**: fork → branch → `npm install` → make changes → `npm test` (
|
|
510
|
+
- **PRs**: fork → branch → `npm install` → make changes → `npm test` (546 tests must stay green) → open a PR with a concise description of what changed and why.
|
|
505
511
|
|
|
506
512
|
### Adding a cycle pattern to `classifyCycle`
|
|
507
513
|
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { analyzeTimeProfile, analyzeTimeProfileSchema, } from "./tools/analyzeTi
|
|
|
13
13
|
import { listTraceDevices, listTraceDevicesSchema, } from "./tools/listTraceDevices.js";
|
|
14
14
|
import { listTraceTemplates, listTraceTemplatesSchema, } from "./tools/listTraceTemplates.js";
|
|
15
15
|
import { inspectTrace, inspectTraceSchema, } from "./tools/inspectTrace.js";
|
|
16
|
+
import { summarizeTrace, summarizeTraceSchema, } from "./tools/summarizeTrace.js";
|
|
16
17
|
import { recordTimeProfile, recordTimeProfileShape, } from "./tools/recordTimeProfile.js";
|
|
17
18
|
import { captureMemgraph, captureMemgraphShape, } from "./tools/captureMemgraph.js";
|
|
18
19
|
import { bootAndLaunchForLeakInvestigation, bootAndLaunchForLeakInvestigationShape, } from "./tools/bootAndLaunchForLeakInvestigation.js";
|
|
@@ -165,6 +166,16 @@ server.registerTool("inspectTrace", {
|
|
|
165
166
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
166
167
|
};
|
|
167
168
|
});
|
|
169
|
+
server.registerTool("summarizeTrace", {
|
|
170
|
+
title: "Single-call cross-schema summary card for a .trace bundle",
|
|
171
|
+
description: "[mg.synthesize] The trace-to-summary-card-in-one-call play. Chains `inspectTrace` + the matching `analyze*` tools (potential-hangs, animation-hitches, time-profile, allocations, app-launch) and returns BOTH a structured per-area result AND a pre-rendered compact markdown card (< 10 KB at default settings). Use this as the FIRST call when handed a `.trace` if you want one synthesis pass instead of chaining 5-6 analyzers manually. The markdown card carries a 1-sentence headline naming the biggest user-impact finding, then per-area sub-sections, then `suggestedNextCalls[]` for drilling in. Empty schemas are suppressed from the card to reduce noise. Failed analyzers (e.g. xctrace SIGSEGV on time-profile) surface inline with their workaround notice. Pass `verbose: true` to expand each section's top-N from 5 to 15+. Pass `focus: \"hangs\" | \"hitches\" | \"allocations\" | \"launch\"` to bias the summary toward a specific area.",
|
|
172
|
+
inputSchema: summarizeTraceSchema.shape,
|
|
173
|
+
}, async (input) => {
|
|
174
|
+
const result = await summarizeTrace(input);
|
|
175
|
+
return {
|
|
176
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
177
|
+
};
|
|
178
|
+
});
|
|
168
179
|
server.registerTool("recordTimeProfile", {
|
|
169
180
|
title: "Record a Time Profiler trace",
|
|
170
181
|
description: "[mg.trace] Wrapper around `xcrun xctrace record`. Capture a `.trace` bundle from a running app on a device or simulator. Required: exactly 1 of `deviceId`/`simulatorId`, exactly 1 of `attachAppName`/`attachPid`/`launchBundleId`, an `output` path ending in `.trace`. Defaults: template = \"Time Profiler\", durationSec = 90.",
|
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,o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,sEAAsE;IACtE,yBAAyB,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,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"}
|
package/dist/runtime/prompts.js
CHANGED
|
@@ -65,6 +65,19 @@ export const PROMPTS = [
|
|
|
65
65
|
],
|
|
66
66
|
render: ({ tracePath }) => renderPlaybookPrompt(PLAYBOOKS["app-launch-slow"], { tracePath }),
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
name: "summarize-trace",
|
|
70
|
+
title: "Single-call cross-schema summary card for a .trace",
|
|
71
|
+
description: "Call `summarizeTrace` on the user-supplied .trace and present the markdown card. Surfaces hangs, hitches, time-profile hotspots, allocations, app launch, and cross-correlations in one pass. Use this as the FIRST step on any new .trace.",
|
|
72
|
+
arguments: [
|
|
73
|
+
{
|
|
74
|
+
name: "tracePath",
|
|
75
|
+
description: "Absolute path to the .trace bundle",
|
|
76
|
+
required: true,
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
render: ({ tracePath }) => renderSummarizeTracePrompt(tracePath),
|
|
80
|
+
},
|
|
68
81
|
{
|
|
69
82
|
name: "verify-cycle-fix",
|
|
70
83
|
title: "Verify a fix closed a known cycle",
|
|
@@ -87,6 +100,42 @@ export const PROMPTS = [
|
|
|
87
100
|
export function findPrompt(name) {
|
|
88
101
|
return PROMPTS.find((p) => p.name === name);
|
|
89
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* v1.13: summarize-trace prompt. Unlike the other prompts (which render
|
|
105
|
+
* multi-step playbooks), this one wraps a single tool call. The brief
|
|
106
|
+
* tells the agent to (1) call `summarizeTrace`, (2) present the
|
|
107
|
+
* pre-rendered markdown card to the user verbatim, (3) offer to drill
|
|
108
|
+
* in via the response's `suggestedNextCalls[]`.
|
|
109
|
+
*/
|
|
110
|
+
function renderSummarizeTracePrompt(tracePath) {
|
|
111
|
+
return [
|
|
112
|
+
`Run the **trace-summary** flow on \`${tracePath}\`.`,
|
|
113
|
+
"",
|
|
114
|
+
"## Step 1: `summarizeTrace`",
|
|
115
|
+
"",
|
|
116
|
+
"Call this tool first:",
|
|
117
|
+
"",
|
|
118
|
+
"```json",
|
|
119
|
+
`{ "tracePath": "${tracePath}" }`,
|
|
120
|
+
"```",
|
|
121
|
+
"",
|
|
122
|
+
"The response carries a structured per-area summary PLUS a pre-rendered markdown card (`result.markdown`).",
|
|
123
|
+
"",
|
|
124
|
+
"## Step 2: present the markdown card",
|
|
125
|
+
"",
|
|
126
|
+
"Show the user the `markdown` field verbatim. Do NOT re-summarize what it already says. It's been tuned for direct presentation.",
|
|
127
|
+
"",
|
|
128
|
+
"## Step 3: offer to drill in",
|
|
129
|
+
"",
|
|
130
|
+
"Each populated area carries `result.areas.<area>.result.suggestedNextCalls[]` (when present) plus `result.inspection.suggestedNextCalls[]` for the analyzer level. Surface these as concrete follow-up offers (e.g. \"Want me to run `analyzeTimeProfile` to see the top 30 symbols instead of just 15?\").",
|
|
131
|
+
"",
|
|
132
|
+
"## Do NOT",
|
|
133
|
+
"",
|
|
134
|
+
"- Propose architectural changes before the user has seen the summary.",
|
|
135
|
+
"- Re-call `summarizeTrace` to refine; pass `verbose: true` to expand or `focus: \"hangs\"` to bias instead.",
|
|
136
|
+
"- Re-call individual analyzers if the summary already answered the question.",
|
|
137
|
+
].join("\n");
|
|
138
|
+
}
|
|
90
139
|
/**
|
|
91
140
|
* Substitutes user-provided values into a playbook's argsTemplate slots and
|
|
92
141
|
* renders a markdown brief the agent can act on directly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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IAAI,CAAC,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QACzC,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;IAC3E,KAAK,CAAC,IAAI,CAAC,mEAAmE,CAAC,CAAC;IAChF,KAAK,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAC;IAC3E,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,kBAAkB,CACzB,QAAiC,EACjC,MAA8B;IAE9B,yEAAyE;IACzE,sEAAsE;IACtE,uEAAuE;IACvE,+DAA+D;IAC/D,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;YAC5C,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;QACrB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -29,8 +29,8 @@ export declare const captureScenarioStateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
29
29
|
readonly include: z.ZodDefault<z.ZodArray<z.ZodEnum<["memgraph", "screenshot", "uiTree"]>, "many">>;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
31
|
outputDir: string;
|
|
32
|
-
simulatorUDID: string;
|
|
33
32
|
label: string;
|
|
33
|
+
simulatorUDID: string;
|
|
34
34
|
include: ("screenshot" | "memgraph" | "uiTree")[];
|
|
35
35
|
pid?: number | undefined;
|
|
36
36
|
appName?: string | undefined;
|
|
@@ -43,8 +43,8 @@ export declare const captureScenarioStateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
43
43
|
include?: ("screenshot" | "memgraph" | "uiTree")[] | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
outputDir: string;
|
|
46
|
-
simulatorUDID: string;
|
|
47
46
|
label: string;
|
|
47
|
+
simulatorUDID: string;
|
|
48
48
|
include: ("screenshot" | "memgraph" | "uiTree")[];
|
|
49
49
|
pid?: number | undefined;
|
|
50
50
|
appName?: string | undefined;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `summarizeTrace`: the trace-to-summary-card-in-one-call feature.
|
|
3
|
+
*
|
|
4
|
+
* Today an agent handed a `.trace` chains inspectTrace + up to 5
|
|
5
|
+
* analyzers + reasons over tens of KB of JSON. That's 6 round-trips
|
|
6
|
+
* and ~$0.10-0.20 in tokens, most of which get thrown away after the
|
|
7
|
+
* agent identifies the one user-visible finding.
|
|
8
|
+
*
|
|
9
|
+
* summarizeTrace does it all in one call:
|
|
10
|
+
*
|
|
11
|
+
* 1. Inspects the TOC via inspectTrace (reuses the v1.11 path).
|
|
12
|
+
* 2. For each populated known schema, runs the matching analyzer in
|
|
13
|
+
* parallel with smart defaults tuned for "what would a user care
|
|
14
|
+
* about?" (Apple's 100ms hitch threshold, top-10 hangs, top-15
|
|
15
|
+
* time-profile symbols, etc).
|
|
16
|
+
* 3. Cross-correlates findings (v1.13 Phase 2): hangs overlapping
|
|
17
|
+
* with hitches, allocation spikes preceding hangs, etc.
|
|
18
|
+
* 4. Produces a structured result PLUS a pre-rendered compact
|
|
19
|
+
* markdown card (< 10 KB target) suitable for direct presentation
|
|
20
|
+
* to the user without further reasoning.
|
|
21
|
+
*
|
|
22
|
+
* Strategic positioning: this is memorydetective's "synthesis over
|
|
23
|
+
* raw-query" play vs trace-MCPs that go deep on single-schema access.
|
|
24
|
+
* See `~/Desktop/internal/v1.9-notelet-retro-market.md` §4.5 for the
|
|
25
|
+
* full framing.
|
|
26
|
+
*/
|
|
27
|
+
import { z } from "zod";
|
|
28
|
+
import { type InspectTraceResult } from "./inspectTrace.js";
|
|
29
|
+
import { type AnalyzeHangsResult } from "./analyzeHangs.js";
|
|
30
|
+
import { type AnalyzeAnimationHitchesResult } from "./analyzeAnimationHitches.js";
|
|
31
|
+
import { type AnalyzeTimeProfileResult } from "./analyzeTimeProfile.js";
|
|
32
|
+
import { type AnalyzeAllocationsResult } from "./analyzeAllocations.js";
|
|
33
|
+
import { type AnalyzeAppLaunchResult } from "./analyzeAppLaunch.js";
|
|
34
|
+
export declare const summarizeTraceSchema: z.ZodObject<{
|
|
35
|
+
tracePath: z.ZodString;
|
|
36
|
+
focus: z.ZodDefault<z.ZodEnum<["hangs", "hitches", "allocations", "launch", "all"]>>;
|
|
37
|
+
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
tracePath: string;
|
|
40
|
+
focus: "all" | "allocations" | "hangs" | "hitches" | "launch";
|
|
41
|
+
verbose: boolean;
|
|
42
|
+
}, {
|
|
43
|
+
tracePath: string;
|
|
44
|
+
focus?: "all" | "allocations" | "hangs" | "hitches" | "launch" | undefined;
|
|
45
|
+
verbose?: boolean | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
export type SummarizeTraceInput = z.infer<typeof summarizeTraceSchema>;
|
|
48
|
+
/**
|
|
49
|
+
* Per-analyzer entry on the structured result. `status` distinguishes
|
|
50
|
+
* "ran successfully", "schema absent in trace", and "ran but failed".
|
|
51
|
+
* Callers branching on the summary can decide whether to retry / refine.
|
|
52
|
+
*/
|
|
53
|
+
export interface SummarizeAreaSummary<TResult> {
|
|
54
|
+
status: "ok" | "schema-absent" | "failed";
|
|
55
|
+
/** Why the status is what it is (one sentence). Surfaces SIGSEGV / missing-schema / parser-error reasons. */
|
|
56
|
+
diagnosis: string;
|
|
57
|
+
/** Full analyzer result when status === "ok". Useful when a caller wants to drill in without re-running the analyzer. */
|
|
58
|
+
result?: TResult;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* v1.13 Phase 2: cross-area correlation. Each entry is a finding
|
|
62
|
+
* tying TWO areas together via timestamp overlap. The narrative
|
|
63
|
+
* field is the human-scannable string that goes into the markdown
|
|
64
|
+
* card; the structured fields (`kind`, `confidence`, evidence ids)
|
|
65
|
+
* are what callers can branch on programmatically.
|
|
66
|
+
*/
|
|
67
|
+
export interface Correlation {
|
|
68
|
+
/** Which two areas this correlation ties together. Currently only `hangs+hitches` is supported; `hangs+allocations` and `hitches+allocations` are deferred to v1.14+ because the analyzer doesn't currently expose per-timestamp allocation rows. */
|
|
69
|
+
kind: "hangs+hitches";
|
|
70
|
+
/** `high` when the overlap is substantial (both events > 100ms and the windows overlap significantly); `medium` when one event is short; `low` when timestamps are only adjacent. */
|
|
71
|
+
confidence: "high" | "medium" | "low";
|
|
72
|
+
/** Pre-formatted human-scannable narrative. Goes into the markdown card. */
|
|
73
|
+
narrative: string;
|
|
74
|
+
/** Start time in seconds (for the hang event). Used to rank correlations by user-relevance (earliest first). */
|
|
75
|
+
atSec: number;
|
|
76
|
+
}
|
|
77
|
+
export interface SummarizeTraceResult {
|
|
78
|
+
ok: boolean;
|
|
79
|
+
tracePath: string;
|
|
80
|
+
/** TOC + suggestedNextCalls from inspectTrace. Always present. */
|
|
81
|
+
inspection: InspectTraceResult;
|
|
82
|
+
/** Per-area summaries. Each section is independent; absence of one doesn't fail the call. */
|
|
83
|
+
areas: {
|
|
84
|
+
hangs: SummarizeAreaSummary<AnalyzeHangsResult>;
|
|
85
|
+
hitches: SummarizeAreaSummary<AnalyzeAnimationHitchesResult>;
|
|
86
|
+
timeProfile: SummarizeAreaSummary<AnalyzeTimeProfileResult>;
|
|
87
|
+
allocations: SummarizeAreaSummary<AnalyzeAllocationsResult>;
|
|
88
|
+
appLaunch: SummarizeAreaSummary<AnalyzeAppLaunchResult>;
|
|
89
|
+
};
|
|
90
|
+
/** Cross-area correlations (v1.13 Phase 2). Empty when areas don't have enough data to correlate. */
|
|
91
|
+
correlations: Correlation[];
|
|
92
|
+
/** Headline string: 1-2 sentences naming the biggest user-impact finding across all areas. */
|
|
93
|
+
headline: string;
|
|
94
|
+
/** Pre-rendered markdown summary card. Target < 10 KB at default `verbose: false`. */
|
|
95
|
+
markdown: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Pure: detect hangs whose window overlaps with animation hitches.
|
|
99
|
+
* When a user sees a hang AND a hitch in the same time window,
|
|
100
|
+
* they almost certainly perceived the impact (the main-thread block
|
|
101
|
+
* delayed render commits, dropping frames).
|
|
102
|
+
*
|
|
103
|
+
* The overlap check is symmetric: a hitch can fall within a hang's
|
|
104
|
+
* window OR a hang can fall within a hitch's window. Both directions
|
|
105
|
+
* are treated equally.
|
|
106
|
+
*
|
|
107
|
+
* Confidence:
|
|
108
|
+
*
|
|
109
|
+
* - `high`: both events >= 250ms AND the overlap span >= 100ms.
|
|
110
|
+
* - `medium`: at least one event >= 250ms.
|
|
111
|
+
* - `low`: neither event >= 250ms but the windows touch.
|
|
112
|
+
*
|
|
113
|
+
* Results are sorted by `atSec` ascending so the markdown card lists
|
|
114
|
+
* correlations in trace order.
|
|
115
|
+
*/
|
|
116
|
+
export declare function correlateHangsAndHitches(hangs: Array<{
|
|
117
|
+
startNs: number;
|
|
118
|
+
durationNs: number;
|
|
119
|
+
durationMs: number;
|
|
120
|
+
}>, hitches: Array<{
|
|
121
|
+
startNs: number;
|
|
122
|
+
durationNs: number;
|
|
123
|
+
durationMs: number;
|
|
124
|
+
hitchType?: string;
|
|
125
|
+
}>): Correlation[];
|
|
126
|
+
/**
|
|
127
|
+
* Pure: build all cross-area correlations from per-area summaries.
|
|
128
|
+
* Currently only `hangs+hitches` produces entries; allocation-based
|
|
129
|
+
* correlations need per-timestamp allocation data the existing
|
|
130
|
+
* analyzeAllocations doesn't expose (v1.14+ candidate).
|
|
131
|
+
*/
|
|
132
|
+
export declare function buildCorrelations(areas: SummarizeTraceResult["areas"]): Correlation[];
|
|
133
|
+
/**
|
|
134
|
+
* Pure: produce the one-or-two-sentence headline that goes at the top
|
|
135
|
+
* of the markdown card. Picks the most user-visible finding across
|
|
136
|
+
* all areas. Order of priority: longest hang above 250ms > worst
|
|
137
|
+
* launch phase > worst hitch > largest allocation spike.
|
|
138
|
+
*/
|
|
139
|
+
export declare function buildHeadline(areas: SummarizeTraceResult["areas"]): string;
|
|
140
|
+
/**
|
|
141
|
+
* Pure: assemble the compact markdown summary card. Designed to be
|
|
142
|
+
* <10 KB at default settings. The structured `areas` field carries
|
|
143
|
+
* the full data for callers who need it; this is the human view.
|
|
144
|
+
*/
|
|
145
|
+
export declare function buildMarkdownCard(result: Omit<SummarizeTraceResult, "markdown">, verbose: boolean): string;
|
|
146
|
+
export declare function summarizeTrace(input: SummarizeTraceInput): Promise<SummarizeTraceResult>;
|
|
147
|
+
export declare const SUMMARIZE_AREA_KEYS: readonly ["hangs", "hitches", "timeProfile", "allocations", "appLaunch"];
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `summarizeTrace`: the trace-to-summary-card-in-one-call feature.
|
|
3
|
+
*
|
|
4
|
+
* Today an agent handed a `.trace` chains inspectTrace + up to 5
|
|
5
|
+
* analyzers + reasons over tens of KB of JSON. That's 6 round-trips
|
|
6
|
+
* and ~$0.10-0.20 in tokens, most of which get thrown away after the
|
|
7
|
+
* agent identifies the one user-visible finding.
|
|
8
|
+
*
|
|
9
|
+
* summarizeTrace does it all in one call:
|
|
10
|
+
*
|
|
11
|
+
* 1. Inspects the TOC via inspectTrace (reuses the v1.11 path).
|
|
12
|
+
* 2. For each populated known schema, runs the matching analyzer in
|
|
13
|
+
* parallel with smart defaults tuned for "what would a user care
|
|
14
|
+
* about?" (Apple's 100ms hitch threshold, top-10 hangs, top-15
|
|
15
|
+
* time-profile symbols, etc).
|
|
16
|
+
* 3. Cross-correlates findings (v1.13 Phase 2): hangs overlapping
|
|
17
|
+
* with hitches, allocation spikes preceding hangs, etc.
|
|
18
|
+
* 4. Produces a structured result PLUS a pre-rendered compact
|
|
19
|
+
* markdown card (< 10 KB target) suitable for direct presentation
|
|
20
|
+
* to the user without further reasoning.
|
|
21
|
+
*
|
|
22
|
+
* Strategic positioning: this is memorydetective's "synthesis over
|
|
23
|
+
* raw-query" play vs trace-MCPs that go deep on single-schema access.
|
|
24
|
+
* See `~/Desktop/internal/v1.9-notelet-retro-market.md` §4.5 for the
|
|
25
|
+
* full framing.
|
|
26
|
+
*/
|
|
27
|
+
import { z } from "zod";
|
|
28
|
+
import { existsSync } from "node:fs";
|
|
29
|
+
import { resolve as resolvePath, basename } from "node:path";
|
|
30
|
+
import { inspectTrace } from "./inspectTrace.js";
|
|
31
|
+
import { analyzeHangs, } from "./analyzeHangs.js";
|
|
32
|
+
import { analyzeAnimationHitches, } from "./analyzeAnimationHitches.js";
|
|
33
|
+
import { analyzeTimeProfile, } from "./analyzeTimeProfile.js";
|
|
34
|
+
import { analyzeAllocations, } from "./analyzeAllocations.js";
|
|
35
|
+
import { analyzeAppLaunch, } from "./analyzeAppLaunch.js";
|
|
36
|
+
export const summarizeTraceSchema = z.object({
|
|
37
|
+
tracePath: z
|
|
38
|
+
.string()
|
|
39
|
+
.min(1)
|
|
40
|
+
.describe("Absolute path to a `.trace` bundle (output of `xcrun xctrace record` or Instruments)."),
|
|
41
|
+
focus: z
|
|
42
|
+
.enum(["hangs", "hitches", "allocations", "launch", "all"])
|
|
43
|
+
.default("all")
|
|
44
|
+
.describe("When set to a specific area, the summary card emphasizes that area and downplays others. Useful for piping into more focused agent loops. Default `all`."),
|
|
45
|
+
verbose: z
|
|
46
|
+
.boolean()
|
|
47
|
+
.default(false)
|
|
48
|
+
.describe("When true, the markdown card includes the full top-N per area (15+ rows per section) instead of the default 5. Trade-off: card grows from <10 KB to potentially 30+ KB."),
|
|
49
|
+
});
|
|
50
|
+
const DEFAULT_HITCH_THRESHOLD_MS = 100; // Apple's user-perceptible threshold.
|
|
51
|
+
const DEFAULT_HANG_MIN_MS = 100;
|
|
52
|
+
const DEFAULT_TOP_N_HANGS = 10;
|
|
53
|
+
const DEFAULT_TOP_N_HITCHES = 10;
|
|
54
|
+
const DEFAULT_TOP_N_TIME_PROFILE = 15;
|
|
55
|
+
const DEFAULT_TOP_N_ALLOCATIONS = 10;
|
|
56
|
+
/**
|
|
57
|
+
* Build a per-area summary by running an analyzer with smart defaults
|
|
58
|
+
* and wrapping the outcome (success / schema-absent / failed) into a
|
|
59
|
+
* status-tagged struct. The schema-absent branch reads the inspectTrace
|
|
60
|
+
* `rowCounts` so we don't spawn xctrace for empty schemas.
|
|
61
|
+
*/
|
|
62
|
+
async function buildAreaSummary(schemaName, inspection, runner, schemaAbsentDiagnosis) {
|
|
63
|
+
const rowCount = inspection.rowCounts[schemaName] ?? 0;
|
|
64
|
+
if (rowCount === 0) {
|
|
65
|
+
return {
|
|
66
|
+
status: "schema-absent",
|
|
67
|
+
diagnosis: schemaAbsentDiagnosis,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
const result = await runner();
|
|
72
|
+
return {
|
|
73
|
+
status: "ok",
|
|
74
|
+
diagnosis: `${rowCount.toLocaleString()} rows analyzed.`,
|
|
75
|
+
result,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
return {
|
|
80
|
+
status: "failed",
|
|
81
|
+
diagnosis: `Analyzer failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Pure: detect hangs whose window overlaps with animation hitches.
|
|
87
|
+
* When a user sees a hang AND a hitch in the same time window,
|
|
88
|
+
* they almost certainly perceived the impact (the main-thread block
|
|
89
|
+
* delayed render commits, dropping frames).
|
|
90
|
+
*
|
|
91
|
+
* The overlap check is symmetric: a hitch can fall within a hang's
|
|
92
|
+
* window OR a hang can fall within a hitch's window. Both directions
|
|
93
|
+
* are treated equally.
|
|
94
|
+
*
|
|
95
|
+
* Confidence:
|
|
96
|
+
*
|
|
97
|
+
* - `high`: both events >= 250ms AND the overlap span >= 100ms.
|
|
98
|
+
* - `medium`: at least one event >= 250ms.
|
|
99
|
+
* - `low`: neither event >= 250ms but the windows touch.
|
|
100
|
+
*
|
|
101
|
+
* Results are sorted by `atSec` ascending so the markdown card lists
|
|
102
|
+
* correlations in trace order.
|
|
103
|
+
*/
|
|
104
|
+
export function correlateHangsAndHitches(hangs, hitches) {
|
|
105
|
+
const results = [];
|
|
106
|
+
for (const hang of hangs) {
|
|
107
|
+
const hangEnd = hang.startNs + hang.durationNs;
|
|
108
|
+
for (const hitch of hitches) {
|
|
109
|
+
const hitchEnd = hitch.startNs + hitch.durationNs;
|
|
110
|
+
// Half-open interval overlap: max(starts) < min(ends).
|
|
111
|
+
const overlapStart = Math.max(hang.startNs, hitch.startNs);
|
|
112
|
+
const overlapEnd = Math.min(hangEnd, hitchEnd);
|
|
113
|
+
if (overlapEnd <= overlapStart)
|
|
114
|
+
continue;
|
|
115
|
+
const overlapMs = (overlapEnd - overlapStart) / 1e6;
|
|
116
|
+
const atSec = Math.min(hang.startNs, hitch.startNs) / 1e9;
|
|
117
|
+
let confidence;
|
|
118
|
+
if (hang.durationMs >= 250 &&
|
|
119
|
+
hitch.durationMs >= 250 &&
|
|
120
|
+
overlapMs >= 100) {
|
|
121
|
+
confidence = "high";
|
|
122
|
+
}
|
|
123
|
+
else if (hang.durationMs >= 250 || hitch.durationMs >= 250) {
|
|
124
|
+
confidence = "medium";
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
confidence = "low";
|
|
128
|
+
}
|
|
129
|
+
const hitchKind = hitch.hitchType ? `${hitch.hitchType} ` : "";
|
|
130
|
+
const narrative = `Hang at t=${(hang.startNs / 1e9).toFixed(2)}s (${hang.durationMs.toFixed(0)}ms) overlaps with ${hitchKind}hitch at t=${(hitch.startNs / 1e9).toFixed(2)}s (${hitch.durationMs.toFixed(0)}ms). Main-thread block likely caused the dropped frames.`;
|
|
131
|
+
results.push({ kind: "hangs+hitches", confidence, narrative, atSec });
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
results.sort((a, b) => a.atSec - b.atSec);
|
|
135
|
+
return results;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Pure: build all cross-area correlations from per-area summaries.
|
|
139
|
+
* Currently only `hangs+hitches` produces entries; allocation-based
|
|
140
|
+
* correlations need per-timestamp allocation data the existing
|
|
141
|
+
* analyzeAllocations doesn't expose (v1.14+ candidate).
|
|
142
|
+
*/
|
|
143
|
+
export function buildCorrelations(areas) {
|
|
144
|
+
const hangs = areas.hangs.result?.top ?? [];
|
|
145
|
+
const hitches = areas.hitches.result?.top ?? [];
|
|
146
|
+
if (hangs.length === 0 || hitches.length === 0)
|
|
147
|
+
return [];
|
|
148
|
+
return correlateHangsAndHitches(hangs, hitches);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Pure: produce the one-or-two-sentence headline that goes at the top
|
|
152
|
+
* of the markdown card. Picks the most user-visible finding across
|
|
153
|
+
* all areas. Order of priority: longest hang above 250ms > worst
|
|
154
|
+
* launch phase > worst hitch > largest allocation spike.
|
|
155
|
+
*/
|
|
156
|
+
export function buildHeadline(areas) {
|
|
157
|
+
const hang = areas.hangs.result?.top?.[0];
|
|
158
|
+
if (hang && hang.durationMs >= 250) {
|
|
159
|
+
const violation = hang.mainThreadViolations?.[0];
|
|
160
|
+
const causedBy = violation
|
|
161
|
+
? ` (caused by \`${violation.topFrame}\` -> ${violation.kind})`
|
|
162
|
+
: "";
|
|
163
|
+
return `${hang.durationMs.toFixed(0)}ms hang at t=${(hang.startNs / 1e9).toFixed(2)}s${causedBy}. Likely user-visible freeze.`;
|
|
164
|
+
}
|
|
165
|
+
const launch = areas.appLaunch.result;
|
|
166
|
+
if (launch && launch.totalLaunchMs > 1000) {
|
|
167
|
+
return `Launch took ${launch.totalLaunchMs.toFixed(0)}ms (${launch.launchType} launch). Above the 1s user-visible threshold.`;
|
|
168
|
+
}
|
|
169
|
+
const hitchesPerceptible = areas.hitches.result?.totals?.perceptible ?? 0;
|
|
170
|
+
if (hitchesPerceptible > 0) {
|
|
171
|
+
return `${hitchesPerceptible} animation hitch${hitchesPerceptible === 1 ? "" : "es"} above the 100ms user-perceptible threshold. Investigate render-server commits and main-thread work during scroll.`;
|
|
172
|
+
}
|
|
173
|
+
if (hang) {
|
|
174
|
+
return `${hang.durationMs.toFixed(0)}ms hang at t=${(hang.startNs / 1e9).toFixed(2)}s. Below the 250ms user-visible threshold but still worth investigating.`;
|
|
175
|
+
}
|
|
176
|
+
return "No user-perceptible perf events detected in the analyzed schemas.";
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Pure: assemble the compact markdown summary card. Designed to be
|
|
180
|
+
* <10 KB at default settings. The structured `areas` field carries
|
|
181
|
+
* the full data for callers who need it; this is the human view.
|
|
182
|
+
*/
|
|
183
|
+
export function buildMarkdownCard(result, verbose) {
|
|
184
|
+
const sections = [];
|
|
185
|
+
const inspection = result.inspection;
|
|
186
|
+
const traceName = basename(result.tracePath);
|
|
187
|
+
sections.push(`# Trace summary: ${traceName}`);
|
|
188
|
+
sections.push("");
|
|
189
|
+
const meta = [];
|
|
190
|
+
if (inspection.deviceModel)
|
|
191
|
+
meta.push(inspection.deviceModel);
|
|
192
|
+
if (inspection.osVersion)
|
|
193
|
+
meta.push(inspection.osVersion);
|
|
194
|
+
if (inspection.templateName)
|
|
195
|
+
meta.push(`Template: \`${inspection.templateName}\``);
|
|
196
|
+
if (meta.length > 0)
|
|
197
|
+
sections.push(`**${meta.join(" · ")}**`);
|
|
198
|
+
sections.push("");
|
|
199
|
+
sections.push(`> **Headline:** ${result.headline}`);
|
|
200
|
+
sections.push("");
|
|
201
|
+
const topNHangs = verbose ? DEFAULT_TOP_N_HANGS : 5;
|
|
202
|
+
const topNHitches = verbose ? DEFAULT_TOP_N_HITCHES : 5;
|
|
203
|
+
const topNAllocations = verbose ? DEFAULT_TOP_N_ALLOCATIONS : 5;
|
|
204
|
+
const topNTimeProfile = verbose ? DEFAULT_TOP_N_TIME_PROFILE : 5;
|
|
205
|
+
// Hangs section.
|
|
206
|
+
if (result.areas.hangs.status === "ok" && result.areas.hangs.result) {
|
|
207
|
+
const h = result.areas.hangs.result;
|
|
208
|
+
const totalHangs = h.totals?.hangs ?? 0;
|
|
209
|
+
const totalMicrohangs = h.totals?.microhangs ?? 0;
|
|
210
|
+
const userVisible = (h.top ?? []).filter((e) => e.durationMs >= 250).length;
|
|
211
|
+
sections.push(`## Hangs (${totalHangs}, ${userVisible} user-visible, ${totalMicrohangs} microhang${totalMicrohangs === 1 ? "" : "s"})`);
|
|
212
|
+
sections.push("");
|
|
213
|
+
if ((h.top ?? []).length > 0) {
|
|
214
|
+
for (const entry of (h.top ?? []).slice(0, topNHangs)) {
|
|
215
|
+
const at = (entry.startNs / 1e9).toFixed(2);
|
|
216
|
+
const violation = entry.mainThreadViolations?.[0];
|
|
217
|
+
const classification = violation
|
|
218
|
+
? ` → ${violation.kind} (\`${violation.topFrame}\`)`
|
|
219
|
+
: "";
|
|
220
|
+
sections.push(`- ${entry.durationMs.toFixed(0)}ms at t=${at}s${classification}`);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
sections.push("_No hang events above the minimum threshold._");
|
|
225
|
+
}
|
|
226
|
+
sections.push("");
|
|
227
|
+
}
|
|
228
|
+
else if (result.areas.hangs.status === "schema-absent") {
|
|
229
|
+
// Suppressed when no hangs data; reduces card clutter.
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
sections.push(`## Hangs`);
|
|
233
|
+
sections.push("");
|
|
234
|
+
sections.push(`_${result.areas.hangs.diagnosis}_`);
|
|
235
|
+
sections.push("");
|
|
236
|
+
}
|
|
237
|
+
// Animation hitches section.
|
|
238
|
+
if (result.areas.hitches.status === "ok" && result.areas.hitches.result) {
|
|
239
|
+
const h = result.areas.hitches.result;
|
|
240
|
+
const totalHitches = h.totals?.rows ?? 0;
|
|
241
|
+
const perceptible = h.totals?.perceptible ?? 0;
|
|
242
|
+
sections.push(`## Animation hitches (${totalHitches}, ${perceptible} above 100ms)`);
|
|
243
|
+
sections.push("");
|
|
244
|
+
if ((h.top ?? []).length > 0) {
|
|
245
|
+
sections.push("| At | Duration | Type |");
|
|
246
|
+
sections.push("|---|---:|---|");
|
|
247
|
+
for (const entry of (h.top ?? []).slice(0, topNHitches)) {
|
|
248
|
+
const at = `t=${(entry.startNs / 1e9).toFixed(2)}s`;
|
|
249
|
+
sections.push(`| ${at} | ${entry.durationMs.toFixed(0)}ms | ${entry.hitchType || "—"} |`);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
sections.push("");
|
|
253
|
+
}
|
|
254
|
+
else if (result.areas.hitches.status === "failed") {
|
|
255
|
+
sections.push(`## Animation hitches`);
|
|
256
|
+
sections.push("");
|
|
257
|
+
sections.push(`_${result.areas.hitches.diagnosis}_`);
|
|
258
|
+
sections.push("");
|
|
259
|
+
}
|
|
260
|
+
// Time profile section. analyzeTimeProfile may surface a workaround
|
|
261
|
+
// notice (xctrace SIGSEGV) via `notice`; we surface it inline so the
|
|
262
|
+
// summary card flags the partial-data situation.
|
|
263
|
+
if (result.areas.timeProfile.status === "ok" &&
|
|
264
|
+
result.areas.timeProfile.result) {
|
|
265
|
+
const tp = result.areas.timeProfile.result;
|
|
266
|
+
sections.push(`## Time profile (${tp.totalSamples.toLocaleString()} samples, top ${topNTimeProfile} symbols)`);
|
|
267
|
+
sections.push("");
|
|
268
|
+
if (tp.notice) {
|
|
269
|
+
sections.push(`> _${tp.notice}_`);
|
|
270
|
+
sections.push("");
|
|
271
|
+
}
|
|
272
|
+
const symbols = tp.topSymbols ?? [];
|
|
273
|
+
if (symbols.length > 0) {
|
|
274
|
+
for (const s of symbols.slice(0, topNTimeProfile)) {
|
|
275
|
+
const pct = tp.totalSamples > 0
|
|
276
|
+
? `${((s.samples / tp.totalSamples) * 100).toFixed(1)}%`
|
|
277
|
+
: `${s.samples} samples`;
|
|
278
|
+
sections.push(`- ${pct} \`${s.symbol || "???"}\``);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
sections.push("_No symbols above the noise threshold._");
|
|
283
|
+
}
|
|
284
|
+
sections.push("");
|
|
285
|
+
}
|
|
286
|
+
else if (result.areas.timeProfile.status === "failed") {
|
|
287
|
+
sections.push(`## Time profile`);
|
|
288
|
+
sections.push("");
|
|
289
|
+
sections.push(`_${result.areas.timeProfile.diagnosis}_`);
|
|
290
|
+
sections.push("");
|
|
291
|
+
}
|
|
292
|
+
// Allocations section.
|
|
293
|
+
if (result.areas.allocations.status === "ok" &&
|
|
294
|
+
result.areas.allocations.result) {
|
|
295
|
+
const a = result.areas.allocations.result;
|
|
296
|
+
const cumulativeBytes = a.totals.cumulativeBytes;
|
|
297
|
+
const persistentBytes = a.totals.persistentBytes;
|
|
298
|
+
sections.push(`## Allocations (${(cumulativeBytes / 1024 / 1024).toFixed(1)} MB cumulative, ${(persistentBytes / 1024 / 1024).toFixed(1)} MB persistent)`);
|
|
299
|
+
sections.push("");
|
|
300
|
+
const top = a.topByBytes ?? [];
|
|
301
|
+
if (top.length > 0) {
|
|
302
|
+
sections.push("| Category | Lifecycle | Bytes (cumulative) | Count |");
|
|
303
|
+
sections.push("|---|---|---:|---:|");
|
|
304
|
+
for (const entry of top.slice(0, topNAllocations)) {
|
|
305
|
+
const mb = (entry.cumulativeBytes / 1024 / 1024).toFixed(2);
|
|
306
|
+
sections.push(`| \`${entry.category}\` | ${entry.lifecycle} | ${mb} MB | ${entry.cumulativeCount.toLocaleString()} |`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
sections.push("");
|
|
310
|
+
}
|
|
311
|
+
// App launch section.
|
|
312
|
+
if (result.areas.appLaunch.status === "ok" &&
|
|
313
|
+
result.areas.appLaunch.result) {
|
|
314
|
+
const al = result.areas.appLaunch.result;
|
|
315
|
+
sections.push(`## App launch (${al.launchType}, ${al.totalLaunchMs.toFixed(0)}ms total)`);
|
|
316
|
+
sections.push("");
|
|
317
|
+
if ((al.phases ?? []).length > 0) {
|
|
318
|
+
sections.push("| Phase | Duration | % of total |");
|
|
319
|
+
sections.push("|---|---:|---:|");
|
|
320
|
+
for (const p of al.phases ?? []) {
|
|
321
|
+
sections.push(`| ${p.label || p.phase} | ${p.durationMs.toFixed(0)}ms | ${p.percentOfTotal.toFixed(1)}% |`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
sections.push("");
|
|
325
|
+
}
|
|
326
|
+
// Cross-correlations (v1.13 Phase 2). High and medium go straight
|
|
327
|
+
// into the card; low-confidence entries collapsed into a single
|
|
328
|
+
// "plus N more" line to keep the card compact.
|
|
329
|
+
const correlations = result.correlations ?? [];
|
|
330
|
+
if (correlations.length > 0) {
|
|
331
|
+
const highMedium = correlations.filter((c) => c.confidence === "high" || c.confidence === "medium");
|
|
332
|
+
const low = correlations.filter((c) => c.confidence === "low");
|
|
333
|
+
if (highMedium.length > 0 || verbose) {
|
|
334
|
+
sections.push("## Cross-correlations");
|
|
335
|
+
sections.push("");
|
|
336
|
+
const visible = verbose ? correlations : highMedium;
|
|
337
|
+
for (const c of visible) {
|
|
338
|
+
const confidenceBadge = c.confidence === "high"
|
|
339
|
+
? "**HIGH**"
|
|
340
|
+
: c.confidence === "medium"
|
|
341
|
+
? "MEDIUM"
|
|
342
|
+
: "low";
|
|
343
|
+
sections.push(`- (${confidenceBadge}) ${c.narrative}`);
|
|
344
|
+
}
|
|
345
|
+
if (!verbose && low.length > 0) {
|
|
346
|
+
sections.push(`- _${low.length} low-confidence overlap${low.length === 1 ? "" : "s"} omitted; pass \`verbose: true\` to see them._`);
|
|
347
|
+
}
|
|
348
|
+
sections.push("");
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
// Suggested next calls from inspectTrace (carries them already).
|
|
352
|
+
if (inspection.suggestedNextCalls.length > 0) {
|
|
353
|
+
sections.push("## Suggested next calls");
|
|
354
|
+
sections.push("");
|
|
355
|
+
for (const call of inspection.suggestedNextCalls.slice(0, 5)) {
|
|
356
|
+
sections.push(`- \`${call.tool}\` — ${call.why}`);
|
|
357
|
+
}
|
|
358
|
+
sections.push("");
|
|
359
|
+
}
|
|
360
|
+
return sections.join("\n").trim();
|
|
361
|
+
}
|
|
362
|
+
export async function summarizeTrace(input) {
|
|
363
|
+
const tracePath = resolvePath(input.tracePath);
|
|
364
|
+
if (!existsSync(tracePath)) {
|
|
365
|
+
throw new Error(`Trace bundle not found: ${tracePath}`);
|
|
366
|
+
}
|
|
367
|
+
const verbose = input.verbose ?? false;
|
|
368
|
+
// Step 1: TOC.
|
|
369
|
+
const inspection = await inspectTrace({ tracePath });
|
|
370
|
+
// Step 2: chain analyzers in parallel. Each branch is fault-tolerant
|
|
371
|
+
// via buildAreaSummary so one failure doesn't tank the whole summary.
|
|
372
|
+
const [hangs, hitches, timeProfile, allocations, appLaunch] = await Promise.all([
|
|
373
|
+
buildAreaSummary("potential-hangs", inspection, () => analyzeHangs({
|
|
374
|
+
tracePath,
|
|
375
|
+
topN: DEFAULT_TOP_N_HANGS,
|
|
376
|
+
minDurationMs: DEFAULT_HANG_MIN_MS,
|
|
377
|
+
includeStackClassification: true,
|
|
378
|
+
}), "potential-hangs schema absent from this trace."),
|
|
379
|
+
buildAreaSummary("animation-hitches", inspection, () => analyzeAnimationHitches({
|
|
380
|
+
tracePath,
|
|
381
|
+
topN: DEFAULT_TOP_N_HITCHES,
|
|
382
|
+
minDurationMs: DEFAULT_HITCH_THRESHOLD_MS,
|
|
383
|
+
}), "animation-hitches schema absent from this trace."),
|
|
384
|
+
buildAreaSummary("time-profile", inspection, () => analyzeTimeProfile({
|
|
385
|
+
tracePath,
|
|
386
|
+
topN: DEFAULT_TOP_N_TIME_PROFILE,
|
|
387
|
+
}), "time-profile schema absent from this trace."),
|
|
388
|
+
buildAreaSummary("allocations", inspection, () => analyzeAllocations({
|
|
389
|
+
tracePath,
|
|
390
|
+
topN: DEFAULT_TOP_N_ALLOCATIONS,
|
|
391
|
+
minBytes: 0,
|
|
392
|
+
}), "allocations schema absent from this trace."),
|
|
393
|
+
buildAreaSummary("app-launch", inspection, () => analyzeAppLaunch({ tracePath }), "app-launch schema absent from this trace."),
|
|
394
|
+
]);
|
|
395
|
+
const areas = {
|
|
396
|
+
hangs,
|
|
397
|
+
hitches,
|
|
398
|
+
timeProfile,
|
|
399
|
+
allocations,
|
|
400
|
+
appLaunch,
|
|
401
|
+
};
|
|
402
|
+
const correlations = buildCorrelations(areas);
|
|
403
|
+
const headline = buildHeadline(areas);
|
|
404
|
+
const base = {
|
|
405
|
+
ok: true,
|
|
406
|
+
tracePath,
|
|
407
|
+
inspection,
|
|
408
|
+
areas,
|
|
409
|
+
correlations,
|
|
410
|
+
headline,
|
|
411
|
+
};
|
|
412
|
+
const markdown = buildMarkdownCard(base, verbose);
|
|
413
|
+
return { ...base, markdown };
|
|
414
|
+
}
|
|
415
|
+
// Helper for tests: ensure the keys in `areas` stay aligned with the
|
|
416
|
+
// implementation. Imported by the test file.
|
|
417
|
+
export const SUMMARIZE_AREA_KEYS = [
|
|
418
|
+
"hangs",
|
|
419
|
+
"hitches",
|
|
420
|
+
"timeProfile",
|
|
421
|
+
"allocations",
|
|
422
|
+
"appLaunch",
|
|
423
|
+
];
|
|
424
|
+
//# sourceMappingURL=summarizeTrace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summarizeTrace.js","sourceRoot":"","sources":["../../src/tools/summarizeTrace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,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,EACV,GAAG,EAAE,CAAC,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC,EACrC,2CAA2C,CAC5C;KACF,CAAC,CAAC;IAEH,MAAM,KAAK,GAAkC;QAC3C,KAAK;QACL,OAAO;QACP,WAAW;QACX,WAAW;QACX,SAAS;KACV,CAAC;IACF,MAAM,YAAY,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAEtC,MAAM,IAAI,GAA2C;QACnD,EAAE,EAAE,IAAI;QACR,SAAS;QACT,UAAU;QACV,KAAK;QACL,YAAY;QACZ,QAAQ;KACT,CAAC;IACF,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAElD,OAAO,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC;AAED,qEAAqE;AACrE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO;IACP,SAAS;IACT,aAAa;IACb,aAAa;IACb,WAAW;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memorydetective",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"mcpName": "io.github.carloshpdoc/memorydetective",
|
|
5
5
|
"description": "MCP server for iOS leak hunting and performance investigation. 34 tools across .memgraph and .trace files, 36-pattern retain-cycle classifier with Swift fixTemplate snippets, abandoned-memory diff for KVO/NotificationCenter/cache shapes that escape leaks(1), per-test CI gate (detectLeaksInXCTest + detectLeaksInXCUITest with self-contained HTML reports), main-thread violation classifier on analyzeHangs, single-call build+boot+launch for the macOS 26.x leaks --outputGraph regression, replayScenario + captureScenarioState verify-fix loop, compareTracesByPattern CI gate on hangs/hitches/launch regressions, SourceKit-LSP source bridging. macOS only (depends on leaks(1) and xctrace).",
|
|
6
6
|
"type": "module",
|