Observation from #7, filed for triage rather than as a defect — the seed works today and nothing refuses the write.
@objectstack/platform-objects declares the column as readonly: true and documents it as derived:
The user's primary business unit — a denormalised projection of sys_business_unit_member.is_primary, maintained by plugin-sharing (ADR-0057 addendum D12). … Do not edit directly; set it via business-unit membership.
#7's org.seed.ts sets it directly, on both sys_user.primary_business_unit_id and sys_user.manager_id (also readonly). Those writes land because the seed loader writes under { isSystem: true }, and they survive a real objectstack dev boot with SharingServicePlugin loaded — measured: all twelve seeded people come back with their unit and manager resolved.
Why it may matter later
The value is a cache of a junction table this app never populates. If plugin-sharing ever recomputes the projection — a membership edit, a backfill, a future version that reconciles on boot — it would recompute it from an emptysys_business_unit_member and blank all twelve. Nothing would error; the demo's unit rollups and any own_and_reports / unit_and_below scope would just quietly go empty.
The durable shape is presumably to seed sys_business_unit_member rows (with is_primary) and let the projection be derived. That was out of #7's stated file surface and its scope, and doing it speculatively would have meant seeding a platform junction whose contract this app has not read — so it is recorded instead.
What would settle it
Whether plugin-sharing recomputes primary_business_unit_id on any path an app can trigger, and if so whether an app seed is expected to write the membership rows rather than the projection. If the answer is "write the membership rows", src/data/org.seed.ts is a small change.
No pm:queue — this is an observation, not a queued fix.
Observation from #7, filed for triage rather than as a defect — the seed works today and nothing refuses the write.
@objectstack/platform-objectsdeclares the column asreadonly: trueand documents it as derived:#7's
org.seed.tssets it directly, on bothsys_user.primary_business_unit_idandsys_user.manager_id(alsoreadonly). Those writes land because the seed loader writes under{ isSystem: true }, and they survive a realobjectstack devboot withSharingServicePluginloaded — measured: all twelve seeded people come back with their unit and manager resolved.Why it may matter later
The value is a cache of a junction table this app never populates. If plugin-sharing ever recomputes the projection — a membership edit, a backfill, a future version that reconciles on boot — it would recompute it from an empty
sys_business_unit_memberand blank all twelve. Nothing would error; the demo's unit rollups and anyown_and_reports/unit_and_belowscope would just quietly go empty.The durable shape is presumably to seed
sys_business_unit_memberrows (withis_primary) and let the projection be derived. That was out of #7's stated file surface and its scope, and doing it speculatively would have meant seeding a platform junction whose contract this app has not read — so it is recorded instead.What would settle it
Whether plugin-sharing recomputes
primary_business_unit_idon any path an app can trigger, and if so whether an app seed is expected to write the membership rows rather than the projection. If the answer is "write the membership rows",src/data/org.seed.tsis a small change.No
pm:queue— this is an observation, not a queued fix.