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
40 changes: 40 additions & 0 deletions .changeset/spec-cloud-provided-environment-credential.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
"@objectstack/spec": minor
---

`CLOUD_PROVIDED_OBJECT_NAMES` (`@objectstack/spec/system`) gains a member:
`sys_environment_credential`. `isPlatformProvidedObjectName('sys_environment_credential')`
now returns `true`, so a reference to that name resolves instead of being
diagnosed as a platform-prefixed name nothing registers (#18309).

This widens an accept set. The list is a closed set and the name was not in it,
so the object-reference ladder now accepts a value it used to warn on, and the
widening reaches every surface that consults the predicate: a dataset `object`,
an action parameter `reference`, a field `reference`, a dashboard
`optionsFrom.object`, a navigation `requiresObject` and a translation
`objects.<name>` subtree naming `sys_environment_credential` all stop being
diagnosed.

Why this name: as read in the cloud repository at `cb8ee7ff60`,
`@objectstack/service-tenant` registers it on exactly the path the list's
existing `sys_package`, `sys_package_version` and `sys_package_installation`
members take — `objects/sys-environment-credential.object.ts` exported through
`objects/index.ts`, listed in `tenantObjects`, spread into
`manifestService.register({ objects })` by `tenant-plugin.ts`. That reading is
the cloud repository's and is carried here on its filer's name; per this list's
header it cannot be conformance-tested from this repo, and this change does not
claim to have re-taken it.

Unlike the earlier additions, this one fixes no diagnostic that fires today: no
`*.object.ts` in this repository references the name, so nothing shipped was
being mis-diagnosed. What was wrong is the registry's own claim about the name.
This repository's governed records already treat the object as real — ADR-0007's
inventory table lists it as existing, and ADR-0131 cites a measured cross-tenant
read of its rows — while the list that decides whether a reference resolves said
no package registers it. The first author to write the reference would have been
told it looked like a typo.

One entry is added; no other member moves and nothing is removed or narrowed.
The cloud-side half of the contract — that `@objectstack/service-tenant`
registers the table — is owned by the cloud repository per the list's header and
is not asserted from here.
28 changes: 28 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 @@ -184,4 +184,32 @@ describe('platform-object predicates', () => {
expect(CLOUD_PROVIDED_OBJECT_NAMES, name).toContain(name);
}
});

it('resolves the tenant credential store the cloud runtime registers', () => {
// The cloud-side registration is a READING TAKEN IN THE CLOUD REPOSITORY,
// at `cb8ee7ff60`, and carried here on its filer's name — like every other
// member of this list, it is not re-checkable from this repo, which is what
// the list's own header means by "they cannot be conformance-tested from
// this repo". As read there, `@objectstack/service-tenant` registers the
// name on the same path as the `sys_package*` family above: declared in
// `objects/sys-environment-credential.object.ts`, exported through
// `objects/index.ts`, listed in `tenantObjects` in `manifest.ts`, and spread
// into `manifestService.register({ objects })` by `tenant-plugin.ts`.
//
// Unlike `sys_license` and `sys_package_version`, no `*.object.ts` in THIS
// repository references it today, so nothing here was being mis-diagnosed
// while it was absent. What was wrong is the registry's own claim: this
// repo's governed records already treat the object as real — ADR-0007's
// inventory table lists it as `✅ exists`, and ADR-0131 §1.1 cites a
// measured cross-tenant read of its rows — while the list that decides
// whether a reference to it resolves said no package registers that name.
// So the first author to write the reference would have been told it looked
// like a typo. Pinned by name, beside `sys_license` and the package family,
// for the same reason: dropping it fails one readable assertion instead of
// nothing. What this test asserts is the objectstack half alone — that the
// list carries the name and the predicate resolves it. The cloud half is
// owned by the cloud repository and is not asserted here.
expect(isPlatformProvidedObjectName('sys_environment_credential')).toBe(true);
expect(CLOUD_PROVIDED_OBJECT_NAMES).toContain('sys_environment_credential');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const PLATFORM_OBJECTS_BY_PACKAGE: Readonly<Record<string, readonly strin
export const CLOUD_PROVIDED_OBJECT_NAMES: readonly string[] = [
'sys_app',
'sys_environment',
'sys_environment_credential',
'sys_environment_member',
'sys_license',
'sys_package',
Expand Down
Loading