Repository navigation
test(cli): keep the two-namespace control's tools distinct so the bare-name rule does not judge it - #31742
Merged
Conversation
…e-name rule does not judge it Claude-Session: https://claude.ai/code/session_01ADHkmQv69sQL5nfT8xuPWs Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:server#1 · os-steve · session_01ADHkmPF1skfu2kx89BEXZi 席位 ACCEPT · head
|
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): |
This was referenced Nov 9, 2026
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 Steve · project thread
Prerequisite for #31661 (it was ejected from the merge queue by this test, queue build 42539489585, Test Core 1/8, triage 6729558102). Test-only; no card of its own, so
skip-changeset.维护者速读
packages/cli/test/validate-namespace-name.test.ts的夹具:两个命名空间那条 CONTROL 里,beta 包的 tool 从nsn_lookup改名为nsn_other_lookup;同命名空间那几条仍共用tool/nsn_lookup。BareNameConflictError422 拒掉。它本意只测 feat(objectql)!: refuse a (type, name) held twice inside one namespace #31717 的命名空间规则,不该被 bare-name 规则判。packagesStack的betaTool一行。pnpm --filter @objectstack/cli exec vitest run test/validate-namespace-name.test.ts—— 预期 4 passed。What changes
packagesStack(betaNs)gives the beta package's tool its own name whenbetaNsis notnsn(nsn_other_lookup), so the two-namespace CONTROL shares only the pagensn_home. The shared-namespace fixtures still holdpage/nsn_homeandtool/nsn_lookuptwice, so every refusal assertion is unchanged. The CONTROL's title now says what it holds ("the same page name in two namespaces validates"). A doc comment says why: a tool is also phase 1's bare-name one-holder type, judged environment-wide, so a shared tool across two namespaces is that rule's refusal, not this rule's CONTROL.os validatedoes not run the bare-name rule, so the CLI CONTROL reads the same either way; only the package-door premise is affected.Verification
Every run under
os-verify-lock, CLI closure rebuilt each time:86e164c2(maincae8d8fe+ this commit):test/validate-namespace-name.test.ts4 passed.30b6c84f(scratch branch): 4 passed.mainmerged with feat(objectql)!: a tool holds one name per package (bare-name one holder, after the AI family) #31661 (no fix, scratch branch): 1 failed / 3 passed, the premise:expected BareNameConflictError: Bare-name conflict… to be undefined. That is the queue failure, reproduced, and the fix clears it.eslint packages/cli/test/validate-namespace-name.test.ts --no-inline-configexit 0. Gates:dispatch-gates --ranon86e164c2: 49 derived, 49 run, 0 NOT-MEASURED, all exit 0 (check:dts-closureandcheck:dual-build-cjs-loadsfirst read a declaration-less / partial local build and were re-run green after a full closure build).Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmQv69sQL5nfT8xuPWs