Commit aa07709
feat(runtime): extract /packages dispatcher domain body — ADR-0076 D11 step ③ PR-5 (#2462)
The largest extraction so far: handlePackages (~470 lines) plus its two
EXCLUSIVE helpers assemblePackageManifest and applyPublishedSeeds
(~190 more) move to domains/packages.ts. resolveActiveOrganizationId
stays on the dispatcher (metadata-domain call sites share it) and is
exposed through deps instead.
DomainHandlerDeps grows: errorFromThrown (spec-validation issues carry
through as field-anchored 422s), resolveActiveOrganizationId,
announceKernelEvent (the metadata:reloaded publish announcement — the
domain keeps the changed-list check, the deps side owns the
trigger-existence check), and optional logger (seed-loader falls back
to console as before). The dynamic './seed-loader.js' import moved to
'../seed-loader.js' (the PR#2415 lesson: dynamic imports are the
extraction landmine — this time the import moved WITH the caller).
Step-② (#3142) single-pipeline behavior preserved; the '/packages'
bare-startsWith match is reproduced as-is.
Verified: seam suite 34 tests (4 new incl. the 409 duplicate-install
guard + ?overwrite=true), runtime 639 green, http-conformance 41 green,
dependent closure builds with DTS (--force).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent cb8322e commit aa07709
5 files changed
Lines changed: 774 additions & 654 deletions
File tree
- .changeset
- packages/runtime/src
- domains
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
105 | 122 | | |
106 | 123 | | |
107 | 124 | | |
| |||
0 commit comments