@ultimat3/cli 31.47.1 → 31.49.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 +30 -23
- package/README.md +96 -4
- package/package.json +29 -29
- package/src/api-registration.ts +28 -14
- package/src/app-load.ts +6 -1
- package/src/app-root.ts +7 -1
- package/src/clean-services.ts +142 -0
- package/src/cmd-auth.ts +3 -0
- package/src/cmd-clean-spec.ts +10 -3
- package/src/cmd-clean.ts +23 -9
- package/src/cmd-db-backfill.ts +6 -0
- package/src/cmd-db-branch.ts +10 -4
- package/src/cmd-db-recount.ts +5 -12
- package/src/cmd-db-rollback.ts +77 -0
- package/src/cmd-db-spec.ts +18 -2
- package/src/cmd-db-status.ts +5 -10
- package/src/cmd-db.ts +105 -33
- package/src/cmd-deploy-verify.ts +14 -6
- package/src/cmd-docs-topic.ts +94 -0
- package/src/cmd-docs.ts +15 -1
- package/src/cmd-doctor.ts +109 -41
- package/src/cmd-drill.ts +100 -19
- package/src/cmd-env.ts +30 -8
- package/src/cmd-errors-app.ts +63 -0
- package/src/cmd-errors.ts +50 -14
- package/src/cmd-generate.ts +17 -4
- package/src/cmd-heavy-spec.ts +36 -0
- package/src/cmd-heavy.ts +244 -0
- package/src/cmd-jobs.ts +27 -1
- package/src/cmd-merge-driver-spec.ts +12 -0
- package/src/cmd-merge-driver.ts +95 -0
- package/src/cmd-new.ts +23 -3
- package/src/cmd-policy-spec.ts +9 -1
- package/src/cmd-policy.ts +72 -17
- package/src/cmd-stop.ts +18 -4
- package/src/cmd-tasks-run.ts +87 -0
- package/src/cmd-tasks-spec.ts +10 -3
- package/src/cmd-tasks.ts +8 -5
- package/src/cmd-test.ts +15 -4
- package/src/cmd-upgrade-spec.ts +8 -1
- package/src/cmd-upgrade.ts +32 -5
- package/src/cmd-verify.ts +9 -41
- package/src/codemods/agents-doc-row.ts +73 -0
- package/src/codemods/define-error-leaf.ts +37 -12
- package/src/codemods/docs-many-agents.ts +26 -0
- package/src/codemods/docs-worker-commands.ts +26 -0
- package/src/codemods/index.ts +6 -0
- package/src/codemods/merge-drivers.ts +66 -0
- package/src/command.ts +3 -0
- package/src/db-applied-edits.ts +117 -0
- package/src/db-dev-wire.ts +18 -0
- package/src/db-diagnostics.ts +5 -10
- package/src/db-generate.ts +82 -7
- package/src/db-migrate-pass.ts +51 -0
- package/src/db-migrate-through-dev.ts +209 -0
- package/src/db-rollback-consent.ts +128 -0
- package/src/db-rollback-pass.ts +76 -0
- package/src/db-seed-generate.ts +5 -1
- package/src/db-seed.ts +7 -1
- package/src/deploy-verify-findings.ts +3 -0
- package/src/deploy-verify-grade.ts +3 -0
- package/src/deploy-verify-processes.ts +32 -0
- package/src/dev-boot.ts +3 -0
- package/src/dev-db-migrate.ts +155 -0
- package/src/dev-db-rollback.ts +33 -0
- package/src/dev-db-settled.ts +22 -0
- package/src/dev-lock-errors.ts +78 -0
- package/src/dev-lock-holder-dir.ts +64 -0
- package/src/dev-lock-live.ts +44 -0
- package/src/dev-lock.ts +59 -84
- package/src/dev-policy.ts +11 -8
- package/src/dev-rebuild-schema.ts +116 -13
- package/src/dev-rebuild.ts +13 -4
- package/src/dev-route-table.ts +7 -0
- package/src/dispatch.ts +21 -1
- package/src/doctor-advisory-floors.ts +30 -8
- package/src/doctor-api-listing.ts +114 -0
- package/src/doctor-guarded.ts +41 -0
- package/src/doctor-port.ts +90 -17
- package/src/doctor-probe.ts +36 -5
- package/src/doctor-processes-probe.ts +127 -0
- package/src/doctor-processes.ts +136 -0
- package/src/doctor-warnings.ts +17 -0
- package/src/error-codes-agents.ts +35 -0
- package/src/error-codes-processes.ts +30 -0
- package/src/error-codes-tooling.ts +11 -3
- package/src/error-codes.ts +12 -13
- package/src/errors-suite.ts +27 -0
- package/src/errors.ts +18 -22
- package/src/exec.ts +11 -3
- package/src/exercise-registration.ts +4 -3
- package/src/framework-env.ts +7 -3
- package/src/generate-files.ts +1 -0
- package/src/generate-grant-findings.ts +7 -5
- package/src/generate-grants.ts +9 -8
- package/src/generate-kinds.ts +30 -6
- package/src/generate-roles-file.ts +30 -0
- package/src/generate-slice-policy.ts +3 -3
- package/src/guards.ts +2 -2
- package/src/heavy-cores.ts +51 -0
- package/src/heavy-env.ts +21 -0
- package/src/heavy-errors.ts +54 -0
- package/src/heavy-flock.ts +73 -0
- package/src/heavy-holders.ts +78 -0
- package/src/heavy-ledger.ts +400 -0
- package/src/heavy-memory.ts +67 -0
- package/src/heavy-pressure.ts +104 -0
- package/src/heavy-weights.ts +47 -0
- package/src/heavy.ts +308 -0
- package/src/i18n-registration.ts +22 -2
- package/src/island-harness.ts +2 -2
- package/src/job-budget.ts +4 -2
- package/src/job-registration.ts +64 -8
- package/src/jobs-queue-known.ts +43 -0
- package/src/local-cli.ts +6 -5
- package/src/mcp-errors-agents.ts +20 -0
- package/src/mcp-errors-doctor.ts +27 -0
- package/src/mcp-errors-processes.ts +23 -0
- package/src/mcp-errors.ts +18 -29
- package/src/mcp-host.ts +2 -2
- package/src/merge-driver-catalog.ts +58 -0
- package/src/merge-driver-config.ts +43 -0
- package/src/merge-driver-lines.ts +140 -0
- package/src/merge-state.ts +105 -0
- package/src/messages-db.ts +22 -1
- package/src/messages-processes.ts +13 -0
- package/src/messages-upgrade.ts +6 -0
- package/src/messages.ts +62 -1
- package/src/output-findings.ts +48 -21
- package/src/parse.ts +37 -6
- package/src/policy-facts.ts +38 -21
- package/src/policy-row.ts +99 -0
- package/src/port-pair-free.ts +28 -0
- package/src/registry-lines.ts +110 -0
- package/src/registry.ts +4 -0
- package/src/retain-sweep.ts +1 -1
- package/src/role-replicator.ts +9 -4
- package/src/role-select.ts +86 -0
- package/src/role-start.ts +13 -55
- package/src/role-sync.ts +10 -5
- package/src/runtime-cache-frame.ts +46 -0
- package/src/runtime-cache-ttl.ts +23 -0
- package/src/runtime-cache.ts +56 -18
- package/src/runtime-database-ssl.ts +84 -0
- package/src/runtime-idempotency-scope.ts +16 -2
- package/src/runtime-jobs-share.ts +52 -0
- package/src/runtime-jobs.ts +43 -12
- package/src/runtime-overrides.ts +4 -2
- package/src/runtime-queue.ts +18 -3
- package/src/runtime-services.ts +8 -1
- package/src/schema-drift.ts +19 -2
- package/src/schema-dump-drift.ts +4 -1
- package/src/serve-boot-probe.ts +30 -2
- package/src/serve-boot.ts +11 -1
- package/src/serve-env.ts +39 -3
- package/src/serve.ts +61 -10
- package/src/stop-run-start.ts +12 -0
- package/src/supervise-boot.ts +61 -0
- package/src/supervise-cgroup.ts +84 -0
- package/src/supervise-child.ts +206 -0
- package/src/supervise-count.ts +244 -0
- package/src/supervise-errors.ts +83 -0
- package/src/supervise-facts.ts +40 -0
- package/src/supervise-messages.ts +84 -0
- package/src/supervise-policy.ts +46 -0
- package/src/supervise-pool.ts +10 -0
- package/src/supervise-probe.ts +158 -0
- package/src/supervise-run.ts +54 -0
- package/src/supervise.ts +383 -0
- package/src/templates/generate-purge.ts +6 -6
- package/src/templates/guard-animated-layout-property.ts +2 -2
- package/src/templates/guard-bare-error.ts +1 -1
- package/src/templates/guard-error-declared.ts +2 -2
- package/src/templates/guard-focus-visible.ts +1 -1
- package/src/templates/guard-image-dimensions.ts +2 -2
- package/src/templates/guard-island-mount-clears.ts +1 -1
- package/src/templates/guard-native-confirm.ts +1 -1
- package/src/templates/guard-raw-breakpoint.ts +2 -2
- package/src/templates/guard-raw-colour.ts +2 -2
- package/src/templates/guard-raw-fetch.ts +1 -1
- package/src/templates/guard-raw-interval.ts +1 -1
- package/src/templates/guard-raw-length.ts +3 -3
- package/src/templates/guard-raw-motion.ts +1 -1
- package/src/templates/guard-raw-shadow.ts +1 -1
- package/src/templates/guard-raw-z-index.ts +1 -1
- package/src/templates/guard-released-forms.ts +59 -13
- package/src/templates/guard-repo-await-in-loop.ts +1 -1
- package/src/templates/guard-repo-raw-sql.ts +4 -4
- package/src/templates/guard-repo-unbounded.ts +1 -1
- package/src/templates/guard-runtime-pin.ts +1 -1
- package/src/templates/guard-semantic-interactive.ts +2 -2
- package/src/templates/guard-unbounded-fanout.ts +1 -1
- package/src/templates/guard-undeclared-custom-property.ts +3 -3
- package/src/templates/guard-undefined-style-class.ts +3 -3
- package/src/templates/guard-unzoned-date.ts +3 -3
- package/src/templates/query-slice.ts +82 -0
- package/src/templates/query.ts +76 -30
- package/src/templates/resource-page.ts +3 -2
- package/src/templates/scaffold-bin.ts +2 -0
- package/src/templates/scaffold-claude-agents.ts +9 -6
- package/src/templates/scaffold-claude-commands.ts +7 -1
- package/src/templates/scaffold-claude.ts +4 -4
- package/src/templates/scaffold-container-compose.ts +47 -7
- package/src/templates/scaffold-docs.ts +11 -6
- package/src/templates/scaffold-gitattributes.ts +18 -1
- package/src/templates/scaffold-helm-templates.ts +9 -0
- package/src/templates/scaffold-repo.ts +4 -1
- package/src/templates/scaffold-test-services.ts +33 -11
- package/src/templates/shapes/offline.ts +0 -7
- package/src/templates/shapes/realtime.ts +2 -6
- package/src/templates/sign-in-action-tests.ts +6 -4
- package/src/templates/sign-in-challenge.ts +62 -0
- package/src/templates/sign-in-oidc-mfa.ts +31 -0
- package/src/templates/sign-in-oidc.ts +11 -3
- package/src/templates/sign-in-password.ts +18 -56
- package/src/test-batches.ts +9 -3
- package/src/test-shards.ts +117 -37
- package/src/test-slots.ts +35 -161
- package/src/test-verdict.ts +79 -0
- package/src/test-workers.ts +15 -0
- package/src/upgrade-gate-codemods.ts +5 -3
- package/src/upgrade-gate.ts +19 -1
- package/src/upgrade-merge-drivers.ts +25 -0
- package/src/upgrade-report.ts +18 -4
- package/src/upgrade-scope.ts +62 -0
- package/src/verify-checks.ts +6 -11
- package/src/verify-coverage-run.ts +9 -5
- package/src/verify-deadline.ts +18 -2
- package/src/verify-heavy-steps.ts +26 -0
- package/src/verify-live.ts +38 -14
- package/src/verify-only.ts +67 -0
- package/src/verify-progress.ts +7 -3
- package/src/verify-run.ts +20 -2
- package/src/verify-services-stack.ts +165 -0
- package/src/verify-services.ts +84 -2
- package/src/verify-test-run.ts +9 -9
- package/src/verify-tests.ts +35 -22
- package/src/verify-typecheck.ts +25 -2
- package/wiki/Actions.md +2 -1
- package/wiki/Admin-Dashboard.md +2 -2
- package/wiki/Agents.md +5 -5
- package/wiki/Auth.md +15 -5
- package/wiki/Bare-VM.md +1 -1
- package/wiki/Building-Your-Own-Base.md +15 -2
- package/wiki/CI-Parallel-Gate.md +4 -4
- package/wiki/CLI-Reference.md +127 -48
- package/wiki/Caching-And-Invalidation.md +2 -2
- package/wiki/Client-Navigation.md +1 -1
- package/wiki/Configuration.md +32 -13
- package/wiki/Deployment.md +44 -4
- package/wiki/Entities-And-Migrations.md +5 -1
- package/wiki/FAQ.md +1 -1
- package/wiki/Getting-Started.md +2 -2
- package/wiki/Home.md +2 -1
- package/wiki/I18n.md +5 -3
- package/wiki/Installation.md +12 -11
- package/wiki/Interface-Rules.md +1 -1
- package/wiki/Jobs-And-Workflows.md +24 -4
- package/wiki/Known-Gaps.md +2 -2
- package/wiki/MCP-And-AI.md +8 -5
- package/wiki/Mail.md +1 -1
- package/wiki/Many-Agents.md +127 -0
- package/wiki/Migrations-And-Backfills.md +18 -0
- package/wiki/Notify.md +1 -1
- package/wiki/Observability.md +13 -0
- package/wiki/Queries-And-Live-Queries.md +2 -2
- package/wiki/Realtime.md +10 -1
- package/wiki/Routes-And-Render-Modes.md +1 -1
- package/wiki/Scheduled-Tasks.md +4 -1
- package/wiki/Testing.md +12 -9
- package/wiki/Timezones-And-Dates.md +5 -1
- package/wiki/Troubleshooting.md +1 -0
- package/wiki/Tutorial-01-First-App.md +5 -5
- package/wiki/Tutorial-02-First-Feature.md +1 -1
- package/wiki/Tutorial-03-Auth-And-Admin.md +7 -6
- package/wiki/Upgrading.md +37 -0
package/wiki/CLI-Reference.md
CHANGED
|
@@ -32,7 +32,7 @@ x version # CLI version
|
|
|
32
32
|
| `x dev` | all roles in one process: embedded services, sub-second reload, `/_x` mounted | shipped |
|
|
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
|
-
| `x db <sub>` | gen, migrate, reset, seed, branch, backfill, diagnostics | shipped |
|
|
35
|
+
| `x db <sub>` | gen, migrate, rollback, reset, seed, branch, backfill, diagnostics, recount, status | shipped |
|
|
36
36
|
| `x verify [--only <step>[,<step>…] [--shard i/n [--timings f]] \| --changed [--base <ref>] [--dirty]] [--workers N] [--isolate]` · `x verify merge <part.json…>` · `x verify plan [--parts n]` | 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 |
|
|
@@ -48,21 +48,21 @@ x version # CLI version
|
|
|
48
48
|
| `x help` / `x version` | catalogue and version | shipped |
|
|
49
49
|
| `x actions` / `x queries` / `x entities` | introspect the declaration registries | shipped |
|
|
50
50
|
| `x jobs` | list, show, retry, cancel, remove and promote jobs; pause and resume a queue · `drain` was removed from the registry `As of 2026-11-15` ([Known gaps](Known-Gaps#open-by-decision)) | shipped |
|
|
51
|
-
| `x tasks` | cron tasks, their timezone and their next run | shipped |
|
|
51
|
+
| `x tasks` | cron tasks, their timezone and their next run; fire one now | shipped |
|
|
52
52
|
| `x policy` | which clause decided a permission, and why | shipped |
|
|
53
53
|
| `x exercise [<name>] [--seed n\|random] [--shard i/n]` | run every action, query, job and route `load` once on generated rows, with no test written; the gate's `exercise` step | shipped |
|
|
54
54
|
| `x drill [<name>] [--list] [--budget-ms n]` | the app's roles as real processes on real Postgres, Redis and NATS, each dependency faulted through a proxy, each role signalled, or every role started before `ROLE=migrate`, red on any framework contract that does not hold. Not a gate step: it needs the services | shipped |
|
|
55
55
|
| `x i18n` | add, sync, check catalogs | shipped |
|
|
56
56
|
| `x mail preview <id>` | render a mail's declared `preview` in every locale, nothing sent | shipped |
|
|
57
57
|
| `x test <type>` | run one of the six test types, or the whole suite | shipped |
|
|
58
|
-
| `x clean [--dry-run]` | remove what test runs leave behind: migrated test templates, `.x/cache`, stray `.x` folders, stale probe databases | shipped |
|
|
58
|
+
| `x clean [--dry-run] [--services]` | remove what test runs leave behind: migrated test templates, `.x/cache`, stray `.x` folders, stale probe databases; `--services` stops this checkout's test stack and lists the machine's others | shipped |
|
|
59
59
|
| `x affected` | the workspaces a diff can have broken, transitively | shipped |
|
|
60
60
|
| `x graph [--from <a> --to <b>]` · `x impact <file\|primitive\|entity>` | the app as one typed graph, each edge `declared`, `import` or `observed` · what an edit reaches | shipped |
|
|
61
61
|
| `x client vendor <name>` · `x client customer --out <dir>` | one OpenAPI compiler, two clients: a third party's document into `apps/web/clients/<name>/` (`outbound()` + `t` schemas), or the app's own published document into a client with no framework import | shipped |
|
|
62
62
|
| `x shot <route>` | photograph one route from a real browser, plus a `verdict.json` a picture cannot carry | shipped |
|
|
63
63
|
| `x pr review\|resolve\|reply` | inline review threads — the ones `gh pr view --comments` does not show — plus every review verdict, every PR comment, and which review bots did not review | shipped |
|
|
64
64
|
| `x ci` | the workflow runs for this branch, and the findings inside the failed step's log; `x ci tested`: whether a push reuses a green PR run | shipped |
|
|
65
|
-
| `x errors explain <CODE>` | code → cause, fix, docs | shipped |
|
|
65
|
+
| `x errors explain <CODE>` | code → cause, fix, docs; inside an app, its own `defineError()` code → title, HTTP status and the declaring `file:line` | shipped |
|
|
66
66
|
| `x docs "<question>"` | framework docs and this wiki, offline, from the install — the first lookup | shipped |
|
|
67
67
|
| `x fix boundary <file>` | plan the minimal cut for an import that crossed a surface boundary (never rewrites) | shipped |
|
|
68
68
|
| `x upgrade` | one major per run: exact pins, the Bun floor, `bun install`, the release's codemods, the gate, the section to read · `x upgrade codemods` | shipped |
|
|
@@ -72,6 +72,8 @@ x version # CLI version
|
|
|
72
72
|
| `x cache graph\|bust <tag>\|clear` | the tag graph off the manifest (what each write evicts), a bust of one tag or every declared tag through the app's own tiers and bus · `stats` was removed `As of 2026-11-15` ([Known gaps](Known-Gaps#open-by-decision)) | shipped |
|
|
73
73
|
| `x explain <query> [--input <json>] [--org <id>]` | one declared query run once on the dev database, every statement it sent planned by the `exercise` step's oracle | shipped |
|
|
74
74
|
| `x profile <route> [--runs 20] [--top 10]` | a CPU profile of rendering one route in this process: the hottest functions, file and line | shipped |
|
|
75
|
+
| `x merge-driver install` · `x merge-driver run <base> <ours> <theirs> <path>` | installs the git merge drivers for this clone (a step of `bun run setup`); `run` is what git calls for a registry both branches changed. [Merging two features](Many-Agents#merging-two-features) | shipped |
|
|
76
|
+
| `x heavy [status]` · `x heavy run [--label s] [--mb n] [--max-wait s] -- <command…>` | the machine's shared memory ledger: who runs, who is queued, load and memory; any command run inside one reservation, its exit code passed through | shipped |
|
|
75
77
|
| `x status [--url <origin>] [--samples n]` | the build each live worker runs (`x_job_workers`), and the build, status and role each sampled origin's `/readyz` answers | shipped |
|
|
76
78
|
|
|
77
79
|
## x new
|
|
@@ -224,6 +226,16 @@ stylesheet that names it with Sass `asset()`. Until 2026-09-27 only the edited r
|
|
|
224
226
|
was re-imported (`?x-reload=<hash>`), and every component it imported stayed the cached one: `x dev`
|
|
225
227
|
logged `reloaded` and rendered the old component until a restart.
|
|
226
228
|
|
|
229
|
+
**The database is part of the verdict, `As of 2026-11-19`.** While the migrations on disk are ahead
|
|
230
|
+
of the database `x dev` serves, or an applied one was edited since, its banner is `✗ dev ready`
|
|
231
|
+
(`ok: false` under `--json --once`) with `X_APP_MIGRATIONS_UNAPPLIED` (fix `x db migrate`; `x stop --json && x db migrate && x dev`
|
|
232
|
+
where this server cannot apply it) or `X_MIGRATION_CONFLICT`, on
|
|
233
|
+
`/_x` too; it still serves. `x db migrate` or `x db rollback` beside it is
|
|
234
|
+
applied by this dev server, and the finding clears with no restart. A schema finding appearing or
|
|
235
|
+
clearing (`X_DB_DRIFT` after `x db gen`) no longer restarts the child — an entity edit still does,
|
|
236
|
+
as a pinned module — so `x db gen "…" && x db migrate` runs against a server that is up; after it
|
|
237
|
+
the terminal prints an `hmr` line, not a fresh banner, and `/_x` holds the verdict.
|
|
238
|
+
|
|
227
239
|
Without `--once` the process stays up until it is signalled. `Ctrl-C` runs the same three-phase
|
|
228
240
|
drain a production `SIGTERM` runs — stop accepting, finish in-flight, close — and only then
|
|
229
241
|
releases the embedded Postgres, the worker and the file watcher, so `.x/pgdata` is never left
|
|
@@ -294,7 +306,7 @@ replicator takes a slot on a shared database. With `DATABASE_URL` unset the embe
|
|
|
294
306
|
serves no logical replication, so the role is refused, but `X_CLI_BAD_FLAG` now names the fix: set
|
|
295
307
|
`DATABASE_URL` to a Postgres with `wal_level=logical`. With `DATABASE_URL` set, the role starts for
|
|
296
308
|
real: advisory lock → `postgresChangeFeed()` → `changeFeedReplicator` → publish to the transport.
|
|
297
|
-
Errors: `X_CLI_BAD_FLAG`, `X_PORT_IN_USE
|
|
309
|
+
Errors: `X_CLI_BAD_FLAG`, `X_PORT_IN_USE` (names the holder's pid and directory; its fix names a port pair that is free when asked), `X_ENV_MISSING`, `X_DB_DRIFT`.
|
|
298
310
|
|
|
299
311
|
## x stop
|
|
300
312
|
|
|
@@ -309,6 +321,7 @@ Ends **this checkout's** `x dev` and returns only once the next `x dev` there ca
|
|
|
309
321
|
| a live `x dev` holds `.x/dev.lock` | SIGTERM to the pid the lock names, then wait for the pid to exit and the lock to clear | `{ stopped: true, pid, port, waitedMs, drained: true }` |
|
|
310
322
|
| Windows | `kill` is TerminateProcess, so no drain runs; `x stop` clears the lock itself | `{ …, drained: false }` |
|
|
311
323
|
| no lock, or a lock naming a dead pid | nothing is signalled, exit 0. A stale lock is left for the next `x dev`'s preflight to clear | `{ stopped: false }` |
|
|
324
|
+
| a lock naming a live pid that is not the `x dev` that wrote it (a reused pid) | nothing is signalled, exit 0; the lock is cleared, under the boot's own guard and only while it still holds the bytes judged. `x db reset`/`status`/`diagnostics`/`recount` treat such a lock as no holder anyway (`liveDevLockChecked`, `packages/cli/src/dev-lock-live.ts`). `As of 2026-11` | `{ stopped: false, stale: true }` |
|
|
312
325
|
| the pid outlives `--timeout` | `X_DEV_STOP_TIMEOUT`, naming the pid; the lock stays | — |
|
|
313
326
|
|
|
314
327
|
| Flag | Type | Default | Does |
|
|
@@ -396,6 +409,8 @@ is a word (`a-z`, `0-9`, `-`, `_`) or `[param]` / `[...rest]`; `..`, `.` and emp
|
|
|
396
409
|
|
|
397
410
|
`resource` emits the whole slice — `entity`, `repo`, `policy`, `errors`, `service`, `actions`, `live`, `jobs`, `ui`, the form island, the plural route and a test beside each declaration — **38 files** on a dry run in an app scaffolded with its example slice, 40 on the real run after `bun run setup` (`x.manifest.json` and `openapi.json` re-projected; 41 dry with `--admin`) — and `x g resource` in a `--no-example` app, which also gains two `package.json` edits, writes 40 and 42 files (43 and 45 with `--admin`; `--live` is refused — a resource already ships a live query, and the flag belongs to `x g query`: `X_CLI_BAD_FLAG`, fix `x g query <name>-feed --feature <name> --live`), and **no migration**: `x db gen` is the only writer of `packages/db/migrations`, so a new slice is `x g resource <name>`, then `x db gen "create <table>"`, then `x db migrate`, then `x build --target static && x verify --only budgets` — the four commands the run prints, in that order (`data.next` under `--json`). **The plural route is reachable as written**, `As of 2026-10-01`: its `load` reads the list through the slice's query as the request's actor (no org in the URL), `AsyncRegion` renders ready, empty and refused, the form island is mounted, and the route declares `policy: { permission: '<name>:read' }`. Its `budget.js` is MEASURED on `x new`'s app (58,522 B, Bun 1.4.0) and carries the `measured:` / `why:` comment `bun run budget-raises` reads; an app that charges more to every document — `navigation: { client: [...] }` adds its router — is over it on the printed build, and the raise is that edit. The page sits in `apps/web/shared/shell.tsx` when the app has one. `backfill` emits a `backfill()` declaration with its `source()` and `handle()` to fill in — see [Migrations and backfills](Migrations-And-Backfills). **`x g query` and `x g backfill` read a table and never create one**, `As of 2026-11-02`: both name a slice holding an `entity.ts`, by `--feature <slice>` or by a name that is one, and neither finding it is `X_FEATURE_REQUIRED`, zero files written, its fix the closest slice's `--feature` line or `x g resource <name>`. `x g resource` and `x g entity` are what create a table. Every generator produces code that passes `x verify` unmodified, and writes it through the app's own Biome when the app has one: `node_modules/.bin/biome` over the TypeScript files that run created, best effort, never a failed `x g`. A slice whose `entity.ts` declares another table under its name gets no foundation from `x g action`/`x g mutator`, and `x g query` there is `X_QUERY_SLICE_ENTITY`. A written contract test reads its exercise from `apps/web/exercise.ts` (`target.contract({ exercise })`), and the same run inserts its entry there — once, the file created from `x new`'s when absent, `As of 2026-11-08`; a file that is not one `export const exercise = defineExercise({ … })` is `X_EXERCISE_FILE_UNEDITABLE`, the entry to paste in its `fix:`. Errors: `X_GENERATE_CONFLICT`, `X_DB_HANDLE_UNREGISTERED`, `X_FEATURE_UNKNOWN`, `X_FEATURE_REQUIRED`, `X_QUERY_SLICE_ENTITY`, `X_EXERCISE_FILE_UNEDITABLE`.
|
|
398
411
|
|
|
412
|
+
**A generated read answers the slice's `<Feature>View`, not the whole row** (`As of 2026-11-19`): `x g query` and `x g resource` project each row through `viewOf` in the query's `sql:` provider (`from<XView>(…)`), so no tenant column reaches the wire and a column added to the entity is published only by an edit to the view, live patches included. That holds when the run writes the scaffold entity or the slice's `entity.ts` declares `XView = x.$view([...])` over `id`, `title` and `createdAt` (the columns the read orders by); otherwise the read answers the row as before. Files generated earlier are untouched.
|
|
413
|
+
|
|
399
414
|
**A name the templates would mangle is `X_CLI_BAD_FLAG` before anything is planned**, each with a `fix:` that runs: a reserved word or a leading digit; a letter outside ASCII (`Über` → `x g entity uber` — it was dropped to `ber`); an already-plural `resource`/`entity` name (`posts` → `x g resource post` — it became `entity('postses')`); and a name whose type spelling an emitted file also uses as a global or local type (`promise`, `omit`, `partial`, `row` → `x g resource promise-resource`).
|
|
400
415
|
|
|
401
416
|
**`entity` and `resource` write a repo over the typed handle, and register the entity in it**, `As of 2026-10`. The generated `repo.ts` holds no `sql` literal, no row decoding and no tenant predicate of any kind — `byId(id)`, `list(limit)` and `insert(row)` read `db.<table>`, and the handle scopes each to the actor's org ([Entities and migrations](Entities-And-Migrations#the-repo)) — and a table is on the handle only when its entity is in the set `packages/db/src/client.ts` passes to `database()`. The generator makes that edit, and four more:
|
|
@@ -475,7 +490,7 @@ The synopsis above is `GENERATORS` in `packages/cli/src/cmd-generate.ts`, which
|
|
|
475
490
|
## x db
|
|
476
491
|
|
|
477
492
|
```bash
|
|
478
|
-
x db gen "add publish_at" | migrate | reset
|
|
493
|
+
x db gen "add publish_at" [--merge-fork] | migrate | rollback [--steps n] | reset
|
|
479
494
|
| seed [<name>] [--tier reference|dev] [--dry-run] [--json]
|
|
480
495
|
| branch list | branch create <name> | branch delete <name>
|
|
481
496
|
| backfill --list [--name n] [--status s] [--limit n] [--json]
|
|
@@ -487,10 +502,11 @@ x db gen "add publish_at" | migrate | reset
|
|
|
487
502
|
|
|
488
503
|
| Subcommand | Does | Notes |
|
|
489
504
|
|---|---|---|
|
|
490
|
-
| `gen ["<name>"]` | diff the app's entities against what the migrations declare, write the next migration, then rewrite the schema dump | the message becomes the id's slug; left out it is `change`. **
|
|
491
|
-
| `migrate` | apply pending migrations, verify the result, then rewrite the schema dump | literally `ROLE=migrate`'s own `runMigrations` — which ends by diffing the live schema against the ledger it just wrote, on the connection it already holds. A difference is `X_DB_DRIFT` and a non-zero exit. Then, `x db migrate` only: the dump is regenerated as `gen` does, and the database is reopened to report any trigger, function, view, type or sequence no migration creates (`unexpected-object`, also `X_DB_DRIFT`). `--json` carries the same `data.schemaDump` |
|
|
505
|
+
| `gen ["<name>"]` | diff the app's entities against what the migrations declare, write the next migration, then rewrite the schema dump | One run at a time per checkout, `As of 2026-11`. The summary names the tables the migration touches (`data.tables`); a run with nothing to write names the newest migration (`data.newest`), which a concurrent run may have written. A forked chain is refused first (`X_MIGRATION_FORKED`). the message becomes the id's slug; left out it is `change`. **Writes to no database of yours** — the diff reads the previous migration's snapshot, and the dump is replayed on a scratch database it boots and discards: the embedded one, restored from a snapshot under `.x/cache` after its first boot, or a real Postgres when a migration creates an extension PGlite cannot link ([the engine rule](Migrations-And-Backfills#extensions-and-the-scratch-database)). **Exit 1 with a migration written** is possible: the dump failed after the migration was generated, the summary and the finding both say so, and the next move is a bare `x db gen`, never the same message again. A bare `x db gen` with nothing to generate rewrites `packages/db/schema/` alone, which makes it `X_SCHEMA_DUMP_DRIFT`'s whole fix. On the **embedded** database it first reads the ledger once (through a running `x dev`, else a read-only open of `.x/pgdata` when it exists; `As of 2026-11-19`): an applied migration whose SQL was edited since is `X_MIGRATION_CONFLICT`, exit 1, nothing written — the dump is never rewritten to match an edit. A ledger it cannot read is a printed line, never a refusal; an external `DATABASE_URL` is never dialled. A change that needs a step outside the transaction is written as two migrations, `<id>` and `<id>_concurrently`, and the summary names both. When the app does not load, nothing is compared and the summary says so — *nothing was compared — the app did not load (N finding(s)); fix them, then run x db gen again* — never "no migration needed". `--json`: `data.schemaDump` = `{ directory, status, files, written, removed }`, `status` one of `written`, `unchanged`, `skipped` (no migration yet), `failed`. `--allow-destructive` lets it emit a drop whose `down` cannot restore the rows; `--rolling-unsafe` lets it drop a column never retired, for an app that stops before it starts → [A column drop takes two releases](Migrations-And-Backfills#a-column-drop-takes-two-releases) |
|
|
506
|
+
| `migrate` | apply pending migrations, verify the result, then rewrite the schema dump | literally `ROLE=migrate`'s own `runMigrations` — which ends by diffing the live schema against the ledger it just wrote, on the connection it already holds. A difference is `X_DB_DRIFT` and a non-zero exit. Beside a live `x dev` holding the embedded database it is **applied by that dev server** (`POST /_x/db/migrate`, loopback and same-origin only), never by a second process: PGlite takes no lock of its own, and a second writer's tables are dropped by the holder's next write. The report, drift and dump are the same either way. The request sends `Sec-Fetch-Site: same-origin`, so an app's CSRF check admits it, and a holder still booting is waited for (up to 120 s; only a refused connection is retried, so a sent request is never sent twice). Applied that way, `x dev` serves the new schema without restarting. A holder that cannot answer (older server, dead port) or runs `database.rowSecurity` (it serves as `x_app`, which cannot migrate) is `X_DEV_ALREADY_RUNNING`, fix `x stop --json && x db migrate && x dev` (`As of 2026-11-19`; against an external `DATABASE_URL` it runs as always). Then, `x db migrate` only: the dump is regenerated as `gen` does, and the database is reopened to report any trigger, function, view, type or sequence no migration creates (`unexpected-object`, also `X_DB_DRIFT`). `--json` carries the same `data.schemaDump` |
|
|
507
|
+
| `rollback [--steps n]` | reverse the most recently applied migration(s), most recently applied first (`applied_at`, not id), by running each file's `-- down` half | default 1 (`--steps` is an integer ≥ 1, read before anything opens). The files stay, so each is pending again: `x db migrate` re-applies it, deleting its `.sql` / `.snapshot.json` / `.hash` drops the change. No `-- down` marker in the file: `X_MIGRATION_IRREVERSIBLE` (an empty `down` under the marker reverses with no statement). A ledger row whose file is gone: `X_MIGRATION_CONFLICT`. On a named deploy (staging or production, `NODE_ENV=production` included), an `ULTIMATE_ENV` that names no environment, or — whatever the environment — an external `DATABASE_URL` whose host is not this machine (loopback or a local socket): `X_MIGRATION_ROLLBACK_DESTRUCTIVE` until `ROLLBACK_ALLOW_DESTRUCTIVE` names every id it would reverse — judged under the migrate lock against the rows it is about to reverse. Beside a live embedded `x dev` it is run by that server (`POST /_x/db/rollback`), as `migrate` is; a request that reached it and lost its answer may have run, so its `X_DEV_ALREADY_RUNNING` fix is `x stop --json && x db status && x dev` — read the ledger, never the rollback again (only a refused connection repeats it). A change `gen` wrote as `<id>` + `<id>_concurrently` takes `--steps 2`; one step reverses the second half and names `<id>` as still applied. An index-only change is one non-transactional migration under the plain id, whole: no such line. `--json`: `data` = `{ reverted, steps, files }`. `As of 2026-11-19` |
|
|
492
508
|
| `reset` | delete the embedded data directory, then migrate | **embedded database only** — against an external Postgres it exits `X_NOT_IMPLEMENTED` and tells you to drop and recreate it yourself |
|
|
493
|
-
| `seed [<name>]` | apply the app's seeds — every one this environment takes, or the one named | **replayable**: a second run writes nothing and raises nothing, on Postgres as well as in memory. One transaction per seed, so one bad fixture graph cannot roll back the seeds that already landed. `--dry-run` reports what each would write and writes nothing |
|
|
509
|
+
| `seed [<name>]` | apply the app's seeds — every one this environment takes, or the one named | **replayable**: a second run writes nothing and raises nothing, on Postgres as well as in memory. One transaction per seed, so one bad fixture graph cannot roll back the seeds that already landed. `--dry-run` reports what each would write and writes nothing. Beside a live `x dev` holding the embedded database, `seed` (`--dry-run` and `--generate` included) is refused `X_DEV_ALREADY_RUNNING`, its fix `x stop --json && x db seed … && x dev` (`As of 2026-11-19`); `backfill --write` is refused the same way, `backfill` listing and dry runs are not |
|
|
494
510
|
| `branch list` | every **managed** branch of this database: name, location, created-at, size | managed means this framework made it — external, a database carrying `createBranch()`'s `comment on database` marker; embedded, a `pgdata-<name>` directory. A branch cloned by the pre-1.2.x `psql` shell-out carries no marker, so it is absent here and `delete` refuses it → [Known gaps](Known-Gaps). `size` reads `unknown` on the embedded database — measuring it is a full directory walk. The delete path only touches what this lists |
|
|
495
511
|
| `branch create <name>` | `CREATE DATABASE … TEMPLATE` copy-on-write clone (PGlite: a copied data directory) | the isolation an agent should use before migrating. An existing name is `X_BRANCH_EXISTS`, never an overwrite |
|
|
496
512
|
| `branch delete <name>` | delete that branch database (PGlite: its `pgdata-<name>` directory) | a name `list` does not show is refused with `X_DB_BRANCH_FAILED` naming what it *would* have touched — that is the whole guard, and it is why there is no `--force` |
|
|
@@ -545,6 +561,8 @@ Two more facts about the set, both `As of 2026-08`:
|
|
|
545
561
|
| `--name` | string | — | migration or branch name, or the backfill to filter the ledger by. Under `backfill --list` it is the **only** spelling of that filter: a positional there is a pass target in every other shape and is refused with `X_CLI_BAD_FLAG` rather than silently dropped |
|
|
546
562
|
| `--allow-destructive` | boolean | `false` | let `gen` emit a DROP whose `down` cannot restore the rows. `X_MIGRATION_IRREVERSIBLE`'s own `fix:` line names it |
|
|
547
563
|
| `--drop-redundant` | boolean | `false` | `gen`: leave out of the diff each implicit index (a column's own, from `.references()` or `.index()`) that another index, the primary key or a unique invariant already leads with, so the migration drops it `concurrently` in a non-transactional step you review. Never a default; once dropped, a plain `x db gen` does not rebuild it. A table with no migration yet keeps every index. `x doctor` lists what it would drop (`data.redundantIndexes`), `As of 2026-11-14` |
|
|
564
|
+
| `--merge-fork` | boolean | `false` | `gen`: the fix `X_MIGRATION_FORKED` prints. Rewrites the newest `.snapshot.json` to what the merged chain builds, then continues as any `gen`. Changes no SQL and deletes no migration. `--json`: `data.outcome` is `fork-merged` when no migration was needed, `data.forkRepairs` the objects corrected. Two migrations creating one object are still refused ([Two branches, one chain](Migrations-And-Backfills#two-branches-one-chain--x_migration_forked)) |
|
|
565
|
+
| `--steps` | integer ≥ 1 | `1` | `rollback` only: how many applied migrations to reverse, most recently applied first. `0`, a fraction or a word is `X_CLI_BAD_FLAG` before anything opens |
|
|
548
566
|
| `--list` | boolean | `false` | `backfill`: print the ledger |
|
|
549
567
|
| `--pending` | boolean | `false` | `backfill`: declared minus completed, judged in this `ULTIMATE_ENV`. Non-zero exit when anything is unswept |
|
|
550
568
|
| `--all` | boolean | `false` | `backfill`: every pending sweep, isolated per name |
|
|
@@ -607,7 +625,7 @@ unappliable.
|
|
|
607
625
|
|
|
608
626
|
**`x env init --production`** (`As of 30.0.0`) writes `.env.production`, the file `x deploy --method compose` reads: `ULTIMATE_ENV=production`, `IMAGE=ultimate-app:dev` (the tag `x build --target docker` makes), `POSTGRES_PASSWORD` and a `DATABASE_URL` naming the compose `db` service with it, `APP_URL` and `SYNC_URL` on localhost, and every secret the app declares or the framework refuses to boot without, 32 random bytes as hex each. Secrets are never printed: `--json` lists the key names (`data.written`). `.gitignore` gains `.env.production` first, the file is mode 600, and a second run refuses (`X_ENV_FILE_EXISTS`): the password is the one the database volume was initialised with. A required key nothing can derive is written empty, named in `data.unfilled`, and exits 1.
|
|
609
627
|
|
|
610
|
-
**`x env check`
|
|
628
|
+
**`x env check` answers for one environment and says which** (`As of 2026-11-19`). Named — `ULTIMATE_ENV`, else `NODE_ENV` — it is checked as named, always. With neither set it is checked as **development**, the environment `x dev` in the same directory declares, and the summary ends `checked as development, as x dev runs here: no ULTIMATE_ENV named — a deploy: ULTIMATE_ENV=production x env check`. With neither set under `CI` it is checked as production, because the boot fails closed (`checked as production: no ULTIMATE_ENV named`). `--json` carries `data.environment`. For a deploy's answer, name it: `ULTIMATE_ENV=production x env check` — the scaffold's image sets `NODE_ENV=production`, and `x deploy`'s pre-flight fix is `NODE_ENV=production x env check --json`. A missing key's `X_ENV_MISSING` fix is the line to add, in the file that environment loads (`.env.development.local`, `.env.test.local`, `.env.production`).
|
|
611
629
|
|
|
612
630
|
**The schema dump against the newest snapshot** (`As of 2026-11-02`, `drift`, no database) is `X_DB_DRIFT`: a column in `packages/db/schema/04_tables/<t>.sql` no snapshot records means an applied migration was edited and regenerated. A table hand-written SQL names is exempt.
|
|
613
631
|
|
|
@@ -629,7 +647,7 @@ pre-1.2.0 layout, and reading it as one would drop every table the pair exists t
|
|
|
629
647
|
|
|
630
648
|
Errors, seed: `X_DECLARATION_UNKNOWN` (no seed of that name — the cause lists the ones there are), `X_CLI_BAD_FLAG` (an unknown `--tier`, one name declared twice, or a `dev` seed reached under `production` with no consent), and whatever the seed itself threw, reported per seed with the file it came from.
|
|
631
649
|
|
|
632
|
-
Errors, schema: `X_DB_DRIFT`, `X_SCHEMA_DUMP_DRIFT`, `X_DB_GEN_FAILED`, `X_DB_MIGRATE_FAILED`, `X_DB_BRANCH_FAILED`, `X_MIGRATION_CONFLICT`, `X_MIGRATION_IRREVERSIBLE`, `X_MIGRATION_VIEW_DEPENDS`, `X_MIGRATE_CONCURRENT`, `X_NOT_IMPLEMENTED`. `X_DB_STUDIO_FAILED` is reserved and no longer thrown — `studio` left `x db` `As of 2026-11-15` ([Known gaps](Known-Gaps#open-by-decision)).
|
|
650
|
+
Errors, schema: `X_DB_DRIFT`, `X_SCHEMA_DUMP_DRIFT`, `X_DB_GEN_FAILED`, `X_DB_MIGRATE_FAILED`, `X_DB_BRANCH_FAILED`, `X_MIGRATION_CONFLICT`, `X_MIGRATION_FORKED`, `X_MIGRATION_IRREVERSIBLE`, `X_MIGRATION_VIEW_DEPENDS`, `X_MIGRATE_CONCURRENT`, `X_NOT_IMPLEMENTED`. `X_DB_STUDIO_FAILED` is reserved and no longer thrown — `studio` left `x db` `As of 2026-11-15` ([Known gaps](Known-Gaps#open-by-decision)).
|
|
633
651
|
|
|
634
652
|
Errors, backfill: `X_BACKFILL_PENDING` (`--pending`, and the only one that is not a refusal — the sweep simply has not run), `X_BACKFILL_UNKNOWN`, `X_BACKFILL_ENVIRONMENT`, `X_BACKFILL_MIGRATION_PENDING`, `X_BACKFILL_APPLIED`, `X_BACKFILL_RUNNING`. All six are `@ultimat3/jobs`', carry a one-line runnable `fix:`, and are what a non-zero exit from these shapes means — full wording in [Error codes → `@ultimat3/jobs`](Error-Codes-jobs). `X_BACKFILL_STALLED` is the seventh and never reaches this command: it is raised by the pass, on a worker, so it surfaces through `x jobs show <id>`.
|
|
635
653
|
|
|
@@ -756,9 +774,24 @@ the env file's is your own server, and is never probed or second-guessed. The st
|
|
|
756
774
|
running** (RAM only; the next run reuses it) and the step's warning says so, with the stop line,
|
|
757
775
|
`docker compose -f docker/docker-compose.test.yml down`. No Docker, or a start that fails with no
|
|
758
776
|
database answering: a warning carrying `X_TEST_SERVICES_UNAVAILABLE` and the start command as its
|
|
759
|
-
fix, and the suites run exactly as before
|
|
760
|
-
`
|
|
761
|
-
`
|
|
777
|
+
fix, and the suites run exactly as before. When the floor holds `live` and that run executed no
|
|
778
|
+
test, `X_TEST_SERVICES_UNAVAILABLE` is the step's **finding**, first and red, with its working fix —
|
|
779
|
+
not `X_VERIFY_SUITE_VANISHED`, which is no longer added when the step already says why
|
|
780
|
+
(`As of 2026-11-19`). `--only live` with no floor, or a live run where some tests ran, keeps the
|
|
781
|
+
warning.
|
|
782
|
+
One stderr line names the stack: `services: started|reused <project>`, or `services: shared <project>
|
|
783
|
+
with <dir>` for another checkout of this app (same first commit or `origin`). A stack under this
|
|
784
|
+
project name started by a different app is refused before compose runs:
|
|
785
|
+
`X_TEST_SERVICES_UNAVAILABLE`, unless `ULTIMATE_TEST_SERVICES_SHARED=1` says the share is intended.
|
|
786
|
+
A **stopped** one is called stopped, never "already running", and its fix removes it by name:
|
|
787
|
+
`docker compose -p <project> down --volumes` (its data was in RAM), then `x verify --only live`. It
|
|
788
|
+
is reported, never taken over. `x new` (`As of 2026-11-19`) writes the compose `name:` as
|
|
789
|
+
`<app>-test-<8 hex of the scaffold directory's hash>` and picks the ports from name and directory,
|
|
790
|
+
so two scaffolds with one name on one machine get two stacks; an existing app keeps the `name:` its
|
|
791
|
+
compose file states, and a moved checkout keeps its scaffold-time name.
|
|
792
|
+
`x clean --services` stops the stack.
|
|
793
|
+
`packages/cli/src/verify-live.ts` decides when; `verify-services.ts` probes and starts;
|
|
794
|
+
`verify-services-stack.ts` reads whose stack it is.
|
|
762
795
|
|
|
763
796
|
`--workers` widens the test steps only. `unit`, `contract`, `job` and `eval` run as
|
|
764
797
|
`bun test --parallel=N`, each worker with its own database; `live` and `e2e` are serial by
|
|
@@ -825,7 +858,8 @@ test can fall between two steps.
|
|
|
825
858
|
because a skipped step — or one gating against nothing — would read as a green gate over untested
|
|
826
859
|
code. It gates on the drop from each eval's committed baseline, never on an absolute score —
|
|
827
860
|
`ULTIMATE_EVAL_RECORD=1 x test eval` re-records those baselines so accepting a new number is a
|
|
828
|
-
reviewable diff.
|
|
861
|
+
reviewable diff. `0`, `false`, `no`, `off` and empty (any case, trimmed) are off and gate; any
|
|
862
|
+
other value records (`As of 2026-11-19`, `packages/ai/src/eval-baseline.ts`).
|
|
829
863
|
|
|
830
864
|
That flag and this step are mutually exclusive. `x verify` with `ULTIMATE_EVAL_RECORD` set is
|
|
831
865
|
`X_EVAL_RECORDING` and the suite does not run: recording makes every eval write the numbers it
|
|
@@ -1005,7 +1039,7 @@ x deploy verify --url <origin> [--build <id>] [--window 60s] [--interval 5s] [--
|
|
|
1005
1039
|
| queues | after the window, when `DATABASE_URL` is set. Expected: `jobs.queues` plus every registered job's queue. Served: a row not draining, of this build. Re-read until served or `--timeout`; a failed read keeps the last grade, and none landing is `X_DB_UNAVAILABLE` |
|
|
1006
1040
|
| no `DATABASE_URL` | `queues.graded: false` and the summary says so. Never the embedded database, never counted as a pass |
|
|
1007
1041
|
|
|
1008
|
-
`--json` `data`: `{ build, samples: { total, good, byBuild, byStatus, share, cached }, windowMs, queues: { graded, served, unserved: [{ queue, builds, depth }], idle } }`. `byStatus` counts a sample nothing answered as `unreachable`. `builds` names what the workers claiming that queue run (`unknown` for a row from before 30.0.0), so a stalled roll reads as one.
|
|
1042
|
+
`--json` `data`: `{ build, samples: { total, good, byBuild, byStatus, share, cached }, windowMs, queues: { graded, served, unserved: [{ queue, builds, depth }], idle, containers? } }`. `byStatus` counts a sample nothing answered as `unreachable`. `builds` names what the workers claiming that queue run (`unknown` for a row from before 30.0.0), so a stalled roll reads as one. `containers` (`As of 2026-11-19`, present when the registry was read): `[{ host, processes, slots }]`, this build's serving worker rows grouped by `host`, sorted — a container running `ULTIMATE_PROCESSES=N` is one `host` with `processes: N`, and `slots` is its `jobs.concurrency` total however the children split it ([Deployment](Deployment#processes-per-container)).
|
|
1009
1043
|
|
|
1010
1044
|
Errors: `X_DEPLOY_BUILD_MISMATCH` (no sample carried the build), `X_DEPLOY_BUILD_UNSTAMPED` (2xx with no header, and no build ever named), `X_DEPLOY_UNSTABLE` (the build answered, the window never closed), `X_DEPLOY_QUEUE_UNSERVED` (one finding per queue), `X_CLI_BAD_FLAG`.
|
|
1011
1045
|
|
|
@@ -1127,7 +1161,7 @@ x auth seal-mfa [--json]
|
|
|
1127
1161
|
One subcommand, and no default: a bare `x auth` is refused (`X_CLI_BAD_FLAG` names the subcommand), as `x db`, `x mcp` and `x pr` are — the one subcommand rewrites credential rows, and the read-only answer (how many are unsealed) is `x doctor`'s. `seal-mfa` seals every `x_users.mfa_secret` still stored
|
|
1128
1162
|
in the clear, in place, under the app's master key (`As of 2026-10`). It is the one-shot an upgrade
|
|
1129
1163
|
onto sealed second-factor secrets owes — `completeMfa` refuses a plaintext value with
|
|
1130
|
-
`X_MFA_SECRET_UNSEALED`, whose fix is this command, and `x doctor` reports how many rows are left.
|
|
1164
|
+
`X_MFA_SECRET_UNSEALED`, whose fix is this command, and `x doctor` reports how many rows are left. Beside a live `x dev` holding the embedded database it is refused `X_DEV_ALREADY_RUNNING`, fix `x stop --json && x auth seal-mfa && x dev` (`As of 2026-11-19`).
|
|
1131
1165
|
|
|
1132
1166
|
| | |
|
|
1133
1167
|
|---|---|
|
|
@@ -1267,7 +1301,9 @@ whatever its bearer token was issued.
|
|
|
1267
1301
|
| `ui.diff` | pixel-compare two PNGs the other `ui.*` tools wrote under `.x/shot/`; launches no browser | `dev:read` |
|
|
1268
1302
|
|
|
1269
1303
|
`db.query` and `db.migrate` refuse structurally — multiple statements, a mutating keyword
|
|
1270
|
-
(a data-modifying CTE included), a locking clause, `EXPLAIN ANALYZE
|
|
1304
|
+
(a data-modifying CTE included), a locking clause, `EXPLAIN ANALYZE` (or `ANALYSE`), a banned
|
|
1305
|
+
function family (`pg_read_*`, `pg_copy_*`, `pg_backup_*`, `pg_restore_*`, … — [MCP and AI](MCP-And-AI)),
|
|
1306
|
+
a non-branch target —
|
|
1271
1307
|
before the host runs anything. `db.explain` is where `ANALYZE` is allowed: it writes the `EXPLAIN`
|
|
1272
1308
|
itself around a statement the same scan passed.
|
|
1273
1309
|
|
|
@@ -1286,18 +1322,20 @@ A tool this caller may not see is absent from `tools/list` and answers ToolNotFo
|
|
|
1286
1322
|
x doctor [--port 3000] [--json]
|
|
1287
1323
|
```
|
|
1288
1324
|
|
|
1325
|
+
A taken port is judged by who holds it (`As of 2026-11-18`): from this checkout, or by a process the OS will not name, it is an `X_PORT_IN_USE` finding; from another checkout it is the same code as a warning in `data.warnings[]`, naming that directory, and the exit stays 0. Either way the fix names a port pair that is free when asked.
|
|
1326
|
+
|
|
1289
1327
|
Checks Bun version, env completeness, source drift, **the newest migration's `.snapshot.json`**, port availability, PWA prerequisites and **embedded-Postgres readiness** — each failing check carries its own fix command.
|
|
1290
1328
|
|
|
1291
|
-
It also lists the shipped guards the app
|
|
1329
|
+
It also lists the copies of shipped guards the app's `guards/` still holds, each with `X_GUARD_VENDORED` beside the verdict in `data.warnings[]`: shipped guards run from the installed framework, so a copy runs in place of the shipped one and never receives a fix. `As of 31.28`. No shipped guard is ever missing, so `data.guards.missing` is always `[]`.
|
|
1292
1330
|
|
|
1293
1331
|
| Listing | One line each | `--json` |
|
|
1294
1332
|
|---|---|---|
|
|
1295
|
-
|
|
|
1296
|
-
|
|
|
1333
|
+
| a copy, identical or edited | the edit that resolves it: `rm -f` for an identical copy; for an edited one, `mv` to `guards/app-<name>.ts` and `"<name>": "off"` in `guards/shipped.json` | `data.guards.vendored[]`: every copy's name |
|
|
1334
|
+
| an edited copy | the same line | `data.guards.differs[]`: `{ name, refresh, diff }` — `refresh` is that edit |
|
|
1297
1335
|
|
|
1298
|
-
A listing, never a finding:
|
|
1336
|
+
A listing, never a finding: the verdict does not move. `x upgrade` applies the same migration (`vendored-guards` codemod); how a shipped guard reports is a row in `guards/shipped.json`.
|
|
1299
1337
|
|
|
1300
|
-
|
|
1338
|
+
Warnings about how the app is held — beside the verdict, never in it: the exit status, `findings` and `data.codes` stay as they were, and `--json` carries each as `data.warnings[]` (`{ code, cause, fix, docs, at }`). None is a gate step; on `next` they join the verdict, red:
|
|
1301
1339
|
|
|
1302
1340
|
| Code | Asked | Fix |
|
|
1303
1341
|
|---|---|---|
|
|
@@ -1305,7 +1343,10 @@ Four warnings about how the app is held, `As of 31.16.0` (a fifth, `X_SHIPPED_GU
|
|
|
1305
1343
|
| `X_VERIFY_STEP_UNFLOORED` | a gate step applies here — its suite files exist, its input is committed — and `x.verify.json` `"steps"` does not hold it, so a deleted suite reads as skipped. `e2e` is never proposed (the scaffold's placeholder skips until a browser driver is registered) | `x verify --only <steps> --json`, then add each step that passed to `"steps"` |
|
|
1306
1344
|
| `X_FRAMEWORK_PIN_RANGE` | an `@ultimat3/*` dependency in any of the app's manifests is anything but an exact version or a `workspace:`/`file:`/`link:` path (`^31.0.0`, `*`, `latest`, `>=31 <32`; an `npm:` alias by its own spec), one finding per manifest | the exact version `bun install` resolved, at the line named; then `bun install` |
|
|
1307
1345
|
| `X_ENV_NAME_RESERVED` | a name the app declares in `envSchema` or seals in `secrets.enc.json` is one `FRAMEWORK_ENV` (`@ultimat3/core`) lists as a `switch` or `internal` name — setting it for the app also switches that package's behaviour. Deploy-contract names (`DATABASE_URL`, `PORT`) and host names are not collisions | rename it `APP_<name>` (or delete it where the value is meant for the framework); then `x env example` |
|
|
1308
|
-
| `
|
|
1346
|
+
| `X_GUARD_VENDORED` (`As of 31.28`) | the app's `guards/` holds a copy of a shipped guard, which runs in place of the built-in one and never receives a fix — one per copy. `boundaries` lists it too | the resolving edit above |
|
|
1347
|
+
| `X_ACTION_UNREGISTERED` · `X_QUERY_UNREGISTERED` (`As of 2026-11-19`) | the app's API index lists actions or queries in `defineApi()`, and a loaded module exports one whose name no list carries — served by the module scan, missing from the typed `Api`. An app that lists none (scan only) is told nothing; a failed load is silent | the import line, as `X_JOB_UNREGISTERED` prints it: `import * as refundTicket from '../app/ticket/actions/refund-ticket';` in `apps/web/api/index.ts`, `refundTicket` added to `actions: [...]` there — then `x manifest` |
|
|
1348
|
+
|
|
1349
|
+
**Processes per container**, the same way (`As of 2026-11-19`): one line per role — the count a production container of it runs on this host under `ULTIMATE_PROCESSES` and the clamp that bound it, its pool plus LISTEN sessions as connections per container — then, when an external database answered, one container of each role against `max_connections`. `--json`: `data.processes` = `{ environment, cores, cpuBudget, migrateReq, roles: [{ role, count, binding, pool, listen, connections } | { role, refused }], connectionsOneOfEach, maxConnections }` (`cpuBudget`, `migrateReq`, `maxConnections` are `null` when unknown; `binding` is one of `environment`, `platform`, `role`, `cpu`, `memory`, `pool`, `shared-state`, `image`, `requested`; `refused` is the code an explicit count met). On a production or staging host only, two warnings join `data.warnings[]`: `X_PROCESSES_CPU_UNDECLARED` (no CPU quota on a multi-core host, so `auto` runs one process; fix `cpus:` on the service) and `X_PROCESSES_MIGRATE_REQ_OFF` (N > 1 with `net.ipv4.tcp_migrate_req` at 0, only where the knob exists — Linux ≥ 5.14; a kernel without it is told nothing; fix: uncomment the `sysctls:` line). A listing, never a finding ([Deployment](Deployment#processes-per-container)).
|
|
1309
1350
|
|
|
1310
1351
|
**Redundant indexes**, the same way (`As of 2026-11-14`): each implicit index the entities describe that another index, the primary key or a unique invariant already leads with, still in the newest migration's snapshot, is one line — `<table>.<index> (<columns>) — <covering index>` — under a header naming `x db gen "drop redundant indexes" --drop-redundant`; `--json`: `data.redundantIndexes[]` = `{ table, name, columns, coveredBy }`, `[]` when none, absent when the app would not load or has no snapshot. A listing, never a finding: every write pays for each twice, and dropping it is a migration the app opts into.
|
|
1311
1352
|
|
|
@@ -1395,10 +1436,10 @@ x jobs [list|show <id>|retry <id>|cancel <id>|delete <id>|promote <id>|resolve-s
|
|
|
1395
1436
|
| `delete <id>` | delete one job and its step records. An unknown id is `X_JOB_UNKNOWN`; a **running** job is refused with `X_JOB_NOT_REMOVABLE`, whose fix is `x jobs cancel <id> --json` — deleting the row under a body does not stop the body |
|
|
1396
1437
|
| `promote <id>` | make a job waiting on its run time — delayed at enqueue, or backing off before a retry — due now. Anything else (due, running, finished, suspended in a `step.sleep`) is `X_JOB_NOT_PROMOTABLE`, naming the state |
|
|
1397
1438
|
| `resolve-step <id> <step>` | answer a `once` step whose outcome is unknown (`X_STEP_OUTCOME_UNKNOWN`): `--ran --output '<json>'` records it `completed` — a replay returns that JSON, default `null` — and `--not-ran` records it `cleared`, so the next run calls it again. Exactly one of the two. Refused on a running job, or a step that did not start-and-not-complete (`X_STEP_NOT_RESOLVABLE`). Answers the job's trace; then `x jobs retry <id>` |
|
|
1398
|
-
| `pause <queue>` | no worker claims from the queue; enqueues still land. A row every worker's next claim reads, so it holds **fleet-wide within one poll interval**. Idempotent. Answers the paused list as the queue now holds it |
|
|
1399
|
-
| `resume <queue>` | undo it |
|
|
1439
|
+
| `pause <queue>` | no worker claims from the queue; enqueues still land. A row every worker's next claim reads, so it holds **fleet-wide within one poll interval**. Idempotent. Answers the paused list as the queue now holds it. A queue outside `jobs.queues` and the registered jobs' queues is `X_CLI_BAD_FLAG`, its fix the nearest name, before any row is written (`As of 2026-11-19`); an app that does not load is never refused on a guess |
|
|
1440
|
+
| `resume <queue>` | undo it; a queue that is paused always resumes, else the same queue check as `pause` |
|
|
1400
1441
|
|
|
1401
|
-
`show`, `retry`, `cancel`, `delete` and `promote` each take **one id positional**, `resolve-step` an id and a step name; `pause` and `resume` take **one queue positional**. There is no bulk verb here — bulk is `requeueMany` / `removeMany` on `JobIntrospection`, which a dashboard calls. `--queue`, `--state`, `--name`, `--limit` and `--after` narrow `list` only. A bare `x jobs` is `list`. One verb each, no alias: `ls` and `rm` are `X_CLI_UNKNOWN_COMMAND` since 26.0.0.
|
|
1442
|
+
`show`, `retry`, `cancel`, `delete` and `promote` each take **one id positional**, `resolve-step` an id and a step name; `pause` and `resume` take **one queue positional**. Beside a live `x dev` holding the embedded database, the writing verbs (`retry`, `cancel`, `delete`, `promote`, `resolve-step`, `pause`, `resume`) are refused `X_DEV_ALREADY_RUNNING`, the fix stopping it, running the verb and starting it again; `list` and `show` still read (`As of 2026-11-19`). There is no bulk verb here — bulk is `requeueMany` / `removeMany` on `JobIntrospection`, which a dashboard calls. `--queue`, `--state`, `--name`, `--limit` and `--after` narrow `list` only. A bare `x jobs` is `list`. One verb each, no alias: `ls` and `rm` are `X_CLI_UNKNOWN_COMMAND` since 26.0.0.
|
|
1402
1443
|
|
|
1403
1444
|
```bash
|
|
1404
1445
|
x jobs cancel 019ff1c5-0000-7000-8000-000000000001 --reason "wrong tenant" --json
|
|
@@ -1417,13 +1458,14 @@ A run refused by its concurrency key reads `state: failed` with `X_JOB_KEY_BUSY`
|
|
|
1417
1458
|
## x tasks
|
|
1418
1459
|
|
|
1419
1460
|
```bash
|
|
1420
|
-
x tasks [list|show <name>] [--count n] [--json]
|
|
1461
|
+
x tasks [list|show <name>|run <name>] [--count n] [--production] [--json]
|
|
1421
1462
|
```
|
|
1422
1463
|
|
|
1423
1464
|
| Subcommand | Does |
|
|
1424
1465
|
|---|---|
|
|
1425
1466
|
| `list` | every registered `task`: cron, timezone, catch-up policy, the jobs it enqueues, the occurrence it **last** fired and its next one |
|
|
1426
1467
|
| `show <name>` | the same plus the cron in words and the next `--count` occurrences (default 5, max 50) |
|
|
1468
|
+
| `run <name>` | fire the task now: each job its occurrence enqueues goes onto the app's queue, through `TaskHandle.enqueue()` (the admin's run-now path). The scheduler's watermark is untouched, so the next scheduled occurrence still fires. Where the environment resolves `production` it fires only when asked by name — `--production`, or `ULTIMATE_TASK_RUN=<name>` for a container whose command line is fixed — as `x db seed --tier` / `ULTIMATE_SEED_TIER` do (`X_TASK_RUN_PRODUCTION` otherwise, nothing queued); beside an `x dev` holding the embedded database it is refused `X_DEV_ALREADY_RUNNING` with the stop–run–restart fix. `--json`: `data` = `{ task, jobs: [{ job, id, runId, deduped }] }`. `x g cron-job <name>` prints `bunx x tasks run <name>.schedule` as its next step. `As of 2026-11-19` |
|
|
1427
1469
|
|
|
1428
1470
|
| `--json` field | Is |
|
|
1429
1471
|
|---|---|
|
|
@@ -1614,9 +1656,11 @@ sampled throughout.
|
|
|
1614
1656
|
| `roll-before-migrate` | the roles started before `ROLE=migrate`, on a schema stamped by an older build | `roles-wait`, `serves-after-migrate`, `one-wait-line` |
|
|
1615
1657
|
|
|
1616
1658
|
`roll-before-migrate`, `As of 2026-11-15`, is the rollout order a deploy cannot always hold: no
|
|
1617
|
-
|
|
1659
|
+
fault and no load. The scratch database is migrated, its framework stamp (`x_jobs`' table comment)
|
|
1618
1660
|
is rewound to name only an older build, then `web`, `worker` and `scheduler` start on it without
|
|
1619
|
-
waiting for readiness
|
|
1661
|
+
waiting for readiness, with `sync` when `TEST_NATS_URL` is set and `replicator` when
|
|
1662
|
+
`TEST_REPLICATION_URL` names a logical server (the scratch database then lives there) and the app
|
|
1663
|
+
has an entity on a table. A role left out is in `data.rolesNotPlayed[]`, `{ drill, role, needs }`. Once each has logged its wait (or exited), they are held 3 s and
|
|
1620
1664
|
`ROLE=migrate` runs again. Each must stay up (`roles-wait`: an exit is a crash-loop), log exactly
|
|
1621
1665
|
one line naming `X_FRAMEWORK_SCHEMA_UNAPPLIED` (`one-wait-line`), and answer `/readyz` 200 once
|
|
1622
1666
|
migrate has run (`serves-after-migrate`). `ULTIMATE_SCHEMA_WAIT_MS` is inherited: `0` — refuse at
|
|
@@ -1635,34 +1679,41 @@ property is red when no job ran during the drill, `sync-resumes` when no sync cl
|
|
|
1635
1679
|
A service the app uses must be up for every drill; an unset one is refused, never skipped. A named
|
|
1636
1680
|
drill that faults a service the app does not declare is refused; a whole run lists it under
|
|
1637
1681
|
`data.notRun`. `--list` prints the table and runs nothing. `--json`: `{ budgets, targets,
|
|
1638
|
-
skippedWrites, drills[], notRun }`, each drill `{ name, verdict, evidence, budgets, baseline }`.
|
|
1682
|
+
skippedWrites, drills[], notRun, rolesNotPlayed }`, each drill `{ name, verdict, evidence, budgets, baseline }`.
|
|
1639
1683
|
|
|
1640
1684
|
Errors: `X_DRILL_FAILED` (one per property that did not hold), `X_DRILL_SERVICE_MISSING`, `X_CLI_UNKNOWN_COMMAND`, `X_CLI_BAD_FLAG`.
|
|
1641
1685
|
|
|
1642
1686
|
## x policy
|
|
1643
1687
|
|
|
1644
1688
|
```bash
|
|
1645
|
-
x policy [list|explain <subject>] [--json]
|
|
1689
|
+
x policy [list|explain <subject> [--input '<json>']] [--json]
|
|
1646
1690
|
```
|
|
1647
1691
|
|
|
1648
1692
|
| Subcommand | Does |
|
|
1649
1693
|
|---|---|
|
|
1650
1694
|
| `list` | every permission, the roles that grant it, and the actions and queries that enforce it — plus the permissions **nothing** enforces, which are grants that do nothing |
|
|
1651
|
-
| `explain <subject>` |
|
|
1695
|
+
| `explain <subject>` | one row per actor per declaration — every declared role plus `anonymous`, for each action or query that enforces the subject — naming the clause that decided and its reason. Verdict `allow`, `deny`, or `needs input` |
|
|
1696
|
+
|
|
1697
|
+
| Flag | Does |
|
|
1698
|
+
|---|---|
|
|
1699
|
+
| `--input '<json>'` | `explain` only: the request's input, as one JSON argument. A predicate that reads input is decided on it. Not JSON is `X_CLI_BAD_FLAG`, reported by length; the value is never echoed back |
|
|
1652
1700
|
|
|
1653
1701
|
`<subject>` resolves in order against a permission (`post:publish`), an action name (`publishPost`), a query name (`postFeed`), then an action's HTTP path (`/api/posts/publish`) — so the `fix:` line printed by an `X_FORBIDDEN` is runnable whichever of the four the throwing surface had to hand.
|
|
1654
1702
|
|
|
1655
1703
|
```bash
|
|
1656
|
-
$ x policy explain
|
|
1657
|
-
action
|
|
1658
|
-
actor verdict
|
|
1659
|
-
anonymous deny
|
|
1660
|
-
|
|
1661
|
-
|
|
1704
|
+
$ x policy explain closeTicket
|
|
1705
|
+
action closeTicket — policy ticket:write
|
|
1706
|
+
actor verdict deciding reason
|
|
1707
|
+
anonymous deny ticket:write no actor for ticket:write
|
|
1708
|
+
admin needs input ticket:write not denied — every actor-only clause passes, and ticket:write has a predicate that reads the request input
|
|
1709
|
+
viewer deny ticket:write actor lacks ticket:write
|
|
1662
1710
|
evaluated with no request input and no row — a rule reading either decides again on the real request
|
|
1711
|
+
✓ closeTicket — allowed for 0 of 3 actor evaluation(s); 1 not denied, decided by a predicate that reads the request input — x policy explain closeTicket --input '<the request input as JSON>'
|
|
1712
|
+
|
|
1713
|
+
$ x policy explain closeTicket --input '{"orgId":"0190…","ticketId":"0190…"}'
|
|
1663
1714
|
```
|
|
1664
1715
|
|
|
1665
|
-
The verdict comes from `@ultimat3/policy`'s own `policyMatrix()` over the app's real `Policy` objects — the same evaluation the request path runs, never a second one.
|
|
1716
|
+
The verdict comes from `@ultimat3/policy`'s own `policyMatrix()` over the app's real `Policy` objects — the same evaluation the request path runs, never a second one. With no `--input` there is no request to read, so a predicate that reads one is **not decided**: the row says `needs input` (`verdict: "needs-input"`, `allowed: null` in `--json`, counted in `data.pending`), never `deny` (`As of 2026-11-19`). Reading is detected, not assumed: the predicate runs over a stand-in input that records being read, so one reading only the actor (`({ actor }) => …`) still decides. `deny` means what it says — no actor, no grant, or an actor-only predicate that refused. A row-level rule is evaluated with no row and decides again on the real request (`row?.ownerId === actor.id` still reads `deny` under that note). The actors carry no `orgId`, so an org-scoped predicate compares against `undefined` even with `--input`. With `--input`, a policy that throws on it (a field the JSON does not carry) reports `decidable: false` and a note in place of the table, never a table of invented denials.
|
|
1666
1717
|
|
|
1667
1718
|
Errors: `X_DECLARATION_UNKNOWN`, `X_CLI_BAD_FLAG`.
|
|
1668
1719
|
|
|
@@ -1727,6 +1778,8 @@ x test [unit|contract|live|job|e2e|eval] [--filter path[,path…]] [--allow-empt
|
|
|
1727
1778
|
|
|
1728
1779
|
The type rule is `x verify`'s, not a second one — so `x test contract` runs exactly what the gate's `contract` step runs. A selection that matches no files is `X_TEST_NO_FILES` (green with `--allow-empty`); an unknown type is `X_CLI_BAD_FLAG` naming the six and suggesting the nearest.
|
|
1729
1780
|
|
|
1781
|
+
**Exit codes, `As of 2026-11-19`.** `0`: at least one test ran and none failed. `1`: a test failed — `X_TEST_FAILED`, its cause naming the failing files (up to 5) and its fix rerunning the first one alone (`x test <type> --filter <file> --workers 1`; the whole reproduce line only when bun named no file; `data.reproduce` unchanged). **`1` too when every test the run selected skipped itself** (`ran 0`, `skipped N`): `bun test` exits 0 there, but nothing was checked. The summary reads `live — 0 test(s) ran: all 1 skipped themselves, so nothing was checked`; the finding is `X_TEST_FAILED`, its cause naming any unset `TEST_DATABASE_URL`, `TEST_REDIS_URL` or `TEST_NATS_URL` and its fix starting the test services, then the same selection — or, with nothing unset, a `grep -nE 'skip|needs:'` over the files. `x verify` is unaffected: its steps do not go through this verdict.
|
|
1782
|
+
|
|
1730
1783
|
**In an app root `--affected` narrows by import closure, `As of 2026-11`** — every slice shares the `apps/web` workspace, so the workspace answer ran the whole app. The rule is `x affected`'s `data.tests`, never a second one: a test runs when its imports reach a changed file, transitively; a changed file the import graph cannot speak for (`app.config.ts`, `package.json`, a catalog, anything outside the app) runs every test; a discovered test outside the scanned globs always runs. `data.affected.tests` carries `{ app, all, reason, forcing, files: [{ path, why }] }` — `reason` is `closure: N changed file(s)` or `all: <forcing files>`, `why` is `closure`, `all` or `unmapped`. Outside an app root, `data.affected` has no `tests` and the workspace scope is unchanged.
|
|
1731
1784
|
|
|
1732
1785
|
`--affected` narrows the FEEDBACK, never the gate. The GATE stays un-narrowable — `x verify` with no flag is the gate, and `x verify --only <step>` announces `NOT A GATE RUN` in both renderers precisely so a narrowed run can never be read as one — because a gate that can be scoped is a gate that can be scoped wrong. Nothing affected is **green with zero spawns**, not a failure: editing a `.md` should not fail a build. A failure's `fix:` carries `--affected --base <ref>` back with it, because `--affected` decides which files exist to run at all and a rerun without it selects the whole corpus.
|
|
@@ -1738,15 +1791,17 @@ The type rule is `x verify`'s, not a second one — so `x test contract` runs ex
|
|
|
1738
1791
|
## x clean
|
|
1739
1792
|
|
|
1740
1793
|
```bash
|
|
1741
|
-
x clean [--dry-run] [--json]
|
|
1794
|
+
x clean [--dry-run] [--services] [--json]
|
|
1742
1795
|
```
|
|
1743
1796
|
|
|
1744
1797
|
Every test leftover the framework knows of, cleared (`As of 27.3.0`): the migrated test-database templates under `.x/test-db`, the whole `.x/cache`, any `.x` folder below the app root, and — with `TEST_DATABASE_URL` set — every probe database whose run is over. `--dry-run` names them and removes nothing; `--json` carries `data.paths` and `data.databases`. Never touched: `.x/pgdata` (the dev database), `.x/storage`, the build output. The test runner sweeps the same set before every run, keeping the newest two of each cache, so `x clean` is for reclaiming the rest by hand. [Testing](Testing#database-state-and-what-a-run-leaves-behind) has the table.
|
|
1745
1798
|
|
|
1799
|
+
**`--services`** (`As of 2026-11-18`) also runs `docker compose -f docker/docker-compose.test.yml down --volumes` for this checkout's stack. A stack another existing checkout started is kept, with the line that stops it. Every other test stack on the machine is listed, never touched. `--dry-run` stops nothing. `--json`: `data.services` with `action` (`stopped`, `would-stop`, `kept`, `none`, `failed`), `project`, `services`, `owner`, and `others[]` (`project`, `status`, `root`, `gone`). Docker failing is `X_TEST_SERVICES_UNAVAILABLE`, exit 1.
|
|
1800
|
+
|
|
1746
1801
|
## x upgrade
|
|
1747
1802
|
|
|
1748
1803
|
```bash
|
|
1749
|
-
x upgrade [--to <version>] [--dry-run] [--json]
|
|
1804
|
+
x upgrade [--to <version>] [--only <step>[,<step>…]] [--dry-run] [--json]
|
|
1750
1805
|
x upgrade codemods --from <version> [--to <version>] [--dry-run] [--json]
|
|
1751
1806
|
```
|
|
1752
1807
|
|
|
@@ -1760,11 +1815,13 @@ One major per run, so each hop's gate attributes its red to that hop. `As of 30.
|
|
|
1760
1815
|
| 2 | read every workspace's `@ultimat3/*` pins, `overrides` and `resolutions` included | `X_UPGRADE_PIN_UNREADABLE`, `X_UPGRADE_MIXED_PINS` |
|
|
1761
1816
|
| 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` |
|
|
1762
1817
|
| 4 | write exact pins, raise the Bun floor | — |
|
|
1763
|
-
| 5 | `bun install` | `X_UPGRADE_INSTALL_FAILED`, `fix:` carries the undo |
|
|
1764
|
-
| 6 | the installed CLI: `x upgrade codemods --from <from> --to <to>` (below), then `x manifest`, `x doctor --json`, each missing
|
|
1818
|
+
| 5 | `bun install`, then `bun update <names>` for each transitive package `bun.lock` holds under an advisory floor (`X_ADVISORY_FLOOR_UNMET`) | `X_UPGRADE_INSTALL_FAILED`, `fix:` carries the undo |
|
|
1819
|
+
| 6 | the installed CLI: `x upgrade codemods --from <from> --to <to>` (below), then `x manifest`, `x doctor --json`, each guard that doctor reports missing (only a hop landing before 31.28: `x g guard <name>`, kept when `x verify --only boundaries` finds nothing more), a Bun-floor hop's `x verify --only unit` coverage rebaseline, `x exercise --json` and its `exercise` floor figures, `x verify --json` | `X_UPGRADE_GATE_UNREADABLE`, as a finding on a red hop |
|
|
1765
1820
|
|
|
1766
1821
|
A dry run refuses exactly what the real run would, then stops before step 4 — after previewing this CLI's codemods for the span, written nowhere. 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.
|
|
1767
1822
|
|
|
1823
|
+
`--only <step>[,<step>…]` (`As of 2026-11-19`): the last stage runs `x verify --only <steps> --json` in place of `x verify --json` — the list `x verify --only` takes, in the gate's order, refused the same way (`X_CLI_BAD_FLAG`, `fix:` the corrected `x upgrade --only …`), and refused with no `app.config.ts`, where no `x verify` runs. **Not the full gate**: `proof` is `verify-only`, `verify.notRun[]` names every step left out — of the installed CLI's gate, read off its `x verify plan --parts 1 --json` (this CLI's list when it has no plan), the summary says `NOT THE FULL GATE` and `then` names `x verify --only <notRun> --json` for CI. Every step named — of this CLI's gate, or of the installed one's — is the full gate, run and reported as one. Default: the full gate. The stages before it (codemods, manifest, doctor, guards, a Bun-floor hop's coverage rebaseline, exercise) run either way: each writes what the hop leaves.
|
|
1824
|
+
|
|
1768
1825
|
`--to`: an exact release in the next major. Over a mixed set a run moves the LOWEST pins one major: `^19` beside `^29` is told `--to 20.x.y`, that hop rewrites only the pins at or below it (a pin above is never moved backwards) and names its walkthrough, `next` names the following hop, and the last one levels the set. A straggler jump straight to the highest major is `X_UPGRADE_HOP_TOO_WIDE`: it skipped every walkthrough between.
|
|
1769
1826
|
|
|
1770
1827
|
| `data` field | Meaning |
|
|
@@ -1774,18 +1831,18 @@ A dry run refuses exactly what the real run would, then stops before step 4 —
|
|
|
1774
1831
|
| `done` | verify's verdict, and the exit code follows it. `true` when already there, `false` on a dry run |
|
|
1775
1832
|
| `dryRun` | nothing written, no gate run |
|
|
1776
1833
|
| `app` | whether the root holds `app.config.ts` |
|
|
1777
|
-
| `proof` | what `done` rests on: `verify
|
|
1834
|
+
| `proof` | what `done` rests on: `verify` (the full gate), `verify-only` (`--only`: some steps, the rest in `verify.notRun`), `scripts` or `none` |
|
|
1778
1835
|
| `section` | `{ title, url, local }` in [Upgrading](Upgrading); `local` is the same section as an `x docs` topic, printed whole offline; `null` when no major is crossed |
|
|
1779
1836
|
| `pins[]` | `{ file, name, from, to }` |
|
|
1780
1837
|
| `bun` | `{ from, to, edited[], manual[] }`. `manual[]`: `{ path, line, text, why }`, a site only you can move, listed on every run |
|
|
1781
1838
|
| `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 |
|
|
1782
|
-
| `guards` | `{ reported, missing[], differs[], installed[], withheld[] }` from the hop's own `x doctor`. `As of 31.16.0` each missing shipped guard is written from the installed release's template and kept when `boundaries` finds nothing more with it on disk: `installed[]` names it
|
|
1839
|
+
| `guards` | `{ reported, missing[], differs[], installed[], withheld[], baselined[]? }` from the hop's own `x doctor`. A hop landing on 31.28 or later has `missing[]`, `installed[]` and `withheld[]` empty: shipped guards run built in. Landing earlier (`As of 31.16.0`), each missing shipped guard is written from the installed release's template and kept when `boundaries` finds nothing more with it on disk: `installed[]` names it; one the tree already breaks is taken back out: `withheld[]` is `{ name, add, findings }` (`findings: null` when the count could not be measured) and `missing[]` still lists it. `differs[]` is `{ name, refresh }`: an edited copy the hop's `vendored-guards` codemod left, never overwritten, `refresh` the edit that resolves it. `reported: false` is a CLI too old to list them, which is not the same as none |
|
|
1783
1840
|
| `guards.baselined` | `[{ name, findings }]`, absent when empty, `As of 2026-11-15`: a guard the tree breaks, kept anyway — its measured count merged into `x.verify.json` as `"guardBaseline": { "<name>": n }` (beside the app's keys; a baseline the app already wrote for it, or a floor that is not a JSON object, is never touched) and kept only when the installed CLI's `boundaries` then finds no more than before. Also in `installed[]`. `findings: null` stays withheld |
|
|
1784
1841
|
| `coverage` | a hop that moved the Bun floor re-measures unit coverage (`x verify --only unit`); only when that measurement is `X_COVERAGE_BELOW_FLOOR` is the `x.verify.json` `coverage` floor moved to it, the number that fell alone, with a dated `why`: `{ file, measured, from, to, why }`. `null` when nothing moved |
|
|
1785
1842
|
| `exerciseFloor` | `{ file, written }`: the `exercise` keys (`unprovenMax`, `statementsMax` ≥ 100) the hop's own `x exercise` measured, written into an `x.verify.json` that stated none, so the hop stays green and the floor only falls. A key the app already wrote is never touched; `null` when nothing was written |
|
|
1786
1843
|
| `manifest` | `{ ok, findings[] }`. A failure does not stop the gate |
|
|
1787
1844
|
| `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 |
|
|
1788
|
-
| `verify` | `{ ok, summary, failed[], findings[] }`, each finding `{ step?, code, cause, fix, at? }` |
|
|
1845
|
+
| `verify` | `{ ok, summary, failed[], findings[], only?, notRun? }`, each finding `{ step?, code, cause, fix, at? }`. `only[]` and `notRun[]` only under `--only`: the steps run, and the gate's steps this hop did not run |
|
|
1789
1846
|
| `codemods` | `As of 2026-11-15`: `{ from, to, dryRun, source, applied[] }`, each `applied[]` a codemod that ran: `{ id, since, summary, changed[], skipped[] }`; a `skipped[]` entry is `{ path, reason, diff? }`, a file the codemod would not overwrite (the app edited it), with the template's change as a unified diff to make by hand. `source: installed` — the hop's own CLI applied its list; `driver` — that CLI predates codemods, so this one applied its own. `reinstalled: true` — a `package.json` differs after the codemods (read byte for byte, never off a codemod's report), so the hop ran `bun install` again before any gate stage; `x upgrade codemods` does the same by hand. `failure: { code, cause, fix }` — the installed CLI's codemods run failed for a reason other than lacking the subcommand: nothing applied, this CLI does not stand in, and the hop is not done. `null`: no app, or already at the target, where no codemod runs (`As of 2026-11-18`; `x upgrade codemods --from 0.0.0 --json` carries an app still holding an old template's copy) |
|
|
1790
1847
|
| `superseded[]` | `As of 2026-11-15`: a workaround the hop's framework made unnecessary, read after the codemods — `{ code: X_SUPERSEDED_WORKAROUND, cause, fix, at }`. A warning, never the verdict |
|
|
1791
1848
|
| `then` | the next thing to do, in a sentence naming the commands |
|
|
@@ -2063,6 +2120,8 @@ command rather than quoting the line. `docs` is `ERROR_DOCS_URL`, the same URL f
|
|
|
2063
2120
|
|
|
2064
2121
|
`list` enumerates every registered code, and names under `data.unavailable` any package this process could not import — a list silently missing codes is worse than one that says which. An unregistered code is `X_ERROR_CODE_UNKNOWN` with the nearest real code as its fix; the command never invents an explanation.
|
|
2065
2122
|
|
|
2123
|
+
**An app's own codes answer inside the app** (`As of 2026-11-19`, `packages/cli/src/cmd-errors-app.ts`). A code the framework does not know is looked up after `loadApp` registers the app's `defineError()` declarations: the answer is the registered title, the `cause:` / `fix:` read off the declaration's text (never by constructing the error), `status`, and the declaring `file:line` as `site`; `--json` carries `{ code, title, cause, fix, docs, status, site }`. Framework codes pay no load. A near miss of a framework code keeps its suggestion. Otherwise `X_ERROR_CODE_UNKNOWN`, its fix inside an app `grep -rn <CODE> apps packages`, outside one `x errors list --json` naming the `--cwd` form.
|
|
2124
|
+
|
|
2066
2125
|
## x repro
|
|
2067
2126
|
|
|
2068
2127
|
```bash
|
|
@@ -2134,7 +2193,7 @@ x docs "<question|topic|symbol>" [--limit <n>] [--json]
|
|
|
2134
2193
|
| this wiki, shipped in the `@ultimat3/cli` tarball (`wiki/`) — every page but Error codes | `wiki.<Page>`, `wiki.<Page>#<anchor>`, the anchor GitHub renders |
|
|
2135
2194
|
| an `X_*` code | redirected to `x errors explain <CODE>`, the one way to a code |
|
|
2136
2195
|
|
|
2137
|
-
A question is ranked; a `Page#anchor` topic (`x docs Upgrading#28x--2900-entry-by-entry`) prints that **whole section**, subsections included, and nothing past it. `x upgrade --json`'s `section.local` is that topic. A search hit carries a capped excerpt.
|
|
2196
|
+
A question is ranked; a `Page#anchor` topic (`x docs Upgrading#28x--2900-entry-by-entry`) prints that **whole section**, subsections included, and nothing past it. **`x docs <topic-id>`** (`As of 2026-11-19`) prints one topic's body: the id is what every search line starts with — `jobs.retry` (a module: its header comment, its exports, its file), `jobs.README#one-job-per-org-from-a-schedule` (a package guide: that whole section, subsections included), `wiki.Upgrading#<anchor>` (a wiki section). Quote an id that carries `#`. A search's last line is the command for its first hit (`x docs jobs.retry # any topic id above prints that section whole`); a query that is exactly a topic id answers that topic alone, not a ranked search. `x upgrade --json`'s `section.local` is that topic. A search hit carries a capped excerpt.
|
|
2138
2197
|
|
|
2139
2198
|
A question is ranked by its task words too (`As of 31.22`): a synonyms table maps a word that names one task to the mechanism that does it — `paginate` → `keyset`, `poll`/`interval` → `pollEvery`/`visibleInterval`, `concurrency` → `mapBounded`, `latest` → `latestBy`, `typing` → `debounce`, `advisory` → `lockKeys`, `denormalize` → `countedIn`, `memoize` → `retryMemo` — and a page that exports the mechanism outranks prose about the task. The dev MCP's `docs.search` is this command.
|
|
2140
2199
|
|
|
@@ -2148,6 +2207,8 @@ x fix boundary <file> [--json]
|
|
|
2148
2207
|
|
|
2149
2208
|
The minimal cut for an import that crossed a surface boundary — the command every `X_SURFACE_BOUNDARY` finding names in its `fix:` line. It prints a plan and **writes nothing**; there is no `--write`.
|
|
2150
2209
|
|
|
2210
|
+
`site-imports-app` (`X_BOUNDARY_SITE_TO_APP`) is one finding per crossing edge — the first import in the chain that lands on `app/` — reported at the file that writes it, with the chain from the `site/` entry in `cause`. Imports below the crossing are `app/ → app/` and are never reported, by the gate or here: one illegal import is one finding and one edit (`As of 2026-11-19`; `classify()`, `packages/render/src/surfaces.ts`).
|
|
2211
|
+
|
|
2151
2212
|
For each violation involving the file it reports the offending edge, the full chain that makes it one, and the edit to make. For the `shared/` fattening case it generates the split: when exactly one surface reaches the module **and the module lands on the same surface as the file it imports**, the plan carries the `git mv` plus every import specifier that move invalidates — the move alone is not a repair, it just relocates the break. When two surfaces reach it, or when relocating would leave the forbidden edge exactly where it was, the module has to be cut by hand and the plan says so rather than guessing.
|
|
2152
2213
|
|
|
2153
2214
|
`<file>` is app-root-relative, or any suffix that matches exactly one source file — the short form a `fix:` line emits. Errors: `X_FIX_TARGET_UNKNOWN` (with the nearest real path as its fix), `X_CLI_BAD_FLAG` on an ambiguous suffix.
|
|
@@ -2164,6 +2225,24 @@ For each violation involving the file it reports the offending edge, the full ch
|
|
|
2164
2225
|
|
|
2165
2226
|
Every flag is read before the database opens: a refusal costs no boot.
|
|
2166
2227
|
|
|
2228
|
+
## x merge-driver
|
|
2229
|
+
|
|
2230
|
+
`As of 2026-11-19`. `x merge-driver install [--json]` · `x merge-driver run <base> <ours> <theirs> <path>` — how two branches that each generated a feature merge with no hand edit. The rules and what stays a conflict: [Merging two features](Many-Agents#merging-two-features).
|
|
2231
|
+
|
|
2232
|
+
| Form | Does |
|
|
2233
|
+
|---|---|
|
|
2234
|
+
| `x merge-driver install` | writes `merge.x-registry.*` and `merge.x-generated.*` into `.git/config`; `data.installed: false` outside a git checkout. `bun run setup` runs it; `x doctor` warns `X_MERGE_DRIVER_UNSET` where it never ran |
|
|
2235
|
+
| `x merge-driver run` | what git invokes, with its temporary files. Exit 0 merged; exit 1 left the markers in the file and reports `X_MERGE_UNRESOLVED` |
|
|
2236
|
+
|
|
2237
|
+
## x heavy
|
|
2238
|
+
|
|
2239
|
+
`As of 2026-11-18`. `x heavy [status] [--json]` · `x heavy run [--label s] [--mb n] [--max-wait s] [--json] -- <command…>` — the machine ledger every heavy run on this machine reserves its measured memory in, from any directory, in any repository. The rules, the weights and what stays outside: [Working with many agents](Many-Agents).
|
|
2240
|
+
|
|
2241
|
+
| Form | Answers |
|
|
2242
|
+
|---|---|
|
|
2243
|
+
| `x heavy` / `x heavy status` | `data.holds` and `data.queue` (label, directory, MB, pid, age; a hold adds `wrapperAlive` and `childPids`, the processes keeping it after its wrapper is gone), `data.capacityMb`, `data.usedMb`, `data.coreCap`, `data.cpuGate` (whether CPU pressure holds new runs back here), `data.machine` (load, runnable tasks, available and usable memory, `cpu`: `source` `psi`/`runnable`, `value`, `limit`, `busy`); `data.enabled: false` with `data.off` naming why (`ci`, `test-run`, `disabled`, `unsupported`) |
|
|
2244
|
+
| `x heavy run -- <command…>` | runs it inside one reservation of `--mb` (default: a monorepo typecheck). Exit code passed through, `128 + n` for a signal, 127 and `X_HEAVY_COMMAND_NOT_FOUND` for no such program. SIGTERM and SIGHUP are forwarded. Its summary goes to stderr, so stdout stays the command's; with `--json` the one document is on stdout and the command's stdout moves to stderr. `--max-wait <seconds>` (`0` to `604800`) bounds the queue: past it the command never starts, `X_HEAVY_WAIT_EXPIRED`, exit 75, `data.started: false` |
|
|
2245
|
+
|
|
2167
2246
|
## x status
|
|
2168
2247
|
|
|
2169
2248
|
`As of 2026-11-15`. `x status [--url <origin>[,<origin>…]] [--samples n] [--json]` — what the running deployment is, from what it already records. A read, exit 0 whatever it finds: whether one build is fully out is [`x deploy verify`](#x-deploy-verify)'s question.
|
|
@@ -114,7 +114,7 @@ export const publishPost = action({
|
|
|
114
114
|
|---|---|---|
|
|
115
115
|
| Tier 1 request memo | drop entries carrying the tag | immediate, same request |
|
|
116
116
|
| 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 |
|
|
117
|
-
| Tier 3 Redis | paged `ZSCAN` over the tag's sorted set, `UNLINK` per value key, `
|
|
117
|
+
| Tier 3 Redis | paged `ZSCAN` over the tag's sorted set, `ZREM` of what was read, `UNLINK` per value key, re-`ZADD … GT` (at its read score, never lowering a later fill's; Redis ≥ 6.2) of any member whose `UNLINK` was refused. Sweep before delete, `As of 2026-11`: a fill from another replica landing mid-bust can no longer be left in no bucket, stale for its whole TTL. An inbound broadcast skips this shared tier only when the sender's frame names the same namespace (same build); another build's, or an older pod's, busts it. `As of 2026-11-19` | immediate, inside the fan-out; 10k keys in 25 round trips |
|
|
118
118
|
| ISR pages | routes whose `revalidate.tags` include the tag are marked stale → regenerated in background | next request serves stale, regen enqueued as a job |
|
|
119
119
|
| 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 |
|
|
120
120
|
| Live queries | the same commit already flows through logical replication | **independent path** — realtime does not depend on cache invalidation |
|
|
@@ -302,7 +302,7 @@ From code: `invalidateTags([...])` from `@ultimat3/cache`, the call `x cache bus
|
|
|
302
302
|
|---|---|---|
|
|
303
303
|
| `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` |
|
|
304
304
|
| `X_CACHE_TAG_UNKNOWN` | `tag "<name>" is not declared by any entity` | `declareTags(['<name>'])` beside the app's other declared tags, plus the name in its `CacheTagRegistry`; for a typo, correct the tag |
|
|
305
|
-
| `X_CACHE_TOO_LARGE` | `entry "<key>" is <n>B, over the <tier> budget of <m>B` | `lruTier({ maxBytes: <n> })` / `redisTier({ maxValueBytes: <n> })`
|
|
305
|
+
| `X_CACHE_TOO_LARGE` | `entry "<key>" is <n>B, over the <tier> budget of <m>B` | `cacheTiers: [lruTier({ maxBytes: <n> })]` / `cacheTiers: [redisTier({ maxValueBytes: <n> })]` in `apps/web/runtime.ts` ([limits](Configuration#cache)), or cache a projection instead of the row |
|
|
306
306
|
| `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 |
|
|
307
307
|
| `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 |
|
|
308
308
|
|
|
@@ -420,7 +420,7 @@ island that drops markup holding other islands (`As of 2026-10`, [Client data](C
|
|
|
420
420
|
|
|
421
421
|
| Call | With the router | Without it (a `site/` page, a `'document'` page, the router's script blocked) |
|
|
422
422
|
|---|---|---|
|
|
423
|
-
| `navigate(url, { replace? })` | the router's own navigation: the server's gate and the answer decide swap, modal or full load. Another origin: a document load | `location.assign` / `location.replace` |
|
|
423
|
+
| `navigate(url, { replace? })` | the router's own navigation: the server's gate and the answer decide swap, modal or full load. Another origin: a document load. A fragment of the page on screen (same path and query, `#…`): the browser's own fragment navigation — it scrolls, fires `hashchange`, and no `ultimate:navigate` / `ultimate:navigated` (`As of 2026-11-19`; it refetched and swapped the page, disposing its islands) | `location.assign` / `location.replace` |
|
|
424
424
|
| `refresh()` | the page fetched again (never from the prefetch cache) and swapped in with no history entry, at the visitor's scroll — for the same visitor: [below](#refresh-is-the-same-page). Under an open modal: nothing | `location.reload()` |
|
|
425
425
|
| `scheduleRefresh()` | a `refresh()` once the visitor is idle, coalesced: [below](#scheduling-a-refresh) | nothing — a reload under a reader is the failure it prevents |
|
|
426
426
|
| `openModal(path)` | `#<path>` over the page, pushed, so Back closes it. A path that is not a modal of this tab opens nothing, as a stale hash | `location.assign(path)`: the modal route's whole page |
|