Skip to content

types: declaresServerFault has no production consumer left after #12281 — definition plus its own tests only #13242

Description

@os-trump

Observation recorded while implementing #12281 (draft PR #13240). ⛔ No defect claimed and nothing is broken; filing so the state is visible rather than discovered later.

What changed

declaresServerFault (packages/types/src/error-leak.ts) was the structural half of #5811's 5xx message withhold, and had two production consumers: the /data door and packages/runtime/src/dispatcher-plugin.ts's errorResponseBase.

Measured on the PR branch at 32470116: git grep declaresServerFault over packages/ returns only its own definition in error-leak.ts, its own test file error-leak.test.ts, and prose references in docblocks. No production call site remains.

Why it was not removed in PR #13240

That card's dispatch fenced packages/types/src/error-leak.ts as read-only — editing it meant stopping and reporting first. Removing an exported symbol is also a published-surface change with its own weight, not a rider on a behaviour fix.

Not established here

  • Whether it should be removed or kept. It is a small, well-tested, correctly-documented predicate, and "structural, phrasing-independent 5xx declaration" is a reasonable thing for the package to keep offering even with no current caller. Against that, ADR-0049's enforce-or-remove direction and the startup-scope discipline both push toward removing a published export nothing consumes.
  • If it is kept, its docblocks want a note saying the withhold rules now read serverFaultProvenance, so the next reader does not adopt the narrower predicate by finding this one first. That is the cheaper half and may be the whole answer.
  • Whether anything outside this repo imports it. @objectstack/types is published, so an external consumer is possible and was not checked.
  • Severity not judged. Nothing misbehaves either way.

Region

packages/types/src/error-leak.ts (declaresServerFault and its docblocks) · packages/types/src/error-leak.test.ts

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions