Commit 092b9da
* fix(rest): the package door carries the producer-marked `userMessage` (#12502)
`sendThrownError` in `packages/rest/src/package-routes.ts` resolved every throw
through the shared ADR-0112 rule and then forwarded `{ details, declaredCode }`
and nothing else, so the marked text it was already holding in the same local
was dropped one line later. It now spreads `thrown.userMessage` into the
envelope writer's `extra` — the third independent spread into that object, and
the idiom the dispatcher twin serving this same path (`errorFromThrown`, #9934)
already applies.
The idiom is the INVERSE of the `declaredCode` half directly above it, and that
is the whole reason this is a separate change. `declaredCode` must be read
through `demotedDeclaredCode` because its raw field carries a second meaning; it
is also set when the producer's spelling IS the registered member. `userMessage`
has no second meaning — `declaredUserMessage` already decided what counts as
marked — so the caller passes the raw field straight through and invents no
obligation to match the sibling.
Additive: an unmarked refusal still carries none, and the three shapes
`declaredUserMessage` rejects (empty, whitespace-only, non-string) still carry
none, so nothing invents a mark for a producer that never wrote one.
`details`, `declaredCode`, `code`, `status` and `message` are unchanged on every
existing path, and the 5xx prose withhold never sees the marked channel.
The reachability standard this door is now judged on is stated in the changeset,
in the new suite's docblock and in the PR body rather than left implicit: the
in-tree producer set here is empty for BOTH channels, and the live population is
the injected/federated limb this door composes rather than closes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjujZN219uFzBhSYfMykCd
* docs(changeset): correct one stale clause in the `declaredCode` changeset (#12502)
`.changeset/package-door-declared-code.md` closed with "the shared `sendError`'s
`extra` does not admit it yet". That clause was already false when it merged:
PR #12477 (#12404, `0e5fe7fc0`) widened the `extra` Pick to admit `userMessage`
and landed BEFORE `14b114553`. Both changesets are unreleased and compile into
the same CHANGELOG, so this fixes a document before it is published rather than
rewriting history — and it is fixed in place, because a correction sitting
beside the false sentence would ship both to the reader.
One clause. The rest of that changeset's prose is untouched, and no other
changeset is touched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UjujZN219uFzBhSYfMykCd
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3a3a099 commit 092b9da
4 files changed
Lines changed: 541 additions & 1 deletion
File tree
- .changeset
- packages/rest/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 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 | + | |
0 commit comments