Commit 1c7adc7
fix(rest): the by-id /data door stops shipping the QuickJS wrapper out of a declared-code arm (#15065)
`classifyDataError` surfaces the bespoke structured arms above the sandbox
unwrap door on purpose, so the structured fields survive the generic
catch-alls. Every arm built its sentence from `error?.message`, which for a
sandboxed producer is the `<kind> '<name>' threw: <msg>` debug wrapper, and the
unwrap door that would have read `.innerMessage` sits below them and was never
reached. One hook refusal therefore came back as two different sentences
depending on which route caught it.
The arms now ask the two-read rule the unwrap door and the declared-status
passthrough already share, named once as `armSentence` rather than re-opined
per arm. `resolveErrorResponse` declines the shared consult for a
sandbox-origin error, so the bulk / metadata / UI doors answer byte for byte
what they answered before and the repair lands on `mapDataError` alone.
A sandboxed CRASH carrying a declared code is deliberately unchanged:
`sandboxBusinessMessage` declines a crash, so the fallback hands the arm the
wrapper exactly as today. The `DUPLICATE_RECORD` arm is untouched — it is gated
on the engine's envelope class and `SandboxError` sets `name` unconditionally,
so no sandboxed producer can reach it.
The parity file's sandboxed-producer case is FLIPPED from ACCEPTED DIVERGENCE
to CONVERGED rather than deleted; it is the only thing that would notice the
divergence returning.
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
Co-authored-by: Claude <noreply@anthropic.com>1 parent ad35745 commit 1c7adc7
4 files changed
Lines changed: 513 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