Filed by the #12533 dev (session session_01UjujZN219uFzBhSYfMykCd), branch claude/issue-12533-resolver-import-alias-hop, as the named consumer follow-up that card's claim comment split out. ⛔ Unassigned and unlabelled on purpose — this needs triage, and the substantive half needs a maintainer call.
What changed under these notes
packages/cli/src/commands/serve-cluster-host-resolution.test.ts's resolveIdentifier() gained an import-alias hop (#12533): it now follows an import alias to a string literal in a sibling module of the same package, so a package spelling can be declared once in packages/cli/src/utils/ and still be seen by the host-anchoring sweep.
That hop is the capability. It has no live site — deliberately, because a capability and the reversal it licenses do not land together.
The notes, and why they are now half-true
Two sites carry a written ⛔ against closing this duplication. Measured on origin/main @ 9bed0b0fe:
packages/cli/src/utils/tenancy-posture-hints.ts:89 — "⛔ Do NOT close the gap by importing Serve.ORGANIZATIONS_RUNTIME_PKG here"packages/cli/src/commands/serve-organizations-message-spelling.test.ts:52 — "Serve.ORGANIZATIONS_RUNTIME_PKGdeliberately stays a string LITERAL in serve.ts", with the stated reason: "serve-cluster-host-resolution.test.ts resolves the organizations import() through that static and needs the literal in that file, or the load drops out of the host-anchoring sweep silently"
The spelling test's reason is the one that moved. The load no longer drops out — static readonly ORGANIZATIONS_RUNTIME_PKG = SHARED_ALIAS; now resolves through the hop, and that shape is pinned by a synthetic case in the sweep. The tenancy-posture-hints.ts:89 note points the other direction (don't import fromserve.tsinto the shared module) and its own reasoning should be re-read on its own terms rather than assumed to fall with the other.
⚠️ So this card is not "finish the job". It is: a documented decision now rests partly on a constraint that has been removed, and the decision must either be taken again or its note rewritten to state the reason that still holds. Leaving a ⛔ whose stated reason is stale is how the next author reads it as arbitrary and steps over it.
What a change here would have to move together
⛔ Not a drive-by. The duplication was shipped on purpose by PR #12532 with the reasoning at both ends, so reversing it is a maintainer-facing decision, not a refactor.
Why it is worth deciding rather than dropping
Left as is, the sweep carries a resolver branch nothing reaches. #12533's PR states that in its body and the suite's own docblock says it in the file, but the durable answer is either a consumer or an explicit "the duplication stays, here is the reason that survives the hop".
Re-check
git grep -n "ORGANIZATIONS_RUNTIME_PKG" origin/main -- packages/cli/src
git grep -n "resolveImportedLiteral" origin/main -- packages/cli/src/commands/serve-cluster-host-resolution.test.ts
⛔ Reverse-check any zero against a term known present in the same file, never a substring of the term under test.
Refs
Generated by Claude Code
Filed by the #12533 dev (session
session_01UjujZN219uFzBhSYfMykCd), branchclaude/issue-12533-resolver-import-alias-hop, as the named consumer follow-up that card's claim comment split out. ⛔ Unassigned and unlabelled on purpose — this needs triage, and the substantive half needs a maintainer call.What changed under these notes
packages/cli/src/commands/serve-cluster-host-resolution.test.ts'sresolveIdentifier()gained an import-alias hop (#12533): it now follows an import alias to a string literal in a sibling module of the same package, so a package spelling can be declared once inpackages/cli/src/utils/and still be seen by the host-anchoring sweep.That hop is the capability. It has no live site — deliberately, because a capability and the reversal it licenses do not land together.
The notes, and why they are now half-true
Two sites carry a written ⛔ against closing this duplication. Measured on
origin/main@9bed0b0fe:packages/cli/src/utils/tenancy-posture-hints.ts:89— "⛔ Do NOT close the gap by importingServe.ORGANIZATIONS_RUNTIME_PKGhere"packages/cli/src/commands/serve-organizations-message-spelling.test.ts:52— "Serve.ORGANIZATIONS_RUNTIME_PKGdeliberately stays a string LITERAL inserve.ts", with the stated reason: "serve-cluster-host-resolution.test.tsresolves the organizationsimport()through that static and needs the literal in that file, or the load drops out of the host-anchoring sweep silently"The spelling test's reason is the one that moved. The load no longer drops out —
static readonly ORGANIZATIONS_RUNTIME_PKG = SHARED_ALIAS;now resolves through the hop, and that shape is pinned by a synthetic case in the sweep. Thetenancy-posture-hints.ts:89note points the other direction (don't import fromserve.tsinto the shared module) and its own reasoning should be re-read on its own terms rather than assumed to fall with the other.What a change here would have to move together
packages/cli/src/commands/serve.ts:548— the literal that would become the aliaspackages/cli/src/utils/tenancy-posture-hints.ts:105—export const ORGANIZATIONS_RUNTIME_PKG = '@objectstack/organizations', already the single source candidate, already imported intoserve.tsfor a different export (serve.ts:56)serve-organizations-message-spelling.test.tssite 8 — it pins the two declarations EQUAL.serve-cluster-host-resolution.test.ts'sresolveIdentifier()stops one hop short of an import alias — so a package literal cannot be moved out ofserve.tswithout silently emptying the sweep #12533 explicitly left it alone.⛔ Not a drive-by. The duplication was shipped on purpose by PR #12532 with the reasoning at both ends, so reversing it is a maintainer-facing decision, not a refactor.
Why it is worth deciding rather than dropping
Left as is, the sweep carries a resolver branch nothing reaches. #12533's PR states that in its body and the suite's own docblock says it in the file, but the durable answer is either a consumer or an explicit "the duplication stays, here is the reason that survives the hop".
Re-check
⛔ Reverse-check any zero against a term known present in the same file, never a substring of the term under test.
Refs
serve-cluster-host-resolution.test.ts'sresolveIdentifier()stops one hop short of an import alias — so a package literal cannot be moved out ofserve.tswithout silently emptying the sweep #12533 — the resolver hop; its claim comment is where this consumer half was split outTENANCY_POSTURE_FIX_HINTSis duplicated WHOLE betweenserve.tsanddoctor.ts— thesingleandgroupentries are byte-identical too, and only theisolatedone is covered by a card #12492 / PR refactor(cli): single-source the tenancy posture hint table thatos serveandos doctorboth print (#12492) #12532 — where the duplication was shipped deliberately, and where the refactor was attempted and measured to empty the sweeporganizationsPkg字面量尚未消费 PLATFORM_PLUGIN_WIRED_RUNTIMES 的 key — roster 落地后的一行闭环 #11614 / PR refactor(cli): single-source the@objectstack/organizationsspelling onto one roster-pinned declaration (#11614) #12149 — the earlier hop, and the loss that motivated itGenerated by Claude Code