Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test: a18 and s-70 pick the failing page read by its arguments, not a stack frame
garrytan6728fd78c207
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex b0394e9139..305df12a8c 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, 2026-11-01 through 2026-11-05; `scripts/*-weights.metadata.json` names the runs. The heaviest of the 28 unit shards is predicted at 538 s against the 600 s budget (537 s before). Test files with no weight drop from 61 to 36 of 4547 in the unit lane and from 4 to 1 of 457 in the serial lane.- `scripts/e2e-weights.json` is unchanged: the 2026-11-05 full-corpus E2E nightly failed, and the newest green one already sourced the map.+- `test/pathological/a18-ledger-path-text.test.ts` and `test/pathological/s-70-classifier-origin.test.ts`: the injected import failure picks the import's page read by its arguments instead of by an `importOnePath` stack frame, so it still fires when an earlier file in the same process opened an embedded engine. The new packing runs `test/engine-gateway.test.ts` before a18 in one unit shard, where five of its cases failed every time.## [0.60.584.0] - 2026-11-05diff --git a/test/pathological/a18-ledger-path-text.test.ts b/test/pathological/a18-ledger-path-text.test.tsindex 99396977b7..2472480313 100644--- a/test/pathological/a18-ledger-path-text.test.ts+++ b/test/pathological/a18-ledger-path-text.test.ts@@ -129,7 +129,7 @@ function failingImports(engine: BrainEngine, error: unknown, only: (slug: unknowreturn 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') && only(args[0]) ? Promise.reject(error) : (value as Function).apply(target, args);+ return (...args: unknown[]) => only(args[0]) && (args[1] as { includeDeleted?: boolean } | undefined)?.includeDeleted === true ? Promise.reject(error) : (value as Function).apply(target, args);}return typeof value === 'function' ? value.bind(target) : value;} }) as BrainEngine;diff --git a/test/pathological/s-70-classifier-origin.test.ts b/test/pathological/s-70-classifier-origin.test.tsindex 9e3c503988..e13c6b5f65 100644--- a/test/pathological/s-70-classifier-origin.test.ts+++ b/test/pathological/s-70-classifier-origin.test.ts@@ -52,7 +52,7 @@ function failingImport(engine: BrainEngine, slug: string, error: () => unknown):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 ? Promise.reject(error()) : (value as Function).apply(target, args);+ return (...args: unknown[]) => args[0] === slug && (args[1] as { includeDeleted?: boolean } | undefined)?.includeDeleted === true ? Promise.reject(error()) : (value as Function).apply(target, args);}return typeof value === 'function' ? value.bind(target) : value;} }) as BrainEngine;