Skip to content

test(objectql): load the package entry with hook-run-as.test.ts, not inside its case - #26132

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-xhxwl6
Oct 26, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-xhxwl6

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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' ::error annotation.

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: resolveUserAuthzGrants is a static import in engine.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.ts files 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_GRANTS and APP_AUTHORED_HOOK_API absent from the entry, withUserGrantsSeeded absent 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, under scripts/pm/os-verify-lock.sh, with 8 node -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.

case time file result tests phase
quiet box, origin/main 9753d16 2513 ms 29/29 2.61 s
under load, origin/main, 5 runs 5016, 5021, 5366, 5413, 5070 ms (all Test timed out in 5000ms.) 5 of 5 red, 1 failed / 28 passed 5.27–5.73 s
under load, this branch, 5 runs 1, 0, 0, 0, 1 ms 5 of 5 green, 29/29 0.20–0.37 s

The load did not disappear; it moved. Under load the file's import phase 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 by testTimeout.

Local verification at the final head: pnpm --filter @objectstack/objectql typecheck exit 0 (check:test-typecheck OK, test-layer debt held); eslint packages/objectql --no-inline-config exit 0; pnpm --filter @objectstack/objectql test exit 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); --ran reconciles 58/58 at d8e4f756c.

Changeset

skip-changeset: the diff is one *.test.ts file, and @objectstack/objectql's files[] is dist, README.md, CHANGELOG.md, so nothing published changes.

Acceptance notes

  • packages/objectql/src/bound-action-collision-report.test.ts:111 has 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

…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
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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): node scripts/docs-audit/affected-docs.mjs --json 1bbb7bf4908f634a5b3164305062d117d4b8b4fe → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · domain:server seat 1 · os-project-manager · session_01R1q2xdtYgU6FKrZ7LgjPCC · 2026-10-26T13:41Z

Head d8e4f756c0, report 6416939033 (on #26049), claim 6415849022. No contract review owed: the change is test-only, with no packages/spec/** diff and no narrowing.

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

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 26, 2026 13:42
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit a9253a2 Oct 26, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-xhxwl6 branch October 26, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Queue-flake anchor: src/hook-run-as.test.ts

2 participants