Commit a76bb7e
committed
fix(cts): act on the review of the 0.42.3 reconciliation (CIP-3727)
Four of the five findings. The fifth is declined, with a reason.
Two are staleness the precedence flip left behind — it made upstream's `help`
win, which moved the dashboard link out of `message` and onto `url`, and two
shipped documents still told a reader to look in the message:
- `skills/stash-auth/SKILL.md` claimed "nothing upstream attaches a URL to
them, which is why the dashboard link is written into `message`". That is
false as of 0.42.3, contradicted this PR's own changeset, and contradicted
the paragraph twenty lines above it that points at `failure.url`. Skills ship
in the `stash` tarball, so the wrong sentence lands in a customer's repo.
- `EncryptionError.authCode`'s JSDoc said the same thing in a published `.d.ts`.
One is a real asymmetry, and it falsified a claim in the changeset. `code` is
the one carried key with a CLOSED type, and the wasm entry screened it in
`toFailure` but not on the thrown-init path, which reached the caller through
`carryDiagnostics` alone — a deliberately structural copy, so that it cannot
drop a field protect-ffi adds next. The two seams of the same entry therefore
disagreed about a check the native entry applies to both, and a fetch failing
inside a JS auth strategy could hand back `code: 'ECONNRESET'` wearing
`ProtectErrorCode`. The screen now runs once, inside `carryDiagnostics`, so it
cannot be forgotten at a third call site. `authCode` is deliberately untouched:
that set is open and a newer code must still arrive.
One is a code/prose disagreement of exactly the kind the CLI's two tables exist
to prevent. `stash env`'s profile-load arm already rendered a terminal hint —
"logging in again will not clear this" — while hardcoding `not_logged_in`, so
an agent read the code, ran `stash auth login`, and arrived back. It now routes
through `authFailureCliCode` like the renewal arm.
DECLINED: `stash auth login` reports `USAGE_LIMIT_EXCEEDED` on `--json` while
`stash env` reports `usage_limit_exceeded`. Real, but `login`'s code for an auth
failure has always been `failure.type` verbatim (`EXPIRED_TOKEN` and the rest),
which predates this work and is documented in `skills/stash-cli`. Collapsing the
two spellings changes an existing machine-readable contract for every code, not
just these, and belongs in its own change rather than riding along here.
Claude-Session: https://claude.ai/code/session_01PS9J6pu3FmmQvJHxwTVJUc1 parent 0fe8a2d commit a76bb7e
7 files changed
Lines changed: 104 additions & 8 deletions
File tree
- .changeset
- packages
- cli/src/commands/env
- __tests__
- stack
- __tests__
- src
- errors
- skills/stash-auth
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
181 | 215 | | |
182 | 216 | | |
183 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
345 | 351 | | |
346 | | - | |
| 352 | + | |
347 | 353 | | |
348 | 354 | | |
349 | 355 | | |
| |||
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
237 | 267 | | |
238 | 268 | | |
239 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
605 | 623 | | |
606 | 624 | | |
607 | 625 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | | - | |
140 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
| |||
0 commit comments