0011 — `customer-0` sentinel org lacks exclusion handling
Status: done — 2026-09-13
Opened: 2026-07-30 · Area: platform (row filters, projections, seeds)
Reopen trigger: any surface observed listing customer-0 / platform-sentinel to a real org or
teacher audience; or org-scoped role grants ever being minted in customer-0; or the first
non-importer writer to the sentinel org.
Evidence
Section titled “Evidence”Found during the ADR-0056 personal-offering boundary inventory (2026-07-30): no production code
path excludes customer-0 from anything. The only behavioural branch on the sentinel id in the
entire tree is the English Planet importer’s isMaster check
(tools/scripts/import-english-planet/cli.ts). The org is invisible today solely because the
importer is opt-in and no role grants exist in it — not because any filter, OneRoster projection,
Caliper aggregate, dashboard read, or seed pool excludes it. The seed value pools
(packages/db/src/seed/run-seed.ts org/offering id pools and count assertions) would ingest it if
it existed in a seeded database.
Disposition
Section titled “Disposition”Parked as a candidate on 2026-07-30, not fixed in the ADR-0056 lane — that lane’s exclusions key on
offering.authority_level = 'person', which customer-0’s platform-authority offerings
deliberately do not carry (its master offerings are meant to be org-visible once provisioned as
tracking copies; the exclusion semantics differ, which is why ADR-0056 chose a separate
personal-0 org).
Closed 2026-09-13. The per-surface decision the 2026-07-30 note deferred was taken: the sentinel
ORG itself and everything homed in it are excluded wherever personal-0 already is, and the
exclusion is keyed on the org id every time — never on authority_level, because a master
offering in customer-0 and the read-only tracking copy provisioned into a real org both carry
authority_level = 'platform' and the copies must keep flowing. The id, its slug and its name now
live once, in packages/db/src/schema/platform-primitives.ts (PLATFORM_SENTINEL_ORG_ID), with the
exclusion rule in the docblock; the importer imports it instead of re-typing the literal.
Surfaces changed
Section titled “Surfaces changed”- OneRoster provider projection (
apps/api/src/features/oneroster/provider-projection-service.ts) — orgs, classes/offerings, courses/containers, enrollments/memberships, resources, grade categories. The offering predicate is the root: every derived set narrows to the surviving offerings. - Row filters / sync entries (
packages/db/src/schema/authorization.ts) — the oldexcludePersonalSentinelOrganizationis generalised toexcludeSentinelOrganizations(both ids, null-org globals still pass), and the offering → org REVERSAL branches gain a newwithoutSentinelOfferingsguard. That one change covers the platform-adminorganizationpicker and the org-keyed hubs behindlearning_container,catalog_resource,grade_category,content, and the LTI deployment/entitlement/tool reads. Theofferingentry (learning-structure.ts) gainsexcludePlatformSentinelOfferingsbeside its person guard on every non-member branch. Every affected entry’srowFilter.revisionis bumped (a logic-only change is invisible to the read-contract fingerprint). - Seed (
packages/db/src/seed/run-seed.ts) — org pools, offering pools,redistributeSeededOfferingsand the summary count assertions each gained the platform-sentinel twin. Declared counts inseed/contracts.tsare unchanged: the seed creates neither sentinel. - Caliper catalog-resource reader
(
apps/api/src/features/telemetry/readers/catalog-resource-reader.ts) — the master library’s catalog rows no longer emit ResourceManagementEvents; the copies inside real orgs still do.
Deliberately left alone
Section titled “Deliberately left alone”- Learning periods, score scales and line items in the OneRoster projection: none is org-keyed in a way the sentinel reaches, and the offering-rooted exclusion above already drops anything derived from a master offering.
- Offering-keyed learner-data entries — memberships-as-learner-data, attempts, scores,
gradebook, PNP, LTI line items: their
authority_level <> 'person'guards stand as they are. No learner data exists incustomer-0(nobody learns in the master library), so an org-id guard there would be cost without a claim. - Other telemetry event readers, proctoring sessions,
lti_platform_tool, the provisioning service, and the erasure/archive registries: the provisioning service must read the masters (copying a source offering down into a target org is its whole job), the tool catalog is global and org-independent (a platform admin must see a freshly registered tool before any deployment exists), and erasure / archive are person-keyed, where the sentinel is not a participant.lti_platform_toolgains no exclusion of its own — its non-admin branch nests the shared organization reach, so it inherits the change and takes a revision bump with it. - The
personal-0exclusion in the Caliper reader: not added. Whether personal activity emits Caliper at all is a ruling ADR-0056 defers to the archive/telemetry work; this lane did not pre-empt it.
Tests: packages/db/src/schema/platform-sentinel-exclusion.test.ts (the twin suite — structural AST
assertions plus a pgwasm execution proving the master is withheld while its tracking copy is not),
plus twins in oneroster-roundtrip.integration.test.ts and catalog-resource-reader.test.ts.
ADR-0056 carries a dated amendment under decision 1.