|
4 | 4 | * [ADR-0131 D3, ADR-0066 D1] The curated platform capabilities as declared |
5 | 5 | * `capability` metadata, read off a REAL boot of this plugin: what the security |
6 | 6 | * catalog read lists, what the boot writes into `sys_capability`, and what the |
7 | | - * capability seeders report. |
| 7 | + * capability seeder reports. |
8 | 8 | * |
9 | 9 | * The boot is the plugin's own — `init`, `start`, then its `kernel:ready` |
10 | | - * handlers in registration order (both capability seeding passes included) — |
| 10 | + * handlers in registration order (the declared-capability seeding included) — |
11 | 11 | * over a real `ObjectQL` engine on a SQLite file, so a second boot can open the |
12 | 12 | * database the first one seeded. |
13 | 13 | * |
|
26 | 26 | * |
27 | 27 | * Read off the producers, never off a registry: the curated entries from |
28 | 28 | * `PLATFORM_CAPABILITIES`, the stack's from its declaration. The census is the |
29 | | - * one the boot wrote before the curated capabilities were declared — the |
30 | | - * curated pass's rows plus the stack's package row — which is why an |
31 | | - * unchanged census is the pin that the declarations changed no row. |
| 29 | + * stack's package row and nothing else: the curated capabilities live in the |
| 30 | + * registry, and the boot writes no `sys_capability` row for them (the curated |
| 31 | + * seeder is retired), on a fresh database or on one it opened again. |
32 | 32 | */ |
33 | 33 |
|
34 | 34 | import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest'; |
@@ -192,9 +192,8 @@ async function census(engine: ObjectQL): Promise<string[]> { |
192 | 192 | .sort(); |
193 | 193 | } |
194 | 194 |
|
195 | | -/** The census the boot writes, read off the producers (module doc). */ |
| 195 | +/** The census the boot writes, read off the producers (module doc): no curated row. */ |
196 | 196 | const EXPECTED_CENSUS = [ |
197 | | - ...PLATFORM_CAPABILITIES.map((c) => [c.name, 'platform', '-', c.label, c.description, c.scope, true].join(' | ')), |
198 | 197 | [STACK_CAPABILITY.name, 'package', STACK_PACKAGE, STACK_CAPABILITY.label, STACK_CAPABILITY.description, STACK_CAPABILITY.scope, true].join(' | '), |
199 | 198 | ].sort(); |
200 | 199 |
|
@@ -248,10 +247,10 @@ describe.each(SCENARIOS)('a $posture boot, the stack capability $declared', ({ p |
248 | 247 | } |
249 | 248 | }); |
250 | 249 |
|
251 | | - it('the boot writes the census it wrote before the declarations, on a fresh and on a seeded database', async () => { |
| 250 | + it('the boot writes no curated row — only the stack’s package row — on a fresh and on a seeded database', async () => { |
252 | 251 | expect(await census(fresh.engine)).toEqual(EXPECTED_CENSUS); |
253 | 252 | expect(await census(reseeded.engine)).toEqual(EXPECTED_CENSUS); |
254 | | - // The seeded database needs no write at all: every row already reads as declared. |
| 253 | + // The seeded database needs no write at all: the package row already reads as declared. |
255 | 254 | expect(reseeded.writes).toEqual([]); |
256 | 255 | }); |
257 | 256 |
|
|
0 commit comments