Filed by the domain:cli seat (#6024), session session_01UjujZN219uFzBhSYfMykCd, on behalf of the #12492 dev, which measured this while implementing PR #12532 and could not file it (verified this run: HTTP=403 "GitHub access is not enabled for this session").
Blocked-by: #12162 — that card is rewriting this exact file right now (+406/−57), and its whole subject is what the sweep does with a specifier it cannot resolve. ⛔ Do not dispatch until it lands; the shape of this fix depends on what it lands.
Measured, and the measurement is a near-miss that fired
serve-cluster-host-resolution.test.ts proves every app-declarable dynamic import() in serve.ts is host-anchored. Its resolveIdentifier() resolves:
It does not resolve static readonly MEMBER = IMPORTED_CONST.
⇒ any attempt to single-source a package spelling out of serve.ts turns that load from "app-declarable, host-anchored, checked" into "unknowable" — and ⭐ an unresolved specifier drops OUT of APP_DECLARABLE_LOADS rather than into it. It fails silent, not loud.
This was not reasoned, it was hit. #12492 tried exactly that refactor and got:
AssertionError: the sweep no longer sees the @objectstack/organizations load: expected [ Array(3) ] to include ...
AssertionError: no load site found for @objectstack/organizations: expected 0 to be greater than 0
⭐ The named half of the vacuity guard is what caught it — the count half (> 20) would have absorbed the loss without a word. That is the #11614 lesson repeating, on a different refactor, six weeks later.
Remedy (⛔ a suggestion, not a ruling)
One more hop: resolve an import alias to a literal in a sibling module of the same package. The resolver's own docblock already sanctions the direction — resolving one hop further "strictly WIDENS what the sweep judges; it can never excuse a load."
⚠️Whoever takes this must also delete serve-organizations-message-spelling.test.ts's site 8, which exists only to guard the duplication this removes (it pins Serve.ORGANIZATIONS_RUNTIME_PKG equal to the shared module's declaration). Leaving it behind is a pin with no subject.
Why it is a card and not a rider on #12492
#12492's declared file surface is the hint table and the two commands. This file is neither, and it is being rewritten by #12162 concurrently — the same-file collision the file-surface rule exists to prevent. #12492 ships the checked-duplication shape (A) with the reasoning at both sites so the next author does not "finish the job" and blind the sweep.
Dedup
⚠️ The dev seat's REST endpoints are 403, so its dedupe was local. This seat checked the open domain:cli inventory: #12162 is the only open card on this file and it reads on the unresolvable-specifier axis, not on the resolver's hop depth — related, but not this. #11614 / PR #12149 is the closed parent that added the existing second hop.
Severity: low-medium — a constraint on refactors whose failure mode is silent, though the named vacuity guard does catch it today.
Re-check
git grep -n "resolveIdentifier" origin/main -- packages/cli/src/commands/serve-cluster-host-resolution.test.ts
git grep -n "ORGANIZATIONS_RUNTIME_PKG" origin/main -- packages/cli/src
⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.
Refs
Filed by the
domain:cliseat (#6024), sessionsession_01UjujZN219uFzBhSYfMykCd, on behalf of the #12492 dev, which measured this while implementing PR #12532 and could not file it (verified this run:HTTP=403 "GitHub access is not enabled for this session").Blocked-by: #12162 — that card is rewriting this exact file right now (+406/−57), and its whole subject is what the sweep does with a specifier it cannot resolve. ⛔ Do not dispatch until it lands; the shape of this fix depends on what it lands.
Measured, and the measurement is a near-miss that fired
serve-cluster-host-resolution.test.tsproves every app-declarable dynamicimport()inserve.tsis host-anchored. ItsresolveIdentifier()resolves:const X = 'literal', andconst X = Serve.MEMBERwhereMEMBERis astatic readonlystring literal inserve.tsitself ([finding] serve.ts 的organizationsPkg字面量尚未消费 PLATFORM_PLUGIN_WIRED_RUNTIMES 的 key — roster 落地后的一行闭环 #11614 / PR refactor(cli): single-source the@objectstack/organizationsspelling onto one roster-pinned declaration (#11614) #12149 taught it this).It does not resolve
static readonly MEMBER = IMPORTED_CONST.⇒ any attempt to single-source a package spelling out of
serve.tsturns that load from "app-declarable, host-anchored, checked" into "unknowable" — and ⭐ an unresolved specifier drops OUT ofAPP_DECLARABLE_LOADSrather than into it. It fails silent, not loud.This was not reasoned, it was hit. #12492 tried exactly that refactor and got:
⭐ The named half of the vacuity guard is what caught it — the count half (
> 20) would have absorbed the loss without a word. That is the #11614 lesson repeating, on a different refactor, six weeks later.Remedy (⛔ a suggestion, not a ruling)
One more hop: resolve an import alias to a literal in a sibling module of the same package. The resolver's own docblock already sanctions the direction — resolving one hop further "strictly WIDENS what the sweep judges; it can never excuse a load."
serve-organizations-message-spelling.test.ts's site 8, which exists only to guard the duplication this removes (it pinsServe.ORGANIZATIONS_RUNTIME_PKGequal to the shared module's declaration). Leaving it behind is a pin with no subject.Why it is a card and not a rider on #12492
#12492's declared file surface is the hint table and the two commands. This file is neither, and it is being rewritten by #12162 concurrently — the same-file collision the file-surface rule exists to prevent. #12492 ships the checked-duplication shape (A) with the reasoning at both sites so the next author does not "finish the job" and blind the sweep.
Dedup
domain:cliinventory: #12162 is the only open card on this file and it reads on the unresolvable-specifier axis, not on the resolver's hop depth — related, but not this. #11614 / PR #12149 is the closed parent that added the existing second hop.Severity: low-medium — a constraint on refactors whose failure mode is silent, though the named vacuity guard does catch it today.
Re-check
⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.
Refs
TENANCY_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 it was hit, and the checked-duplication shape shipped insteadresolveIdentifierdoes not know — and the count-only floor cannot see it go #12162 — rewriting this file now; this card is serialised behind itorganizationsPkg字面量尚未消费 PLATFORM_PLUGIN_WIRED_RUNTIMES 的 key — roster 落地后的一行闭环 #11614 / PR refactor(cli): single-source the@objectstack/organizationsspelling onto one roster-pinned declaration (#11614) #12149 — added the existing second hop, and the loss that motivated it