Skip to content

The two ⛔ notes forbidding a single-sourced ORGANIZATIONS_RUNTIME_PKG name a constraint that no longer exists — decide whether to consume the resolver hop or restate why not #12579

Description

@os-litant

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 outstatic 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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions