Repository navigation
Commit 6c06603
test(codegen): pin the @provided own-only read the cherry-pick had no test for
The cherry-picked fix (6b89546, from the draft int-backed-enum branch) changed
codegen behaviour in three ports and shipped with NO test — its branch's enum tests
cover @intValueMap, a different feature. A behaviour change riding into a release
untested is how the divergence it fixes got there in the first place.
Two cases, on the existing FR-019 runGen harness:
- a CHAINED declaration materializes. Root abstract `@provided Base`, root
abstract `Derived extends Base`, entity field extends Derived. Under the old
resolving read Derived is classified provided and the port emits an import of a
hand-written `Derived` the adopter never declared; it must emit the type instead.
- the marked declaration itself is STILL provided, so the fix cannot be "read own
everywhere" overreach.
PROVEN NON-VACUOUS: reverting just the TS half (ownAttrs -> attr) turns the first
case red and leaves the other six green, then restoring it turns it back. A test
that passes with and without the change it guards is worse than no test.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 6b89546 commit 6c06603
1 file changed
Lines changed: 59 additions & 0 deletions
File tree
- server/typescript/packages/codegen-ts/test/templates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 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 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
0 commit comments