|
18 | 18 | * registration order (`kernel.ts` `trigger`). The showcase AppPlugin starts |
19 | 19 | * BEFORE the Security plugin, so an app hook on `kernel:ready` runs *before* |
20 | 20 | * the security bootstrap has created the position/set rows — the rows never |
21 | | - * appear from inside that hook. We therefore bind on **`kernel:listening`**, |
22 | | - * the phase the kernel fires only AFTER every `kernel:ready` handler has |
23 | | - * completed (`kernel.ts` Phase 4 / `lite-kernel.ts`), so the bootstrap rows are |
| 21 | + * appear from inside that hook. We therefore bind on **`kernel:bootstrapped`**, |
| 22 | + * the anchor the kernel fires only AFTER every `kernel:ready` handler has |
| 23 | + * settled (`kernel.ts` Phase 3.5 / `lite-kernel.ts`), so the bootstrap rows are |
24 | 24 | * guaranteed present. |
25 | 25 | * |
26 | | - * `everyone → showcase_member_default` IS bound here. The security plugin only |
27 | | - * auto-binds an app's `isDefault` set to `everyone` when that set is |
28 | | - * application-owned; the showcase ships as a package, so its default lands in |
29 | | - * `sys_audience_binding_suggestion` (pending admin confirmation) and is NOT |
30 | | - * live until confirmed. Binding it here keeps the demo's baseline working out |
31 | | - * of the box, idempotently and alongside the suggestion. |
| 26 | + * `everyone → showcase_member_default` is NOT bound here: the security plugin |
| 27 | + * auto-binds the app's `isDefault` set (resolved as its `fallbackPermissionSet`) |
| 28 | + * to `everyone` at boot. This list only carries the persona → set bindings the |
| 29 | + * framework cannot infer. |
32 | 30 | */ |
33 | 31 |
|
34 | 32 | const BINDINGS: ReadonlyArray<readonly [position: string, permissionSet: string]> = [ |
35 | | - ['everyone', 'showcase_member_default'], |
36 | 33 | ['contributor', 'showcase_contributor'], |
37 | 34 | ['manager', 'showcase_manager'], |
38 | 35 | ['exec', 'showcase_executive'], |
@@ -106,12 +103,12 @@ export function registerShowcasePositionBindings(ctx: BindHostContext): void { |
106 | 103 | ctx.logger?.info?.('[showcase] position bindings ensured', { created, total: BINDINGS.length }); |
107 | 104 | }; |
108 | 105 |
|
109 | | - // Bind on `kernel:listening` — the phase that fires only after every |
| 106 | + // Bind on `kernel:bootstrapped` — the anchor that fires only after every |
110 | 107 | // `kernel:ready` handler (incl. the security bootstrap that seeds the |
111 | | - // position/set rows) has completed. Fall back to a deferred immediate run |
| 108 | + // position/set rows) has settled. Fall back to a deferred immediate run |
112 | 109 | // if the host context somehow omits the hook registrar. |
113 | 110 | if (typeof ctx.hook === 'function') { |
114 | | - ctx.hook('kernel:listening', run); |
| 111 | + ctx.hook('kernel:bootstrapped', run); |
115 | 112 | } else { |
116 | 113 | setTimeout(() => void run(), 0); |
117 | 114 | } |
|
0 commit comments