Skip to content

Commit 2ad146f

Browse files
committed
test(platform-objects): pin sys_seed_landed_key's shape; regenerate the tenancy census (wip)
Claude-Session: https://claude.ai/code/session_017xRBcTJTE7kSbcMoJQ4Txf Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7a89f01 commit 2ad146f

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

‎packages/platform-objects/src/plugin.test.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ describe('PlatformObjectsPlugin: platform-infrastructure object registration (#4
102102
expect(SysRecycleBin.name).toBe(RECYCLE_BIN_OBJECT);
103103
});
104104

105+
// [#31021] The record of landed seed rows: the seed loader writes
106+
// `sys_seed_landed_key` by this name (it cannot import this package), keeps
107+
// it per organization, and a row reaped or served over a data API would let
108+
// a removed seed row come back or be edited into one.
109+
it('sys_seed_landed_key is organization-owned, durable and has no data API', () => {
110+
expect(SysSeedLandedKey.name).toBe('sys_seed_landed_key');
111+
expect(Object.keys(SysSeedLandedKey.fields).sort()).toEqual(['created_at', 'id', 'object_name', 'organization_id', 'seed_key']);
112+
expect(SysSeedLandedKey.fields.organization_id).toMatchObject({ type: 'lookup', reference: 'sys_organization', deleteBehavior: 'cascade' });
113+
expect((SysSeedLandedKey as { lifecycle?: unknown }).lifecycle).toBeUndefined();
114+
expect(SysSeedLandedKey.enable).toMatchObject({ apiEnabled: false, apiMethods: [] });
115+
});
116+
105117
/**
106118
* [#12359 ruling, 2026-08-26 — 「同意」] ADR-0126 §4's activation ledger.
107119
* Registration follows the DECLARATION: the object is declared in this

‎scripts/platform-object-tenancy-census.json‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"predicate": "resolveTenantFieldName(registered schema) !== null, where the registered schema is the authored schema plus the columns resolveInjectedSystemColumns says the registration injects (the applySystemFields pass). Both functions are loaded from source and executed; neither is re-spelled here.",
2727
"population": "every object registered by a tracked packages/**/*.object.ts module whose name carries a platform prefix (sys_ / cloud_ / ai_). The cloud repository's own cloud_ objects are not in this tree and so not in this census.",
2828
"totals": {
29-
"registered": 96,
30-
"inReach": 49,
29+
"registered": 97,
30+
"inReach": 50,
3131
"outOfReach": 47
3232
},
3333
"reasonTotals": {
@@ -666,6 +666,13 @@
666666
"systemFields.tenant: false"
667667
]
668668
},
669+
{
670+
"name": "sys_seed_landed_key",
671+
"file": "packages/platform-objects/src/system/sys-seed-landed-key.object.ts",
672+
"reach": "in",
673+
"tenantField": "organization_id",
674+
"reasons": []
675+
},
669676
{
670677
"name": "sys_session",
671678
"file": "packages/platform-objects/src/identity/sys-session.object.ts",

0 commit comments

Comments
 (0)