Skip to content

finding: the liveness author-lint's array fan-out (getNested) has no warned subject left, so it is now untested #7079

Description

@os-zhuang

Out-of-scope discovery from the #7069 sweep (member #6774). Filed unassigned, observation class — nothing is broken today.

Fact

lintLivenessProperties (packages/lint/src/lint-liveness-properties.ts) resolves a dotted warn-map path through getNested, which fans a path out over an array container level — so widgets.colorVariant checks every widget on a dashboard, not just widgets[0]. The docblock names the intended reach: "Container properties fan out over arrays (each flow node, each dataset measure)."

That behaviour had exactly one test, in lint-liveness-properties.test.ts:

it('fans out over EVERY widget, not just the first', …)   // the dead key sits on widgets[1]

and exactly one subject — dashboard.widgets[].colorVariant, because a warn-map entry only becomes a dotted path when it sits in a ledger row's children.

Measured across all 28 ledgers on origin/main @ 2c7e62d, the complete set of entries the lint warns on (authorWarn: true, or status: experimental) is six:

Ledger Path Under an array container?
dashboard.json widgets.colorVariant yes
agent.json lifecycle, memory, guardrails, structuredOutput no (top-level)
object.json externalSharingModel no (top-level)
tool.json outputSchema no (top-level)

PR for #7069 flips widgets.colorVariant to live (objectui#3799 gave it a renderer — #5010 ruling B's enforce leg), which drops its authorWarn. That leaves zero warned entries under any array container, so the fan-out assertion has no subject that can distinguish a working walk from one that never looks past index 0. The PR removes the assertion rather than rewriting it into a silence check that would pass on a broken fan-out, and records the loss in a comment pointing here.

Why it is worth recording rather than shrugging off

The mechanism is the one this repo keeps paying for: a check whose coverage lapses silently, as a side effect of good news elsewhere. Nothing goes red. The next author to touch getNested — or to add a children entry with authorWarn under an array container — gets a green suite either way, and the first symptom would be an advisory that is half-blind on every real dashboard (the exact defect the deleted test was written for, per its own comment).

It is also the shape #4956 already hit once from the other side: the ledger was correct and the lint silent, because dashboard was not registered in TYPE_COLLECTIONS.

Options, none obviously right — hence a finding, not a task

  1. Make getNested testable directly. It is module-private today. Exporting it (or an @internal test seam) buys a unit test that does not depend on which ledger rows happen to warn this month. Cost: a second, ledger-independent contract on a function whose whole design is "ledger-driven, coverage grows by marking entries".
  2. Let the next warned array entry re-adopt the test. Cheapest, and honest — but it is a promise nobody is holding, which is what this issue exists to stop being invisible.
  3. Accept it. The fan-out is exercised in production by no one right now (zero dotted warned paths), so the untested code is also unreached code. That is a real argument, and it expires the moment option 2's entry arrives.

Refs

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions