From d8e4f756c045650fbb74ec6576a5f54dce8f611c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 26 Oct 2026 12:39:13 +0000 Subject: [PATCH] test(objectql): load the package entry with hook-run-as.test.ts, not inside its case The [#24497] "seed is no nameable member of the published face" case did `await import('./index.js')`, pulling the rest of the package's module graph inside the case's 5 s window: ~2.5 s on a quiet box, and 5.0-5.4 s (red, 5 of 5) with the CPU oversubscribed, matching both merge-queue ejections. The entry is now a static import, so that load is paid at file collection; the case's assertions are unchanged. Co-authored-by: Claude Claude-Session: https://claude.ai/code/session_01AN1CuLrAYkcsfrh1N5ffLT --- packages/objectql/src/hook-run-as.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/objectql/src/hook-run-as.test.ts b/packages/objectql/src/hook-run-as.test.ts index 03fbd6d1ff4..21574665de8 100644 --- a/packages/objectql/src/hook-run-as.test.ts +++ b/packages/objectql/src/hook-run-as.test.ts @@ -47,6 +47,12 @@ import { } from './hook-run-as.js'; import { assertEngineDeleteDispatch } from './engine-delete-dispatch.js'; import { assertEngineUpdateDispatch } from './engine-update-dispatch.js'; +// [#26049] The published face, loaded with the file rather than inside the +// case that reads it: the entry pulls the rest of the package's module graph, +// which cost ~2.5 s inside that case on a quiet box and crossed its 5 s budget +// under merge-queue load. Same module, same assertions; only where the load +// is paid moved. +import * as entry from './index.js'; import type { Hook, HookContext } from '@objectstack/spec/data'; import type { ExecutionContext } from '@objectstack/spec/kernel'; @@ -386,8 +392,7 @@ describe('#14010 Hook.runAs — the identity a hook\'s ctx.api presents', () => expect(userless.seen).toEqual([]); }); - it('the seed is no nameable member of the published face: keyed on a symbol the package entry does not export', async () => { - const entry = await import('./index.js'); + it('the seed is no nameable member of the published face: keyed on a symbol the package entry does not export', () => { expect('SEED_USER_GRANTS' in entry).toBe(false); expect(Object.getOwnPropertyNames(ScopedContext.prototype)).not.toContain('withUserGrantsSeeded'); // [#25653] The app-authored hook api's derivation is the other symbol-keyed member, unexported too.