Uh oh!
There was an error while loading. Please reload this page.
fix(devx): add missing @objectstack/spec/qa (and /api) alias entries - #8416
Conversation
Six vitest configs alias the bare @objectstack/spec key to a FILE without a subpath entry for /qa (and, in knowledge-memory, /api) — the subpath @objectstack/core's own source reaches through its own src alias in these configs. An alias list matches by PREFIX, so the bare @objectstack/spec entry wins and yields the nonsensical spec/src/index.ts/qa (ENOTDIR at run time). This was latent rather than currently-red: every use inside @objectstack/core's qa adapters is in a TYPE position, so esbuild elides the import and the specifier never reaches the resolver — until the first value use. Adds the seven entries from #8391's table, each placed ABOVE the bare @objectstack/spec key using the same idiom the existing /shared entries in these configs use. Fixes#8391 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 6 package(s): 28 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 5 release-owned page(s) also reference the affected code. These are read-only:
|
Uh oh!
There was an error while loading. Please reload this page.
Fixes#8391
What
Adds the seven missing
@objectstack/spec/qa(and, forknowledge-memory,/api)alias entries across the six vitest configs listed in the issue's table, each placed
ABOVE the bare
@objectstack/speckey — the same/sharedidiom these configsalready use:
packages/metadata/vitest.config.ts@objectstack/spec/qapackages/runtime/vitest.config.ts@objectstack/spec/qa(array form, matching the file's existing regex-anchored style)packages/drivers/driver-memory/vitest.config.ts@objectstack/spec/qapackages/plugins/plugin-dev/vitest.config.ts@objectstack/spec/qapackages/plugins/plugin-hono-server/vitest.config.ts@objectstack/spec/qapackages/plugins/knowledge-memory/vitest.config.ts@objectstack/spec/qa,@objectstack/spec/apiNo other lines in these six files changed — no reordering, no reformatting, no new
keys beyond the seven entries.
Why
Each of these configs aliases
@objectstack/coretocore/src/index.tsand aliasesthe bare
@objectstack/specto a FILE, without a subpath entry for/qa(and, inknowledge-memory,/api) — the subpath@objectstack/core's own source reaches atthose import sites. Since alias resolution matches by PREFIX, the bare
@objectstack/specentry wins for these subpaths and yields the nonsensicalspec/src/index.ts/qa(ENOTDIR at run time). This is currently latent — every useinside
@objectstack/core'sqaadapters is in a TYPE position, so esbuild elidesthe import — but the first value use kills every test file in all six packages at
load, the way #7378 did for
/shared.Sequencing
This lands first. Companion gate-hardening PR #8392 (from #8351) reports exactly
these seven findings as rule-5 failures on its sharpened
check-test-source-alias.mjs; once this PR merges, #8392 flips ready and goes greenwith zero further edits.
Scope
The six touched files span four lanes (
metadata,runtime/plugin-dev/plugin-hono-server,driver-memory,knowledge-memory) under the triage-designatedcross-domain exception path recorded on #8391 (
domain:devxowns the sequencing withthe companion gate card).
driver-memoryis a frozen-investment family; this changeis test-infra resolution repair only — one alias line, no other edits.
Verification
origin/claude/issue-8351-alias-walk-cross-package'sscripts/check-test-source-alias.mjsreported exactly the 7 findings from theissue's table (6 ×
/qa,knowledge-memory×/api).(
check-test-source-alias OK — 72 packages with tests scanned; 61 registered as still resolving a workspace dep throughdist/.).maingate (node scripts/check-test-source-alias.mjs) stays greenafter the edits — the new entries don't disturb its ledger or rules.
driver-memorydoingawait import('@objectstack/spec/qa')loaded successfully under the patchedconfig (no ENOTDIR); the probe file was deleted before committing
(
git statusclean of it).pnpm --filter(package-dependency-closure form, e.g.--filter '@objectstack/metadata^...')buildrun for the dependencyclosures of all six touched packages before testing.
pnpm testrun (scoped,--maxWorkers=2,--workspace-concurrency=2) — see report for pass/fail counts.pnpm check:nul-bytes— OK.node scripts/pm/dispatch-gates.mjs(the sixchanged paths as arguments):
check:changeset-gate-self-tests,check:docs-audit-scope,check:driver-conformance,check:test-source-alias,check:type-source-resolutionall green;node scripts/check-dev-prereqs.mjsreports the fresh worktree'sdist/asunbuilt for packages outside this PR's scope — a pre-existing property of an
unbuilt worktree, not a regression from this change, since it's a workspace-wide
build-state check unrelated to the six vitest configs touched here.
Notes for reviewers
.changeset/*.md— this is a test-config-only change (vitest alias entries),no user-visible behavior change.
skip-changesetlabel applied.Generated by Claude Code
Generated by Claude Code