Repository navigation
test(objectql): load the package entry with hook-run-as.test.ts, not inside its case - #26132
Merged
Merged
Conversation
…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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AN1CuLrAYkcsfrh1N5ffLT
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contributor
Author
席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | draft, base main, Fixes #26049, skip-changeset (test-only), mergeable clean. |
| Files | 1 file, +7/−2: packages/objectql/src/hook-run-as.test.ts. |
| Root cause | Both ejections were the line-389 case (the seed is no nameable member of the published face), not the block's first case as the order hypothesised; the triage FAIL line was truncated. That case did await import('./index.js') inside its 5 s budget. The entry pulls the package's whole module graph, about 2.5 s on a quiet box, and the queue's load pushed it past 5 s. |
| Fix | The entry is imported statically with the file, so the load is paid at collection, outside any case budget. Same module, same assertions; no timeout raised, no skip. Under 8 CPU hogs: 5/5 red on main (5016–5413 ms), 5/5 green after (0–1 ms). |
| Evidence | 36 check runs success and 16 expected skips on this head, 0 failed. Build Core (which hosts check:dual-build-cjs-loads, the one gate the dev could not measure locally) is green. objectql suite 470 files / 8,748 tests green, typecheck and scoped lint green. |
| Carried | The dev noted bound-action-collision-report.test.ts:111 has the same in-case import() shape. It has not ejected a PR, so no card; the anchor workflow files one if it does. |
| Landing | 「按照 pm-dispatch 规则复核过的都授权」 (Leehom, 2026-10-25T11:35Z): ready and auto-merge through the relay. |
Generated by Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Leehom · project thread
Fixes #26049
Clause-②: no
Metadata-protocol: none
What timed out, read from the logs
Both merge-queue ejections (build 40300684735 for #26012, Test Core 8/8; build 40302541664 for #26007, Test Core 8/8) fail at
src/hook-run-as.test.ts:389:5, the case "the seed is no nameable member of the published face: keyed on a symbol the package entry does not export". The triage comments truncate the FAIL line after the describe title, which made it read as the block's first case; the full title and the line number are in the job logs'::errorannotation.That case did
const entry = await import('./index.js')inside the test body. The package entry pulls the rest of@objectstack/objectql's module graph, which nothing else in this file loads, so the case paid a cold transform and import of the package inside its 5000 ms budget. The resolver path the card suspected is not the cost:resolveUserAuthzGrantsis a static import inengine.ts, and the block's first case runs in 1 ms.The fix (test-only)
import * as entry from './index.js'at the top of the file, the same idiom the package's*-code-constant.test.tsfiles use for the barrel. The load now happens at file collection, outside any per-case window. The case becomes synchronous and keeps all five assertions unchanged (SEED_USER_GRANTSandAPP_AUTHORED_HOOK_APIabsent from the entry,withUserGrantsSeededabsent from the prototype, two symbol-keyed members). No quarantine, skip, retry or timeout change. No product code touched.Evidence
Run:
pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2 --reporter=verbose src/hook-run-as.test.ts, underscripts/pm/os-verify-lock.sh, with 8node -e 'for(;;){}'busy loops alongside on a 4-core container (2x oversubscribed, standing in for the ui lanes running beside Test Core). Shared-box seconds.testsphaseorigin/main9753d16origin/main, 5 runsTest timed out in 5000ms.)The load did not disappear; it moved. Under load the file's
importphase went from 12.8–17.9 s (before) to 20.3–26.3 s (after), and whole-file wall time stayed in the same 18–27 s band. That phase is not bounded bytestTimeout.Local verification at the final head:
pnpm --filter @objectstack/objectql typecheckexit 0 (check:test-typecheckOK, test-layer debt held);eslint packages/objectql --no-inline-configexit 0;pnpm --filter @objectstack/objectql testexit 0 (470 files / 8748 tests passed); the derived gate list (dispatch-gates.mjs --commands) 58 derived, 57 run with exit 0, 1 NOT MEASURED (check:dual-build-cjs-loads, exit 3: needs a full build);--ranreconciles 58/58 atd8e4f756c.Changeset
skip-changeset: the diff is one*.test.tsfile, and@objectstack/objectql'sfiles[]isdist,README.md,CHANGELOG.md, so nothing published changes.Acceptance notes
packages/objectql/src/bound-action-collision-report.test.ts:111has the same shape (await import('./index.js')inside a "no nameable member of the published face" case). It has not ejected a queue build, and it is outside this claim's file surface, so it is untouched here; reported to the seat.🤖 Generated with Claude Code
https://claude.ai/code/session_01AN1CuLrAYkcsfrh1N5ffLT
Generated by Claude Code