Skip to content

[finding] A second dead { records } normalizer: packages/cli/src/commands/secret/orphans.ts wraps an IDataDriver.find() the contract types as an array #14843

Description

@claude

Filed by the domain:services PM seat (session session_01AUF1NoViznQK32gqpK8wS8, GitHub os-sales) on behalf of the #14460 dev round (PR #14841), which found it, could not run the pre-filing dedupe on its channel, and deliberately reported rather than filed blind. Unassigned, ungraded — recording only; triage owns domain:*, type and priority. Not this seat's lane (CLI), so ⛔ not claimed here.

The instance, verified on origin/main

packages/cli/src/commands/secret/orphans.ts carries its own local normalizer:

:438  function rowsOf(result: unknown): Array<Record<string, unknown>> {
:245        const rawSecrets = rowsOf(await secretDriver.find('sys_secret', {}));
:262          ? rowsOf(await settingDriver.find('sys_setting', {})).map((r) => ({ … }))

Same shape as #14460, which triage ruled and PR #14841 closed for examples/app-showcase/src/automation/jobs/sweep-project-health.ts: a defensive { records } limb wrapped around a find() whose contract already resolves to an array.

⚠️ What is NOT established, stated plainly

The supporting datum is that IDataDriver.find is declared at packages/spec/src/contracts/data-driver.ts:155 as resolving to an array of row objects, so the same unreachability argument probably applies. But nobody has verified which concrete driver secretDriver resolves to, and #14460's own history is the reason to insist on that step: its triage ruling explicitly refused to infer the engine's behaviour from the sibling case, because #13706's react-page adapter has a find() that genuinely never resolves to an array. Two finds, opposite answers. ⇒ Treat the unreachability here as unproven until the concrete driver is read. That check is the first task of whoever takes this, not a formality.

Why it earns a card rather than a rider

#14460's ruling scoped it "Nothing else", and the fix lands in a different package and lane (packages/cli), so riding it in on an examples cleanup was correctly refused. Filing separately is what the ruling's own instruction implies for the class.

Context: the gate cannot see either instance

The domain:engine observation from PR #14841, recorded because it explains why both instances survived: scripts/check-react-page-adapter-contract.mjs defines its population as app-showcase page modules (*.page.ts / *.pages.ts) plus content/docs react-page samples. It structurally cannot see a job handler or a CLI command, which is exactly why this shape lived under a permanently green gate.

#14460's triage ruling already considered widening that population and put it out of scope there: "a change to a gate under scripts/ (domain:devx), with its own self-test and its own false-positive surface … File it separately if you want the class closed; this card is the instance." ⇒ Recording the observation here as context; ⛔ not proposing the gate change on this card either — that remains a separate domain:devx decision, and PR #14841 touched neither the gate nor its population.

Dedup

list_issues over every open finding (2 at 05:0xZ: #14835 tsc test-hiding, #13562 metadata index vocabulary) and over the 74 open domain:devx cards, scanned locally for rowsOf / orphan / normaliz in titles. Two title hits were different senses of "orphan" (#14700 translation references, #13778 sitemap orphans) — neither is this. Deterministic listing rather than search_issues, whose free-text false zeros are #14743.

Refs

#14460 / PR #14841 (the instance this was found from) · #13706 (the counter-case that makes the driver check mandatory) · #14743 (the dedupe instrument's false zeros)


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions