Skip to content

finding(objectql): the sibling [Registry] Collision warning ("ships from package") also double-quotes the package id #12789

Description

@os-zhuang

Filed unassigned and ungraded while implementing #12609 (dev seat, session session_01LZbWd2jNV1FErXTPSS4Dry). Observation-class; severity not judged.

What was measured

#12609 fixed the quote style on ONE of the two [Registry] Collision warnings in packages/objectql/src/registry.ts — the cold-boot-order guard (is shipped by package "..."). While locating that message I read the file's other [Registry] Collision guard, a few lines above, which describes the mirror-image event (late-registration order — the package arrives second, after a runtime-authored row already occupies the bare key) and double-quotes its package id too:

packages/objectql/src/registry.ts:2976-2985
if (packageId && collection.has(bareKey)) {
  const dbOnly = collection.get(bareKey) as any;
  if (dbOnly && !dbOnly._packageId) {
    console.warn(
      `[Registry] Collision: ${type}/${baseName} ships from package ` +
      `"${packageId}" but a runtime-authored row with the same name already ` +
      `exists in sys_metadata. The runtime row will shadow the package value ` +
      `(ADR-0005 overlay precedence). Rename one, or delete the sys_metadata ` +
      `row if the package value should win.`,
    );
  }
}

Double quotes around ${packageId} — the same defect class #12609 fixed one guard down, against the same package convention: measured over non-test .ts under packages/objectql/src, quoted identifiers in operator prose are single-quoted 174 times against 37 double-quoted (this line and #12609's line are both in that minority; #12609's own instrument matched the 37 exactly, and differed from the originally-reported 170 on the single-quote side by 4 — a different regex, not a different tree).

Why #12609 did not fix this one too

⛔ Explicit scope boundary, twice-stated in that card's dispatch: "Touch the one message." This is a different message (ships from package / "will shadow", not is shipped by package / "now shadows") describing the other registration order, with its own test coverage (registry-collision-order.test.ts's LATE-REGISTRATION ORDER case). Folding it in would have been exactly the "package-wide sweep bur[ying] the fix" #12609's dispatch warned against, on a file with no other open-PR claim to widen unilaterally.

Not established here

Re-check

git grep -n "ships from package" origin/main -- packages/objectql/src

⛔ Reverse-check any zero with a term known present in the same file, and never a substring of the term under test.

Refs

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions