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
docs: implementation-accuracy audit of the #4212-family affected docs
Ran the repo's docs-accuracy-audit workflow scoped to the drift-check advisory
from #4242 (14 docs) plus 4 the retired-surface grep implicated. 158
evidence-backed fixes across 18 docs, each cited to file:line. The largest
classes:
- kernel/cluster.mdx (22): a documented `eventBus.emit(...)` that exists
nowhere in packages/, a `ctx.cluster` PluginContext property that does not
exist, `defineStack({ cluster })` that stack.zod.ts silently strips,
`postgres`/`nats` listed as shipped drivers when neither package exists,
`REDIS_URL` for the real `OS_CLUSTER_DRIVER`, and an at-least-once delivery
promise no shipped driver provides.
- protocol/kernel/plugin-spec.mdx (20): `plugin.manifest.ts` as the manifest
filename — grep-empty across packages/, apps/ and examples/; the real one is
`objectstack.plugin.json`. Plus `context.plugins.isInstalled()` (no such
member), compound semver ranges (`'>=1.0.0 <2.0.0'`) that make the resolver
throw, and init ordering described as registration order when bootstrap()
runs a dependency topological sort.
- data-modeling/external-datasources.mdx: `credentialsRef: 'secret:…'` — the
shipped binder only resolves `sys_secret:<id>`, so the sample as written
fails closed at connect.
- deployment/migration-from-objectql.mdx: a `^3.1.0` pin that can never
resolve to the current 16.1.0 line.
VERIFICATION STATUS — 7 of 18 docs carry an adversarial-verifier pass; the
other 11 do not (the run hit the session limit mid-phase). The verifier earned
its keep on the 7 it reached: 8 repairs, including a fabricated
`enforceNetworkAccess` (real: `enforceNetworkRequest`,
plugin-permission-enforcer.ts:212) and an over-broad retirement claim that
would have contradicted the live app-bundle `onEnable`. The remaining 11 are
committed unverified and MUST NOT ship until their verifier pass runs — the PR
stays draft until then.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HrRNgrWaRtggzmrHpbomyh
Copy file name to clipboardExpand all lines: content/docs/kernel/events.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ 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: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`. |
22
+
|`kernel:bootstrapped`| Fired after every `kernel:ready` handler has settled, before `kernel:listening`. The "all **synchronous**bootstrap has settled" anchor — use it for reconcile/backfill work that consumes data a later-starting plugin produces during `kernel:ready`. It does **not** guarantee app *seed* data has settled: an inline seed that overruns `OS_INLINE_SEED_BUDGET_MS` (default 8s) keeps seeding in the background and can outlast even `kernel:listening`. Subscribe to `app:seeded` for the true per-app seed-settle point. |
23
23
|`kernel:listening`| Fired after every `kernel:ready` and `kernel:bootstrapped` handler has completed (e.g. the HTTP server is accepting connections). |
24
24
|`kernel:shutdown`| Shutdown signal received. Plugins should clean up resources. |
25
25
@@ -74,7 +74,7 @@ Every data hook is a single-argument handler `(ctx: HookContext) => void | Promi
|`ctx.result`| Operation result, available in `after*` events (mutable). |
76
76
|`ctx.previous`| Record state before the operation (update/delete). |
77
-
|`ctx.session`| Auth/tenancy info (`userId`, `organizationId`, `roles`, …). |
77
+
|`ctx.session`| Auth/tenancy info (`userId`, `organizationId`, `positions`, `accessToken`, …). Absent entirely when the call carried no identity envelope. |
Copy file name to clipboardExpand all lines: content/docs/plugins/index.mdx
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,11 +211,23 @@ The `os serve` and `os dev` commands automatically detect and load plugins:
211
211
| Condition | Auto-loaded Plugin |
212
212
|:----------|:-------------------|
213
213
|`objects` defined, no ObjectQL |`@objectstack/objectql`|
214
-
|`objects` defined, no driver |`DefaultDatasourcePlugin` (runtime) — driver kind from `OS_DATABASE_DRIVER` / `OS_DATABASE_URL`, defaulting to SQLite in dev and to nothing in production |
214
+
|`objects` defined, no driver |`DefaultDatasourcePlugin` (runtime) — driver kind from `OS_DATABASE_DRIVER` / `OS_DATABASE_URL`, defaulting to SQLite |
215
215
|`objects`, `manifest`, `apps`, `flows`, or `apis` defined |`AppPlugin` (runtime) |
216
216
| Server not disabled |`@objectstack/plugin-hono-server`|
217
217
| Server enabled |`@objectstack/rest` (REST API) |
218
218
219
+
<Callouttype="info">
220
+
**Which SQLite default you get depends on the boot path.** A bare `defineStack()`
221
+
config — one whose `plugins` array instantiates nothing — boots through
222
+
`createStandaloneStack`, which anchors a SQLite *file* under the project
223
+
(`.objectstack/data/standalone.db`) in development **and** production. A host config
224
+
that already instantiates plugins takes `serve`'s own fallback instead: with no
225
+
`OS_DATABASE_URL` / `OS_DATABASE_DRIVER` set it declares SQLite `:memory:` in dev and
226
+
registers **no** datasource in production, so a missing driver surfaces loudly
227
+
downstream. `os dev` sidesteps both defaults by exporting
**Example:** A plugin declares `apiKey` in its `configSchema`. If it is missing, the plugin loader fails the load with the Zod issues spelled out per key — `Plugin slack-integration configuration validation failed:` followed by ` - apiKey: Required` — so boot stops instead of a request failing later.
485
+
**Example:** Wiring, not config, is what the kernel currently enforces at boot. A plugin that declares a dependency the kernel never received fails `bootstrap()` outright — `[Kernel] Dependency 'com.objectstack.engine.objectql' not found for plugin 'com.objectstack.audit'` — and a dependency cycle throws `[Kernel] Circular dependency detected: <plugin>`. Boot stops there instead of a request failing later.
486
+
487
+
<Callout type="warn">
488
+
Plugin `configSchema` is **not** part of this fail-fast path yet. The loader
489
+
stores the schema and postpones the check, so a missing or malformed value in
490
+
a plugin's config will not stop boot today. Validate config you depend on in
0 commit comments