Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: s-classic-file-holds picks the failing page read by its arguments, not a stack frame

garrytanf63348ec1ba1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 16bac63e9e..bd9d08139f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ identifiers and attribution are available in the pre-removal Git revision
- `scripts/test-weights.json` and `scripts/serial-weights.json`: each test file's weight is its median over the five newest green Test nightlies (41792242983, 41596314589, 41406386795, 41284734181 and 41180589845). The heaviest of the 28 unit shards is predicted at 536 s against the 600 s budget (523 s before). Test files with no weight drop from 65 to 50 of 4536 in the unit lane and from 7 to 4 of 457 in the serial lane.
- `scripts/e2e-weights.json`: re-mined from the full-corpus E2E nightly 41784138099. Test files with no weight drop from 19 to 17 of 864.
+- `test/pathological/s-classic-file-holds.test.ts`: the unknown-error case picks the import's page read by its arguments instead of by a stack frame, so it still injects its failure when an earlier file in the same process opened an embedded engine. The new packing runs `test/engine-open.test.ts` before it in one unit shard, where it failed every time.
## [0.60.580.0] - 2026-11-05
diff --git a/test/pathological/s-classic-file-holds.test.ts b/test/pathological/s-classic-file-holds.test.ts
index 72eb497203..f175044c29 100644
--- a/test/pathological/s-classic-file-holds.test.ts
+++ b/test/pathological/s-classic-file-holds.test.ts
@@ -155,7 +155,7 @@ function unknownFailure(engine: BrainEngine, slug: string): BrainEngine {
return new Proxy(engine, { get(target, prop) {
const value = Reflect.get(target, prop);
if (prop === 'getPage' && typeof value === 'function') {
- return (...args: unknown[]) => new Error().stack?.includes('importOnePath') && args[0] === slug
+ return (...args: unknown[]) => args[0] === slug && (args[1] as { includeDeleted?: boolean } | undefined)?.includeDeleted === true
? Promise.reject(new Error('an unexpected parser state in an example plugin')) : (value as Function).apply(target, args);
}
return typeof value === 'function' ? value.bind(target) : value;