Repository navigation
Commit 07bc34a
Part of #15204
Clause-②: no
**T2 of stage 6b-2**: tests only. Fixtures that looked up a permission
set's seeded `sys_permission_set` row now read the set from the security
catalog (ADR-0131 D3, the catalog is its one home). Fixtures that model
an **existing** database write the legacy row themselves. It is split
off the 6b-2 code PR (#22900) so that PR falls under 3,000 changed
lines.
**Landing, as sequenced by the seat:** T1, T2 and the 6b-2 code PR
(#22900) stay drafts until #22900's own gates clear (the #22865 pickers
and objectui PR-4), then land back to back, **T1 → T2 → #22900**. That
way the publish materializer and the seeders are never live on `main`
with their pins gone. 6b-2a (#22899) is independent and goes to the
maintainer separately. This branch is green on `main` as it is today,
while the seeder still runs. No production file changes.
## What changes
- New `packages/qa/dogfood/test/catalog-permission-set.ts`:
- `catalogPermissionSet(ql, name)` returns the set the catalog serves
(via `securityCatalogReaderOf`; it throws if no reader is bound, so a
missing catalog cannot pass as an absent set);
- `ensureLegacyPermissionSetRow(ql, name, { managedBy })` writes the
organization-less legacy row with its full body from the catalog
definition, for the suites whose data-door cases need a row.
- About 30 dogfood suites move from `findOne('sys_permission_set')`
preconditions to `catalogPermissionSet`.
- `showcase-permission-zoo`, `two-doors-permission`,
`showcase-permission-projection`,
`permission-set-write-through-package-binding` and
`permission-set-lock-row-provenance` write the legacy row where their
cases edit one. `two-doors-permission` 块1 (a publish materializes a row)
goes; the materializer is deleted in 6b-2.
- `armed.dogfood.test.ts`: the seeded controls use signed-up members,
not `usr_system`.
- `permission-set-clone-boot-unowned-warning.dogfood.test.ts` is deleted
(it pins the seeder's boot warning).
- plugin-security: new `src/__tests__/legacy-catalog-rows.testkit.ts`
(`seedLegacyPlatformBucket`). Eight suites that model an existing
database call it before their bootstrap.
- **plugin-auth (added after the 6b-2 wider-suites run, item (d))**: the
two grant-reader suites, `grant-readers-by-name.golden.test.ts` and
`grant-readers-unnamed-grant.test.ts`, read the platform-bucket rows the
bootstrap seeded: `organization_admin` to clone per organization, and
`viewer_readonly` to point a legacy id at. Each now calls
`seedLegacyPlatformBucket` before the bootstrap, through a plugin-auth
copy of the testkit at `src/__tests__/legacy-catalog-rows.testkit.ts`.
The copy has the same shape (organization-less, idempotent); a test-only
helper is not exported across the package boundary. Without it, #22900's
tree turns 3 of their cases red.
## Size
58 files against `main`, +379 / −831 (1,210 changed lines). The −831
includes the `bootstrap-platform-admin` suites this branch retires, with
their ledger baseline entries.
## Verification
On this branch, with the seeder still running:
- full build; dogfood typecheck green;
- the 8 plugin-security fixture suites: 8 files, 72 passed;
- the 40 migrated dogfood suites: 40 files, 447 passed, 1 skipped;
- the three double-contract gates, `check:changeset-no-major` and
`check:nul-bytes` green.
The same fixtures also pass with the seeder deleted: they are inside the
6b-2 branch's full dogfood run (248 files green).
After merging `main` (`74c4b3435e`):
- full dogfood: 254 files, 2,071 passed, 9 skipped;
- plugin-security: 196 files, 4,042 passed;
- `dispatch-gates --ran`: every derived family run, exit 0 (67 of 67 at
`a38b54f6f`).
The plugin-auth item: both suites, 9 passed, on this branch alone and
again with #22900's tree on top; plugin-auth typecheck green in both.
Test-only: `skip-changeset`.
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_013XKtmoR5QCUSTMjiQ3os49
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 965a1bf commit 07bc34a
58 files changed
Lines changed: 379 additions & 831 deletions
File tree
- packages
- plugins
- plugin-auth/src
- __tests__
- plugin-security/src
- __tests__
- qa/dogfood/test
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| 157 | + | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
| 127 | + | |
125 | 128 | | |
126 | 129 | | |
127 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| 323 | + | |
| 324 | + | |
322 | 325 | | |
323 | 326 | | |
324 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
744 | 745 | | |
745 | 746 | | |
746 | 747 | | |
| 748 | + | |
| 749 | + | |
747 | 750 | | |
748 | 751 | | |
749 | 752 | | |
| |||
0 commit comments