Commit f5cc78b
fix(rest): the generic declared-status passthrough names its object on both error doors (#15452)
* fix(rest): the generic declared-status passthrough names its object on both doors (#14725)
`resolveErrorResponse`'s 4xx arm now ends on the same
`...(object ? { object } : {})` limb `classifyDataError`'s generic
declared-status passthrough has always carried, so the two copies of one
passthrough no longer differ by a key.
Measured on `main` @ `a12b15e394`, one error object, both doors:
{ code: 'DUPLICATE_RECORD', status: 409 } // no `name`, so no bespoke arm
mapDataError(err, 'duly_note')
409 {"error":"…","code":"DUPLICATE_RECORD","object":"duly_note"}
sendThrownError(res, err, 'duly_note')
409 {"error":"…","code":"DUPLICATE_RECORD"}
The 5xx arm deliberately gains nothing: its sibling
`declaredServerFaultAnswer` names no object either, so that band already
agreed and adding the limb there would create the divergence this one
removes. The message-text sniff is not lifted above the passthrough.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
* test(rest): the residue pin this card closes now states full convergence
`error-response-structured-arm-door-parity.test.ts` §4's
`ERR_DATASOURCE_UNAVAILABLE` case pinned the bodies differing by one key
and named this card as the owner of that residue. With the limb added the
case's own CONVERGED label holds for the body too, so the pin asserts
door-to-door body equality instead of describing a gap that is closed.
The §5 drift guard's `RECORD_NOT_FOUND` entry moves from `known-gap`
(citing this card) to `by-design` for the same reason: the arm still stays
out of the shared classification — its second limb is a message-TEXT gate,
outside the declared-code boundary — but it no longer needs lifting,
because both limbs now converge measurably. Leaving a `known-gap` citing a
closed card would leave the guard green by disclosing a gap that no longer
exists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
* chore(changeset): raise the rest bump to minor — an additive widening of a published surface
The bump rule lives in `.github/workflows/pr-automation.yml`'s Check Changeset
prose (and is cited from `scripts/check-changeset-no-major.mjs`), not in
AGENTS.md: "A purely additive widening of a published package's public surface
(a new exported symbol on an `index`, a new accepted key or value) takes at
least `minor`. The commit type may raise a bump but never lower it below what
the act requires." Maintainer ruling 2026-09-04, decision batch #35.
This PR adds a new accepted key to a published 4xx body, so the act is that
widening whatever the `fix(` type says. The historical `patch` precedents this
changeset previously cited are named in the same ruling as pre-rule and are
deliberately not retro-fixed, so they cannot settle it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D47qPfEWVPmhguWgBZCi5N
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6b8c677 commit f5cc78b
4 files changed
Lines changed: 449 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments