Commit 810a3a2
In multi-tenant mode a new org replays the kernel's `seed-datasets` list on the
`sys_organization` insert, so that list must hold the union of every seed source
(every config app + every marketplace package). Two framework traps — the same
pair #3444 fixed for seed-summary — shrank it to just the first source:
- the standard PluginContext has no `.kernel` handle, so
`(ctx as any).kernel?.getService('seed-datasets')` always read undefined and
each source clobbered the list with only its own datasets; and
- `registerService` throws on a duplicate name, so the second source's
re-register was swallowed and its datasets (and, for a config app, its
replayer) were silently lost.
`seed-datasets` is now a single shared array, registered once and mutated in
place by every source via a new `mergeSeedDatasets` helper that reads through the
context's own resolver first. AppPlugin's per-org replayer reads that live list
at invoke time — not a captured snapshot — and is itself registered once and
reused by later config apps, so a new org replays the full union.
Seam-level unit tests only (accumulation across app + marketplace sources; the
replayer reads the live union); true multi-tenant e2e needs the enterprise
`@objectstack/organizations` plugin, which lives in the cloud repo.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7aea626 commit 810a3a2
6 files changed
Lines changed: 465 additions & 29 deletions
File tree
- .changeset
- packages
- cloud-connection/src
- runtime/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 | + | |
| 34 | + | |
Lines changed: 53 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
323 | 374 | | |
324 | 375 | | |
325 | 376 | | |
| |||
905 | 956 | | |
906 | 957 | | |
907 | 958 | | |
908 | | - | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
| 959 | + | |
| 960 | + | |
918 | 961 | | |
919 | 962 | | |
920 | 963 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
750 | 751 | | |
751 | 752 | | |
752 | 753 | | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
765 | 762 | | |
766 | | - | |
767 | 763 | | |
768 | 764 | | |
769 | 765 | | |
770 | | - | |
| 766 | + | |
771 | 767 | | |
772 | 768 | | |
773 | 769 | | |
774 | 770 | | |
775 | | - | |
776 | | - | |
777 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
778 | 777 | | |
779 | 778 | | |
780 | 779 | | |
| |||
806 | 805 | | |
807 | 806 | | |
808 | 807 | | |
809 | | - | |
810 | | - | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
811 | 817 | | |
812 | 818 | | |
813 | 819 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
0 commit comments