Commit 5cf1c88
fix(cli,verify,dogfood): branch the multi-org remedy on the ABSENCE, not on one failure kind (#15158)
* test(cli,verify,dogfood): pin the third failure kind's remedy at all three sites
Red-first for #14270. #14041 added a third `HostImportFailureKind`,
`declared-no-loadable-entry` — the app declares the package, the install
delivered it, and the package's own `exports` names no runtime entry Node
can load. Three consumers pick their remedy with a two-way branch written
when only two kinds existed, so the third falls into the else leg and
renders the DECLARE remedy at an operator who has already declared AND
installed it.
Each site gets a fixture carrying that kind and an assertion naming which
arm fired. The verify and dogfood fixtures are real host roots on disk
whose installed package publishes a `types`-only `exports` map; the CLI
formatter takes the kind directly. Controls for `undeclared` and
`declared-unresolvable` are untouched.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
* fix(cli,verify,dogfood): branch the multi-org remedy on the ABSENCE, not on one kind
`declared-no-loadable-entry` (#14041) means the app declares the package,
the install delivered it, and the package's own `exports` names no runtime
entry Node can load. All three consumers picked their remedy with a
two-way branch written when only two kinds existed, so that kind fell into
the else leg and printed "declare it in the app's package.json and
install" — at an operator who has already done both, and directly
contradicting the importer's own message printed beside it.
Each branch now asks "is the declaration the problem?": undeclared keeps
the declare remedy, `declared-unresolvable` keeps the install remedy, and
the third kind prescribes nothing and defers to the importer's message,
which every one of the three sites already interpolates. No fourth remedy
sentence is minted — the importer words the package-shape case once, and a
local re-wording would be a second copy to drift.
`packages/types` is untouched: the strings deferred to are #14278's.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
* chore(changeset): the multi-org remedy stops re-prescribing a declaration the app already has
Patch for @objectstack/cli and @objectstack/verify — the two published
packages whose `files` field ships the changed code. @objectstack/dogfood
is `private: true` with no `files`, so it publishes nothing and takes no
changeset entry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
* test(verify): keep the new cases off `@objectstack/verify`'s frozen TEST_DEBT
`harness.host-resolution.test.ts` imports `./harness` without the `.js`
extension, so under NodeNext the specifier does not resolve and every
symbol it names is `any` — which makes a `.then` callback PARAMETER
implicitly any. The two new cases used `.then(onFulfilled, onRejected)`
and added 2 x TS7006, taking the package's TEST_DEBT entry from its
recorded 3 to 5. That ledger is shrink-only, so the fix is the errors,
not the ceiling.
try/catch instead: a `const` initialised from an `any` call is not a
diagnostic, only a parameter is. `check:type-check-debt --re-measure`
now reports 17 entries re-measured, 217 raw errors, none above its
recorded number.
⛔ Deliberately NOT the one-line `.js` fix that graduates the entry — that
is a different card's, filed separately.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yfqQh2dBgPAymYd7xipza
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8422acd commit 5cf1c88
7 files changed
Lines changed: 369 additions & 44 deletions
File tree
- .changeset
- packages
- cli/src/commands
- qa/dogfood/test
- verify/src
| 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 | + | |
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 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 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
157 | 193 | | |
158 | 194 | | |
159 | 195 | | |
| |||
188 | 224 | | |
189 | 225 | | |
190 | 226 | | |
| 227 | + | |
191 | 228 | | |
192 | 229 | | |
193 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5225 | 5225 | | |
5226 | 5226 | | |
5227 | 5227 | | |
5228 | | - | |
5229 | | - | |
5230 | | - | |
5231 | | - | |
5232 | | - | |
5233 | | - | |
5234 | | - | |
| 5228 | + | |
| 5229 | + | |
| 5230 | + | |
| 5231 | + | |
| 5232 | + | |
| 5233 | + | |
| 5234 | + | |
| 5235 | + | |
| 5236 | + | |
| 5237 | + | |
| 5238 | + | |
| 5239 | + | |
| 5240 | + | |
| 5241 | + | |
| 5242 | + | |
| 5243 | + | |
| 5244 | + | |
| 5245 | + | |
| 5246 | + | |
| 5247 | + | |
| 5248 | + | |
| 5249 | + | |
| 5250 | + | |
| 5251 | + | |
| 5252 | + | |
| 5253 | + | |
| 5254 | + | |
| 5255 | + | |
| 5256 | + | |
| 5257 | + | |
| 5258 | + | |
| 5259 | + | |
| 5260 | + | |
5235 | 5261 | | |
5236 | 5262 | | |
5237 | 5263 | | |
5238 | 5264 | | |
5239 | 5265 | | |
5240 | 5266 | | |
5241 | 5267 | | |
5242 | | - | |
5243 | | - | |
| 5268 | + | |
| 5269 | + | |
5244 | 5270 | | |
5245 | 5271 | | |
5246 | 5272 | | |
5247 | | - | |
5248 | | - | |
5249 | | - | |
5250 | | - | |
5251 | | - | |
5252 | | - | |
5253 | | - | |
5254 | | - | |
5255 | | - | |
| 5273 | + | |
| 5274 | + | |
| 5275 | + | |
| 5276 | + | |
| 5277 | + | |
| 5278 | + | |
| 5279 | + | |
| 5280 | + | |
| 5281 | + | |
| 5282 | + | |
| 5283 | + | |
| 5284 | + | |
| 5285 | + | |
| 5286 | + | |
| 5287 | + | |
| 5288 | + | |
| 5289 | + | |
| 5290 | + | |
5256 | 5291 | | |
5257 | 5292 | | |
5258 | 5293 | | |
| |||
Lines changed: 85 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
36 | | - | |
| 48 | + | |
37 | 49 | | |
38 | 50 | | |
39 | 51 | | |
| |||
50 | 62 | | |
51 | 63 | | |
52 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
53 | 86 | | |
54 | 87 | | |
55 | 88 | | |
| |||
73 | 106 | | |
74 | 107 | | |
75 | 108 | | |
| 109 | + | |
| 110 | + | |
76 | 111 | | |
77 | 112 | | |
78 | 113 | | |
79 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
80 | 121 | | |
81 | 122 | | |
82 | 123 | | |
| |||
132 | 173 | | |
133 | 174 | | |
134 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 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 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
135 | 218 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | | - | |
| 125 | + | |
120 | 126 | | |
121 | 127 | | |
122 | | - | |
123 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
124 | 134 | | |
125 | 135 | | |
126 | 136 | | |
| |||
0 commit comments