You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 810a3a2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(runtime,cloud-connection): multi-tenant seed replay covers every source, not just the first (#3453) (#3478)
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>
0 commit comments