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
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/datadoor andpackages/runtime/src/dispatcher-plugin.ts'serrorResponseBase./dataside moved todeclaredHttpStatus/declaredServerFaultAnswerearlier (rest: a declared 5xx answers500 ANALYTICS_QUERY_FAILEDon/analytics/dataset/querywhere/dataanswers the declared status and code #11718, PR fix(rest): relay a producer-declared 5xx on/analytics/dataset/queryinstead of collapsing it to500 ANALYTICS_QUERY_FAILED#12280).errorResponseBasetoserverFaultProvenance(packages/types/src/thrown-http-error.ts), per the 2026-08-27 option-D ruling on [Decision] Is ADR-0112'sdeclaredCodechannel in scope for 5xx sanitisation at all — and the answer must be applied to all three doors at once #12509.Measured on the PR branch at
32470116:git grep declaresServerFaultoverpackages/returns only its own definition inerror-leak.ts, its own test fileerror-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.tsas 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
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.@objectstack/typesis published, so an external consumer is possible and was not checked.Region
packages/types/src/error-leak.ts(declaresServerFaultand its docblocks) ·packages/types/src/error-leak.test.tsRefs
codekeeps its prose on/analytics/querywhere/datawithholds it unconditionally #12281 / PR fix(runtime): withhold the message of every declared 5xx at the dispatcher exit (#12281) #13240 — removed the last production consumerdeclaredCodechannel in scope for 5xx sanitisation at all — and the answer must be applied to all three doors at once #12509 — the ruling that replaced it withserverFaultProvenance/analytics/query仍把 RLS 策略字段名回显给调用方 —— read-scope 拒收的泄漏在姐妹面上没堵,#5367 只堵了 dataset 路由 #5811 — where it came from, and why it was made structural