@ultimat3/cli 30.8.0 → 31.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +75 -64
- package/README.md +4 -1
- package/package.json +30 -29
- package/src/admin-registration.ts +1 -1
- package/src/affected.ts +5 -1
- package/src/app-boundaries.ts +88 -9
- package/src/app-load-async.ts +133 -0
- package/src/app-load-batch.ts +203 -0
- package/src/app-load-prebuilt.ts +147 -0
- package/src/app-load-register.ts +175 -0
- package/src/app-load.ts +143 -175
- package/src/app-loader-imports.ts +31 -0
- package/src/app-root.ts +13 -0
- package/src/app-runtime.ts +5 -1
- package/src/boundary-findings.ts +12 -0
- package/src/browser-launcher-port.ts +3 -7
- package/src/browser-launcher.ts +1 -1
- package/src/budgets-scan.ts +8 -0
- package/src/budgets.ts +10 -1
- package/src/build-registry-background.ts +59 -0
- package/src/build-registry.ts +207 -0
- package/src/cdp-shot-clock.ts +3 -11
- package/src/cdp-shot-driver.ts +3 -2
- package/src/cdp-shot-element.ts +3 -2
- package/src/cdp-shot-page.ts +2 -2
- package/src/cdp-shot-watch.ts +4 -3
- package/src/cmd-auth.ts +3 -3
- package/src/cmd-db-recount.ts +15 -0
- package/src/cmd-drill.ts +10 -6
- package/src/cmd-exercise.ts +2 -1
- package/src/cmd-generate-spec.ts +6 -0
- package/src/cmd-generate.ts +22 -4
- package/src/cmd-mail.ts +1 -1
- package/src/cmd-routes.ts +2 -2
- package/src/cmd-secrets-spec.ts +4 -1
- package/src/cmd-shot.ts +14 -4
- package/src/cmd-verify-spec.ts +21 -1
- package/src/cmd-verify.ts +16 -4
- package/src/coverage-source.ts +4 -1
- package/src/db-diagnostics.ts +8 -1
- package/src/dev-boot.ts +29 -15
- package/src/dev-dashboard-invalidations.ts +43 -0
- package/src/dev-dashboard.ts +13 -16
- package/src/dev-n-plus-one.ts +7 -3
- package/src/dev-rebuild.ts +2 -1
- package/src/dev-route-table.ts +1 -1
- package/src/dev-traces.ts +16 -15
- package/src/document-options.ts +12 -1
- package/src/drift-store.ts +55 -0
- package/src/error-catalog.ts +8 -3
- package/src/error-codes-boundary.ts +32 -0
- package/src/error-codes.ts +23 -19
- package/src/errors.ts +17 -7
- package/src/exercise-database.ts +13 -1
- package/src/exercise-findings.ts +36 -18
- package/src/exercise-services.ts +84 -0
- package/src/exercise-subject.ts +38 -13
- package/src/failure-capture-boot.ts +9 -5
- package/src/framework-schema.ts +5 -5
- package/src/generate-exercise.ts +1 -1
- package/src/generate-files.ts +27 -7
- package/src/generate-kinds.ts +5 -0
- package/src/generate-refresh.ts +53 -0
- package/src/generate-workspace.ts +169 -0
- package/src/generate-write.ts +8 -2
- package/src/hold.ts +19 -8
- package/src/image-prepare.ts +6 -2
- package/src/index.ts +5 -20
- package/src/island-bundle.ts +7 -3
- package/src/island-capture.ts +2 -2
- package/src/island-harness.ts +1 -1
- package/src/job-registration.ts +43 -6
- package/src/jobs-driver.ts +4 -5
- package/src/mcp-errors.ts +18 -4
- package/src/mcp-host.ts +5 -1
- package/src/mcp-ui-interact.ts +3 -0
- package/src/messages-gate.ts +4 -0
- package/src/new-shapes-generate.ts +1 -1
- package/src/otlp-export.ts +94 -29
- package/src/output.ts +3 -7
- package/src/page-sync.ts +3 -1
- package/src/role-load.ts +17 -11
- package/src/role-start.ts +5 -4
- package/src/role-sync.ts +7 -8
- package/src/route-islands-preload.ts +46 -0
- package/src/route-islands.ts +6 -2
- package/src/runtime-admin.ts +5 -1
- package/src/runtime-bindings.ts +25 -19
- package/src/runtime-boot-ports.ts +66 -0
- package/src/runtime-bus.ts +29 -5
- package/src/runtime-cache-bus.ts +53 -0
- package/src/runtime-cache.ts +43 -13
- package/src/runtime-isr-outcome.ts +5 -4
- package/src/runtime-jobs.ts +2 -2
- package/src/runtime-keys.ts +37 -0
- package/src/runtime-overrides.ts +148 -42
- package/src/runtime-port-bindings-queue.ts +36 -0
- package/src/runtime-port-bindings.ts +117 -0
- package/src/runtime-ports.ts +164 -0
- package/src/runtime-purge.ts +41 -28
- package/src/runtime-push.ts +7 -3
- package/src/runtime-queue.ts +70 -55
- package/src/runtime-realtime.ts +5 -5
- package/src/runtime-render-document.ts +4 -1
- package/src/runtime-services.ts +110 -158
- package/src/runtime-storage-boot.ts +111 -0
- package/src/runtime-storage-upload.ts +9 -7
- package/src/runtime-storage.ts +7 -1
- package/src/serve-boot.ts +8 -4
- package/src/serve-entry.ts +3 -0
- package/src/serve-env.ts +47 -14
- package/src/serve-prebuilt-paths.ts +3 -0
- package/src/serve-prebuilt.ts +15 -4
- package/src/serve.ts +2 -2
- package/src/static-cards.ts +3 -2
- package/src/static-report.ts +2 -2
- package/src/style-bundle.ts +1 -1
- package/src/sync-authenticator.ts +17 -18
- package/src/templates/action-tests.ts +4 -4
- package/src/templates/backfill.ts +5 -8
- package/src/templates/entity.ts +3 -0
- package/src/templates/github/ci.yml.ts +3 -1
- package/src/templates/github/dependabot.yml.ts +73 -0
- package/src/templates/job.ts +13 -22
- package/src/templates/naming.ts +20 -1
- package/src/templates/pinned/docker-compose.yml +1 -1
- package/src/templates/query.ts +7 -8
- package/src/templates/route.ts +5 -3
- package/src/templates/scaffold-api.ts +1 -1
- package/src/templates/scaffold-auth.ts +5 -3
- package/src/templates/scaffold-claude-commands.ts +6 -3
- package/src/templates/scaffold-claude.ts +4 -4
- package/src/templates/scaffold-container-compose.ts +2 -4
- package/src/templates/scaffold-domain-package.ts +1 -1
- package/src/templates/scaffold-entries.ts +6 -1
- package/src/templates/scaffold-helm-fences.ts +3 -2
- package/src/templates/scaffold-helm.ts +35 -6
- package/src/templates/scaffold-repo.ts +47 -135
- package/src/templates/scaffold-runtime-ports.ts +62 -0
- package/src/templates/scaffold-verify-floor.ts +97 -0
- package/src/templates/shapes/overlay.ts +1 -1
- package/src/templates/sign-in-oidc.ts +5 -3
- package/src/templates/sign-in-shared.ts +28 -10
- package/src/templates/workspace.ts +75 -0
- package/src/test-ignores.ts +5 -2
- package/src/test-select.ts +4 -1
- package/src/upgrade-gate.ts +30 -5
- package/src/upgrade-report.ts +7 -1
- package/src/verify-changed-facts.ts +53 -0
- package/src/verify-changed-scope.ts +161 -0
- package/src/verify-changed.ts +174 -0
- package/src/verify-checks.ts +31 -19
- package/src/verify-drift-owner.ts +30 -0
- package/src/verify-e2e.ts +2 -1
- package/src/verify-factories.ts +86 -0
- package/src/verify-run.ts +13 -11
- package/src/verify-step.ts +13 -0
- package/src/verify-tests.ts +58 -6
- package/src/write-line.ts +21 -6
- package/wiki/Actions.md +2 -2
- package/wiki/Adapters.md +400 -0
- package/wiki/Admin-Dashboard.md +2 -1
- package/wiki/Agents.md +9 -9
- package/wiki/Auth.md +78 -2
- package/wiki/Building-Your-Own-Base.md +1 -1
- package/wiki/CLI-Reference.md +34 -7
- package/wiki/Caching-And-Invalidation.md +17 -5
- package/wiki/Compared.md +8 -2
- package/wiki/Configuration.md +14 -14
- package/wiki/Deployment.md +28 -1
- package/wiki/Entities-And-Migrations.md +48 -2
- package/wiki/FAQ.md +8 -2
- package/wiki/Feature-Flags.md +1 -1
- package/wiki/Home.md +3 -2
- package/wiki/Jobs-And-Workflows.md +107 -6
- package/wiki/Known-Gaps.md +4 -3
- package/wiki/MCP-And-AI.md +18 -4
- package/wiki/Mail.md +14 -5
- package/wiki/Migrations-And-Backfills.md +31 -4
- package/wiki/Money.md +2 -0
- package/wiki/N-Plus-One-Detection.md +24 -22
- package/wiki/Notify.md +28 -4
- package/wiki/Observability.md +121 -15
- package/wiki/Queries-And-Live-Queries.md +2 -2
- package/wiki/Realtime.md +9 -4
- package/wiki/Routes-And-Render-Modes.md +5 -0
- package/wiki/Scraping.md +57 -11
- package/wiki/Shapes.md +2 -2
- package/wiki/Stability.md +7 -5
- package/wiki/Storage-And-Uploads.md +56 -4
- package/wiki/Testing.md +69 -56
- package/wiki/Troubleshooting.md +1 -1
- package/wiki/Tutorial-01-First-App.md +1 -1
- package/wiki/Tutorial-04-Jobs-And-Realtime.md +1 -1
- package/wiki/Tutorial-05-Deploy-Free.md +1 -1
- package/wiki/Tutorial-06-Growing-Up.md +8 -8
- package/wiki/Upgrading.md +129 -4
package/wiki/CLI-Reference.md
CHANGED
|
@@ -33,7 +33,7 @@ x version # CLI version
|
|
|
33
33
|
| `x stop [--timeout 30s]` | stop this checkout's `x dev` (the pid its `.x/dev.lock` names, nothing else) and return once the next `x dev` can boot | shipped |
|
|
34
34
|
| `x g <kind> <name>` | scaffold a primitive with its test | shipped |
|
|
35
35
|
| `x db <sub>` | gen, migrate, reset, seed, studio, branch, backfill, diagnostics | shipped |
|
|
36
|
-
| `x verify [--only <step>[,<step>…] [--shard i/n [--timings f]]] [--workers N] [--isolate]` · `x verify merge <part.json…>` | the gate — 21 steps, in this order: typecheck, lint, boundaries, filesize, package-shape, errors, unit, contract, live, job, exercise, e2e, eval, drift, contract-diff, budgets, seo, i18n, policy, manifest, roadmap. `--only <step>[,<step>…]` runs the named steps, in one process and in gate order, for an iteration loop and announces `NOT A GATE RUN` in the summary and in `--json` (`data.notAGateRun`, `data.only` — always a list), writing no floor file; an unknown name is refused with every valid name and the nearest match. **The gate is this command with no flag.** There is no `--skip` | shipped |
|
|
36
|
+
| `x verify [--only <step>[,<step>…] [--shard i/n [--timings f]] \| --changed [--base <ref>] [--dirty]] [--workers N] [--isolate]` · `x verify merge <part.json…>` | the gate — 21 steps, in this order: typecheck, lint, boundaries, filesize, package-shape, errors, unit, contract, live, job, exercise, e2e, eval, drift, contract-diff, budgets, seo, i18n, policy, manifest, roadmap. `--only <step>[,<step>…]` runs the named steps, in one process and in gate order, for an iteration loop and announces `NOT A GATE RUN` in the summary and in `--json` (`data.notAGateRun`, `data.only` — always a list), writing no floor file; an unknown name is refused with every valid name and the nearest match. **The gate is this command with no flag.** There is no `--skip` | shipped |
|
|
37
37
|
| `x env [check\|example\|init]` | validate the process env against `envSchema`, regenerate `.env.example` from it, or write `.env.production` (`init --production`) | shipped |
|
|
38
38
|
| `x secrets <sub>` | the committed encrypted secrets file: show, init, edit, set, rotate | shipped |
|
|
39
39
|
| `x auth seal-mfa` | one-shot: seal every second-factor secret still stored in the clear | shipped |
|
|
@@ -273,7 +273,7 @@ rather than rendering an empty one as an answer.
|
|
|
273
273
|
| Env | Unset means | Set means |
|
|
274
274
|
|---|---|---|
|
|
275
275
|
| `DATABASE_URL` | PGlite in this process | that Postgres |
|
|
276
|
-
|
|
|
276
|
+
| `NATS_URL` | in-process fanout | that NATS server — set, it is the bus for every role; a bus of the app's own is `transport` in `export const runtime = { … }` in `apps/<app>/runtime.ts` instead |
|
|
277
277
|
| `NATS_KV_BUCKET` | the KV bucket `x_presence` | that bucket — one per app on a shared cluster |
|
|
278
278
|
| `S3_ENDPOINT` | `.x/storage` on disk | that S3 |
|
|
279
279
|
|
|
@@ -320,14 +320,18 @@ x g admin:page <name> --permission <perm> [--at <dir>] # a custom admin screen
|
|
|
320
320
|
x g guard <name> # a convention this app enforces, as a build error
|
|
321
321
|
x g sign-in --password | --oidc <provider> # the app's one sign-in: pages, actions, boot guard
|
|
322
322
|
x g chart-alerts [--print] # the chart's ServiceMonitor + alert rules, backfilled
|
|
323
|
+
x g app <name> # one more app workspace: apps/<name>/
|
|
324
|
+
x g package <name> # one more shared package: packages/<name>/
|
|
323
325
|
```
|
|
324
326
|
|
|
327
|
+
**`x g app <name>` / `x g package <name>`** (`As of 2026-11`) add a workspace to the monorepo: `apps/<name>/` (`package.json` + `tsconfig.json`) or `packages/<name>/` (manifest, README, `src/index.ts` and its test), named `@<scope>/<name>` with the scope read off the root `package.json` (`@acme/root` → `acme`). Nothing outside the new directory is edited: the root `workspaces` globs and tsconfig alias already reach it. A name the other kind already holds is `X_WORKSPACE_NAME_TAKEN` (both would install as `@<scope>/<name>`); one the same kind holds is `X_GENERATE_CONFLICT`. The run prints `bun install` then `bunx x verify --changed --dirty` (`data.next`). A workspace is no slice: it reads `--force` and `--dry-run` only, and any other `x g` flag (`--feature`, `--surface`, `--live`, `--admin`, `--locales`, `--at`, `--app`, `--permission`) is `X_CLI_BAD_FLAG`, fix the same run without it.
|
|
328
|
+
|
|
325
329
|
**`x g sign-in`** (`As of 2026-11`) is what a deployed scaffold needs to issue a session: before it, a production `web` role answered every policy-protected route `401` (`packages/cli/e2e/sign-in.e2e.test.ts` proves the after). Exactly one of the two flags, and no `<name>` — an app has one sign-in; anything else is `X_CLI_BAD_FLAG`, and so is any other `x g` flag it would ignore (`--feature`, `--surface`, `--at`, `--permission`, `--live`, `--admin`), and either flag on another generator. Its keys land in every catalog the app ships, or the ones `--locales` names, as every other generator's do. The auth slice lands under `apps/web/app/auth/` beside `x new`'s `auth.ts`, plus `apps/web/runtime.ts` and the edits in the last column. A dry run lists the deletions in `data.removed`, apart from `data.files`; a real run reports them under the same key:
|
|
326
330
|
|
|
327
331
|
| Shape | Writes | Also edits |
|
|
328
332
|
|---|---|---|
|
|
329
333
|
| `--password` | `sign-in/page.tsx` (a native form, 0 kB) posting to `createSession` over `login()`; `sign-in/second-factor/page.tsx` posting to `confirmSession` over `completeMfa()` (the sealed challenge travels in an HttpOnly cookie); `destroySession` over `logout()` + `signOutHeaders()`; `sign-in-guard.ts`; `apps/web/runtime.ts` — 22 files on a dry run in the default scaffold, 24 after setup | `apps/web/api/index.ts` (the three actions), `app.config.ts` (`auth: { signInPath: '/auth/sign-in' }`), the catalogs |
|
|
330
|
-
| `--oidc <provider>` | `oidc.ts` — `discoverOAuthProvider` on the FIRST sign-in, never at import — and `sign-in-routes.ts`, the `oauthLogin` legs on `runtime.routes`; the sign-in page (one link to `/auth/
|
|
334
|
+
| `--oidc <provider>` | `oidc.ts` — `discoverOAuthProvider` on the FIRST sign-in, never at import — and `sign-in-routes.ts`, the `oauthLogin` legs on `runtime.routes`; the sign-in page (one link to `/auth/sso/<provider>`); `destroySession`; the guard — 20 files on a dry run (plus the two in `data.removed`), 22 after setup | as above, plus `<PROVIDER>_ISSUER`, `_CLIENT_ID`, `_CLIENT_SECRET` in `envSchema`; and **the authenticator swap**: `authenticator.ts` loses the development fallback and `dev-actor.ts` is deleted, only while all four files are byte-for-byte what `x new` wrote — an edited one is an `X_GENERATE_CONFLICT` finding naming the line to delete by hand |
|
|
331
335
|
|
|
332
336
|
The boot guard is generated, app-owned: `apps/web/runtime.ts` calls `assertSignInConfigured(process.env)` before the boot binds a port, and outside `development`/`test` a `web` or `sync` role with a sign-in key unset refuses to start — `X_AUTH_SIGN_IN_UNCONFIGURED`, fix `export <KEY>="<value>"` in the role's deployed environment, then restart it (`x env example` lists the keys). The keys: `ULTIMATE_SECRETS_KEY` for `--password` (it seals the second-factor challenge); the provider's three plus `SESSION_SECRET` and `APP_URL` for `--oidc`. A second `x g sign-in` is `X_GENERATE_CONFLICT` and writes nothing. `--password` keeps the development viewer: it ships no sign-up page, so the first user is `register(appAuth(), { email, password, orgId, roles })`. An app that already has an `apps/web/runtime.ts` is that conflict too — merge the two `runtime` objects by hand.
|
|
333
337
|
|
|
@@ -346,6 +350,7 @@ is a word (`a-z`, `0-9`, `-`, `_`) or `[param]` / `[...rest]`; `..`, `.` and emp
|
|
|
346
350
|
|---|---|---|---|
|
|
347
351
|
| `--feature` | string | derived from the name | feature slice to write into. Not for `resource`: its name IS the slice (`app/<name>/`, page at `app/<names>/`), and a `--feature` naming anything else is `X_CLI_BAD_FLAG` |
|
|
348
352
|
| `--surface` | string | `app` | `site` or `app` |
|
|
353
|
+
| `--app` | string | `web` | `route`, `island`, `query` only: the app workspace under `apps/` the files land in (`x g route reports --app admin` → `apps/admin/app/reports/page.tsx`). An app that is not there is `X_CLI_BAD_FLAG`, fix `x g app <app>`; any other generator registers in files only `apps/web` holds (API index, roles, exercise file, db handle) and refuses it, fix the same run without the flag |
|
|
349
354
|
| `--permission` | string | `<name>:read` | `admin:page` only: the permission the page's own work needs, on top of the frame's `admin:read`. A `<resource>:<verb>`, or namespaced with more segments (`admin:blog:write`, `As of 27.6.2` — one colon exactly was required, which refused every `admin:<area>:<verb>` a staff console declares); an empty segment, a space or a quote is `X_CLI_BAD_FLAG` before a file is written — the value reaches the emitted source three times and `Permission` is `${string}:${string}` |
|
|
350
355
|
| `--live` | boolean | `false` | `query` only: make it subscribable. On any other generator it is `X_CLI_BAD_FLAG` naming the `x g query … --live` to run instead |
|
|
351
356
|
| `--admin` | boolean | `false` | `resource` only: also emit the per-entity admin override **and list it** under `resources:` in `apps/admin/app/admin/admin.ts`. The screen itself needs no flag — an entity in the handle is an admin screen |
|
|
@@ -593,10 +598,29 @@ Errors, backfill: `X_BACKFILL_PENDING` (`--pending`, and the only one that is no
|
|
|
593
598
|
## x verify
|
|
594
599
|
|
|
595
600
|
```bash
|
|
596
|
-
x verify [--only <step>[,<step>…] [--shard i/n [--timings file]]] [--workers N] [--isolate] [--json]
|
|
601
|
+
x verify [--only <step>[,<step>…] [--shard i/n [--timings file]] | --changed [--base <ref>] [--dirty]] [--workers N] [--isolate] [--json]
|
|
597
602
|
x verify merge <part.json…> [--json]
|
|
598
603
|
```
|
|
599
604
|
|
|
605
|
+
**`--changed`**, `As of 31.0` — the steps whose inputs the diff touches, NOT A GATE RUN like `--only`
|
|
606
|
+
and never beside it (`X_CLI_BAD_FLAG`). The diff is `x affected`'s: `<base>...HEAD`, `--base` default
|
|
607
|
+
`main`, `--dirty` adds uncommitted and untracked work. Each file gets one rule, each rule selects
|
|
608
|
+
steps; `data.changed` carries `{ base, dirty, files: [{ path, rule }], steps: [{ name, files }] }` and
|
|
609
|
+
the human render one `step ← files` line per step. Fail-open: a path no rule speaks for runs the gate.
|
|
610
|
+
Each suite but `eval` then runs only the test files the diff's import closure reaches — `x test
|
|
611
|
+
--affected`'s selection, `data.changed.tests` — a suite none of them belongs to is dropped, and the
|
|
612
|
+
`unit` coverage floor is not judged on the subset; a file the import graph cannot speak for (a root
|
|
613
|
+
config, a catalog) runs every test.
|
|
614
|
+
|
|
615
|
+
| rule | files | steps |
|
|
616
|
+
|---|---|---|
|
|
617
|
+
| `doc` | `*.md`, `docs/`, `wiki/` | package-shape, errors, unit, manifest, roadmap |
|
|
618
|
+
| `test` | `*.test.ts(x)`, `e2e/` | typecheck, lint, filesize, package-shape, errors + the suite that owns the file |
|
|
619
|
+
| `generated` | `x.manifest.json` | lint, contract-diff, manifest |
|
|
620
|
+
| `source` | `apps/`, `packages/`, `guards/`, `scripts/`, `types/`, `bin/` | every step but `drift` |
|
|
621
|
+
| `drift-input` | `packages/db/**`, `apps/*/clients/**`, `openapi.json`, any module importing `@ultimat3/entity` and everything it imports | every step |
|
|
622
|
+
| `root-config` · `deleted` · `unknown` · `outside` | a root file, any `app.config.ts`, a vanished module, another directory, a path outside the app | every step |
|
|
623
|
+
|
|
600
624
|
**`As of 22.7`** — the width is a memory budget (`max(2.75 GiB, 25% of RAM)` at 1.25 GiB a worker — no fixed 4 GiB cap since 2026-11-07,
|
|
601
625
|
at most one per core, printed on the step line; `ULTIMATE_TEST_MEMORY_BUDGET` /
|
|
602
626
|
`ULTIMATE_TEST_MAX_WORKERS` override, `--workers` wins), shared machine-wide across concurrent runs,
|
|
@@ -1340,7 +1364,9 @@ effects, ms, override? }`. A `<name>` runs that one primitive; an unknown name i
|
|
|
1340
1364
|
`X_DECLARATION_UNKNOWN`.
|
|
1341
1365
|
|
|
1342
1366
|
`unreached` is red: `X_CONTRACT_EXERCISE_UNREACHED`, and its `fix:` is the entry to paste into
|
|
1343
|
-
`apps/web/exercise.ts` — the
|
|
1367
|
+
`apps/web/exercise.ts` — valid TS naming the actor the pass ran as (`testActor(…).actor`, imported
|
|
1368
|
+
from `@ultimat3/policy`) and the seeded row each id field was bound to (`As of 2026-11`). The
|
|
1369
|
+
`exercise` option `.contract()` takes, one shape:
|
|
1344
1370
|
|
|
1345
1371
|
```ts
|
|
1346
1372
|
import type { Actor } from '@ultimat3/core';
|
|
@@ -1528,7 +1554,7 @@ One major per run, so each hop's gate attributes its red to that hop. `As of 30.
|
|
|
1528
1554
|
| 3 | `bun pm view @ultimat3/cli versions`: the next major's newest; the last major's newest when no later major exists | `X_UPGRADE_REGISTRY_UNREACHABLE`, `X_UPGRADE_HOP_TOO_WIDE`, `X_UPGRADE_VERSION_UNPUBLISHED`, `X_BUN_VERSION` |
|
|
1529
1555
|
| 4 | write exact pins, raise the Bun floor | — |
|
|
1530
1556
|
| 5 | `bun install` | `X_UPGRADE_INSTALL_FAILED`, `fix:` carries the undo |
|
|
1531
|
-
| 6 | the installed CLI: `x manifest`, `x doctor --json`, `x verify --json` | `X_UPGRADE_GATE_UNREADABLE`, as a finding on a red hop |
|
|
1557
|
+
| 6 | the installed CLI: `x manifest`, `x doctor --json`, `x exercise --json`, `x verify --json` | `X_UPGRADE_GATE_UNREADABLE`, as a finding on a red hop |
|
|
1532
1558
|
|
|
1533
1559
|
A dry run refuses exactly what the real run would, then stops before step 4. It never commits; `git diff` is the hop. Under `--json` fd 1 is one document, fd 2 a `{"upgrade":"<stage>"}` line per stage and a heartbeat a minute.
|
|
1534
1560
|
|
|
@@ -1548,10 +1574,11 @@ A dry run refuses exactly what the real run would, then stops before step 4. It
|
|
|
1548
1574
|
| `agentsMd` | `link`: `AGENTS.md` was byte-identical to `CLAUDE.md` and the hop makes it a relative symlink to it · `linked`: already one · `differs`: two different files, left alone; merge what only `AGENTS.md` says into `CLAUDE.md`, then `ln -sf CLAUDE.md AGENTS.md` · `none`: one of the two is missing · `null`: no hop planned |
|
|
1549
1575
|
| `guards` | `{ reported, missing[], differs[] }` from the hop's own `x doctor`. Offered, never overwritten: `x g guard <name> --force` is yours. `reported: false` is a CLI too old to list them, which is not the same as none |
|
|
1550
1576
|
| `manifest` | `{ ok, findings[] }`. A failure does not stop the gate |
|
|
1577
|
+
| `exercise` | `{ reported, ok, findings[] }` from the hop's own `x exercise --json`, listed (and printed) before the gate's findings; each `fix` pastes as written. `reported: false`: the hop's CLI answered no exercise document — unknown, never a finding |
|
|
1551
1578
|
| `verify` | `{ ok, summary, failed[], findings[] }`, each finding `{ step?, code, cause, fix, at? }` |
|
|
1552
1579
|
| `then` | the next thing to do, in a sentence naming the commands |
|
|
1553
1580
|
|
|
1554
|
-
`null` for `guards`, `manifest` and `verify` means no gate ran: a dry run, already there, or no app.
|
|
1581
|
+
`null` for `guards`, `manifest`, `exercise` and `verify` means no gate ran: a dry run, already there, or no app.
|
|
1555
1582
|
|
|
1556
1583
|
**Pins and no `app.config.ts`.** Needs no app: the root is the app at or above the cwd, else the nearest manifest holding `@ultimat3/*` pins, or the workspace root claiming it. No such manifest is `X_UPGRADE_PIN_UNREADABLE`; an app below that root is `X_NOT_IN_APP`, with the `cd`. With no app, `x manifest`, `x doctor` and `x verify` cannot run, so the hop runs the `typecheck` and `test` scripts the root declares: `data.scripts[]` is `{ name, ok, code, output }`, `proof` is `scripts`, and the summary says no `x verify` ran. Neither script declared: `proof: none`, `done: false`, red. It checked nothing, so it never claims otherwise.
|
|
1557
1584
|
|
|
@@ -80,7 +80,7 @@ export const publishPost = action({
|
|
|
80
80
|
|---|---|---|
|
|
81
81
|
| Tier 1 request memo | drop entries carrying the tag | immediate, same request |
|
|
82
82
|
| Tier 2 in-process LRU (**all instances**) | tag-invalidation message on NATS | ~ms, best-effort; a missed message costs a stale read until TTL, never a wrong write |
|
|
83
|
-
| Tier 3 Redis | `
|
|
83
|
+
| Tier 3 Redis | paged `ZSCAN` over the tag's sorted set, `UNLINK` per value key, `ZREM` of what died | immediate, inside the fan-out; 10k keys in 25 round trips |
|
|
84
84
|
| ISR pages | routes whose `revalidate.tags` include the tag are marked stale → regenerated in background | next request serves stale, regen enqueued as a job |
|
|
85
85
|
| CDN | purge by surrogate key through the configured `PurgeDriver` — a row bust purges `post:1` and `post`, a collection bust `e:post` and `post` | seconds; `stale-while-revalidate` covers the gap |
|
|
86
86
|
| Live queries | the same commit already flows through logical replication | **independent path** — realtime does not depend on cache invalidation |
|
|
@@ -88,6 +88,18 @@ export const publishPost = action({
|
|
|
88
88
|
Fan-out runs **after the handler resolves, in the same call** — `bustAfterCommit` awaits `invalidateTags()` directly (`packages/action/src/cache-gate.ts`), never through the outbox `As of 2026-08`. A handler that throws never reaches it, so a rolled-back write never purges; a process that dies between the commit and the fan-out leaves those entries until their TTL. An action invoked **inside `withTransaction`** — an app's own unit of work, or another action's — hands the fan-out to the root transaction's `onCommit` instead `As of 2026-10-02`: it runs once the root `COMMIT` is answered and never for a rollback, so a concurrent read cannot refill an entry from rows that are not yet durable.
|
|
89
89
|
|
|
90
90
|
> **Tier 3 invalidation is slot-local as of 2.0.0, and was not through 1.2.0.** The Lua script `DEL`ed keys it never declared in `KEYS`, which single-node Redis tolerates and **Dragonfly and Redis Cluster reject** — a cluster cannot route a key it was not told about. The script now returns the member list and the tier deletes the value keys client-side, one key per `DEL`, so every delete is slot-local. On 1.2.0 and earlier: use single-node Redis, or drop the shared tier → [Known gaps](Known-Gaps).
|
|
91
|
+
>
|
|
92
|
+
> **As of 31.0.0 a bust runs no script at all**, and every command names one key. Tag buckets are sorted sets (`t2:`/`e2:`) scored by the member's expiry plus 60 s; every write prunes members past their score, so a bucket holds live keys only. Before, only a bust removed members: an entity written constantly and never invalidated collected every key it ever wrote, and its first bust read millions in one reply. A value over `redisTier({ maxValueBytes })` (1 MiB) is refused with `X_CACHE_TOO_LARGE`.
|
|
93
|
+
|
|
94
|
+
**Across replicas without NATS.** `As of 2026-11-09`. The tier-2 message rides whichever bus reaches the other processes, decided once at boot ([`runtime-cache-bus.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/runtime-cache-bus.ts)):
|
|
95
|
+
|
|
96
|
+
| Configured | Invalidations ride | `cache.broadcast` log line |
|
|
97
|
+
|---|---|---|
|
|
98
|
+
| `NATS_URL`, or a `transport` in `runtime.ts` | that transport | `bus: 'nats'` (the transport's name) |
|
|
99
|
+
| no NATS, `REDIS_URL` (else `VALKEY_URL`) | Redis pub/sub (`redisPubSubAt`) | `bus: 'redis', source: 'REDIS_URL'` |
|
|
100
|
+
| neither | the in-process bus: this replica only | `bus: 'in-process'` |
|
|
101
|
+
|
|
102
|
+
Never both: a second hop beside NATS would deliver every bust twice through two systems that fail independently. A replica whose Redis subscription dropped flushes its own tiers on reconnect rather than serve what it may have missed. This is what makes rung 1 of the [scale ladder](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/17-scale-ladder.md) — roles split, Redis, no NATS — safe with two web replicas.
|
|
91
103
|
|
|
92
104
|
There is exactly one fan-out entry point in the implementation (`invalidateTags()`); no caller reaches a tier directly. Tier failures are collected into an invalidation report — **a cache tier may never fail a business write.**
|
|
93
105
|
|
|
@@ -121,9 +133,9 @@ still live fails its joiners too.
|
|
|
121
133
|
| stopped | refused at once → a miss | refused at once → `report.errors`; the same tags again once it answers |
|
|
122
134
|
| restarted | every pod reconnects on its own, no restart | answers |
|
|
123
135
|
|
|
124
|
-
A missed deadline or a park is `
|
|
136
|
+
A missed deadline or a park is a `cache.tier_failure` event with `X_CACHE_DRIVER_UNAVAILABLE`; a stopped server's refusal is recorded with Bun's `ERR_REDIS_CONNECTION_CLOSED` message and no `code`. While the store is gone each pod still collapses its own concurrent misses to one `load()`; across pods, Postgres takes one load per pod per key — the rung's known cost. The jobs queue on the same client refuses an enqueue with `X_DRIVER_UNAVAILABLE` instead of waiting ([Jobs](Jobs-And-Workflows)).
|
|
125
137
|
|
|
126
|
-
The read ladder keeps the same rule with no report to hand back: a tier that throws on `get`, `set` or `del` is a tier that did not answer, so the walk continues and the source is still returned. A value too large for the in-process LRU (`X_CACHE_TOO_LARGE`) costs the entry, never the read. Every absorbed refusal
|
|
138
|
+
The read ladder keeps the same rule with no report to hand back: a tier that throws on `get`, `set` or `del` is a tier that did not answer, so the walk continues and the source is still returned. A value too large for the in-process LRU or the Redis tier (`X_CACHE_TOO_LARGE`) costs the entry, never the read. Every absorbed refusal is one `cache.tier_failure` event on core's instrumentation bus — `subscribe('cache.tier_failure', …)`, carrying the tier, the operation, the key and the `X_*` code — plus one `cache.tier.failed` warn; a subscriber that throws is contained by the bus and logged once, never the read's failure. Every rung a read asks is a `cache.hit` or `cache.miss` event, and every bust a `cache.invalidate` event. `As of 2026-11` (v31). The one call left to throw is the load itself: it *is* the business read.
|
|
127
139
|
|
|
128
140
|
## Failure modes removed
|
|
129
141
|
|
|
@@ -237,7 +249,7 @@ Today: `x dev` then the `/_x` cache panel, and `invalidateTags([...])` from `@ul
|
|
|
237
249
|
|---|---|---|
|
|
238
250
|
| `X_CACHE_UNTAGGED_QUERY` | **reserved, nothing raises it** `As of 2026-08` — a query's tables are covered by no tag, so it could never be invalidated ([Error codes → Reserved codes](Error-Codes#reserved-codes)) | declare the entity tag, then `x manifest` |
|
|
239
251
|
| `X_CACHE_TAG_UNKNOWN` | `tag "<name>" is not declared by any entity` | `x manifest` |
|
|
240
|
-
| `X_CACHE_TOO_LARGE` | `entry "<key>" is <n>B, over the <tier> budget of <m>B` | `
|
|
252
|
+
| `X_CACHE_TOO_LARGE` | `entry "<key>" is <n>B, over the <tier> budget of <m>B` | `lruTier({ maxBytes: <n> })` / `redisTier({ maxValueBytes: <n> })` where the tier is built, or cache a projection instead of the row |
|
|
241
253
|
| `X_CACHE_DRIVER_UNAVAILABLE` | `cache tier "<driver>" is unavailable` — a Redis command missed its deadline, or the tier is parked after one; or a purge driver built without its token | the error carries the exact config or command to fix |
|
|
242
254
|
| `X_CACHE_PURGE_FAILED` | `<driver> refused the purge (HTTP <status>)` — a wrong token, a zone without tag purge, a throttle, or a key a CDN would split | `meta.retryable === true` → the identical purge can land again; otherwise set the env key the `fix` names |
|
|
243
255
|
|
|
@@ -251,5 +263,5 @@ Verbatim shapes: [`packages/cache/src/errors.ts`](https://github.com/developerz-
|
|
|
251
263
|
- `flushAll` has no shipped caller: `x cache clear` is planned, and there is no runtime API for it.
|
|
252
264
|
- Cache misses must be correct and merely slower — no code path may depend on a hit.
|
|
253
265
|
- Prefer `tag.post.id(x)` over `tag.post`. Narrow eviction is the default, not an optimization.
|
|
254
|
-
- A cache tier may never fail a business read or write. Tier errors land in the invalidation report, or in `
|
|
266
|
+
- A cache tier may never fail a business read or write. Tier errors land in the invalidation report, or in a `cache.tier_failure` event on the read ladder.
|
|
255
267
|
- Realtime is not a cache tier. Live queries flow from logical replication on their own path ([Realtime](Realtime)).
|
package/wiki/Compared.md
CHANGED
|
@@ -13,13 +13,19 @@ point the harness at yours.
|
|
|
13
13
|
| any runtime but Bun | `non_goals` in `.dz/maintainer/maintainer.yml`; [FAQ](FAQ) |
|
|
14
14
|
| any database but Postgres | the same list; [Home](Home) |
|
|
15
15
|
| any renderer but SolidJS | the same list; [Routes and render modes](Routes-And-Render-Modes) |
|
|
16
|
-
| a long track record: released in 2026
|
|
17
|
-
| a slow major cadence: from
|
|
16
|
+
| a long track record: released in 2026; who builds on it is stated below | [FAQ](FAQ#is-it-production-ready) |
|
|
17
|
+
| a slow major cadence: from v31, at most one major per 90 days | [Stability](Stability) |
|
|
18
18
|
| a third-party security audit: there has been none | [`SECURITY.md`](https://github.com/developerz-ai/ultimate/blob/main/SECURITY.md) |
|
|
19
19
|
| a plugin API: an app wraps a primitive instead | [Home](Home) |
|
|
20
20
|
| a serverless or edge target: containers only | [Deployment](Deployment) |
|
|
21
21
|
| everything on the open list | [Known gaps](Known-Gaps) |
|
|
22
22
|
|
|
23
|
+
Who uses it:
|
|
24
|
+
|
|
25
|
+
<!-- generated: production-apps — bun run scripts/production-apps.ts --write -->
|
|
26
|
+
9 apps outside this repository build on Ultimate, small to medium in size; at least 1 of them serves production traffic. Owner-reported, `As of 2026-11`: adopters are never named (`scripts/private-names.ts` refuses a name in the tree), so no command here re-derives this line.
|
|
27
|
+
<!-- end generated -->
|
|
28
|
+
|
|
23
29
|
## Measured, and how to reproduce it
|
|
24
30
|
|
|
25
31
|
One local run on an 8-core laptop, `As of 2026-11-06`, not yet a CI figure; the method, the box and
|
package/wiki/Configuration.md
CHANGED
|
@@ -23,7 +23,7 @@ export const config = defineConfig({
|
|
|
23
23
|
// The tiers ARE the selection: naming `redis` is what builds the shared rung, and it reads
|
|
24
24
|
// `REDIS_URL` — there is no second `driver` field to agree with, and no env key to name.
|
|
25
25
|
cache: { tiers: ['request-memo', 'lru', 'redis'] },
|
|
26
|
-
jobs: { queues: ['
|
|
26
|
+
jobs: { queues: ['default'], concurrency: 8 },
|
|
27
27
|
pwa: { enabled: true, offline: { fallback: '/offline' } },
|
|
28
28
|
});
|
|
29
29
|
```
|
|
@@ -117,7 +117,7 @@ await withReplicaReads(async () => {
|
|
|
117
117
|
| `limiter` / `orgLimiter` | `AuthLimiter` | omitted means one process' worth of state, i.e. `maxAttempts × N` for N replicas. An attempt is reserved before the KDF (`reserve` / `refund`), never checked and recorded after it |
|
|
118
118
|
| `mfa` | `Partial<AuthMfaPolicy>` | `required` is typed `false` and cannot be set true: both credential paths branch on `user.mfaSecret`, so a user who never enrolled would be locked out for good |
|
|
119
119
|
| `totpReplay` | `TotpReplayGuard` | which TOTP steps are spent, one atomic `claim(subject, step, at)`, called by `completeMfa`. Omitted means the guard the host installed: a framework boot's is `postgresTotpReplayGuard` (`x_totp_steps`), so a code is single-use across the fleet. With no host, `memoryTotpReplayGuard()`, single-use per replica. A guard with no `claim` is `X_CONFIG_INVALID` |
|
|
120
|
-
| `providers` | `OAuthProviderId[]` | **defaults to `[]`**, `As of 2026-08-23` — an empty list is "no OAuth", and every `/auth/
|
|
120
|
+
| `providers` | `OAuthProviderId[]` | **defaults to `[]`**, `As of 2026-08-23` — an empty list is "no OAuth", and every `/auth/sso/<id>` answers `X_OAUTH_PROVIDER_UNKNOWN`. Never the live registry: that would let any dependency that calls `registerOAuthProvider` turn on a login route this app never enabled |
|
|
121
121
|
| `link` | `OAuthLinkPolicy` | defaults to `'verified-email'` |
|
|
122
122
|
| `passkeys` | `PasskeyPolicyInput` | `{ rpId, origins, rpName?, challengeTtlMs? }` (`As of 2026-11`): the relying party every WebAuthn ceremony verifies against. `rpId` a bare lowercase host, never a URL or an IP; each origin exact (`URL.origin` round-trips it), https or `http://localhost`, on `rpId` or a subdomain; `challengeTtlMs` 5 min. Anything else is `X_CONFIG_INVALID` at `defineAuth`. Absent means no passkeys: `passkeyLogin(auth)` / `passkeyStepUp(auth)` refuse at definition ([Auth](Auth#passkeys)) |
|
|
123
123
|
|
|
@@ -127,8 +127,8 @@ There is no `auth.trustedOrigins` in either place, and passkeys are `defineAuth`
|
|
|
127
127
|
|
|
128
128
|
| field | type | default | notes |
|
|
129
129
|
|---|---|---|---|
|
|
130
|
-
| ~~`jobs.driver`~~ | — | — | **Deleted in 5.0.0.** It accepted `'postgres' \| 'redis' \| 'nats'` and was read by nothing: boot always built the Postgres driver, so `jobs: { driver: 'redis' }` did not throw, did not warn, and silently gave you Postgres. Which driver runs is `
|
|
131
|
-
| `jobs.queues` | `string[]` | `['
|
|
130
|
+
| ~~`jobs.driver`~~ | — | — | **Deleted in 5.0.0.** It accepted `'postgres' \| 'redis' \| 'nats'` and was read by nothing: boot always built the Postgres driver, so `jobs: { driver: 'redis' }` did not throw, did not warn, and silently gave you Postgres. Which driver runs is `jobs:` in `apps/<app>/runtime.ts` and only that — absent, the boot installs `postgresJobDriver()`; a test uses `installJobDriver(memoryJobDriver())` from `@ultimat3/jobs/adapter` ([Jobs and workflows](Jobs-And-Workflows)). Since 25.0.0 a config still writing it is refused at boot, `X_CONFIG_INVALID` naming that seam |
|
|
131
|
+
| `jobs.queues` | `string[]` | `['default']` | the queue a `job()` naming none lands on (`['<name>-default']` until 31.0.0). A `worker` serves these **and** every queue a registered `job()` is enqueued on (the union, so a job naming no queue is never stranded on `default`). A Deployment that sets [`WORKER_QUEUES`](#env-vars) serves exactly that list instead. Empty is `X_CONFIG_INVALID` |
|
|
132
132
|
| `jobs.concurrency` | `number \| Record<queue, number>` | `8` (`JOBS_CONCURRENCY_DEFAULT`) | slots per queue, per worker process. A number applies to every queue served; a table gives each its own (`{ banks: 4, 'banks-long': 2 }`), and a served queue the table does not name runs at `8`. `As of 25.0.0`. A count below 1 or not whole, an empty table or a blank queue name is `X_CONFIG_INVALID` naming the entry (`jobs.concurrency.banks`). An overlay's table replaces the base's whole |
|
|
133
133
|
| `jobs.maxInFlight` | `number` | unset (no process cap) | runs one worker **process** holds at once across every queue it serves — Sidekiq's `concurrency`; `jobs.concurrency` still bounds each queue under it. At the cap the worker claims nothing; each run that ends frees one claim, given to the next queue in turn that has work, so no queue starves. `jobWorker`'s `maxInFlight`. `As of 2026-10-28`. Not a whole number of at least 1: `X_CONFIG_INVALID` |
|
|
134
134
|
| `jobs.maxAttempts` | `number` | `5` | per-job `retry` overrides it |
|
|
@@ -152,15 +152,14 @@ Each worker then claims its list and nothing else. Every entry must be a queue t
|
|
|
152
152
|
|
|
153
153
|
## `realtime`
|
|
154
154
|
|
|
155
|
-
`RealtimeConfig` is
|
|
155
|
+
`RealtimeConfig` is four fields and no more `As of 2026-11-10` (31.0.0 removed `transport` and `urlEnv`) ([`packages/core/src/config.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/core/src/config.ts)):
|
|
156
156
|
|
|
157
157
|
| field | type | default | notes |
|
|
158
158
|
|---|---|---|---|
|
|
159
159
|
| `realtime.enabled` | `boolean` | `true` | **on by default since 22.0.0**, when the boot began obeying the key: an app with no `realtime` section keeps the `sync` node it always got. `enabled: false` is the opt-out — for an app that declares no `channel()` topic and no `live: true` query |
|
|
160
|
-
| `realtime.transport` | `'memory' \| 'nats' \| 'redis'` | `'memory'` | `memory` = in-process, single node, dev and small deploys. `redis` type-checks and is never built — `selectTransport` resolves in-process or NATS only |
|
|
161
|
-
| `realtime.urlEnv` | `string` | — | the **env key name**, never a URL. Required unless `memory`; missing → `X_CONFIG_INVALID` |
|
|
162
160
|
| `realtime.maxSubscriptionsPerActor` | `number` | unset = `1000` | live-query subscriptions one actor may hold on one `sync` node, **across all its sockets**. An anonymous socket counts against the client NETWORK resolved at the upgrade — an IPv4 address exactly, an IPv6 address by its /64, an IPv4-mapped IPv6 as its IPv4 (`TRUSTED_PROXY_HOPS` honoured, as `ctx.ip` is). Exceeded → `X_SUBSCRIPTION_LIMIT`, scope `actor`. A whole number ≥ 1, else `X_CONFIG_INVALID` |
|
|
163
161
|
| `realtime.maxSocketsPerActor` | `number` | unset = `16` | sockets one signed-in actor may hold on one `sync` node. An anonymous NETWORK (keyed exactly as above) gets **8 ×** this — 128 at the default — because it is often many people: one office behind a corporate NAT viewing a public live page. The next upgrade is refused before a socket exists: `429 X_SOCKET_LIMIT`. Closing a socket frees its slot. 16 × the per-socket 128 subscriptions passes the 1,000 above, so normal tabs hit neither. A whole number ≥ 1, else `X_CONFIG_INVALID` |
|
|
162
|
+
| `realtime.maxQueued` | `number` | unset = no ceiling | unsent writes the page's offline outbox holds before it refuses the next (`X_OFFLINE_QUEUE_FULL`; nothing queued is dropped). Rendered on every document as `<meta name="ultimate-outbox-max">`, read by realtime's page boot. A whole number ≥ 1, else `X_CONFIG_INVALID` |
|
|
164
163
|
|
|
165
164
|
**Behind a proxy, set `TRUSTED_PROXY_HOPS`.** An anonymous socket is keyed by the client network the upgrade resolved (IPv6 grouped by /64, so one host cannot rotate through its block for fresh budgets). With nothing trusted, that address is the proxy's own, so every anonymous visitor shares ONE 1,000-subscription and 128-socket budget — the same failure as the anonymous rate-limit bucket. A socket that names no actor and no address at all shares one `address:unknown` budget. That fails closed: those sockets are still bounded, just together.
|
|
166
165
|
|
|
@@ -171,7 +170,7 @@ Each worker then claims its list and nothing else. Every entry must be a queue t
|
|
|
171
170
|
export const config = defineConfig({ name: 'shop', realtime: { maxSubscriptionsPerActor: 200 } });
|
|
172
171
|
```
|
|
173
172
|
|
|
174
|
-
Since
|
|
173
|
+
Since 31.0.0 the transport is not config: `NATS_URL` set is NATS, unset is the in-process bus (one node — dev and small deploys). A bus of the app's own is `transport` in `export const runtime = { … }` in `apps/<app>/runtime.ts`. Both keys were removed: a `realtime.transport` or `realtime.urlEnv` left in `app.config.ts` is refused at boot ([Upgrading](Upgrading), 30 → 31 entry 32; [`17-scale-ladder.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/17-scale-ladder.md)).
|
|
175
174
|
|
|
176
175
|
**`realtime.tier` is gone**, `As of 2026-08-23` — the same shape as `jobs.driver` and
|
|
177
176
|
`realtime.heartbeatMs` before it. It accepted
|
|
@@ -195,7 +194,7 @@ is refused at boot since 25.0.0** (`realtime.heartbeatMs was removed in 4.0.0`,
|
|
|
195
194
|
`heartbeatMs` was silently kept at runtime and only `TS2353` caught it — never for an app that built
|
|
196
195
|
its config into a variable first.
|
|
197
196
|
|
|
198
|
-
**`realtime.limits.*`, `realtime.changeBuffer.*` and `realtime.drain.*` are not `app.config.ts` fields** `As of 2026-08-19`, and never were — `RealtimeConfig` is `{ enabled,
|
|
197
|
+
**`realtime.limits.*`, `realtime.changeBuffer.*` and `realtime.drain.*` are not `app.config.ts` fields** `As of 2026-08-19`, and never were — `RealtimeConfig` is `{ enabled, maxSubscriptionsPerActor, maxSocketsPerActor, maxQueued }` ([`packages/core/src/config.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/core/src/config.ts)). Writing one is a typecheck failure (`TS2353`, excess property on `Input<RealtimeConfig>`) and, since 25.0.0, a boot refusal (`X_CONFIG_INVALID`, the closed shape above) for a config the compiler never saw. The caps and the ring are **constructor options**, passed where the node is built:
|
|
199
198
|
|
|
200
199
|
| Option | Where | Default | Effect |
|
|
201
200
|
|---|---|---|---|
|
|
@@ -606,7 +605,7 @@ receives nothing.
|
|
|
606
605
|
|
|
607
606
|
**The sweep only runs against the Postgres inbox.** `postgresInboxStore` carries `purgeBefore`; the
|
|
608
607
|
memory inbox does not, and a boot that installed the memory one — or no inbox at all — sweeps
|
|
609
|
-
nothing and logs nothing. Installing the store is `
|
|
608
|
+
nothing and logs nothing. Installing the store is `notifyStores:` in `apps/<app>/runtime.ts`; the
|
|
610
609
|
framework applies the DDL either way.
|
|
611
610
|
|
|
612
611
|
**`x_notify_deliveries` has no config key**, deliberately. Its window is
|
|
@@ -695,7 +694,7 @@ production, never two.
|
|
|
695
694
|
|
|
696
695
|
```ts
|
|
697
696
|
// apps/web/runtime.ts
|
|
698
|
-
import type {
|
|
697
|
+
import type { RuntimeOverrides } from '@ultimat3/cli/serve';
|
|
699
698
|
import type { Middleware } from '@ultimat3/http';
|
|
700
699
|
|
|
701
700
|
// `ctx.headers` is merged into whatever response the route produces.
|
|
@@ -704,7 +703,7 @@ const servedBy: Middleware = (request, ctx, next) => {
|
|
|
704
703
|
return next(request, ctx);
|
|
705
704
|
};
|
|
706
705
|
|
|
707
|
-
export const runtime
|
|
706
|
+
export const runtime = { middleware: [servedBy] } satisfies RuntimeOverrides;
|
|
708
707
|
```
|
|
709
708
|
|
|
710
709
|
Every field is optional, and every field **replaces** the default the environment would have
|
|
@@ -722,7 +721,8 @@ picked — it never sits beside it. The type is `RuntimeOverrides` (`packages/cl
|
|
|
722
721
|
| `middleware` | nothing — prepended to the request pipeline, outermost first |
|
|
723
722
|
| `routes` | nothing — plain HTTP routes at paths no primitive projects to (an OAuth token endpoint, a feed with its own content type; every declared `webhookReceiver()`'s are mounted beside them without a line here), mounted after the framework's routes and before the pages, through the whole pipeline |
|
|
724
723
|
| `images` | `builtinImageDriver`, the `/media/*` transform |
|
|
725
|
-
|
|
724
|
+
|
|
725
|
+
The adapter ports (`ADAPTER_PORTS` in `@ultimat3/core`) are fields of the same object; `x new` writes each as a commented line. A `sync` socket is authenticated by the app's own `configureAuthenticator(fn, { credentialTtlMs })` — `syncAuthenticate` was deleted in 31.0.0.
|
|
726
726
|
|
|
727
727
|
### What middleware can and cannot see
|
|
728
728
|
|
|
@@ -770,7 +770,7 @@ Rules:
|
|
|
770
770
|
|---|---|
|
|
771
771
|
| Secrets are env or a mounted file | the framework never talks to a vendor secret API ([axiom 7](Home)) |
|
|
772
772
|
| `env.X` reads through `defineEnv`'s schema | a declared key that is missing or malformed is `X_ENV_MISSING` at boot, every offender in one error. A `process.env` read outside the schema is a lint error, never a runtime one |
|
|
773
|
-
| `X_CONFIG_INVALID` is env **and** `app.config.ts` | one code for a configuration that cannot boot: what `defineConfig`'s own validation throws — a bad locale or two spellings of one, an unknown time zone, a section or list of the wrong shape (`jobs: null`), a value outside its closed set (`roles`, `jobs.backoff`, `theme.defaultMode`), a switch that is not a boolean (`database.ssl: 'false'`), `jobs.concurrency < 1`, a
|
|
773
|
+
| `X_CONFIG_INVALID` is env **and** `app.config.ts` | one code for a configuration that cannot boot: what `defineConfig`'s own validation throws — a bad locale or two spellings of one, an unknown time zone, a section or list of the wrong shape (`jobs: null`), a value outside its closed set (`roles`, `jobs.backoff`, `theme.defaultMode`), a switch that is not a boolean (`database.ssl: 'false'`), `jobs.concurrency < 1`, a removed key such as `realtime.transport`, a `cache.tiers` entry the environment cannot supply — and any env **combination** no boot can resolve, thrown by the selector that reads it. Both CDN pairs or half a pair (`selectPurgeDriver`), more than one of `SMTP_URL` / `RESEND_API_KEY` / `SES_REGION`, or a transport with no `MAIL_FROM` (`selectMailDriver`), or `REPLICATION_URL` naming a different host, port or database than `DATABASE_URL` (`selectChangeFeed`) |
|
|
774
774
|
| `X_ENV_MISSING` is one key, `X_CONFIG_INVALID` is the shape | absent or malformed key → `X_ENV_MISSING` at the `defineEnv` gate. Keys that each parse but contradict each other → `X_CONFIG_INVALID`. The two never overlap |
|
|
775
775
|
| No runtime mutation | config is frozen after `defineConfig`; there is no `setConfig` |
|
|
776
776
|
| Same image, all environments | only env differs. That is what makes staging a real rehearsal ([Deployment](Deployment)) |
|
package/wiki/Deployment.md
CHANGED
|
@@ -31,6 +31,22 @@ ROLE=replicator myapp
|
|
|
31
31
|
|
|
32
32
|
`PORT` selects the bind port, default `3000`. Empty or whitespace falls back to the default; anything else must be an integer in 0–65535 or the process refuses with `X_PORT_INVALID` rather than quietly binding 3000 and failing the platform's health probe with nothing in the log that names the cause. The production entry is the scaffolded `apps/web/server.ts` → [CLI reference](CLI-Reference).
|
|
33
33
|
|
|
34
|
+
## One repository, one image
|
|
35
|
+
|
|
36
|
+
Rule: one repository is one app and one image. `As of 2026-11-09`. Every `apps/*` workspace (`web`, `admin`, `api`, …) boots into the one registry the root `app.config.ts` configures, and one image serves them all; `ROLE` chooses the process, never the app.
|
|
37
|
+
|
|
38
|
+
| Question | Answer |
|
|
39
|
+
|---|---|
|
|
40
|
+
| URLs across apps | merged into one route table; a clash is `X_ROUTE_DUPLICATE` |
|
|
41
|
+
| migrations | once, in `packages/db/migrations`, applied by `ROLE=migrate` |
|
|
42
|
+
| an image per app | not a shape: an `app.config.ts` inside a workspace is `X_APP_ROOT_NESTED` (the `drift` step) |
|
|
43
|
+
| shared code | `packages/<name>` (`x g package <name>`), which never imports an app (`X_BOUNDARY_PACKAGE_TO_APP`) |
|
|
44
|
+
| a new app | `x g app <name>`, reached as `@<app>/<name>/…` through the root tsconfig's one alias (`@<app>/*` → `packages/*/src`, then `apps/*`) |
|
|
45
|
+
| one app importing a sibling | allowed when its `package.json` declares it (`X_WORKSPACE_DEP_UNDECLARED`) — `apps/admin` projects `apps/web`'s API this way |
|
|
46
|
+
| the surface rules | hold across apps: a `site/` page importing another app's `app/` is `X_BOUNDARY_SITE_TO_APP`. The surface is the directory directly under `apps/<name>/`, so an app workspace may itself be named `api`, `site`, `app` or `shared` |
|
|
47
|
+
|
|
48
|
+
`x verify --changed` gates only what a diff reaches: a docs-only or test-only diff runs a handful of steps; `drift` runs only when an entity's import closure, `packages/db/**`, a generated client or `openapi.json` moved; each suite runs only the tests the diff's import closure reaches ([CLI reference](CLI-Reference)).
|
|
49
|
+
|
|
34
50
|
## Health endpoints
|
|
35
51
|
|
|
36
52
|
**Every serving role answers both.** `web` and `sync` on their HTTP server; `worker`, `scheduler` and `replicator` construct none and answer them on the metrics listener (`METRICS_PORT`, default 9090, `packages/cli/src/metrics-endpoint.ts`) with the verdict only — `{ state, ready, role }`, never the check names. There `/readyz` is 503 until the role has started and from the first instant of a drain, which is what the chart's readiness probe on those roles reads. Both endpoints return a body, never a bare `200 OK`.
|
|
@@ -197,6 +213,17 @@ the milliseconds and the line above. Measured on the demo app's image, `ROLE=web
|
|
|
197
213
|
**An app scaffolded before 23.0.0 does not have the line** — its `docker/Dockerfile` is the app's
|
|
198
214
|
own file. Add it; the boot log names it until you do ([Upgrading](Upgrading)).
|
|
199
215
|
|
|
216
|
+
**The prebuilt module registry.** `As of 2026-11-09`. The same `RUN` also writes `node_modules/.cache/ultimate/registry/`: every module the app scan imports, in scan order, as chunk modules of 256 static imports each, plus `registry.json` (format, Bun version, file list). The `web`, `sync` and `replicator` roles boot from it instead of scanning; `worker` and `scheduler` keep their document-graph scan.
|
|
217
|
+
|
|
218
|
+
| Case | What the boot does |
|
|
219
|
+
|---|---|
|
|
220
|
+
| the registry's file list matches the app's files on disk (a directory listing, no import) | imports the registry |
|
|
221
|
+
| it does not | logs `X_PREBUILT_REGISTRY_STALE` (warn) and scans — move the prebuilt `RUN` after the last `COPY` and rebuild |
|
|
222
|
+
| the registry came from another Bun | ignores it and scans |
|
|
223
|
+
| a module would not import at build time | no registry was written; the boot scans and refuses with that module's cause (`X_APP_MODULE_LOAD_FAILED`) |
|
|
224
|
+
|
|
225
|
+
Every scan without a registry — tools, `x dev`'s first load, `x build` — imports in batches of 256 through one generated entry module per batch, in the serial scan's evaluation order (`packages/cli/src/app-load-order.test.ts`). Measured cold module load, 5,000 synthetic modules: serial 3,258 ms, batched 1,259 ms ([`boot-vs-files.json`](https://github.com/developerz-ai/ultimate/blob/main/scripts/bench/results/boot-vs-files.json)).
|
|
226
|
+
|
|
200
227
|
All targets share one build ID (content hash), stamped into the image, the HTML, the assets, `x.manifest.json` — **and `sw.js`**, `As of 2026-08`: the worker's cache names carry the build id, so a deploy retires the previous build's caches instead of serving them ([#390](https://github.com/developerz-ai/ultimate/issues/390)). Every target that serves or writes a document emits `manifest.webmanifest`, `sw.js` and `x-sw-register.js` alike ([PWA and offline](PWA-And-Offline)).
|
|
201
228
|
|
|
202
229
|
```
|
|
@@ -249,7 +276,7 @@ services:
|
|
|
249
276
|
# service, so the other worker names every remaining queue itself. Unset, a worker claims
|
|
250
277
|
# jobs.queues plus every queue a registered job is enqueued on; set, `jobs.worker.queue-unserved`
|
|
251
278
|
# names the registered queues it leaves that NO live worker serves — none, once `integrations` is up.
|
|
252
|
-
worker: { <<: *app, environment: { ROLE: worker, WORKER_QUEUES:
|
|
279
|
+
worker: { <<: *app, environment: { ROLE: worker, WORKER_QUEUES: default },
|
|
253
280
|
deploy: { replicas: 4 } }
|
|
254
281
|
worker-integrations: { <<: *app, environment: { ROLE: worker, WORKER_QUEUES: integrations },
|
|
255
282
|
deploy: { replicas: 1 } }
|
|
@@ -666,7 +666,7 @@ is the shape a table already has, `As of 2026-08`.
|
|
|
666
666
|
| `enumerated(v)` · `tz(zones)` · `locale(tags)` | `text` + CHECK | the union of the declared values |
|
|
667
667
|
| `timestamp()` | `timestamptz` | `Date` — an instant, stored UTC |
|
|
668
668
|
| `money()` | `<n>_minor bigint` + `<n>_currency char(3)` + `<n>_scale integer null` | `MoneyValue` |
|
|
669
|
-
| `json(schema)` | `jsonb` | whatever the schema infers. The schema is **required** — a `json()` returning `unknown` is an `any` hole, and the value arrives from the database as often as from a caller |
|
|
669
|
+
| `json(schema)` | `jsonb` | whatever the schema infers. The schema is **required** — a `json()` returning `unknown` is an `any` hole, and the value arrives from the database as often as from a caller. `null` in a NOT NULL `json()` column is the JSON value — the schema judges it (`t.nullable(…)` admits it) and it is stored as `'null'::jsonb`; in a `.nullable()` column `null` is SQL NULL, the clear `is-null` matches |
|
|
670
670
|
| `decimal({ precision, scale })` | `numeric(p, s)` | `string`, the exact digits. A value with more decimal places than the column stores is refused, not rounded |
|
|
671
671
|
| `date()` | `date` | `PlainDate` — a calendar date, no time, no zone |
|
|
672
672
|
| `bigint()` | `bigint` | `string`. A JS `bigint` is what `JSON.stringify` throws on and a `number` loses digits past 2^53, which is where a legacy `int8` key lives |
|
|
@@ -872,6 +872,23 @@ vocabulary cannot express, said precisely rather than approximated:
|
|
|
872
872
|
| Not authz | an invariant is about data shape. Permission belongs in [Policies and authz](Policies-And-Authz) |
|
|
873
873
|
| Duplicate entity | two entities on one table name is `X_ENTITY_DUPLICATE` — rename or merge |
|
|
874
874
|
|
|
875
|
+
## Full-text search — the `searchIndex` port
|
|
876
|
+
|
|
877
|
+
Rule: `.search(term)` on a chain asks the INSTALLED `SearchIndex` — one search path. `As of 2026-11-10`. The port is `index` / `remove` / `query` / `list`: `list({ entity, tenant?, after, limit })` pages the live documents an index holds (never a tombstone); `tenant` left out is every tenant's — the sweep's maintenance read, under the tenancy rule `query` follows (`crossTenant` for the built-in index). `searchIndexConformance` checks it: each id once across pages, removed ids absent, another tenant's absent. Canonical wording: `packages/entity/README.md`, "Search index".
|
|
878
|
+
|
|
879
|
+
| Index | How `.search(term)` answers |
|
|
880
|
+
|---|---|
|
|
881
|
+
| the built-in Postgres one (default) | inside the statement, its `matches` predicate over the `.searchable()` columns — the same SQL as before the port; costs a write nothing |
|
|
882
|
+
| an external one (`searchIndex` in `apps/<app>/runtime.ts`: Meilisearch, Typesense, the app's adapter) | ids first, then the chain reads those rows — tenancy, soft delete, order and cursor still apply, so a hit can never widen what the chain sees |
|
|
883
|
+
|
|
884
|
+
| Fact | Detail |
|
|
885
|
+
|---|---|
|
|
886
|
+
| the version | every `SearchDocument` carries `version`, the row's `onUpdateNow()` instant in epoch ms — STRICTLY increasing per row: a write (a soft delete included) stores it no earlier than the stored one + 1 ms (Postgres `greatest($now, updated_at + interval '1 millisecond')`; the memory driver and a `defineDriver` store through `advanceVersion` / `DriverRepo.update`'s `advance`), so two writes inside one millisecond are two versions and the column may run a millisecond ahead of the clock per same-ms write. A searchable entity declares `updatedAt: timestamp().defaultNow().onUpdateNow()`; without one `searchDocumentOf` and `reindex()` refuse (`X_INVARIANT_VIOLATED`) |
|
|
887
|
+
| keep only newer | an adapter applies a document only when its version is newer than the document or tombstone it holds for that id; `remove(scope, ids, version)` leaves a tombstone (a delete's: past the row's last version and no earlier than its instant); an equal version is a replay. EXCEPT a `committed` document — the write path's, `index(docs, { committed: true })` — which replaces a tombstone whatever its version, so a key deleted and written again is live at once; `reindex()`'s reads are not `committed`, so a stale read never brings a deleted row back. `searchIndexConformance` (`@ultimat3/testing/conformance`) checks each case |
|
|
888
|
+
| the write path | with an external index installed, every committed write of a searchable entity reaches it: insert, upsert, update, transition and `updateWhere` index the rows written; `delete` and `deleteWhere` (soft or hard) remove them — whatever the primary key (`id`, another column, composite; an instant in a key is spelled ISO 8601 UTC). Taken when the write runs, merged per key per transaction, sent at commit on one chain per index (`search-mirror-batch.ts`), so a rolled-back write indexes nothing. The driver hands a delete's or filtered write's rows over (`returning *` on Postgres) only for a searchable entity under an external index; under the built-in index every write is the statement it always was |
|
|
889
|
+
| a failed index write | never fails the business write: one `entity.search-index.write-failed` log line; repair with `reindex()` ([Jobs](Jobs-And-Workflows#rebuilding-a-search-index--reindex)), whose sweep also removes what the table lost |
|
|
890
|
+
| not mirrored | a delete or filtered write past `MAX_ASSERTED_ROWS` rows: Postgres counts first and sends no `returning *` past it (memory and `defineDriver` stores the same) — logged the same way; `reindex()` repairs it |
|
|
891
|
+
|
|
875
892
|
## Embeddings
|
|
876
893
|
|
|
877
894
|
```ts
|
|
@@ -920,7 +937,7 @@ export const likes = entity('likes', {
|
|
|
920
937
|
- **Retention is a promise `x verify` checks.** A `retain` no `purge()` covers is `X_ENTITY_RETAIN_UNSWEPT` in the `manifest` step. `purge({ entities: 'declared' })` covers every one, history tables included, and needs no line per entity.
|
|
921
938
|
- **History is recorded by trigger**, so `updateWhere`, a cascade and raw SQL are recorded too. An update that changes nothing records nothing; a change to a counted column alone records nothing. `.sealed()` columns stay ciphertext in the images. `actor_id`/`request_id` are what the WRITE'S transaction set (`x.actor`, `x.request`): the repository sets them before its first write to a history entity inside a transaction; an autocommit write records `null`, never a guess. Update of a history row is refused always; delete only under `x.purge` naming that table, which the retention sweep sets (`X_ENTITY_APPEND_ONLY`, SQLSTATE `23001`). Reading it is an ordinary, tenant-scoped, cursor-paged read: `database({ posts, postsHistory: posts.$history })`.
|
|
922
939
|
- **A counter locks its parent row.** A hot parent serializes its writers; where that matters, `countBy` plus a cache is the alternative. A soft-deleted child is not counted. A new counter's migration recounts once, so an existing table starts true; `x db recount posts.likeCount` reports drift and `--write` repairs it.
|
|
923
|
-
- **A counter's write is the trigger's, not the repository's.** The WAL replicator reports it; the in-process row
|
|
940
|
+
- **A counter's write is the trigger's, not the repository's.** The WAL replicator reports it; the in-process `entity.row` event (what `x dev` on PGlite and the memory driver feed live queries from) does not, so a live view of the counter on those does not move until the parent row is written again. A counter a page shows live stays the mutator's job until that event reports trigger writes. As of 2026-11.
|
|
924
941
|
- **Memory answers as Postgres does**: the memory driver records history and moves counters in its repository (`counter.test.ts`, `history.test.ts` are the parity tables).
|
|
925
942
|
- Drift names a missing or disabled lifecycle trigger: `X_LIFECYCLE_TRIGGER_MISSING`, its fix the statements that re-create it.
|
|
926
943
|
|
|
@@ -997,6 +1014,35 @@ of 2026-11:
|
|
|
997
1014
|
|
|
998
1015
|
Prod ordering is fixed: `ROLE=migrate` completes, then `web` / `sync` / `worker` / `scheduler` roll. A generated migration is forward-compatible with the previous release, so a rolling restart never serves a request against a schema it cannot read: a column drop takes two releases through `retired: ['<c>']` (refused otherwise, `X_MIGRATION_ROLLING_UNSAFE`), and a key or CHECK on a live table is added without stopping writes → [Migrations And Backfills](Migrations-And-Backfills). See [Deployment](Deployment).
|
|
999
1016
|
|
|
1017
|
+
## Custom drivers
|
|
1018
|
+
|
|
1019
|
+
A store that is not Postgres — Mongo, Cassandra, a key-value store — is a `Driver` built with
|
|
1020
|
+
`defineDriver({ name, capabilities, repo })` from `@ultimat3/entity/adapter`. `As of 2026-11-09`.
|
|
1021
|
+
|
|
1022
|
+
| The kit owns | The store owns |
|
|
1023
|
+
|---|---|
|
|
1024
|
+
| tenant scoping, soft delete, the page bound, the total order and the cursor — the store is handed a plan already scoped, never `FindManyArgs` | answering `plan.where` / `plan.orderBy` (`selectRows(entity, rows, read)` does it in process) |
|
|
1025
|
+
| narrowing, `assertRowTenant` and EVERY invariant, judged before a write reaches the store | its schema, its unique indexes (a duplicate key: `entityUniqueViolation(entity, constraint)`), its references |
|
|
1026
|
+
| refusing a returned row outside the plan (`X_DRIVER_ROW_OUT_OF_SCOPE`) | atomicity: declare `'transactions'` and a `transactor`, or every `{ tx }` and a seed dry run is refused |
|
|
1027
|
+
|
|
1028
|
+
An undeclared capability (`upsert`, `matches`, `aggregate:<kind>`, `transactions`) is
|
|
1029
|
+
`X_DRIVER_UNSUPPORTED` with `meta.capability`; a declared one with no method behind it is
|
|
1030
|
+
`X_DRIVER_CAPABILITY_MISSING` when the table opens. `lock` and `series` undeclared answer the
|
|
1031
|
+
shipped `X_LOCK_UNSUPPORTED` / `X_ENTITY_SERIES_UNSUPPORTED`.
|
|
1032
|
+
|
|
1033
|
+
A searchable entity's version is strictly increasing per row, and a custom store advances it in
|
|
1034
|
+
its OWN write, atomically: `update(filter, patch, advance?)` writes `advance.property` per matched
|
|
1035
|
+
row as the later of the patch's instant and that row's stored one + `advance.stepMs` (an in-code
|
|
1036
|
+
merge: `advanceVersion(entity, row, { ...row, ...patch }, (p) => p === advance.property)`), and a
|
|
1037
|
+
store declaring `'upsert'` passes its merged row through `advanceVersion(entity, stored, merged, (p)
|
|
1038
|
+
=> plan.set.includes(p))`. Both from `@ultimat3/entity/adapter`; `entityDriverConformance` refuses a
|
|
1039
|
+
store that skips either. `As of 2026-11-10`.
|
|
1040
|
+
|
|
1041
|
+
**Migrations, drift and `x db` describe Postgres only.** A custom store owns its schema: `x verify`'s
|
|
1042
|
+
`drift` step skips an app whose only store is a `defineDriver` one and which has no migration, and
|
|
1043
|
+
prints why. An app mixing Postgres and a custom store keeps its migrations and its drift check for
|
|
1044
|
+
the Postgres tables.
|
|
1045
|
+
|
|
1000
1046
|
## Drift is a `x verify` failure
|
|
1001
1047
|
|
|
1002
1048
|
```
|
package/wiki/FAQ.md
CHANGED
|
@@ -6,11 +6,17 @@ Honest answers. Where something is not built yet, it says so.
|
|
|
6
6
|
|
|
7
7
|
### Is it production ready?
|
|
8
8
|
|
|
9
|
-
**Yes, for a single-region app on one Postgres, `As of 2026-11`, on the evidence below.** What you can check: [the live demo](https://social-media.ultimate.demo.developerz.ai), built from `dummy/social-media-clone/` and deployed on every push to `main` (`deploy-social-demo.yml`)
|
|
9
|
+
**Yes, for a single-region app on one Postgres, `As of 2026-11`, on the evidence below.** What you can check: [the live demo](https://social-media.ultimate.demo.developerz.ai), built from `dummy/social-media-clone/` and deployed on every push to `main` (`deploy-social-demo.yml`); two apps in the repository build on it and gate on every push, the demo and the reference app `examples/dummy/` (`scripts/lib/gated-apps.ts`). The API is under semver, and the window and the next major's date are on [Stability](Stability). No outside security audit has been done ([`SECURITY.md`](https://github.com/developerz-ai/ultimate/blob/main/SECURITY.md)).
|
|
10
|
+
|
|
11
|
+
Outside the repository, the one claim no command here can check:
|
|
12
|
+
|
|
13
|
+
<!-- generated: production-apps — bun run scripts/production-apps.ts --write -->
|
|
14
|
+
9 apps outside this repository build on Ultimate, small to medium in size; at least 1 of them serves production traffic. Owner-reported, `As of 2026-11`: adopters are never named (`scripts/private-names.ts` refuses a name in the tree), so no command here re-derives this line.
|
|
15
|
+
<!-- end generated -->
|
|
10
16
|
|
|
11
17
|
| Proven | By |
|
|
12
18
|
|---|---|
|
|
13
|
-
| a rolling restart on Kubernetes drops no request | `ci.yml`'s `deploy-proof` job, `docker/deploy-proof/run.sh`: 0 of 9,
|
|
19
|
+
| a rolling restart on Kubernetes drops no request | `ci.yml`'s `deploy-proof` job, `docker/deploy-proof/run.sh`: 0 of 9,201 requests failed, `As of 2026-11-10` |
|
|
14
20
|
| a fresh scaffold is green on its first gate run | `ci.yml`'s `scaffold-smoke` job, every push |
|
|
15
21
|
| every package is on npm at one version, published by the workflow over OIDC, attested | `bun run scripts/registry-audit.ts --json`, and `registry-audit.yml` daily |
|
|
16
22
|
| one `sync` node reconnects all 50,000 clients after a forced restart | [`scripts/bench/results/`](https://github.com/developerz-ai/ultimate/tree/main/scripts/bench/results) |
|
package/wiki/Feature-Flags.md
CHANGED
|
@@ -56,7 +56,7 @@ fallback to the actor or to `default`.
|
|
|
56
56
|
`applyFlagSnapshot({ key: targeting })` lands targeting from outside — a poller, a job, a channel —
|
|
57
57
|
so evaluation never loads anything. Keys this build does not declare come back in `unknown` rather
|
|
58
58
|
than throwing: a control plane is often ahead of a deploy. An overdue flag is reported through
|
|
59
|
-
core's
|
|
59
|
+
core's `reportError` — to whatever the `errorReporter` port installed ([Adapters](Adapters#errorreporter)) — at most once an hour per flag.
|
|
60
60
|
|
|
61
61
|
`flagsReport()` projects every flag with its kind, owner and expiry. Nothing reads it yet: no CLI
|
|
62
62
|
command prints it and no manifest section carries it.
|
package/wiki/Home.md
CHANGED
|
@@ -96,7 +96,7 @@ Follow in order. Each page states what it was executed against in its own first
|
|
|
96
96
|
| [Auth](Auth) | sessions, OAuth, MFA, API keys and service tokens — the output is an `Actor` |
|
|
97
97
|
| [Mail](Mail) | one template renders HTML and text, every string a key, sending is a job |
|
|
98
98
|
| [Notify](Notify) | `notifier()` as a job factory: fan-out, preference gate, digest window, ledger, inbox |
|
|
99
|
-
| [Storage and uploads](Storage-And-Uploads) | named disks, safe keys, the three-call signed upload,
|
|
99
|
+
| [Storage and uploads](Storage-And-Uploads) | named disks, safe keys, the three-call signed upload, upload scanning, orphans |
|
|
100
100
|
| [Feature flags](Feature-Flags) | permanent switches and temporary ones that cannot be forgotten |
|
|
101
101
|
| [SEO](SEO) | enforced meta, typed JSON-LD, sitemaps, fail-closed robots, feeds, responsive images |
|
|
102
102
|
|
|
@@ -122,11 +122,12 @@ Follow in order. Each page states what it was executed against in its own first
|
|
|
122
122
|
| [CLI reference](CLI-Reference) | every `x` command and flag, with `--json` examples |
|
|
123
123
|
| [Error codes](Error-Codes) | every `X_*` code: meaning, cause, exact fix |
|
|
124
124
|
| [Configuration](Configuration) | every `app.config.ts` field and every env var |
|
|
125
|
+
| [Adapters](Adapters) | every swappable backend — one `runtime.ts` field each: the interface, the reference to copy, the conformance suite, the default |
|
|
125
126
|
| [Deployment](Deployment) | one image, six roles, `ROLE`/`PORT`, drain, compose, Helm, targets, the prebuilt island store, `docs/ops/` |
|
|
126
127
|
| [Deploy recipes](Deploy-Recipes) | per host — Compose, the chart, Fly.io, Render, Railway, Heroku, bare VM — the build source, port, health path, release command and services, each marked executed or not |
|
|
127
128
|
| [Observability](Observability) | counters, gauges, histograms, process and pool gauges, `MetricExporter`, the Prometheus body, `/metrics` on its own port, and what the chart still cannot reach |
|
|
128
129
|
| [Known gaps](Known-Gaps) | every defect and unfinished seam in the published release, named |
|
|
129
|
-
| [Upgrading](Upgrading) | one section per major with every manual edit, the
|
|
130
|
+
| [Upgrading](Upgrading) | one section per major with every manual edit, the newest first, each as a checklist, version skew — and how `x upgrade` walks them, one major per run |
|
|
130
131
|
| [Stability](Stability) | what semver covers and what it does not, one major per 90 days from v30, the support window, deprecation, the security exception |
|
|
131
132
|
| [Troubleshooting](Troubleshooting) | symptom → cause → fix |
|
|
132
133
|
| [FAQ](FAQ) | why Bun only, why no GraphQL, is it production ready |
|