Skip to content

Commit c0dc292

Browse files
committed
test: the suites main's D and wall changes touched span stage 8 as well
Measured on a local main + S8-T + S8 tree: - plugin-auth's two grant-reader suites seed the legacy platform-bucket rows only where sys_permission_set is still registered; - builtin-positions expects the walled tenant create refusal while the plugin declares the sys_position row object, which stage 8 retires together with that refusal; - the record-page label-map floor is 38, the count with B2's two maps and the retired position page gone. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 008ca32 commit c0dc292

4 files changed

Lines changed: 21 additions & 9 deletions

File tree

‎packages/cli/test/platform-page-i18n-parity.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ describe('shipped platform record pages -- i18n ownership (#14817)', () => {
842842
// that the pages went monolingual. [#15204 B2] The user page's two grant
843843
// lists dropped their `add` pickers, and with them two label maps.
844844
// (`sys_position_detail` retired with the `sys_position` object, C3 stage 8.)
845-
expect(maps.length).toBeGreaterThanOrEqual(39);
845+
expect(maps.length).toBeGreaterThanOrEqual(38);
846846

847847
const incomplete = maps
848848
.filter((m) => SHIPPED_LOCALES.some((locale) => !m.locales.includes(locale)))

‎packages/plugins/plugin-auth/src/grant-readers-by-name.golden.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ async function standingByReader(posture: Posture): Promise<Record<string, unknow
154154
await user('usr_member', 'member@gra.example', '2025-03-01T00:00:00.000Z');
155155
await user('usr_agent', 'agent@gra.example', '2025-04-01T00:00:00.000Z');
156156

157-
// An existing database: the platform-bucket rows an earlier release seeded.
158-
await seedLegacyPlatformBucket(engine, bootstrapSets);
157+
// An existing database: the platform-bucket rows an earlier release seeded,
158+
// where the row object is still registered (C3 stage 8 retires it).
159+
if (engine.getObject?.('sys_permission_set')) await seedLegacyPlatformBucket(engine, bootstrapSets);
159160
const boot = await bootstrapPlatformAdmin(engine, bootstrapSets);
160161
expect(boot.adminPromoted).toBe(posture === 'single');
161162
// The organization's own copies of the sets, where the row object is still

‎packages/plugins/plugin-auth/src/grant-readers-unnamed-grant.test.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,11 @@ async function soleGrantAnchoredAdmin(): Promise<Rig> {
123123
'sys_account', { id: `acc_${id}`, user_id: id, account_id: `${id}@un.example`, provider_id: 'credential' }, SYS,
124124
);
125125
}
126-
// An existing database: the platform-bucket rows an earlier release seeded.
127-
await seedLegacyPlatformBucket(engine, (manifest.permissions ?? []) as any[]);
126+
// An existing database: the platform-bucket rows an earlier release seeded,
127+
// where the row object is still registered (C3 stage 8 retires it).
128+
if (engine.getObject?.('sys_permission_set')) {
129+
await seedLegacyPlatformBucket(engine, (manifest.permissions ?? []) as any[]);
130+
}
128131
const boot = await bootstrapPlatformAdmin(engine, (manifest.permissions ?? []) as any[]);
129132
expect(boot).toMatchObject({ adminPromoted: true });
130133
return { engine };

‎packages/plugins/plugin-security/src/builtin-positions.boot.test.ts‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,15 +573,23 @@ const REFUSAL_GOLDEN: Record<string, WriteOutcome> = {
573573
},
574574
};
575575

576+
/**
577+
* Whether the plugin still declares the `sys_position` row object. C3 stage 8
578+
* retires it (ADR-0131 D3) and unregisters the walled data-door refusal with
579+
* it; this harness registers the legacy table itself either way.
580+
*/
581+
const PLUGIN_DECLARES_POSITION_ROWS = securityObjects.some((o) => o.name === 'sys_position');
582+
576583
/**
577584
* {@link REFUSAL_GOLDEN} for a scenario: the built-in row cases need an existing
578585
* database's rows. [ADR-0131 D3] Under a wall the tenant's position CREATE is
579-
* refused (`walled-catalog-data-door.ts`): the catalog is the platform
580-
* operator's, and a tenant may only assign it. The assignment cases do not
581-
* move, and the built-in row refusals keep their `403 PERMISSION_DENIED`.
586+
* refused (`walled-catalog-data-door.ts`) while the plugin declares the row
587+
* object: the catalog is the platform operator's, and a tenant may only assign
588+
* it. The assignment cases do not move, and the built-in row refusals keep
589+
* their `403 PERMISSION_DENIED`.
582590
*/
583591
function refusalGoldenFor(scenario: Scenario): Record<string, WriteOutcome> {
584-
const golden: Record<string, WriteOutcome> = scenario.posture === 'single'
592+
const golden: Record<string, WriteOutcome> = scenario.posture === 'single' || !PLUGIN_DECLARES_POSITION_ROWS
585593
? REFUSAL_GOLDEN
586594
: { ...REFUSAL_GOLDEN, 'control: create a position row': { ok: false, code: 'PERMISSION_DENIED', status: 403 } };
587595
if (scenario.existingRows) return golden;

0 commit comments

Comments
 (0)