memorydetective 1.8.0 → 1.9.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 +64 -1
- package/README.md +75 -9
- package/USAGE.md +27 -4
- package/dist/cli.js +106 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.js +42 -22
- package/dist/index.js.map +1 -1
- package/dist/parsers/referenceTree.d.ts +73 -0
- package/dist/parsers/referenceTree.js +145 -0
- package/dist/parsers/referenceTree.js.map +1 -0
- package/dist/runtime/axe.js +6 -1
- package/dist/runtime/axe.js.map +1 -1
- package/dist/runtime/exec.d.ts +30 -0
- package/dist/runtime/exec.js +30 -3
- package/dist/runtime/exec.js.map +1 -1
- package/dist/runtime/fixTemplates.js +67 -0
- package/dist/runtime/fixTemplates.js.map +1 -1
- package/dist/runtime/leakReport.d.ts +62 -0
- package/dist/runtime/leakReport.js +138 -0
- package/dist/runtime/leakReport.js.map +1 -0
- package/dist/runtime/platformCheck.d.ts +54 -0
- package/dist/runtime/platformCheck.js +94 -0
- package/dist/runtime/platformCheck.js.map +1 -0
- package/dist/runtime/redact.d.ts +66 -0
- package/dist/runtime/redact.js +146 -0
- package/dist/runtime/redact.js.map +1 -0
- package/dist/runtime/responseFormatter.d.ts +55 -0
- package/dist/runtime/responseFormatter.js +200 -0
- package/dist/runtime/responseFormatter.js.map +1 -0
- package/dist/runtime/securityFlags.d.ts +74 -0
- package/dist/runtime/securityFlags.js +90 -0
- package/dist/runtime/securityFlags.js.map +1 -0
- package/dist/runtime/staticAnalysisHints.js +14 -1
- package/dist/runtime/staticAnalysisHints.js.map +1 -1
- package/dist/templates/leak-report.html +39 -0
- package/dist/templates/templates/leak-report.html +39 -0
- package/dist/tools/analyzeAbandonedMemory.d.ts +140 -0
- package/dist/tools/analyzeAbandonedMemory.js +287 -0
- package/dist/tools/analyzeAbandonedMemory.js.map +1 -0
- package/dist/tools/analyzeAllocations.d.ts +11 -2
- package/dist/tools/analyzeAllocations.js +4 -0
- package/dist/tools/analyzeAllocations.js.map +1 -1
- package/dist/tools/analyzeAnimationHitches.d.ts +32 -2
- package/dist/tools/analyzeAnimationHitches.js +25 -4
- package/dist/tools/analyzeAnimationHitches.js.map +1 -1
- package/dist/tools/analyzeAppLaunch.d.ts +3 -0
- package/dist/tools/analyzeAppLaunch.js +2 -0
- package/dist/tools/analyzeAppLaunch.js.map +1 -1
- package/dist/tools/analyzeHangs.d.ts +78 -2
- package/dist/tools/analyzeHangs.js +117 -4
- package/dist/tools/analyzeHangs.js.map +1 -1
- package/dist/tools/analyzeMemgraph.d.ts +21 -1
- package/dist/tools/analyzeMemgraph.js +52 -2
- package/dist/tools/analyzeMemgraph.js.map +1 -1
- package/dist/tools/analyzeTimeProfile.d.ts +11 -1
- package/dist/tools/analyzeTimeProfile.js +5 -0
- package/dist/tools/analyzeTimeProfile.js.map +1 -1
- package/dist/tools/bootAndLaunchForLeakInvestigation.d.ts +18 -9
- package/dist/tools/bootAndLaunchForLeakInvestigation.js +27 -0
- package/dist/tools/bootAndLaunchForLeakInvestigation.js.map +1 -1
- package/dist/tools/captureMemgraph.d.ts +22 -4
- package/dist/tools/captureMemgraph.js +42 -9
- package/dist/tools/captureMemgraph.js.map +1 -1
- package/dist/tools/captureScenarioState.d.ts +12 -4
- package/dist/tools/captureScenarioState.js +4 -0
- package/dist/tools/captureScenarioState.js.map +1 -1
- package/dist/tools/classifyCycle.js +77 -0
- package/dist/tools/classifyCycle.js.map +1 -1
- package/dist/tools/cleanupTraces.d.ts +87 -0
- package/dist/tools/cleanupTraces.js +232 -0
- package/dist/tools/cleanupTraces.js.map +1 -0
- package/dist/tools/compareTracesByPattern.d.ts +2 -2
- package/dist/tools/detectLeaksInXCTest.d.ts +116 -0
- package/dist/tools/detectLeaksInXCTest.js +311 -0
- package/dist/tools/detectLeaksInXCTest.js.map +1 -0
- package/dist/tools/detectLeaksInXCUITest.d.ts +8 -3
- package/dist/tools/detectLeaksInXCUITest.js +30 -4
- package/dist/tools/detectLeaksInXCUITest.js.map +1 -1
- package/dist/tools/diffMemgraphs.d.ts +5 -2
- package/dist/tools/diffMemgraphs.js +2 -0
- package/dist/tools/diffMemgraphs.js.map +1 -1
- package/dist/tools/findCycles.d.ts +1 -1
- package/dist/tools/recordTimeProfile.d.ts +29 -9
- package/dist/tools/recordTimeProfile.js +70 -7
- package/dist/tools/recordTimeProfile.js.map +1 -1
- package/dist/tools/renderCycleGraph.d.ts +1 -1
- package/dist/tools/verifyFix.d.ts +2 -2
- package/dist/types.d.ts +24 -1
- package/package.json +4 -3
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { existsSync, mkdirSync } from "node:fs";
|
|
3
|
+
import { resolve as resolvePath, join as joinPath, basename } from "node:path";
|
|
4
|
+
import { runCommand } from "../runtime/exec.js";
|
|
5
|
+
import { runLeaksAndParse } from "../runtime/leaks.js";
|
|
6
|
+
import { resolveAppNameToPid } from "./captureMemgraph.js";
|
|
7
|
+
import { rootCyclesOnly } from "../parsers/leaksOutput.js";
|
|
8
|
+
import { writeLeakReportHtml } from "../runtime/leakReport.js";
|
|
9
|
+
/**
|
|
10
|
+
* CI-runnable leak detection for XCTest unit-test bundles.
|
|
11
|
+
*
|
|
12
|
+
* Sibling to `detectLeaksInXCUITest`. The orchestration model is the same:
|
|
13
|
+
* build-for-testing -> launch test bundle -> poll for the runner process ->
|
|
14
|
+
* capture baseline memgraph -> wait for test to finish -> capture after
|
|
15
|
+
* memgraph -> diff. The difference is the target process: unit tests run
|
|
16
|
+
* inside an `xctest` runner (or the app process if a host app is configured),
|
|
17
|
+
* not the XCUITest host app. Default `processName` reflects that.
|
|
18
|
+
*
|
|
19
|
+
* Per-test granularity is achieved by the CALLER invoking the tool once per
|
|
20
|
+
* test method (passing a different `testCaseFilter` each time). The tool
|
|
21
|
+
* itself runs ONE `xcodebuild test` invocation per call so the result is
|
|
22
|
+
* always tied to a single, well-defined before/after pair.
|
|
23
|
+
*/
|
|
24
|
+
export const detectLeaksInXCTestSchema = z
|
|
25
|
+
.object({
|
|
26
|
+
workspace: z
|
|
27
|
+
.string()
|
|
28
|
+
.min(1)
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("Path to the `.xcworkspace`. Mutually exclusive with `project`."),
|
|
31
|
+
project: z
|
|
32
|
+
.string()
|
|
33
|
+
.min(1)
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("Path to the `.xcodeproj`. Mutually exclusive with `workspace`."),
|
|
36
|
+
scheme: z
|
|
37
|
+
.string()
|
|
38
|
+
.min(1)
|
|
39
|
+
.describe("Xcode scheme that builds and runs the XCTest unit-test target."),
|
|
40
|
+
destination: z
|
|
41
|
+
.string()
|
|
42
|
+
.default("platform=iOS Simulator,name=iPhone 11,OS=latest")
|
|
43
|
+
.describe("xcodebuild destination string. Default targets the most common iOS Simulator profile."),
|
|
44
|
+
testCaseFilter: z
|
|
45
|
+
.string()
|
|
46
|
+
.min(1)
|
|
47
|
+
.optional()
|
|
48
|
+
.describe("Optional `-only-testing` filter in `<TestTarget>/<TestClass>` or `<TestTarget>/<TestClass>/<testMethod>` form. Omit to run every test in the scheme (slower; produces one before/after pair for the entire run)."),
|
|
49
|
+
processName: z
|
|
50
|
+
.string()
|
|
51
|
+
.default("xctest")
|
|
52
|
+
.describe("Process name to attach `leaks` against. `xctest` is the default unit-test runner on the simulator. If your tests are hosted in an app, pass the host app's process name instead (the same value `pgrep -x` would match)."),
|
|
53
|
+
outputDir: z
|
|
54
|
+
.string()
|
|
55
|
+
.default("/tmp/memorydetective-xctest")
|
|
56
|
+
.describe("Directory where the baseline + after `.memgraph` snapshots are written."),
|
|
57
|
+
allowlistPatterns: z
|
|
58
|
+
.array(z.string())
|
|
59
|
+
.default([])
|
|
60
|
+
.describe("Substrings of class names that are allowed to leak. Cycles whose root class contains any of these substrings will not fail the run."),
|
|
61
|
+
skipBuild: z
|
|
62
|
+
.boolean()
|
|
63
|
+
.default(false)
|
|
64
|
+
.describe("Skip the `build-for-testing` step (faster on CI when the build is cached)."),
|
|
65
|
+
runnerStartTimeoutMs: z
|
|
66
|
+
.number()
|
|
67
|
+
.int()
|
|
68
|
+
.positive()
|
|
69
|
+
.default(5 * 60_000)
|
|
70
|
+
.describe("How long to wait for the test runner process to appear under `pgrep -x <processName>` before giving up. Default 5 minutes."),
|
|
71
|
+
outputHtmlPath: z
|
|
72
|
+
.string()
|
|
73
|
+
.optional()
|
|
74
|
+
.describe("Absolute path to write a self-contained HTML report (inline CSS, no external assets). When set, the response also gains an `htmlReportPath` field pointing at the same file. Designed for CI artifact upload + PR-comment attachment."),
|
|
75
|
+
})
|
|
76
|
+
.superRefine((val, ctx) => {
|
|
77
|
+
const targets = [val.workspace, val.project].filter(Boolean).length;
|
|
78
|
+
if (targets !== 1) {
|
|
79
|
+
ctx.addIssue({
|
|
80
|
+
code: z.ZodIssueCode.custom,
|
|
81
|
+
message: "Provide exactly one of `workspace` or `project`.",
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
async function captureMemgraphForProcess(processName, outputPath) {
|
|
86
|
+
const pid = await resolveAppNameToPid(processName);
|
|
87
|
+
const result = await runCommand("leaks", ["--outputGraph", outputPath, String(pid)], { timeoutMs: 120_000 });
|
|
88
|
+
if (result.code !== 0 && result.code !== 1) {
|
|
89
|
+
throw new Error(`leaks --outputGraph failed (code ${result.code}): ${result.stderr || result.stdout}`);
|
|
90
|
+
}
|
|
91
|
+
if (!existsSync(outputPath)) {
|
|
92
|
+
throw new Error(`leaks reported success but output file is missing: ${outputPath}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
async function runXcodebuild(args, step, steps) {
|
|
96
|
+
steps.push(`$ xcodebuild ${args.join(" ")}`);
|
|
97
|
+
const result = await runCommand("xcodebuild", args, { timeoutMs: 30 * 60_000 });
|
|
98
|
+
if (result.code !== 0) {
|
|
99
|
+
throw new Error(`${step} failed (code ${result.code}): ${result.stderr || result.stdout || "<no output>"}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export function isAllowlisted(rootClass, patterns) {
|
|
103
|
+
return patterns.some((p) => rootClass.includes(p));
|
|
104
|
+
}
|
|
105
|
+
export function countDescendants(children) {
|
|
106
|
+
let n = children.length;
|
|
107
|
+
for (const c of children) {
|
|
108
|
+
n += countDescendants(c.children);
|
|
109
|
+
}
|
|
110
|
+
return n;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Build the new-cycles summary by diffing baseline + after reports against the
|
|
114
|
+
* allowlist. Exposed for testing so the diff logic can be exercised without
|
|
115
|
+
* spinning up xcodebuild.
|
|
116
|
+
*/
|
|
117
|
+
export function summarizeNewCycles(baseline, after, allowlistPatterns) {
|
|
118
|
+
const baselineRootClasses = new Set(rootCyclesOnly(baseline.cycles).map((c) => c.className || c.address));
|
|
119
|
+
const afterRoots = rootCyclesOnly(after.cycles);
|
|
120
|
+
const newOnes = afterRoots.filter((c) => !baselineRootClasses.has(c.className || c.address));
|
|
121
|
+
const allowlistedFlags = newOnes.map((c) => isAllowlisted(c.className, allowlistPatterns));
|
|
122
|
+
const newCycles = newOnes.map((c, i) => ({
|
|
123
|
+
rootClass: c.className || c.address,
|
|
124
|
+
chainLength: countDescendants(c.children) + 1,
|
|
125
|
+
allowlisted: allowlistedFlags[i],
|
|
126
|
+
}));
|
|
127
|
+
const failingCount = newCycles.filter((c) => !c.allowlisted).length;
|
|
128
|
+
return { newCycles, failingCount };
|
|
129
|
+
}
|
|
130
|
+
function attachHtmlReportIfRequested(result, outputHtmlPath, schemeLabel) {
|
|
131
|
+
if (!outputHtmlPath)
|
|
132
|
+
return result;
|
|
133
|
+
const path = writeLeakReportHtml(outputHtmlPath, {
|
|
134
|
+
title: `Leak report: ${schemeLabel}`,
|
|
135
|
+
subtitle: result.testCaseFilter
|
|
136
|
+
? `Filter: ${result.testCaseFilter}`
|
|
137
|
+
: "No -only-testing filter (entire scheme).",
|
|
138
|
+
sections: [
|
|
139
|
+
{
|
|
140
|
+
title: result.testCaseFilter ?? schemeLabel,
|
|
141
|
+
passed: result.passed,
|
|
142
|
+
failureReason: result.failureReason,
|
|
143
|
+
baselineMemgraph: result.baselineMemgraph || undefined,
|
|
144
|
+
afterMemgraph: result.afterMemgraph || undefined,
|
|
145
|
+
totals: result.totals,
|
|
146
|
+
newCycles: result.newCycles,
|
|
147
|
+
steps: result.steps,
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
});
|
|
151
|
+
return { ...result, htmlReportPath: path };
|
|
152
|
+
}
|
|
153
|
+
export async function detectLeaksInXCTest(input) {
|
|
154
|
+
const projectPath = resolvePath((input.workspace ?? input.project));
|
|
155
|
+
if (!existsSync(projectPath)) {
|
|
156
|
+
throw new Error(`Workspace/project not found: ${projectPath}`);
|
|
157
|
+
}
|
|
158
|
+
const outputDir = resolvePath(input.outputDir);
|
|
159
|
+
if (!existsSync(outputDir))
|
|
160
|
+
mkdirSync(outputDir, { recursive: true });
|
|
161
|
+
const filterTag = input.testCaseFilter
|
|
162
|
+
? input.testCaseFilter.replace(/[^A-Za-z0-9._-]/g, "_")
|
|
163
|
+
: "all";
|
|
164
|
+
const baselinePath = joinPath(outputDir, `${basename(projectPath)}-${filterTag}-baseline.memgraph`);
|
|
165
|
+
const afterPath = joinPath(outputDir, `${basename(projectPath)}-${filterTag}-after.memgraph`);
|
|
166
|
+
const steps = [];
|
|
167
|
+
const projectFlag = input.workspace ? "-workspace" : "-project";
|
|
168
|
+
// 1. Build for testing (once).
|
|
169
|
+
if (!input.skipBuild) {
|
|
170
|
+
await runXcodebuild([
|
|
171
|
+
projectFlag,
|
|
172
|
+
projectPath,
|
|
173
|
+
"-scheme",
|
|
174
|
+
input.scheme,
|
|
175
|
+
"-destination",
|
|
176
|
+
input.destination,
|
|
177
|
+
"build-for-testing",
|
|
178
|
+
"-quiet",
|
|
179
|
+
], "build-for-testing", steps);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
steps.push("(skipped build-for-testing)");
|
|
183
|
+
}
|
|
184
|
+
// 2. Run the test bundle in the background so we can attach `leaks` to the
|
|
185
|
+
// runner process while it is alive. Captures baseline once the runner shows
|
|
186
|
+
// up under pgrep, then after the test finishes (best-effort: the xctest
|
|
187
|
+
// runner exits quickly at end-of-bundle).
|
|
188
|
+
const testArgs = [
|
|
189
|
+
projectFlag,
|
|
190
|
+
projectPath,
|
|
191
|
+
"-scheme",
|
|
192
|
+
input.scheme,
|
|
193
|
+
"-destination",
|
|
194
|
+
input.destination,
|
|
195
|
+
"test-without-building",
|
|
196
|
+
"-quiet",
|
|
197
|
+
];
|
|
198
|
+
if (input.testCaseFilter) {
|
|
199
|
+
testArgs.splice(testArgs.length - 2, 0, "-only-testing:" + input.testCaseFilter);
|
|
200
|
+
steps.push(`Filter: -only-testing:${input.testCaseFilter}`);
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
steps.push("No filter — running the entire test scheme.");
|
|
204
|
+
}
|
|
205
|
+
const { spawn } = await import("node:child_process");
|
|
206
|
+
const child = spawn("xcodebuild", testArgs);
|
|
207
|
+
let testStdout = "";
|
|
208
|
+
let testStderr = "";
|
|
209
|
+
child.stdout.on("data", (c) => (testStdout += c.toString("utf8")));
|
|
210
|
+
child.stderr.on("data", (c) => (testStderr += c.toString("utf8")));
|
|
211
|
+
const testPromise = new Promise((resolve) => {
|
|
212
|
+
child.on("close", (code) => resolve(code ?? -1));
|
|
213
|
+
});
|
|
214
|
+
// Poll pgrep for the runner process. xctest typically appears within
|
|
215
|
+
// a few seconds of `xcodebuild test` starting.
|
|
216
|
+
const startedAt = Date.now();
|
|
217
|
+
let captured = false;
|
|
218
|
+
while (Date.now() - startedAt < input.runnerStartTimeoutMs) {
|
|
219
|
+
try {
|
|
220
|
+
const pgrep = await runCommand("pgrep", ["-x", input.processName], {
|
|
221
|
+
timeoutMs: 5_000,
|
|
222
|
+
});
|
|
223
|
+
if (pgrep.code === 0 && pgrep.stdout.trim()) {
|
|
224
|
+
await captureMemgraphForProcess(input.processName, baselinePath);
|
|
225
|
+
steps.push(`Captured baseline: ${baselinePath}`);
|
|
226
|
+
captured = true;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
// Runner not up yet; keep polling.
|
|
232
|
+
}
|
|
233
|
+
await new Promise((r) => setTimeout(r, 1500));
|
|
234
|
+
}
|
|
235
|
+
if (!captured) {
|
|
236
|
+
child.kill("SIGTERM");
|
|
237
|
+
return attachHtmlReportIfRequested({
|
|
238
|
+
ok: false,
|
|
239
|
+
passed: false,
|
|
240
|
+
baselineMemgraph: "",
|
|
241
|
+
afterMemgraph: "",
|
|
242
|
+
testCaseFilter: input.testCaseFilter,
|
|
243
|
+
totals: { baselineLeaks: 0, afterLeaks: 0, leakDelta: 0 },
|
|
244
|
+
newCycles: [],
|
|
245
|
+
failureReason: `Timed out (${input.runnerStartTimeoutMs}ms) waiting for the test runner process "${input.processName}" to appear under pgrep. Check that the scheme actually builds a runnable test bundle, and that \`processName\` matches the runner's process name on this simulator runtime.`,
|
|
246
|
+
steps,
|
|
247
|
+
}, input.outputHtmlPath, input.scheme);
|
|
248
|
+
}
|
|
249
|
+
const testExitCode = await testPromise;
|
|
250
|
+
steps.push(`Test exited with code ${testExitCode}`);
|
|
251
|
+
// After-capture is best-effort. The xctest runner exits quickly at end of
|
|
252
|
+
// the test bundle; if we miss the window the user can either configure a
|
|
253
|
+
// post-test sleep in their test setup, or use a host app whose lifetime
|
|
254
|
+
// outlives the test bundle.
|
|
255
|
+
let afterCaptured = false;
|
|
256
|
+
let afterCaptureError;
|
|
257
|
+
try {
|
|
258
|
+
await captureMemgraphForProcess(input.processName, afterPath);
|
|
259
|
+
steps.push(`Captured after: ${afterPath}`);
|
|
260
|
+
afterCaptured = true;
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
afterCaptureError = err instanceof Error ? err.message : String(err);
|
|
264
|
+
steps.push(`Skipped after-capture — runner process ended before we could attach. ${afterCaptureError}`);
|
|
265
|
+
}
|
|
266
|
+
if (!afterCaptured) {
|
|
267
|
+
return attachHtmlReportIfRequested({
|
|
268
|
+
ok: false,
|
|
269
|
+
passed: false,
|
|
270
|
+
baselineMemgraph: baselinePath,
|
|
271
|
+
afterMemgraph: "",
|
|
272
|
+
testCaseFilter: input.testCaseFilter,
|
|
273
|
+
totals: { baselineLeaks: 0, afterLeaks: 0, leakDelta: 0 },
|
|
274
|
+
newCycles: [],
|
|
275
|
+
failureReason: "After-capture failed because the test runner exited before `leaks` could attach. Configure the test to keep the process alive briefly at end-of-run (e.g. `_ = XCTWaiter.wait(for: [.init()], timeout: 0.5)` in `tearDown`) or run with a host app whose lifetime outlives the test bundle.",
|
|
276
|
+
steps,
|
|
277
|
+
}, input.outputHtmlPath, input.scheme);
|
|
278
|
+
}
|
|
279
|
+
const [baseline, after] = await Promise.all([
|
|
280
|
+
runLeaksAndParse(baselinePath),
|
|
281
|
+
runLeaksAndParse(afterPath),
|
|
282
|
+
]);
|
|
283
|
+
const baselineReport = baseline.report;
|
|
284
|
+
const afterReport = after.report;
|
|
285
|
+
const { newCycles, failingCount } = summarizeNewCycles(baselineReport, afterReport, input.allowlistPatterns ?? []);
|
|
286
|
+
const passed = failingCount === 0 && testExitCode === 0;
|
|
287
|
+
return attachHtmlReportIfRequested({
|
|
288
|
+
ok: true,
|
|
289
|
+
passed,
|
|
290
|
+
baselineMemgraph: baselinePath,
|
|
291
|
+
afterMemgraph: afterPath,
|
|
292
|
+
testCaseFilter: input.testCaseFilter,
|
|
293
|
+
totals: {
|
|
294
|
+
baselineLeaks: baselineReport.totals.leakCount,
|
|
295
|
+
afterLeaks: afterReport.totals.leakCount,
|
|
296
|
+
leakDelta: afterReport.totals.leakCount - baselineReport.totals.leakCount,
|
|
297
|
+
},
|
|
298
|
+
newCycles,
|
|
299
|
+
failureReason: passed
|
|
300
|
+
? undefined
|
|
301
|
+
: testExitCode !== 0
|
|
302
|
+
? `Test run failed with exit code ${testExitCode}. stderr: ${testStderr.slice(0, 500)}`
|
|
303
|
+
: `${failingCount} new ROOT CYCLE(s) appeared after the test that are not in the allowlist: ${newCycles
|
|
304
|
+
.filter((c) => !c.allowlisted)
|
|
305
|
+
.map((c) => c.rootClass)
|
|
306
|
+
.slice(0, 5)
|
|
307
|
+
.join(", ")}${failingCount > 5 ? ", ..." : ""}`,
|
|
308
|
+
steps,
|
|
309
|
+
}, input.outputHtmlPath, input.scheme);
|
|
310
|
+
}
|
|
311
|
+
//# sourceMappingURL=detectLeaksInXCTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detectLeaksInXCTest.js","sourceRoot":"","sources":["../../src/tools/detectLeaksInXCTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,IAAI,IAAI,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC7E,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,C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AC,CAAC,WAAW,CAAC;qBAC7B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;qBACvB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;qBACX,IAAI,CAAC,IAAI,CAAC,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACvD,KAAK;KACN,EACD,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,MAAM,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -25,24 +25,27 @@ export declare const detectLeaksInXCUITestSchema: z.ZodObject<{
|
|
|
25
25
|
outputDir: z.ZodDefault<z.ZodString>;
|
|
26
26
|
allowlistPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
27
27
|
skipBuild: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
+
outputHtmlPath: z.ZodOptional<z.ZodString>;
|
|
28
29
|
}, "strip", z.ZodTypeAny, {
|
|
29
30
|
appName: string;
|
|
30
31
|
workspace: string;
|
|
31
32
|
scheme: string;
|
|
32
|
-
outputDir: string;
|
|
33
|
-
testIdentifier: string;
|
|
34
33
|
destination: string;
|
|
34
|
+
outputDir: string;
|
|
35
35
|
allowlistPatterns: string[];
|
|
36
36
|
skipBuild: boolean;
|
|
37
|
+
testIdentifier: string;
|
|
38
|
+
outputHtmlPath?: string | undefined;
|
|
37
39
|
}, {
|
|
38
40
|
appName: string;
|
|
39
41
|
workspace: string;
|
|
40
42
|
scheme: string;
|
|
41
43
|
testIdentifier: string;
|
|
42
|
-
outputDir?: string | undefined;
|
|
43
44
|
destination?: string | undefined;
|
|
45
|
+
outputDir?: string | undefined;
|
|
44
46
|
allowlistPatterns?: string[] | undefined;
|
|
45
47
|
skipBuild?: boolean | undefined;
|
|
48
|
+
outputHtmlPath?: string | undefined;
|
|
46
49
|
}>;
|
|
47
50
|
export type DetectLeaksInXCUITestInput = z.infer<typeof detectLeaksInXCUITestSchema>;
|
|
48
51
|
export interface XCUITestLeakResult {
|
|
@@ -65,5 +68,7 @@ export interface XCUITestLeakResult {
|
|
|
65
68
|
}>;
|
|
66
69
|
failureReason?: string;
|
|
67
70
|
steps: string[];
|
|
71
|
+
/** Absolute path to the rendered HTML report when `outputHtmlPath` was set. */
|
|
72
|
+
htmlReportPath?: string;
|
|
68
73
|
}
|
|
69
74
|
export declare function detectLeaksInXCUITest(input: DetectLeaksInXCUITestInput): Promise<XCUITestLeakResult>;
|
|
@@ -5,6 +5,7 @@ import { runCommand } from "../runtime/exec.js";
|
|
|
5
5
|
import { runLeaksAndParse } from "../runtime/leaks.js";
|
|
6
6
|
import { resolveAppNameToPid } from "./captureMemgraph.js";
|
|
7
7
|
import { rootCyclesOnly } from "../parsers/leaksOutput.js";
|
|
8
|
+
import { writeLeakReportHtml } from "../runtime/leakReport.js";
|
|
8
9
|
/**
|
|
9
10
|
* CI-runnable leak detection across an XCUITest run.
|
|
10
11
|
*
|
|
@@ -55,6 +56,10 @@ export const detectLeaksInXCUITestSchema = z.object({
|
|
|
55
56
|
.boolean()
|
|
56
57
|
.default(false)
|
|
57
58
|
.describe("Skip the build-for-testing step (faster on CI when the build is already cached)."),
|
|
59
|
+
outputHtmlPath: z
|
|
60
|
+
.string()
|
|
61
|
+
.optional()
|
|
62
|
+
.describe("Absolute path to write a self-contained HTML report (inline CSS, no external assets). When set, the response also gains an `htmlReportPath` field pointing at the same file. Designed for CI artifact upload + PR-comment attachment."),
|
|
58
63
|
});
|
|
59
64
|
async function captureMemgraphForApp(appName, outputPath) {
|
|
60
65
|
const pid = await resolveAppNameToPid(appName);
|
|
@@ -76,6 +81,27 @@ async function runXcodebuild(args, step, steps) {
|
|
|
76
81
|
function isAllowlisted(rootClass, patterns) {
|
|
77
82
|
return patterns.some((p) => rootClass.includes(p));
|
|
78
83
|
}
|
|
84
|
+
function attachHtmlReportIfRequested(result, outputHtmlPath, schemeLabel) {
|
|
85
|
+
if (!outputHtmlPath)
|
|
86
|
+
return result;
|
|
87
|
+
const path = writeLeakReportHtml(outputHtmlPath, {
|
|
88
|
+
title: `Leak report: ${schemeLabel}`,
|
|
89
|
+
subtitle: `Test: ${result.testIdentifier}`,
|
|
90
|
+
sections: [
|
|
91
|
+
{
|
|
92
|
+
title: result.testIdentifier,
|
|
93
|
+
passed: result.passed,
|
|
94
|
+
failureReason: result.failureReason,
|
|
95
|
+
baselineMemgraph: result.baselineMemgraph || undefined,
|
|
96
|
+
afterMemgraph: result.afterMemgraph || undefined,
|
|
97
|
+
totals: result.totals,
|
|
98
|
+
newCycles: result.newCycles,
|
|
99
|
+
steps: result.steps,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
});
|
|
103
|
+
return { ...result, htmlReportPath: path };
|
|
104
|
+
}
|
|
79
105
|
export async function detectLeaksInXCUITest(input) {
|
|
80
106
|
const workspace = resolvePath(input.workspace);
|
|
81
107
|
if (!existsSync(workspace)) {
|
|
@@ -180,7 +206,7 @@ export async function detectLeaksInXCUITest(input) {
|
|
|
180
206
|
steps.push(`Skipped after-capture — app process ended before we could attach. ${err instanceof Error ? err.message : String(err)}`);
|
|
181
207
|
}
|
|
182
208
|
if (!afterCaptured) {
|
|
183
|
-
return {
|
|
209
|
+
return attachHtmlReportIfRequested({
|
|
184
210
|
ok: false,
|
|
185
211
|
passed: false,
|
|
186
212
|
baselineMemgraph: baselinePath,
|
|
@@ -194,7 +220,7 @@ export async function detectLeaksInXCUITest(input) {
|
|
|
194
220
|
newCycles: [],
|
|
195
221
|
failureReason: "After-capture failed. Configure the XCUITest to keep the app alive at end-of-test (e.g. `XCTAssertTrue(true); _ = XCTWaiter.wait(for: [...], timeout: 1.0)`) or run with a longer simulator boot.",
|
|
196
222
|
steps,
|
|
197
|
-
};
|
|
223
|
+
}, input.outputHtmlPath, input.scheme);
|
|
198
224
|
}
|
|
199
225
|
// 3. Diff.
|
|
200
226
|
const [baseline, after] = await Promise.all([
|
|
@@ -220,7 +246,7 @@ export async function detectLeaksInXCUITest(input) {
|
|
|
220
246
|
allowlisted: allowlistedFlags[i],
|
|
221
247
|
}));
|
|
222
248
|
const passed = failingCycles.length === 0 && testExitCode === 0;
|
|
223
|
-
return {
|
|
249
|
+
return attachHtmlReportIfRequested({
|
|
224
250
|
ok: true,
|
|
225
251
|
passed,
|
|
226
252
|
baselineMemgraph: baselinePath,
|
|
@@ -238,7 +264,7 @@ export async function detectLeaksInXCUITest(input) {
|
|
|
238
264
|
? `Test failed with exit code ${testExitCode}.`
|
|
239
265
|
: `${failingCycles.length} new ROOT CYCLE(s) appeared after the test that aren't in the allowlist: ${failingCycles.map((c) => c.rootClass).slice(0, 5).join(", ")}${failingCycles.length > 5 ? ", ..." : ""}`,
|
|
240
266
|
steps,
|
|
241
|
-
};
|
|
267
|
+
}, input.outputHtmlPath, input.scheme);
|
|
242
268
|
}
|
|
243
269
|
function countDescendants(children) {
|
|
244
270
|
let n = children.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detectLeaksInXCUITest.js","sourceRoot":"","sources":["../../src/tools/detectLeaksInXCUITest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,IAAI,IAAI,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"detectLeaksInXCUITest.js","sourceRoot":"","sources":["../../src/tools/detectLeaksInXCUITest.ts"],"names":[],"mappings":"AAAA,OAAO,E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AAC,MAAM,CAAC,SAAS;SACjE;QACD,SAAS;QACT,aAAa,EAAE,MAAM;YACnB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,YAAY,KAAK,CAAC;gBAClB,CAAC,CAAC,8BAA8B,YAAY,GAAG;gBAC/C,CAAC,CAAC,GAAG,aAAa,CAAC,MAAM,4EAA4E,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACjN,KAAK;KACN,EACD,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,MAAM,CACb,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,QAAwC;IAChE,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC;IACxB,KAAK,MAAM,CAAC,IAAI,QAA+D,EAAE,CAAC;QAChF,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
|
@@ -3,12 +3,15 @@ import type { LeaksReport } from "../types.js";
|
|
|
3
3
|
export declare const diffMemgraphsSchema: z.ZodObject<{
|
|
4
4
|
before: z.ZodString;
|
|
5
5
|
after: z.ZodString;
|
|
6
|
+
outputFormat: z.ZodOptional<z.ZodEnum<["markdown", "json", "both"]>>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
before: string;
|
|
8
8
|
after: string;
|
|
9
|
-
}, {
|
|
10
9
|
before: string;
|
|
10
|
+
outputFormat?: "markdown" | "json" | "both" | undefined;
|
|
11
|
+
}, {
|
|
11
12
|
after: string;
|
|
13
|
+
before: string;
|
|
14
|
+
outputFormat?: "markdown" | "json" | "both" | undefined;
|
|
12
15
|
}>;
|
|
13
16
|
export type DiffMemgraphsInput = z.infer<typeof diffMemgraphsSchema>;
|
|
14
17
|
export interface CycleSignature {
|
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { runLeaksAndParse } from "../runtime/leaks.js";
|
|
3
3
|
import { rootCyclesOnly } from "../parsers/leaksOutput.js";
|
|
4
4
|
import { countByClass } from "./countAlive.js";
|
|
5
|
+
import { outputFormatField } from "../runtime/responseFormatter.js";
|
|
5
6
|
export const diffMemgraphsSchema = z.object({
|
|
6
7
|
before: z
|
|
7
8
|
.string()
|
|
@@ -11,6 +12,7 @@ export const diffMemgraphsSchema = z.object({
|
|
|
11
12
|
.string()
|
|
12
13
|
.min(1)
|
|
13
14
|
.describe("Absolute path to the comparison `.memgraph` file."),
|
|
15
|
+
outputFormat: outputFormatField,
|
|
14
16
|
});
|
|
15
17
|
function fingerprint(node, maxShapeDepth = 4) {
|
|
16
18
|
const shape = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diffMemgraphs.js","sourceRoot":"","sources":["../../src/tools/diffMemgraphs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"diffMemgraphs.js","sourceRoot":"","sources":["../../src/tools/diffMemgraphs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,iB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,CAAC,GAAG,CAAC;QAChB,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;QAC9B,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC;KAC9B,CAAC,CAAC;IACL,OAAO,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -6,8 +6,8 @@ export declare const findCyclesSchema: z.ZodObject<{
|
|
|
6
6
|
maxDepth: z.ZodDefault<z.ZodNumber>;
|
|
7
7
|
verbosity: z.ZodDefault<z.ZodEnum<["compact", "normal", "full"]>>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
maxDepth: number;
|
|
10
9
|
path: string;
|
|
10
|
+
maxDepth: number;
|
|
11
11
|
verbosity: "compact" | "normal" | "full";
|
|
12
12
|
className?: string | undefined;
|
|
13
13
|
}, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
|
-
* Base shape
|
|
3
|
+
* Base shape, exposed so the MCP layer can read `.shape` (ZodEffects from
|
|
4
4
|
* `.superRefine()` doesn't expose shape).
|
|
5
5
|
*/
|
|
6
6
|
export declare const recordTimeProfileShape: {
|
|
@@ -23,43 +23,48 @@ export declare const recordTimeProfileSchema: z.ZodEffects<z.ZodObject<{
|
|
|
23
23
|
readonly durationSec: z.ZodDefault<z.ZodNumber>;
|
|
24
24
|
readonly output: z.ZodString;
|
|
25
25
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
output: string;
|
|
26
27
|
template: string;
|
|
27
28
|
durationSec: number;
|
|
28
|
-
output: string;
|
|
29
|
-
deviceId?: string | undefined;
|
|
30
29
|
simulatorId?: string | undefined;
|
|
31
30
|
attachAppName?: string | undefined;
|
|
31
|
+
deviceId?: string | undefined;
|
|
32
32
|
attachPid?: number | undefined;
|
|
33
33
|
launchBundleId?: string | undefined;
|
|
34
34
|
}, {
|
|
35
35
|
output: string;
|
|
36
36
|
template?: string | undefined;
|
|
37
|
-
deviceId?: string | undefined;
|
|
38
37
|
simulatorId?: string | undefined;
|
|
39
38
|
attachAppName?: string | undefined;
|
|
39
|
+
durationSec?: number | undefined;
|
|
40
|
+
deviceId?: string | undefined;
|
|
40
41
|
attachPid?: number | undefined;
|
|
41
42
|
launchBundleId?: string | undefined;
|
|
42
|
-
durationSec?: number | undefined;
|
|
43
43
|
}>, {
|
|
44
|
+
output: string;
|
|
44
45
|
template: string;
|
|
45
46
|
durationSec: number;
|
|
46
|
-
output: string;
|
|
47
|
-
deviceId?: string | undefined;
|
|
48
47
|
simulatorId?: string | undefined;
|
|
49
48
|
attachAppName?: string | undefined;
|
|
49
|
+
deviceId?: string | undefined;
|
|
50
50
|
attachPid?: number | undefined;
|
|
51
51
|
launchBundleId?: string | undefined;
|
|
52
52
|
}, {
|
|
53
53
|
output: string;
|
|
54
54
|
template?: string | undefined;
|
|
55
|
-
deviceId?: string | undefined;
|
|
56
55
|
simulatorId?: string | undefined;
|
|
57
56
|
attachAppName?: string | undefined;
|
|
57
|
+
durationSec?: number | undefined;
|
|
58
|
+
deviceId?: string | undefined;
|
|
58
59
|
attachPid?: number | undefined;
|
|
59
60
|
launchBundleId?: string | undefined;
|
|
60
|
-
durationSec?: number | undefined;
|
|
61
61
|
}>;
|
|
62
62
|
export type RecordTimeProfileInput = z.infer<typeof recordTimeProfileSchema>;
|
|
63
|
+
export interface RecordingTimeoutWorkaroundNotice {
|
|
64
|
+
issue: "xctrace-time-limit-ignored";
|
|
65
|
+
message: string;
|
|
66
|
+
fallbacks: string[];
|
|
67
|
+
}
|
|
63
68
|
export interface RecordTimeProfileResult {
|
|
64
69
|
ok: boolean;
|
|
65
70
|
command: string;
|
|
@@ -67,6 +72,21 @@ export interface RecordTimeProfileResult {
|
|
|
67
72
|
durationSec: number;
|
|
68
73
|
template: string;
|
|
69
74
|
stderr?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Present and `true` when xctrace ignored `--time-limit` and the external
|
|
77
|
+
* timeout wrapper had to SIGINT it. The `.trace` bundle on disk MAY be
|
|
78
|
+
* usable: xctrace flushes the active template on SIGINT, but if the
|
|
79
|
+
* escalation path had to send SIGKILL (after the graceful window) the
|
|
80
|
+
* trace may be missing template metadata and `analyzeTimeProfile` will
|
|
81
|
+
* fail to export it. Inspect `workaroundNotice` for the recovery path.
|
|
82
|
+
*/
|
|
83
|
+
recordingTimedOut?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Present when `recordingTimedOut` is true. Documents the
|
|
86
|
+
* `xctrace --time-limit` regression observed on macOS 26.x simulators
|
|
87
|
+
* and the practical mitigations.
|
|
88
|
+
*/
|
|
89
|
+
workaroundNotice?: RecordingTimeoutWorkaroundNotice;
|
|
70
90
|
}
|
|
71
91
|
/** Pure: build the xctrace argv for the given input. Exposed for testing. */
|
|
72
92
|
export declare function buildXctraceArgs(input: RecordTimeProfileInput): string[];
|