Commit e79107a
test(rest): pin the approvals FORBIDDEN → 403 row here too — and correct the record that it was unpinned (#14838)
* test(rest): pin the approvals FORBIDDEN → 403 row's live emission
`handleApprovalError`'s `[/^FORBIDDEN/, 403, 'FORBIDDEN']` row is the one
every authorisation refusal rides, and it had no live-emission pin: the
service suites assert the `FORBIDDEN:` message prefix at the throw site,
which is a different fact from what the route answers on the wire.
Adds one `it()` to `rest-approvals-wire-codes.test.ts` driving the real
recall route with a service that throws the real refusal, asserting
status 403, `code === 'FORBIDDEN'`, and that the [#13095] anchored strip
removed the prefix. Losing the row fails closed (500
`APPROVAL_RECALL_FAILED` with the raw message), so the third assertion
catches the strip half of the regression as well as the status half.
Test-only; no production behaviour changed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
* test(rest): record that §7 already pins this row — the card's premise is false
Measured, not read: deleting `[/^FORBIDDEN/, 403, 'FORBIDDEN']` from
`handleApprovalError` reds THREE cases, not one — this new pin and both
cases of `rest-data-door-code-prefix.test.ts` §7, which already drive the
real approve route and already assert 403, `code: 'FORBIDDEN'` and the
anchored strip.
#14573 was filed and triaged on the reading that the row had no
live-emission pin anywhere. That is wrong. What is true is narrower: the
file that OWNS the approvals wire-code contract did not pin it, so an
audit of wire codes here saw a gap a strip-contract file was silently
covering. Naming §7 from here is half the fix — the unlabelled duplicate
is what got the card mis-filed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 84199cb commit e79107a
1 file changed
Lines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
| 44 | + | |
38 | 45 | | |
39 | 46 | | |
40 | 47 | | |
| |||
115 | 122 | | |
116 | 123 | | |
117 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
118 | 183 | | |
119 | 184 | | |
120 | 185 | | |
| |||
0 commit comments