You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kernel:ready handlers run sequentially in plugin-registration order, so a
handler that consumes data produced by a later-starting plugin (security
bootstrap seeds sys_position; the app plugin's seed loader inserts records)
races the very rows it needs. Add kernel:bootstrapped — fired after every
kernel:ready handler has settled but before kernel:listening (HTTP socket
open) — as the correct anchor for reconcile/backfill work. Both ObjectKernel
and LiteKernel trigger it; ordering is locked by tests in kernel.test.ts and
lite-kernel.test.ts. The sharing-rule boot backfill moves from kernel:listening
to kernel:bootstrapped (semantics-only).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017bJWtKmZ2mFpRFAmmmoeqe
feat(kernel): add `kernel:bootstrapped` lifecycle anchor — the phase that fires after every `kernel:ready` handler has settled but before `kernel:listening` (HTTP socket open). `kernel:ready` handlers run sequentially in plugin-registration order, so a handler that consumes data produced by a later-starting plugin (e.g. the security bootstrap seeds `sys_position`; the app plugin's seed loader inserts records) would race the very rows it needs. `kernel:bootstrapped` is the correct anchor for reconcile/backfill work: every producer's ready handler has finished by the time it fires. Both `ObjectKernel` and `LiteKernel` trigger it. The sharing-rule boot backfill moves from `kernel:listening` to `kernel:bootstrapped` (semantics-only; behaviour unchanged).
Copy file name to clipboardExpand all lines: content/docs/kernel/events.mdx
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,8 @@ Triggered by the Kernel during bootstrap and shutdown:
19
19
| Event | Description |
20
20
| :--- | :--- |
21
21
|`kernel:ready`| All plugins have successfully started. System is live. |
22
-
|`kernel:listening`| Fired after every `kernel:ready` handler has completed (e.g. the HTTP server is accepting connections). |
22
+
|`kernel:bootstrapped`| Fired after every `kernel:ready` handler has settled, before `kernel:listening`. The "all bootstrap + seed data is ready" anchor — use it for reconcile/backfill work that consumes data a later-starting plugin produces during `kernel:ready`. |
23
+
|`kernel:listening`| Fired after every `kernel:ready` and `kernel:bootstrapped` handler has completed (e.g. the HTTP server is accepting connections). |
23
24
|`kernel:shutdown`| Shutdown signal received. Plugins should clean up resources. |
0 commit comments