Skip to content

finding(metadata-protocol): global search's getAllObjects?.() ?? [] invents an empty registry — a structural omission reports "nothing matched" with objectsScanned: 0 #11754

Description

@os-steve

Found incidentally while measuring #9165's step 1 (the check:durability-log-level criterion extension). Filed unassigned, not a claim of a live defect. ⛔ No domain:* — triage's field. Measured on origin/main @ 945ffbea8.

Duplicate-searched first, by symbol and by file, open issues: getAllObjects in title → 0 open; protocol.ts registry in title → 0 open. #9285 is the nearest neighbour and is closed (PR #9682) — it was scoped to packages/objectql/src/plugin.ts and does not reach this file.

The seam

packages/metadata-protocol/src/protocol.ts:9866, in the global-search implementation:

constallObjects=(this.engineasany).registry?.getAllObjects?.()??[];consthits: Array<{object: string;id: string;title: string;snippet?: string;record: any}>=[];letobjectsScanned=0;for(constobjofallObjects){}

An invented empty allObjects means the loop body never runs: zero hits, objectsScanned: 0, and a successful response. "The registry holds no objects" and "the registry could not be read" have opposite meanings to a search caller, and only the first is a truthful reason to return nothing (ADR-0110 D3).

This is #9285's seam 1 shape — an invented empty registry silently skipping the whole operation — in a file #9285's declared surface did not cover.

Why observation-class, not a defect card

The same dormancy argument #9154 / #9285 were graded on, re-derived here: SchemaRegistry.getAllObjects() is a walk over in-memory Maps and has no throwing path, so the ?? [] cannot fire on an outage. What it does absorb is the structural omission — a registry object that does not implement getAllObjects at all — which PR #9284's body names as "the structural omission that never throws and is therefore invisible". That is exactly the shape that made #9002 and #8896 silent.

Not demonstrated live. No path is shown reaching it, and no test is shown vacuous. It is filed because it is the last unswept member of a family whose other members were each fixed on the same reasoning, and because the optional call makes it invisible by construction.

Not included, and why

Why no gate sees it

check:durability-log-level's read-seam rule is anchored to IDataDriver's read methods (find / findOne / count), and getAllObjects is not a storage read — the population miss measured under #9165 on 2026-08-18. Admitting it was ruled out there (option 2b, "a scope change, not a vocabulary addition"), so this seam is not gate-reachable by design and is fixable without waiting on any gate work.

Suggested direction (triage's call, not mine)

The family's ruled answer is discriminate or propagate. Here there is no benign class — a registry that cannot enumerate its objects is never truthfully "no objects" — so #9284's disposition (drop both halves of the swallow, let it propagate) is the shape that fits, with the caveat that removing the optional call is what exposes any incomplete double, as it did across 9 suites on #9284.

Related: #9285 (same shape, plugin.ts, closed by PR #9682) · #9154 / PR #9284 (the roll-up index, the propagate precedent) · #9002 · #8895 (the discriminate or propagate ruling) · #9165 (the card this was found under).


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