@alwaysmeticulous/debug-workspace 2.306.0 → 2.307.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/dist/__tests__/detect-snapshot-assets.spec.js +4 -1
- package/dist/__tests__/detect-snapshot-assets.spec.js.map +1 -1
- package/dist/__tests__/extract-screenshot-dom-files.spec.js +4 -1
- package/dist/__tests__/extract-screenshot-dom-files.spec.js.map +1 -1
- package/dist/__tests__/fetch-dom-diffs.spec.js +5 -1
- package/dist/__tests__/fetch-dom-diffs.spec.js.map +1 -1
- package/dist/__tests__/meticulous-sha.spec.d.ts +2 -0
- package/dist/__tests__/meticulous-sha.spec.d.ts.map +1 -0
- package/dist/__tests__/meticulous-sha.spec.js +47 -0
- package/dist/__tests__/meticulous-sha.spec.js.map +1 -0
- package/dist/__tests__/redact-cookies-and-headers.spec.js +5 -1
- package/dist/__tests__/redact-cookies-and-headers.spec.js.map +1 -1
- package/dist/__tests__/redact-log-credentials.spec.js +4 -1
- package/dist/__tests__/redact-log-credentials.spec.js.map +1 -1
- package/dist/debug-constants.js +4 -1
- package/dist/debug-constants.js.map +1 -1
- package/dist/debug.types.d.ts +1 -0
- package/dist/debug.types.d.ts.map +1 -1
- package/dist/debug.types.js +4 -1
- package/dist/debug.types.js.map +1 -1
- package/dist/download-debug-data.js +4 -1
- package/dist/download-debug-data.js.map +1 -1
- package/dist/extract-screenshot-dom-files.js +4 -1
- package/dist/extract-screenshot-dom-files.js.map +1 -1
- package/dist/fetch-dom-diffs.js +4 -1
- package/dist/fetch-dom-diffs.js.map +1 -1
- package/dist/generate-debug-derived-files.js +6 -2
- package/dist/generate-debug-derived-files.js.map +1 -1
- package/dist/generate-debug-workspace.d.ts.map +1 -1
- package/dist/generate-debug-workspace.js +11 -1
- package/dist/generate-debug-workspace.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/meticulous-sha.d.ts +7 -0
- package/dist/meticulous-sha.d.ts.map +1 -0
- package/dist/meticulous-sha.js +26 -0
- package/dist/meticulous-sha.js.map +1 -0
- package/dist/pipeline.js +4 -1
- package/dist/pipeline.js.map +1 -1
- package/dist/replay-walk.js +4 -1
- package/dist/replay-walk.js.map +1 -1
- package/dist/resolve-debug-context.js +6 -1
- package/dist/resolve-debug-context.js.map +1 -1
- package/dist/screenshot-identifier.d.ts +6 -2
- package/dist/screenshot-identifier.d.ts.map +1 -1
- package/dist/screenshot-identifier.js +23 -3
- package/dist/screenshot-identifier.js.map +1 -1
- package/dist/screenshot-identifier.spec.d.ts +2 -0
- package/dist/screenshot-identifier.spec.d.ts.map +1 -0
- package/dist/screenshot-identifier.spec.js +53 -0
- package/dist/screenshot-identifier.spec.js.map +1 -0
- package/dist/templates/CLAUDE.md +6 -1
- package/package.json +4 -4
- package/dist/templates/templates/CLAUDE.md +0 -348
- package/dist/templates/templates/agents/log-diff-analyzer.md +0 -66
- package/dist/templates/templates/agents/planner.md +0 -67
- package/dist/templates/templates/agents/pr-analyzer.md +0 -57
- package/dist/templates/templates/agents/summarizer.md +0 -75
- package/dist/templates/templates/settings.json +0 -57
- package/dist/templates/templates/skills/debugging-diffs/SKILL.md +0 -61
- package/dist/templates/templates/skills/debugging-flakes/SKILL.md +0 -52
- package/dist/templates/templates/skills/debugging-network/SKILL.md +0 -45
- package/dist/templates/templates/skills/debugging-sessions/SKILL.md +0 -47
- package/dist/templates/templates/skills/debugging-timelines/SKILL.md +0 -51
- package/dist/templates/templates/skills/pr-analysis/SKILL.md +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-debug-context.js","
|
|
1
|
+
{"version":3,"file":"resolve-debug-context.js","sources":["../src/resolve-debug-context.ts"],"sourceRoot":"","names":[],"mappings":";;;;;;;;AACA,qDAAqE;AACrE,kDAA0B;AAoBnB,MAAM,mBAAmB,GAAG,KAAK,EACtC,OAAmC,EACZ,E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,EAAE,IAAI,IAAI,SAAS,CAAC;IACxD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,IAAI,SAAS,CAAC;IAC9C,OAAO,GAAG,OAAO,IAAI,WAAW,EAAE,CAAC;AACrC,CAAC,CAAC","debugId":"83374b67-639d-5c4e-918a-0927c4dbee91"}
|
|
@@ -3,6 +3,9 @@ export interface ScreenshotIdentifier {
|
|
|
3
3
|
eventNumber?: number;
|
|
4
4
|
logicVersion?: number | null;
|
|
5
5
|
variant?: string | null;
|
|
6
|
+
sequenceNumber?: number;
|
|
7
|
+
reason?: string;
|
|
8
|
+
endState?: boolean;
|
|
6
9
|
}
|
|
7
10
|
/**
|
|
8
11
|
* Single source of truth for the on-disk screenshot basename (no extension)
|
|
@@ -13,8 +16,9 @@ export declare const screenshotIdentifierToFilename: (identifier: ScreenshotIden
|
|
|
13
16
|
/**
|
|
14
17
|
* Name accepted by the backend's replay-diff screenshot endpoints — differs
|
|
15
18
|
* from the on-disk basename: no zero-padding, no `logicVersion` suffix, and
|
|
16
|
-
* `end-state` instead of `final-state`.
|
|
17
|
-
*
|
|
19
|
+
* `end-state` instead of `final-state`. Must match the backend's
|
|
20
|
+
* `getScreenshotName`. Returns `null` for redacted variants (backend naming
|
|
21
|
+
* unverified) and unknown types.
|
|
18
22
|
*/
|
|
19
23
|
export declare const screenshotIdentifierToBackendName: (identifier: ScreenshotIdentifier) => string | null;
|
|
20
24
|
//# sourceMappingURL=screenshot-identifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenshot-identifier.d.ts","sourceRoot":"","sources":["../src/screenshot-identifier.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"screenshot-identifier.d.ts","sourceRoot":"","sources":["../src/screenshot-identifier.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAGxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,8BAA8B,eAC7B,oBAAoB,KAC/B,MAAM,GAAG,IA+BX,CAAC;AAEF,eAAO,MAAM,8BAA8B,eAC7B,oBAAoB,KAC/B,MAAM,GAAG,SAGX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,eAChC,oBAAoB,KAC/B,MAAM,GAAG,IAmBX,CAAC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8db2921c-64be-5943-ae19-0063058e5088")}catch(e){}}();
|
|
3
|
+
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
5
|
exports.screenshotIdentifierToBackendName = exports.screenshotIdentifierToFilename = exports.screenshotIdentifierToBaseName = void 0;
|
|
4
6
|
/**
|
|
@@ -18,6 +20,16 @@ const screenshotIdentifierToBaseName = (identifier) => {
|
|
|
18
20
|
? `screenshot-after-event-${eventIndexStr}${variantPortion}`
|
|
19
21
|
: `screenshot-after-event-${eventIndexStr}-v${identifier.logicVersion}${variantPortion}`;
|
|
20
22
|
}
|
|
23
|
+
if (identifier.type === "auxiliary" &&
|
|
24
|
+
identifier.eventNumber != null &&
|
|
25
|
+
identifier.sequenceNumber != null &&
|
|
26
|
+
identifier.reason != null) {
|
|
27
|
+
const eventIndexStr = identifier.eventNumber.toString().padStart(5, "0");
|
|
28
|
+
const sequenceStr = identifier.sequenceNumber.toString().padStart(5, "0");
|
|
29
|
+
const endStatePortion = identifier.endState ? "end-" : "";
|
|
30
|
+
const versionPortion = identifier.logicVersion == null ? "" : `-v${identifier.logicVersion}`;
|
|
31
|
+
return `screenshot-auxiliary-${eventIndexStr}-${endStatePortion}${sequenceStr}-${identifier.reason}${versionPortion}${variantPortion}`;
|
|
32
|
+
}
|
|
21
33
|
return null;
|
|
22
34
|
};
|
|
23
35
|
exports.screenshotIdentifierToBaseName = screenshotIdentifierToBaseName;
|
|
@@ -29,8 +41,9 @@ exports.screenshotIdentifierToFilename = screenshotIdentifierToFilename;
|
|
|
29
41
|
/**
|
|
30
42
|
* Name accepted by the backend's replay-diff screenshot endpoints — differs
|
|
31
43
|
* from the on-disk basename: no zero-padding, no `logicVersion` suffix, and
|
|
32
|
-
* `end-state` instead of `final-state`.
|
|
33
|
-
*
|
|
44
|
+
* `end-state` instead of `final-state`. Must match the backend's
|
|
45
|
+
* `getScreenshotName`. Returns `null` for redacted variants (backend naming
|
|
46
|
+
* unverified) and unknown types.
|
|
34
47
|
*/
|
|
35
48
|
const screenshotIdentifierToBackendName = (identifier) => {
|
|
36
49
|
if (identifier.variant === "redacted") {
|
|
@@ -42,7 +55,14 @@ const screenshotIdentifierToBackendName = (identifier) => {
|
|
|
42
55
|
if (identifier.type === "after-event" && identifier.eventNumber != null) {
|
|
43
56
|
return `after-event-${identifier.eventNumber}`;
|
|
44
57
|
}
|
|
58
|
+
if (identifier.type === "auxiliary" &&
|
|
59
|
+
identifier.eventNumber != null &&
|
|
60
|
+
identifier.sequenceNumber != null &&
|
|
61
|
+
identifier.reason != null) {
|
|
62
|
+
return `auxiliary-${identifier.eventNumber}-${identifier.sequenceNumber}-${identifier.reason}`;
|
|
63
|
+
}
|
|
45
64
|
return null;
|
|
46
65
|
};
|
|
47
66
|
exports.screenshotIdentifierToBackendName = screenshotIdentifierToBackendName;
|
|
48
|
-
//# sourceMappingURL=screenshot-identifier.js.map
|
|
67
|
+
//# sourceMappingURL=screenshot-identifier.js.map
|
|
68
|
+
//# debugId=8db2921c-64be-5943-ae19-0063058e5088
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenshot-identifier.js","
|
|
1
|
+
{"version":3,"file":"screenshot-identifier.js","sources":["../src/screenshot-identifier.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAYA;;;GAGG;AACI,MAAM,8BAA8B,GAAG,CAC5C,UAAgC,EACjB,EAAE;IACjB,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5E,IAAI,UAAU,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QACpC,OAAO,UAAU,CAAC,YAAY,IAAI,IAAI;YACpC,CAAC,CAAC,cAAc,cAAc,EAAE;YAChC,CAAC,CAAC,gBAAgB,UAAU,CAAC,YAAY,GAAG,cAAc,EAAE,CAAC;IACjE,CAAC;IAED,IAAI,UAAU,CAAC,IAAI,KAAK,aAAa,IAAI,UAAU,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;QACxE,MAAM,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QACzE,OAAO,UAAU,CAAC,YAAY,IAAI,IAAI;YACpC,CAAC,CAAC,0BAA0B,aAAa,GAAG,cAAc,EAAE;YAC5D,CAAC,CAAC,0BAA0B,aAAa,KAAK,UAAU,CAAC,YAAY,GAAG,cAAc,EAAE,CAAC;IAC7F,CAAC;IAED,IACE,UAAU,CAAC,IAAI,KAAK,WAAW;QAC/B,U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AC;QACpC,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,aAAa,IAAI,UAAU,CAAC,WAAW,IAAI,IAAI,EAAE,CAAC;QACxE,OAAO,eAAe,UAAU,CAAC,WAAW,EAAE,CAAC;IACjD,CAAC;IACD,IACE,UAAU,CAAC,IAAI,KAAK,WAAW;QAC/B,UAAU,CAAC,WAAW,IAAI,IAAI;QAC9B,UAAU,CAAC,cAAc,IAAI,IAAI;QACjC,UAAU,CAAC,MAAM,IAAI,IAAI,EACzB,CAAC;QACD,OAAO,aAAa,UAAU,CAAC,WAAW,IAAI,UAAU,CAAC,cAAc,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;IACjG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AArBW,QAAA,iCAAiC,qCAqB5C","debugId":"8db2921c-64be-5943-ae19-0063058e5088"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenshot-identifier.spec.d.ts","sourceRoot":"","sources":["../src/screenshot-identifier.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1cacba17-a16e-534d-b007-03bd86daf1a9")}catch(e){}}();
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const vitest_1 = require("vitest");
|
|
6
|
+
const screenshot_identifier_1 = require("./screenshot-identifier");
|
|
7
|
+
(0, vitest_1.describe)("screenshotIdentifierToBackendName", () => {
|
|
8
|
+
(0, vitest_1.it)("names end-state and after-event screenshots", () => {
|
|
9
|
+
(0, vitest_1.expect)((0, screenshot_identifier_1.screenshotIdentifierToBackendName)({ type: "end-state" })).toBe("end-state");
|
|
10
|
+
(0, vitest_1.expect)((0, screenshot_identifier_1.screenshotIdentifierToBackendName)({
|
|
11
|
+
type: "after-event",
|
|
12
|
+
eventNumber: 5,
|
|
13
|
+
})).toBe("after-event-5");
|
|
14
|
+
});
|
|
15
|
+
(0, vitest_1.it)("names auxiliary screenshots (matching the backend getScreenshotName)", () => {
|
|
16
|
+
(0, vitest_1.expect)((0, screenshot_identifier_1.screenshotIdentifierToBackendName)({
|
|
17
|
+
type: "auxiliary",
|
|
18
|
+
eventNumber: 291,
|
|
19
|
+
sequenceNumber: 0,
|
|
20
|
+
reason: "exit_animation",
|
|
21
|
+
})).toBe("auxiliary-291-0-exit_animation");
|
|
22
|
+
});
|
|
23
|
+
(0, vitest_1.it)("returns null for redacted variants", () => {
|
|
24
|
+
(0, vitest_1.expect)((0, screenshot_identifier_1.screenshotIdentifierToBackendName)({
|
|
25
|
+
type: "after-event",
|
|
26
|
+
eventNumber: 5,
|
|
27
|
+
variant: "redacted",
|
|
28
|
+
})).toBeNull();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
(0, vitest_1.describe)("screenshotIdentifierToBaseName", () => {
|
|
32
|
+
(0, vitest_1.it)("derives the on-disk basename for auxiliary screenshots", () => {
|
|
33
|
+
// Must match @alwaysmeticulous/screenshot-utils getScreenshotFilename
|
|
34
|
+
// (without the .png extension): zero-padded event/sequence indices.
|
|
35
|
+
(0, vitest_1.expect)((0, screenshot_identifier_1.screenshotIdentifierToBaseName)({
|
|
36
|
+
type: "auxiliary",
|
|
37
|
+
eventNumber: 291,
|
|
38
|
+
sequenceNumber: 0,
|
|
39
|
+
reason: "exit_animation",
|
|
40
|
+
})).toBe("screenshot-auxiliary-00291-00000-exit_animation");
|
|
41
|
+
});
|
|
42
|
+
(0, vitest_1.it)("includes the end- prefix for end-state-anchored auxiliaries", () => {
|
|
43
|
+
(0, vitest_1.expect)((0, screenshot_identifier_1.screenshotIdentifierToBaseName)({
|
|
44
|
+
type: "auxiliary",
|
|
45
|
+
eventNumber: 291,
|
|
46
|
+
sequenceNumber: 2,
|
|
47
|
+
reason: "exit_animation",
|
|
48
|
+
endState: true,
|
|
49
|
+
})).toBe("screenshot-auxiliary-00291-end-00002-exit_animation");
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=screenshot-identifier.spec.js.map
|
|
53
|
+
//# debugId=1cacba17-a16e-534d-b007-03bd86daf1a9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenshot-identifier.spec.js","sources":["../src/screenshot-identifier.spec.ts"],"sourceRoot":"","names":[],"mappings":";;;;AAAA,mCAA8C;AAE9C,mEAGiC;AAEjC,IAAA,iBAAQ,EAAC,mCAAmC,EAAE,GAAG,EAAE;IACjD,IAAA,WAAE,EAAC,6CAA6C,EAAE,GAAG,EAAE;QACrD,IAAA,eAAM,EAAC,IAAA,yDAAiC,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CACnE,WAAW,CACZ,CAAC;QACF,IAAA,eAAM,EACJ,IAAA,yDAAiC,EAAC;YAChC,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,CAAC;SACf,CAAC,CACH,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,IAAA,eAAM,EACJ,IAAA,yDAAiC,EAAC;YAChC,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,GAAG;YAChB,cAAc,EAAE,CAAC;YACjB,MAAM,EAAE,gBAAgB;SACzB,CAAC,CACH,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,IAAA,eAAM,EACJ,IAAA,yDAAiC,EAAC;YAChC,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,CAAC;YACd,OAAO,EAAE,UAAU;SACpB,CAAC,CACH,CAAC,QAAQ,EAAE,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,IAAA,iBAAQ,EAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,IAAA,WAAE,EAAC,wDAAwD,EAAE,GAAG,EAAE;QAChE,sEAAsE;QACtE,oEAAoE;QACpE,IAAA,eAAM,EACJ,IAAA,sDAA8B,EAAC;YAC7B,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,GAAG;YAChB,cAAc,EAAE,CAAC;YACjB,MAAM,EAAE,gBAAgB;SACzB,CAAC,CACH,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,6DAA6D,EAAE,GAAG,EAAE;QACrE,IAAA,eAAM,EACJ,IAAA,sDAA8B,EAAC;YAC7B,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,GAAG;YAChB,cAAc,EAAE,CAAC;YACjB,MAAM,EAAE,gBAAgB;YACxB,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","debugId":"1cacba17-a16e-534d-b007-03bd86daf1a9"}
|
package/dist/templates/CLAUDE.md
CHANGED
|
@@ -50,14 +50,19 @@ Each replay directory (`debug-data/replays/<role>/<replayId>/`) contains:
|
|
|
50
50
|
|
|
51
51
|
- `logs.deterministic.txt` -- Deterministic logs with non-deterministic data stripped. Best for
|
|
52
52
|
diffing between replays. Can be very large (check `fileMetadata` in `context.json` for sizes).
|
|
53
|
+
Credential-looking values (`Cookie`/`Authorization`/etc. header dumps, `Bearer`/`Basic` tokens)
|
|
54
|
+
are always redacted, even in this "raw" file; other noise (tunnel URLs, S3 tokens, PostHog
|
|
55
|
+
payloads) is left as-is here and only stripped in the filtered copy below.
|
|
53
56
|
- `logs.deterministic.filtered.txt` -- **Start here for single-replay investigation.**
|
|
54
57
|
Noise-stripped version of the deterministic logs: tunnel URLs, S3 tokens, PostHog payloads,
|
|
55
58
|
build hashes, and other non-deterministic patterns are replaced with placeholders. Prefer this
|
|
56
59
|
over the raw version unless you need unmodified output.
|
|
57
60
|
- `logs.concise.txt` -- Full logs with both virtual and real timestamps, and trace IDs.
|
|
61
|
+
Credential-looking values are redacted the same way as in `logs.deterministic.txt`.
|
|
58
62
|
- `timeline.json` -- Detailed timeline of all replay events (user interactions, network requests,
|
|
59
63
|
DOM mutations, etc.). Can be 1-2MB; prefer `debug-data/events-index/` or
|
|
60
|
-
`debug-data/timeline-summaries/` for compact overviews.
|
|
64
|
+
`debug-data/timeline-summaries/` for compact overviews. Cookie/header values on network request
|
|
65
|
+
entries are redacted.
|
|
61
66
|
- `timeline.ndjson` -- Same data as `timeline.json` but one JSON object per line (NDJSON format).
|
|
62
67
|
Greppable with standard tools: `grep '"screenshot"' timeline.ndjson` to find screenshots,
|
|
63
68
|
`grep '"pollyReplay"' timeline.ndjson` for network stubs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/debug-workspace",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.307.0",
|
|
4
4
|
"description": "Shared debug workspace pipeline for investigating Meticulous diffs and replays",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"chalk": "^4.1.2",
|
|
13
13
|
"p-limit": "^3.1.0",
|
|
14
14
|
"prettier": "^3.5.3",
|
|
15
|
-
"@alwaysmeticulous/client": "2.
|
|
16
|
-
"@alwaysmeticulous/
|
|
17
|
-
"@alwaysmeticulous/
|
|
15
|
+
"@alwaysmeticulous/client": "2.307.0",
|
|
16
|
+
"@alwaysmeticulous/downloading-helpers": "2.307.0",
|
|
17
|
+
"@alwaysmeticulous/common": "2.301.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"vitest": "^4.1.7"
|
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
# Meticulous Debug Workspace
|
|
2
|
-
|
|
3
|
-
## What This Is
|
|
4
|
-
|
|
5
|
-
You are in a debugging workspace for the Meticulous automated UI testing platform.
|
|
6
|
-
You are investigating a replay issue (flaky behavior, unexpected diffs, or replay failures).
|
|
7
|
-
|
|
8
|
-
`debug-data/context.json` is the index for this workspace. Read it first; it lists all IDs, paths,
|
|
9
|
-
metadata, and what data is available.
|
|
10
|
-
|
|
11
|
-
## How Meticulous Works
|
|
12
|
-
|
|
13
|
-
Meticulous records user sessions by injecting a JavaScript recorder snippet into your
|
|
14
|
-
application. These sessions capture user activity and network requests. When you make
|
|
15
|
-
a commit, Meticulous triggers a test run that replays selected sessions against the new code,
|
|
16
|
-
taking screenshots at key moments. If there is a base test run to compare against, screenshot
|
|
17
|
-
diffs are computed and surfaced to the developer.
|
|
18
|
-
|
|
19
|
-
- A **replay** is a single session being replayed against a version of your app.
|
|
20
|
-
- A **test run** is a collection of replays triggered by a commit.
|
|
21
|
-
- A **replay diff** compares a head replay (new code) against a base replay (old code) and
|
|
22
|
-
contains the screenshot diff results.
|
|
23
|
-
- A **session** is the original user recording that gets replayed.
|
|
24
|
-
|
|
25
|
-
## Workspace Layout
|
|
26
|
-
|
|
27
|
-
The workspace root contains the debug workspace files. All downloaded debug data lives under
|
|
28
|
-
the `debug-data/` subdirectory.
|
|
29
|
-
|
|
30
|
-
- **`debug-data/context.json`** -- Index of IDs, paths, metadata, and what data is available
|
|
31
|
-
in this workspace. Read this first.
|
|
32
|
-
- **`debug-data/`** -- All downloaded replay data, session recordings, diffs, and
|
|
33
|
-
pre-computed analysis artifacts.
|
|
34
|
-
<!-- if-local-cli -->
|
|
35
|
-
- **`project-repo/`** -- (Optional) Your codebase checked out at the relevant commit.
|
|
36
|
-
Only present if the command was run from within a git repository.
|
|
37
|
-
<!-- end-if-local-cli -->
|
|
38
|
-
|
|
39
|
-
## debug-data/ Contents
|
|
40
|
-
|
|
41
|
-
Data falls into three categories: per-replay files (always present), diff files (only when
|
|
42
|
-
comparing replays), and other data.
|
|
43
|
-
|
|
44
|
-
### Per-Replay Files (always available)
|
|
45
|
-
|
|
46
|
-
Replay data is organized into `head/` and `base/` subdirectories under
|
|
47
|
-
`debug-data/replays/`. All files are searchable and can be found via glob/search.
|
|
48
|
-
|
|
49
|
-
Each replay directory (`debug-data/replays/<role>/<replayId>/`) contains:
|
|
50
|
-
|
|
51
|
-
- `logs.deterministic.txt` -- Deterministic logs with non-deterministic data stripped. Best for
|
|
52
|
-
diffing between replays. Can be very large (check `fileMetadata` in `context.json` for sizes).
|
|
53
|
-
Credential-looking values (`Cookie`/`Authorization`/etc. header dumps, `Bearer`/`Basic` tokens)
|
|
54
|
-
are always redacted, even in this "raw" file; other noise (tunnel URLs, S3 tokens, PostHog
|
|
55
|
-
payloads) is left as-is here and only stripped in the filtered copy below.
|
|
56
|
-
- `logs.deterministic.filtered.txt` -- **Start here for single-replay investigation.**
|
|
57
|
-
Noise-stripped version of the deterministic logs: tunnel URLs, S3 tokens, PostHog payloads,
|
|
58
|
-
build hashes, and other non-deterministic patterns are replaced with placeholders. Prefer this
|
|
59
|
-
over the raw version unless you need unmodified output.
|
|
60
|
-
- `logs.concise.txt` -- Full logs with both virtual and real timestamps, and trace IDs.
|
|
61
|
-
Credential-looking values are redacted the same way as in `logs.deterministic.txt`.
|
|
62
|
-
- `timeline.json` -- Detailed timeline of all replay events (user interactions, network requests,
|
|
63
|
-
DOM mutations, etc.). Can be 1-2MB; prefer `debug-data/events-index/` or
|
|
64
|
-
`debug-data/timeline-summaries/` for compact overviews. Cookie/header values on network request
|
|
65
|
-
entries are redacted.
|
|
66
|
-
- `timeline.ndjson` -- Same data as `timeline.json` but one JSON object per line (NDJSON format).
|
|
67
|
-
Greppable with standard tools: `grep '"screenshot"' timeline.ndjson` to find screenshots,
|
|
68
|
-
`grep '"pollyReplay"' timeline.ndjson` for network stubs.
|
|
69
|
-
- `timeline-stats.json` -- Aggregated statistics about timeline events.
|
|
70
|
-
- `metadata.json` -- Replay configuration, parameters, and environment info.
|
|
71
|
-
- `launchBrowserAndReplayParams.json` -- The exact parameters used to launch the replay.
|
|
72
|
-
- `stack-traces.ndjson` -- JavaScript stack traces captured during replay (if any errors
|
|
73
|
-
occurred), one JSON object per line.
|
|
74
|
-
- `accuracy.json` -- Replay accuracy assessment comparing to expected behavior.
|
|
75
|
-
- `cookies.json` -- Cookies captured at session record time. Rarely needed; useful only when
|
|
76
|
-
authentication or cookie-driven behavior is part of the investigation.
|
|
77
|
-
- `mapped-coverage.json` -- JS code coverage for the whole replay, mapped back to source files.
|
|
78
|
-
Cross-reference with `pr-diff.txt` to check whether changed code actually executed during the replay.
|
|
79
|
-
- `mapped-per-screenshot-js-coverage/<screenshotId>.json` -- Same coverage broken down per
|
|
80
|
-
screenshot. Use this to localize which code ran around a specific diff.
|
|
81
|
-
<!-- if-snapshot-assets -->
|
|
82
|
-
- `snapshotted-assets/` -- Static assets (JS/CSS) that were captured and used during replay.
|
|
83
|
-
<!-- end-if-snapshot-assets -->
|
|
84
|
-
- `screenshots/<name>.metadata.json` -- Per-screenshot metadata, including the captured `before.dom`
|
|
85
|
-
(full HTML at screenshot time).
|
|
86
|
-
- `screenshots/<name>.html` -- The `before.dom` extracted to a standalone HTML file. Prefer reading
|
|
87
|
-
this over grepping the metadata JSON. The one-line `<!-- screenshot=... url=... vt=... -->`
|
|
88
|
-
header at the top is for humans only and is not used when computing DOM diffs.
|
|
89
|
-
|
|
90
|
-
Per-replay generated summaries:
|
|
91
|
-
|
|
92
|
-
- `debug-data/events-index/<role>-<replayId>.txt` -- **Use this instead of raw timeline.json.**
|
|
93
|
-
One line per timeline event with index, virtual time, kind, and key data fields. Fully greppable:
|
|
94
|
-
`grep 'kind=screenshot' events-index/head-abc.txt` to find screenshots,
|
|
95
|
-
`grep 'kind=pollyReplay' events-index/head-abc.txt` for network stubs,
|
|
96
|
-
`grep 'api/v9/users' events-index/head-abc.txt` for specific API calls.
|
|
97
|
-
- `debug-data/network-log/<role>-<replayId>.txt` -- Compact network request log with one line
|
|
98
|
-
per request: method, URL, status, and match result. Grep for specific endpoints.
|
|
99
|
-
- `debug-data/vt-progression/<role>-<replayId>.txt` -- One virtual time value per line, extracted
|
|
100
|
-
from `logs.ndjson`. Compare head vs base with `diff`. Use this instead of parsing `logs.ndjson`
|
|
101
|
-
for virtual time progression.
|
|
102
|
-
- `debug-data/logs-index/<role>-<replayId>.txt` -- **Use this instead of raw logs.ndjson.**
|
|
103
|
-
One line per log entry with index, current virtual time, source, type, and truncated message.
|
|
104
|
-
Virtual-time-change entries appear as `[virtual-time-change -> <value>]`. Fully greppable:
|
|
105
|
-
`grep 'source=application' logs-index/head-abc.txt` to filter by source,
|
|
106
|
-
`grep -i 'error' logs-index/head-abc.txt` for keyword search,
|
|
107
|
-
`grep 'vt=7648' logs-index/head-abc.txt` for events at a specific virtual time.
|
|
108
|
-
- `debug-data/screenshot-timeline-context/<role>-<replayId>-<screenshotId>.txt` -- Events
|
|
109
|
-
surrounding each screenshot (30 before, 10 after) from the timeline. The screenshot line is
|
|
110
|
-
marked with `>>>`. Use these to understand what happened right before a screenshot.
|
|
111
|
-
- `debug-data/timeline-summaries/<role>-<replayId>.txt` -- Compact summary of each replay's
|
|
112
|
-
timeline: total entries, virtual time range, screenshot timestamps, event kind breakdown.
|
|
113
|
-
<!-- if-snapshot-assets -->
|
|
114
|
-
- `debug-data/formatted-assets/<role>/<replayId>/` -- Pretty-printed JS/CSS from
|
|
115
|
-
`snapshotted-assets/`. Use these instead of the originals.
|
|
116
|
-
<!-- end-if-snapshot-assets -->
|
|
117
|
-
|
|
118
|
-
### Diff Files (only when comparing replays)
|
|
119
|
-
|
|
120
|
-
These files are only generated when comparing replays.
|
|
121
|
-
|
|
122
|
-
- `debug-data/diffs/<id>.json` -- Full diff data including replay metadata, test run config,
|
|
123
|
-
and screenshot results. Can be very large (20K+ tokens). Only read this if you need the full context.
|
|
124
|
-
- `debug-data/diffs/<id>.summary.json` -- **Start here.** Compact summary with just the screenshot
|
|
125
|
-
diff results: which screenshots differ, mismatch pixel counts, mismatch percentages, and changed
|
|
126
|
-
section class names.
|
|
127
|
-
- `debug-data/log-diffs/<id>.diff` -- Raw unified diff of `logs.deterministic.txt` between head and base.
|
|
128
|
-
- `debug-data/log-diffs/<id>.filtered.diff` -- **Start here for diff investigation.** Noise-stripped
|
|
129
|
-
version with tunnel URLs, S3 tokens, PostHog payloads removed. Hunks that only differ in
|
|
130
|
-
noise are removed entirely.
|
|
131
|
-
- `debug-data/log-diffs/<id>.summary.txt` -- High-level summary: total changed lines, first divergence
|
|
132
|
-
point, and categorized change counts with direction (e.g. "animation frames: +85 in head /
|
|
133
|
-
-46 in base, net +39 in head").
|
|
134
|
-
- `debug-data/params-diffs/<id>.diff` -- JSON-aware diff of `launchBrowserAndReplayParams.json`
|
|
135
|
-
between head and base. Keys are sorted and pretty-printed so only meaningful value changes appear.
|
|
136
|
-
<!-- if-snapshot-assets -->
|
|
137
|
-
- `debug-data/assets-diffs/<id>.txt` -- Comparison of snapshotted asset file lists between head
|
|
138
|
-
and base (added/removed/changed by content hash). Not generated if assets are identical.
|
|
139
|
-
<!-- end-if-snapshot-assets -->
|
|
140
|
-
- `debug-data/screenshot-context/<id>.txt` -- Only generated with `--screenshot`. Shows ±30 lines
|
|
141
|
-
of `logs.deterministic.txt` surrounding the screenshot for both head and base, with the
|
|
142
|
-
screenshot line marked `>>>`.
|
|
143
|
-
- `debug-data/dom-diffs/<headReplayId>-vs-<baseReplayId>-<screenshotBaseName>.diff` -- **Start
|
|
144
|
-
here for DOM changes.** Unified diff with 3 lines of context per hunk of the HEAD vs BASE
|
|
145
|
-
DOM at a specific screenshot, identical to the diff shown in the Meticulous product. Only
|
|
146
|
-
written when the DOMs actually differ.
|
|
147
|
-
- `debug-data/dom-diffs/<headReplayId>-vs-<baseReplayId>-<screenshotBaseName>.full.diff` --
|
|
148
|
-
The same hunks as the sibling `.diff`, but with full-file context. Read this when 3 lines
|
|
149
|
-
of context around a hunk isn't enough to understand the surrounding DOM structure.
|
|
150
|
-
- `debug-data/dom-diffs/<headReplayId>-vs-<baseReplayId>.summary.txt` -- Per-pair index of DOM
|
|
151
|
-
diffs: total screenshots compared, count breakdown by status, and a TSV table (`screenshot`,
|
|
152
|
-
`status`, `hunks`, `diff_bytes`, `url`).
|
|
153
|
-
|
|
154
|
-
<!-- if-local-cli -->
|
|
155
|
-
|
|
156
|
-
Note: DOM diffs are only generated when a `replayDiffId` is available (the normal
|
|
157
|
-
`meticulous debug replay-diff <id>` path). On the rare `meticulous debug replay --baseReplayId`
|
|
158
|
-
path there is no `replayDiffId`, so `dom-diffs/` is not generated — diff the per-replay
|
|
159
|
-
`screenshots/<baseName>.html` files directly with the system `diff` command instead.
|
|
160
|
-
|
|
161
|
-
<!-- end-if-local-cli -->
|
|
162
|
-
|
|
163
|
-
Individual screenshots may also be marked `skipped-error` (backend fetch failed) or
|
|
164
|
-
`skipped-unsupported` (e.g. redacted variants, or screenshots whose identifier couldn't
|
|
165
|
-
be resolved from `timeline.json`) in the per-pair `.summary.txt`. For those, fall back
|
|
166
|
-
to diffing the two `screenshots/<baseName>.html` files directly.
|
|
167
|
-
|
|
168
|
-
### Other Data
|
|
169
|
-
|
|
170
|
-
- `debug-data/session-summaries/<sessionId>.txt` -- **Start here for session investigation.** Compact
|
|
171
|
-
summary of each session: URL history, user event breakdown, network request stats (methods,
|
|
172
|
-
status codes, domains, failures), storage counts, WebSocket connections, custom data, session
|
|
173
|
-
context, and framework info.
|
|
174
|
-
- `debug-data/sessions/<sessionId>/data.json` -- Full session recording data including user events, network
|
|
175
|
-
requests (HAR format), and application storage. Can be very large; prefer the session summary
|
|
176
|
-
or use search to find relevant portions.
|
|
177
|
-
- `debug-data/test-run/<testRunId>.json` -- Test run configuration, results, commit SHA, and status.
|
|
178
|
-
<!-- if-pr-description -->
|
|
179
|
-
- `debug-data/pr-description.txt` -- Pull request description/body.
|
|
180
|
-
<!-- end-if-pr-description -->
|
|
181
|
-
<!-- if-pr-diff -->
|
|
182
|
-
- `debug-data/pr-diff.txt` -- Source code changes between the base and head commits.
|
|
183
|
-
<!-- end-if-pr-diff -->
|
|
184
|
-
|
|
185
|
-
## Key `context.json` fields
|
|
186
|
-
|
|
187
|
-
- `screenshotMap` -- maps each screenshot identifier to its virtual timestamp and event number.
|
|
188
|
-
Use this to correlate e.g. `screenshot-after-event-00673` with a timeline position.
|
|
189
|
-
- `replayComparison` -- side-by-side per-replay stats (events, network requests, animation
|
|
190
|
-
frames, virtual time, screenshots). Scan for head-vs-base drift.
|
|
191
|
-
- `domDiffMap` -- keyed by `"<headReplayId>-vs-<baseReplayId>/<screenshotBaseName>"`. An
|
|
192
|
-
entry is present **only** for screenshots with a real DOM diff to open; each carries
|
|
193
|
-
`diffPath` (3-line-context), `fullDiffPath` (full-file-context), `totalHunks`, `bytes`,
|
|
194
|
-
and `url`. `fullDiffPath` alone can be `null` when the full-context fetch failed while
|
|
195
|
-
the canonical succeeded — in that case `diffPath` is non-null and still usable.
|
|
196
|
-
Screenshots that are identical, only-in-one-side, `skipped-error`, or
|
|
197
|
-
`skipped-unsupported` have **no entry** in the map; consult the per-pair `.summary.txt`
|
|
198
|
-
for the full list (it records every compared screenshot and its status).
|
|
199
|
-
- `fileMetadata` -- byte sizes and line counts for key files. Check this before reading
|
|
200
|
-
anything large; for files over ~5000 lines prefer grep/search or ranged reads.
|
|
201
|
-
|
|
202
|
-
## Debugging Workflow
|
|
203
|
-
|
|
204
|
-
Don't work through this top-to-bottom -- pick the phases relevant to the question. Phase 1
|
|
205
|
-
applies to every investigation; then pick phase 2 (comparing replays) or phase 3 (single
|
|
206
|
-
replay), and drop into phase 4 only as needed.
|
|
207
|
-
|
|
208
|
-
### 1. Orient
|
|
209
|
-
|
|
210
|
-
1. **Read `debug-data/context.json`** for IDs, statuses, file paths, `screenshotMap`,
|
|
211
|
-
`replayComparison`, and `fileMetadata`. If a `screenshot` field is present, that's the
|
|
212
|
-
specific screenshot the user wants to investigate -- use `screenshotMap` to find its
|
|
213
|
-
virtual timestamp and focus analysis on events leading up to it.
|
|
214
|
-
2. **Scan `replayComparison`** for head-vs-base drift signals (event counts, animation
|
|
215
|
-
frames, virtual time, screenshot count).
|
|
216
|
-
|
|
217
|
-
### 2. Investigate a diff (head vs base)
|
|
218
|
-
|
|
219
|
-
3. **Screenshot diffs** -- read `debug-data/diffs/<id>.summary.json` for which screenshots
|
|
220
|
-
changed and by how much. If `debug-data/screenshot-context/` is present, read it for the
|
|
221
|
-
log lines around each screenshot. Only open the full `diffs/<id>.json` for complete
|
|
222
|
-
replay metadata.
|
|
223
|
-
4. **DOM diffs** -- for each changed screenshot, open the matching `.diff` under
|
|
224
|
-
`debug-data/dom-diffs/` (use `domDiffMap` to navigate). If 3 lines of context around a
|
|
225
|
-
hunk isn't enough, open the sibling `.full.diff` file (same hunks with full-file context,
|
|
226
|
-
path on `domDiffMap[...].fullDiffPath`).
|
|
227
|
-
5. **Log diffs** -- **delegate to the log-diff-analyzer subagent** instead of reading
|
|
228
|
-
`debug-data/log-diffs/*.filtered.diff` directly; only open the raw diff to verify
|
|
229
|
-
specific findings.
|
|
230
|
-
<!-- if-pr-description-and-diff -->
|
|
231
|
-
6. **PR description and diff** -- read `debug-data/pr-description.txt` first to understand
|
|
232
|
-
the intended change, then **delegate to the pr-analyzer subagent** to correlate code
|
|
233
|
-
changes with visual diffs. Only open `debug-data/pr-diff.txt` directly to verify findings.
|
|
234
|
-
<!-- end-if-pr-description-and-diff -->
|
|
235
|
-
<!-- if-pr-description-only -->
|
|
236
|
-
7. **PR description** -- read `debug-data/pr-description.txt` to understand the intended
|
|
237
|
-
change that triggered this test run.
|
|
238
|
-
<!-- end-if-pr-description-only -->
|
|
239
|
-
<!-- if-pr-diff-only -->
|
|
240
|
-
8. **PR diff** -- **delegate to the pr-analyzer subagent** to correlate code changes with
|
|
241
|
-
visual diffs. Only open `debug-data/pr-diff.txt` directly to verify findings.
|
|
242
|
-
<!-- end-if-pr-diff-only -->
|
|
243
|
-
|
|
244
|
-
### 3. Investigate a single replay
|
|
245
|
-
|
|
246
|
-
7. **Filtered logs** -- read `logs.deterministic.filtered.txt` inside the replay directory.
|
|
247
|
-
Fall back to the raw `logs.deterministic.txt` only if you need unmodified output.
|
|
248
|
-
8. **Events index** -- grep `debug-data/events-index/<role>-<replayId>.txt` by kind,
|
|
249
|
-
virtual time, or URL (e.g. `grep 'kind=screenshot'`, `grep 'api/v9/users'`). Prefer this
|
|
250
|
-
over parsing `timeline.json`.
|
|
251
|
-
9. **Logs index** -- grep `debug-data/logs-index/<role>-<replayId>.txt` by source
|
|
252
|
-
(`source=application`), type (`type=warn`), keyword, or virtual time (`vt=1234`).
|
|
253
|
-
|
|
254
|
-
### 3b. Check network match quality (when diffs involve partial matches)
|
|
255
|
-
|
|
256
|
-
When the replay shows "Low accuracy: Network issues", or `network-log/` shows pollyReplay
|
|
257
|
-
entries with a `repair=` suffix (indicating session repair was needed to serve a response)
|
|
258
|
-
in the root cause time span (events preceding the first visual difference), this is a
|
|
259
|
-
high-priority check:
|
|
260
|
-
|
|
261
|
-
1. Grep `timeline.ndjson` for `pollyReplay` events near the first divergence point. Each
|
|
262
|
-
event's `data` contains both:
|
|
263
|
-
- `data.pollyRequest.request.url` -- the **actual request** made during replay.
|
|
264
|
-
- `data.matchedRequest.request.url` -- the **original recorded request** whose saved
|
|
265
|
-
response was served (null if no match was found).
|
|
266
|
-
2. Compare these URLs for each pollyReplay event. If they differ significantly (different
|
|
267
|
-
endpoint, different query parameters, different resource), the response served almost
|
|
268
|
-
certainly doesn't match what the application expected. This is a common root cause for
|
|
269
|
-
diffs and should be flagged.
|
|
270
|
-
|
|
271
|
-
For example, if the actual request was `GET /api/v1/items` but Meticulous served a saved
|
|
272
|
-
response originally recorded for `GET /api/v1/orders?page=1&search=...`, the
|
|
273
|
-
response schema is likely wrong for the requesting code, causing downstream UI differences.
|
|
274
|
-
|
|
275
|
-
When you identify such a mismatch, report it as the likely root cause and note that the diff
|
|
276
|
-
can be disregarded -- it stems from a network matching issue, not a real code regression.
|
|
277
|
-
|
|
278
|
-
### 4. Deeper dives (as needed)
|
|
279
|
-
|
|
280
|
-
10. **Screenshot timeline context** -- `debug-data/screenshot-timeline-context/` for the 30
|
|
281
|
-
events before and 10 after each screenshot.
|
|
282
|
-
11. **Network activity** -- grep `debug-data/network-log/` for endpoints, status codes,
|
|
283
|
-
domains. For any pollyReplay entries with a `repair=` suffix, cross-reference with
|
|
284
|
-
`timeline.ndjson` to compare the actual request URL against the matched recorded request
|
|
285
|
-
URL (see phase 3b above).
|
|
286
|
-
12. **Virtual time progression** -- `diff` on `debug-data/vt-progression/` files to find
|
|
287
|
-
where head and base diverge.
|
|
288
|
-
13. **Replay parameters** -- `debug-data/params-diffs/` for computed diffs, or
|
|
289
|
-
`launchBrowserAndReplayParams.json` for a single replay.
|
|
290
|
-
14. **Code coverage** -- `mapped-coverage.json` for whole-replay coverage; correlate executed
|
|
291
|
-
code with `pr-diff.txt` to see whether the changed lines actually ran. Use
|
|
292
|
-
`mapped-per-screenshot-js-coverage/<screenshotId>.json` to localize what executed before
|
|
293
|
-
a specific screenshot.
|
|
294
|
-
<!-- if-snapshot-assets -->
|
|
295
|
-
15. **Assets** -- `debug-data/assets-diffs/` for snapshotted JS/CSS diffs,
|
|
296
|
-
`debug-data/formatted-assets/` for pretty-printed bundles.
|
|
297
|
-
<!-- end-if-snapshot-assets -->
|
|
298
|
-
16. **Session data** -- `debug-data/session-summaries/<sessionId>.txt` first; only read raw
|
|
299
|
-
`sessions/<id>/data.json` for specific request bodies or event selectors.
|
|
300
|
-
<!-- if-local-cli -->
|
|
301
|
-
17. **Project source** -- `project-repo/` when present.
|
|
302
|
-
<!-- if-snapshot-assets -->
|
|
303
|
-
For third-party library code, use `debug-data/formatted-assets/`.
|
|
304
|
-
<!-- end-if-snapshot-assets -->
|
|
305
|
-
<!-- end-if-local-cli -->
|
|
306
|
-
|
|
307
|
-
**Important**: Do NOT use Python one-liners to parse `timeline.json` or `logs.ndjson`. The
|
|
308
|
-
derived files above (`events-index/`, `logs-index/`, `network-log/`, `vt-progression/`,
|
|
309
|
-
`screenshot-timeline-context/`) are pre-computed and greppable. Use `timeline.ndjson`
|
|
310
|
-
(NDJSON format, one JSON object per line) if you need to grep the raw timeline data.
|
|
311
|
-
|
|
312
|
-
## Subagents
|
|
313
|
-
|
|
314
|
-
Specialized subagents are available via the Task tool — the SDK surfaces each one's
|
|
315
|
-
name, tools, and description automatically; you don't need to enumerate them. Two
|
|
316
|
-
general-purpose subagents are worth calling out because they apply across all phases
|
|
317
|
-
of the workflow:
|
|
318
|
-
|
|
319
|
-
- **Planner** — when the user describes a complex or ambiguous issue, delegate to
|
|
320
|
-
the planner before starting your own investigation. It reads workspace summaries
|
|
321
|
-
and metadata to produce a structured debugging plan with prioritized investigation
|
|
322
|
-
steps. Skip it for straightforward cases (e.g. a specific screenshot diff with an
|
|
323
|
-
obvious focus, or a single diff to investigate).
|
|
324
|
-
- **Summarizer** — when you need to understand a large file (over 5000 lines),
|
|
325
|
-
delegate to the summarizer instead of reading the file in full. It scans with
|
|
326
|
-
grep and targeted reads and returns a concise overview with line numbers for
|
|
327
|
-
follow-up.
|
|
328
|
-
|
|
329
|
-
Phase-specific subagents (log-diff-analyzer, pr-analyzer) are referenced from the
|
|
330
|
-
workflow steps above.
|
|
331
|
-
|
|
332
|
-
## Rules
|
|
333
|
-
|
|
334
|
-
- This workspace is for analysis and investigation. Focus on understanding root causes.
|
|
335
|
-
- When referencing files, use paths relative to this workspace root.
|
|
336
|
-
- Prefer `logs.deterministic.filtered.txt` over `logs.deterministic.txt` for general
|
|
337
|
-
investigation. Use the raw version only when you need unmodified output.
|
|
338
|
-
- Prefer `logs.deterministic.txt` over `logs.concise.txt` when comparing between replays,
|
|
339
|
-
since real-time timestamps are stripped.
|
|
340
|
-
- Session data files can be very large. Use grep/search to find relevant portions rather than
|
|
341
|
-
reading entire files.
|
|
342
|
-
- For per-screenshot DOM content, prefer reading
|
|
343
|
-
`debug-data/replays/<role>/<replayId>/screenshots/<name>.html` rather than parsing the raw
|
|
344
|
-
`<name>.metadata.json`.
|
|
345
|
-
- For DOM changes between replays, prefer `debug-data/dom-diffs/` over diffing the two
|
|
346
|
-
`<name>.html` files yourself -- the pre-computed `.diff` is identical to the diff shown
|
|
347
|
-
in the Meticulous product and already has context lines added.
|
|
348
|
-
- Check `fileMetadata` in `context.json` for file sizes before reading large files.
|