Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .changeset/sys-license-cloud-provided-registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'@objectstack/spec': patch
---

`sys_license` is now registered in `CLOUD_PROVIDED_OBJECT_NAMES`
(`@objectstack/spec/system`), so `isPlatformProvidedObjectName('sys_license')`
returns `true` and a stack referencing it resolves instead of being flagged.

The object is real and shipping: `@objectstack/service-tenant` declares it in
the cloud repository (`packages/service-tenant/src/objects/sys-license.object.ts`),
alongside `sys_package_installation` and the other four names already on the
list. This repository has cited it repo-wide as the canonical
`tenancy.enabled: false` example — the driver tenant-scope suites, the
platform-global note on `ObjectSchema`, ADR-0066's worked example — while the
registry omitted it, which is exactly the stale-entry failure the registry's
maintenance contract warns about: consumers now trust the list, so a missing
name turns a real cross-reference into a probable-typo warning
(`object-reference-unregistered-platform`) rather than a resolved one.

No accept-set change and no behaviour change for any name already on the list.
14 changes: 14 additions & 0 deletions packages/spec/src/system/constants/platform-object-names.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,18 @@ describe('platform-object predicates', () => {
expect(hasPlatformObjectPrefix('crm_lead')).toBe(false);
expect(isPlatformProvidedObjectName('user')).toBe(false);
});

it('resolves a cloud-provided object this repo never declares', () => {
// `sys_license` is declared by `@objectstack/service-tenant` in the cloud
// repo (`packages/service-tenant/src/objects/sys-license.object.ts`), and
// this repo cites it repo-wide as the canonical `tenancy.enabled: false`
// example — the driver tenant-scope suites, `object.zod.ts`'s
// platform-global note, ADR-0066's worked example. While it was absent
// from the registry those references read as fictional, so a
// cloud-targeted stack naming a real object was warned about a typo.
// Pinned by name rather than left to the loop above, so dropping it fails
// one readable assertion instead of nothing.
expect(isPlatformProvidedObjectName('sys_license')).toBe(true);
expect(CLOUD_PROVIDED_OBJECT_NAMES).toContain('sys_license');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ export const CLOUD_PROVIDED_OBJECT_NAMES: readonly string[] = [
'sys_app',
'sys_environment',
'sys_environment_member',
'sys_license',
'sys_package',
'sys_package_installation',
];
Expand Down
Loading