@ultimat3/cli 31.48.0 → 31.50.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.
Files changed (287) hide show
  1. package/CLAUDE.md +30 -23
  2. package/README.md +96 -4
  3. package/package.json +30 -30
  4. package/src/api-registration.ts +45 -14
  5. package/src/api-routes.ts +1 -0
  6. package/src/app-load.ts +7 -3
  7. package/src/app-openapi.ts +7 -1
  8. package/src/app-root.ts +7 -1
  9. package/src/budgets.ts +2 -1
  10. package/src/clean-services.ts +142 -0
  11. package/src/cmd-auth.ts +3 -0
  12. package/src/cmd-clean-spec.ts +10 -3
  13. package/src/cmd-clean.ts +23 -9
  14. package/src/cmd-db-backfill.ts +6 -0
  15. package/src/cmd-db-branch.ts +10 -4
  16. package/src/cmd-db-recount.ts +5 -12
  17. package/src/cmd-db-rollback.ts +77 -0
  18. package/src/cmd-db-spec.ts +18 -2
  19. package/src/cmd-db-status.ts +5 -10
  20. package/src/cmd-db.ts +105 -33
  21. package/src/cmd-deploy-verify.ts +14 -6
  22. package/src/cmd-docs-topic.ts +94 -0
  23. package/src/cmd-docs.ts +15 -1
  24. package/src/cmd-doctor.ts +109 -41
  25. package/src/cmd-drill.ts +80 -18
  26. package/src/cmd-env.ts +30 -8
  27. package/src/cmd-errors-app.ts +63 -0
  28. package/src/cmd-errors.ts +50 -14
  29. package/src/cmd-generate.ts +17 -4
  30. package/src/cmd-heavy-spec.ts +9 -1
  31. package/src/cmd-heavy.ts +111 -27
  32. package/src/cmd-i18n.ts +33 -1
  33. package/src/cmd-jobs.ts +27 -1
  34. package/src/cmd-merge-driver-spec.ts +12 -0
  35. package/src/cmd-merge-driver.ts +95 -0
  36. package/src/cmd-new.ts +23 -3
  37. package/src/cmd-policy-spec.ts +9 -1
  38. package/src/cmd-policy.ts +72 -17
  39. package/src/cmd-stop.ts +18 -4
  40. package/src/cmd-tasks-run.ts +87 -0
  41. package/src/cmd-tasks-spec.ts +10 -3
  42. package/src/cmd-tasks.ts +8 -5
  43. package/src/cmd-test.ts +2 -1
  44. package/src/cmd-upgrade-spec.ts +8 -1
  45. package/src/cmd-upgrade.ts +15 -1
  46. package/src/cmd-verify.ts +9 -41
  47. package/src/codemods/agents-doc-row.ts +73 -0
  48. package/src/codemods/define-error-leaf.ts +37 -12
  49. package/src/codemods/docs-many-agents.ts +11 -15
  50. package/src/codemods/docs-worker-commands.ts +26 -0
  51. package/src/codemods/engine-fs.ts +9 -2
  52. package/src/codemods/index.ts +4 -0
  53. package/src/codemods/merge-drivers.ts +147 -0
  54. package/src/command.ts +3 -0
  55. package/src/db-applied-edits.ts +117 -0
  56. package/src/db-dev-wire.ts +18 -0
  57. package/src/db-diagnostics.ts +5 -10
  58. package/src/db-generate.ts +82 -7
  59. package/src/db-migrate-pass.ts +51 -0
  60. package/src/db-migrate-through-dev.ts +209 -0
  61. package/src/db-rollback-consent.ts +128 -0
  62. package/src/db-rollback-pass.ts +76 -0
  63. package/src/db-seed-generate.ts +5 -1
  64. package/src/db-seed.ts +7 -1
  65. package/src/deploy-verify-findings.ts +3 -0
  66. package/src/deploy-verify-grade.ts +3 -0
  67. package/src/deploy-verify-processes.ts +32 -0
  68. package/src/dev-boot.ts +3 -0
  69. package/src/dev-db-migrate.ts +155 -0
  70. package/src/dev-db-rollback.ts +33 -0
  71. package/src/dev-db-settled.ts +22 -0
  72. package/src/dev-lock-errors.ts +78 -0
  73. package/src/dev-lock-holder-dir.ts +64 -0
  74. package/src/dev-lock-live.ts +44 -0
  75. package/src/dev-lock.ts +59 -84
  76. package/src/dev-policy.ts +11 -8
  77. package/src/dev-rebuild-schema.ts +116 -13
  78. package/src/dev-rebuild.ts +13 -4
  79. package/src/dev-route-table.ts +7 -0
  80. package/src/dispatch.ts +21 -1
  81. package/src/doctor-api-listing.ts +114 -0
  82. package/src/doctor-guarded.ts +41 -0
  83. package/src/doctor-port.ts +90 -17
  84. package/src/doctor-probe.ts +36 -5
  85. package/src/doctor-processes-probe.ts +127 -0
  86. package/src/doctor-processes.ts +136 -0
  87. package/src/doctor-warnings.ts +17 -0
  88. package/src/error-codes-agents.ts +35 -0
  89. package/src/error-codes-processes.ts +30 -0
  90. package/src/error-codes-tooling.ts +2 -0
  91. package/src/error-codes.ts +12 -13
  92. package/src/errors-suite.ts +27 -0
  93. package/src/errors.ts +18 -22
  94. package/src/exercise-registration.ts +4 -3
  95. package/src/exercise-services.ts +13 -3
  96. package/src/framework-env.ts +7 -3
  97. package/src/framework-schema.ts +15 -5
  98. package/src/generate-files.ts +1 -0
  99. package/src/generate-grant-findings.ts +7 -5
  100. package/src/generate-grants.ts +9 -8
  101. package/src/generate-kinds.ts +30 -6
  102. package/src/generate-roles-file.ts +30 -0
  103. package/src/generate-slice-policy.ts +3 -3
  104. package/src/guard-sources.ts +1 -2
  105. package/src/guards.ts +2 -2
  106. package/src/heavy-env.ts +2 -0
  107. package/src/heavy-errors.ts +18 -0
  108. package/src/heavy-holders.ts +78 -0
  109. package/src/heavy-ledger.ts +56 -14
  110. package/src/heavy-pressure.ts +104 -0
  111. package/src/heavy.ts +31 -13
  112. package/src/i18n-registration.ts +22 -2
  113. package/src/island-harness.ts +2 -2
  114. package/src/job-budget.ts +4 -2
  115. package/src/job-registration.ts +64 -8
  116. package/src/jobs-queue-known.ts +43 -0
  117. package/src/mcp-errors-agents.ts +20 -0
  118. package/src/mcp-errors-doctor.ts +27 -0
  119. package/src/mcp-errors-processes.ts +23 -0
  120. package/src/mcp-errors.ts +15 -29
  121. package/src/mcp-host.ts +2 -2
  122. package/src/merge-driver-catalog.ts +58 -0
  123. package/src/merge-driver-config.ts +43 -0
  124. package/src/merge-driver-lines.ts +140 -0
  125. package/src/merge-state.ts +105 -0
  126. package/src/messages-db.ts +22 -1
  127. package/src/messages-processes.ts +13 -0
  128. package/src/messages-upgrade.ts +10 -0
  129. package/src/messages.ts +54 -4
  130. package/src/output-findings.ts +48 -21
  131. package/src/page-navigation.ts +5 -2
  132. package/src/parse.ts +37 -6
  133. package/src/policy-facts.ts +38 -21
  134. package/src/policy-row.ts +99 -0
  135. package/src/port-pair-free.ts +28 -0
  136. package/src/pwa-artifacts.ts +1 -1
  137. package/src/registry-lines.ts +110 -0
  138. package/src/registry.ts +2 -0
  139. package/src/retain-sweep.ts +1 -1
  140. package/src/retained-assets-boot.ts +1 -1
  141. package/src/role-replicator.ts +4 -1
  142. package/src/role-select.ts +86 -0
  143. package/src/role-start.ts +13 -55
  144. package/src/role-sync.ts +10 -5
  145. package/src/runtime-assets-site.ts +2 -2
  146. package/src/runtime-assets.ts +1 -1
  147. package/src/runtime-cache-frame.ts +46 -0
  148. package/src/runtime-cache-ttl.ts +23 -0
  149. package/src/runtime-cache.ts +33 -16
  150. package/src/runtime-database-ssl.ts +84 -0
  151. package/src/runtime-idempotency-scope.ts +16 -2
  152. package/src/runtime-jobs-share.ts +52 -0
  153. package/src/runtime-jobs.ts +43 -12
  154. package/src/runtime-queue.ts +18 -3
  155. package/src/runtime-render-document.ts +1 -2
  156. package/src/runtime-services.ts +8 -1
  157. package/src/schema-drift.ts +19 -2
  158. package/src/schema-dump-drift.ts +4 -1
  159. package/src/serve-boot-probe.ts +30 -2
  160. package/src/serve-boot.ts +11 -1
  161. package/src/serve-env.ts +39 -3
  162. package/src/serve.ts +61 -10
  163. package/src/site-asset-routes.ts +2 -2
  164. package/src/site-assets.ts +5 -158
  165. package/src/stop-run-start.ts +12 -0
  166. package/src/supervise-boot.ts +61 -0
  167. package/src/supervise-cgroup.ts +84 -0
  168. package/src/supervise-child.ts +206 -0
  169. package/src/supervise-count.ts +244 -0
  170. package/src/supervise-errors.ts +83 -0
  171. package/src/supervise-facts.ts +40 -0
  172. package/src/supervise-messages.ts +84 -0
  173. package/src/supervise-policy.ts +46 -0
  174. package/src/supervise-pool.ts +10 -0
  175. package/src/supervise-probe.ts +158 -0
  176. package/src/supervise-run.ts +54 -0
  177. package/src/supervise.ts +383 -0
  178. package/src/sw-precache-plan.ts +1 -1
  179. package/src/templates/generate-purge.ts +6 -6
  180. package/src/templates/guard-animated-layout-property.ts +2 -2
  181. package/src/templates/guard-bare-error.ts +1 -1
  182. package/src/templates/guard-error-declared.ts +2 -2
  183. package/src/templates/guard-focus-visible.ts +1 -1
  184. package/src/templates/guard-image-dimensions.ts +2 -2
  185. package/src/templates/guard-island-mount-clears.ts +1 -1
  186. package/src/templates/guard-native-confirm.ts +1 -1
  187. package/src/templates/guard-raw-breakpoint.ts +2 -2
  188. package/src/templates/guard-raw-colour.ts +2 -2
  189. package/src/templates/guard-raw-fetch.ts +1 -1
  190. package/src/templates/guard-raw-interval.ts +1 -1
  191. package/src/templates/guard-raw-length.ts +3 -3
  192. package/src/templates/guard-raw-motion.ts +97 -1
  193. package/src/templates/guard-raw-shadow.ts +1 -1
  194. package/src/templates/guard-raw-z-index.ts +1 -1
  195. package/src/templates/guard-released-forms.ts +58 -9
  196. package/src/templates/guard-repo-await-in-loop.ts +1 -1
  197. package/src/templates/guard-repo-raw-sql.ts +4 -4
  198. package/src/templates/guard-repo-unbounded.ts +1 -1
  199. package/src/templates/guard-runtime-pin.ts +1 -1
  200. package/src/templates/guard-semantic-interactive.ts +2 -2
  201. package/src/templates/guard-unbounded-fanout.ts +1 -1
  202. package/src/templates/guard-undeclared-custom-property.ts +3 -3
  203. package/src/templates/guard-undefined-style-class.ts +3 -3
  204. package/src/templates/guard-unzoned-date.ts +3 -3
  205. package/src/templates/query-slice.ts +82 -0
  206. package/src/templates/query.ts +76 -30
  207. package/src/templates/resource-page.ts +3 -2
  208. package/src/templates/scaffold-bin.ts +2 -0
  209. package/src/templates/scaffold-claude-commands.ts +6 -0
  210. package/src/templates/scaffold-claude.ts +4 -4
  211. package/src/templates/scaffold-container-compose.ts +47 -7
  212. package/src/templates/scaffold-docs.ts +7 -3
  213. package/src/templates/scaffold-gitattributes.ts +18 -1
  214. package/src/templates/scaffold-helm-templates.ts +9 -0
  215. package/src/templates/scaffold-repo.ts +5 -2
  216. package/src/templates/scaffold-test-services.ts +33 -11
  217. package/src/templates/shapes/offline.ts +0 -7
  218. package/src/templates/shapes/realtime.ts +2 -6
  219. package/src/templates/sign-in-action-tests.ts +6 -4
  220. package/src/templates/sign-in-challenge.ts +62 -0
  221. package/src/templates/sign-in-oidc-mfa.ts +31 -0
  222. package/src/templates/sign-in-oidc.ts +11 -3
  223. package/src/templates/sign-in-password.ts +18 -56
  224. package/src/test-only-shipped.ts +29 -2
  225. package/src/test-shards.ts +134 -42
  226. package/src/test-verdict.ts +79 -0
  227. package/src/test-workers.ts +15 -0
  228. package/src/upgrade-coverage-ratchet.ts +95 -0
  229. package/src/upgrade-gate-codemods.ts +5 -3
  230. package/src/upgrade-gate.ts +42 -4
  231. package/src/upgrade-merge-drivers.ts +25 -0
  232. package/src/upgrade-report.ts +32 -4
  233. package/src/upgrade-scope.ts +62 -0
  234. package/src/verify-checks.ts +2 -8
  235. package/src/verify-coverage-run.ts +4 -1
  236. package/src/verify-e2e.ts +21 -3
  237. package/src/verify-live.ts +38 -14
  238. package/src/verify-only.ts +67 -0
  239. package/src/verify-progress.ts +7 -3
  240. package/src/verify-run.ts +20 -2
  241. package/src/verify-services-stack.ts +165 -0
  242. package/src/verify-services.ts +84 -2
  243. package/src/verify-test-run.ts +6 -7
  244. package/src/verify-tests.ts +8 -2
  245. package/src/verify-typecheck.ts +25 -2
  246. package/src/workspace-checks.ts +4 -1
  247. package/wiki/Actions.md +66 -3
  248. package/wiki/Admin-Dashboard.md +2 -2
  249. package/wiki/Agents.md +5 -5
  250. package/wiki/Auth.md +20 -6
  251. package/wiki/Bare-VM.md +1 -1
  252. package/wiki/CI-Parallel-Gate.md +2 -1
  253. package/wiki/CLI-Reference.md +115 -42
  254. package/wiki/Caching-And-Invalidation.md +1 -1
  255. package/wiki/Client-Navigation.md +35 -5
  256. package/wiki/Configuration.md +12 -10
  257. package/wiki/Deployment.md +44 -4
  258. package/wiki/Entities-And-Migrations.md +17 -3
  259. package/wiki/FAQ.md +1 -1
  260. package/wiki/Getting-Started.md +2 -2
  261. package/wiki/Home.md +3 -3
  262. package/wiki/I18n.md +6 -4
  263. package/wiki/Installation.md +12 -11
  264. package/wiki/Interface-Rules.md +3 -1
  265. package/wiki/Jobs-And-Workflows.md +24 -4
  266. package/wiki/Known-Gaps.md +2 -2
  267. package/wiki/MCP-And-AI.md +48 -13
  268. package/wiki/Many-Agents.md +69 -2
  269. package/wiki/Migrations-And-Backfills.md +18 -0
  270. package/wiki/Notify.md +5 -3
  271. package/wiki/Observability.md +13 -0
  272. package/wiki/Outbound-HTTP.md +53 -2
  273. package/wiki/Policies-And-Authz.md +1 -1
  274. package/wiki/Queries-And-Live-Queries.md +2 -2
  275. package/wiki/Realtime.md +24 -7
  276. package/wiki/Routes-And-Render-Modes.md +2 -2
  277. package/wiki/Scheduled-Tasks.md +4 -1
  278. package/wiki/Static-Assets.md +5 -3
  279. package/wiki/Testing.md +64 -7
  280. package/wiki/Theming.md +6 -3
  281. package/wiki/Timezones-And-Dates.md +5 -1
  282. package/wiki/Troubleshooting.md +1 -0
  283. package/wiki/Tutorial-01-First-App.md +3 -3
  284. package/wiki/Tutorial-02-First-Feature.md +1 -1
  285. package/wiki/Tutorial-03-Auth-And-Admin.md +7 -6
  286. package/wiki/UI-Components.md +1 -0
  287. package/wiki/Upgrading.md +38 -0
@@ -297,7 +297,7 @@ Then `x db gen "row security"`, commit the migration and `packages/db/schema/`,
297
297
  | roles, PGlite | its one session is a superuser; the migrate step (`x db migrate`, `ROLE=migrate`) holds `x_migrator` and takes over what the superuser owned in `public`; `x dev` and a served role switch to `x_app` at boot (`serveAsAppRole`) and grant it DML on every table already there |
298
298
  | roles, production | the operator's: `DATABASE_URL` of a serving role is a `nosuperuser nobypassrls` role owning nothing; `ROLE=migrate`'s owns the tables. Grants on tables, the `x_*` ones included, are the operator's too |
299
299
  | `x doctor` | with the flag on, connects as `DATABASE_URL` and names `X_DB_ROW_SECURITY_BYPASSED`; the drift half rides the drift probe |
300
- | policy | `enable` + `force row level security`, one `ultimate_tenant` policy: `org_id = nullif(current_setting('x.tenant', true), '')::<type> or current_setting('x.cross', true) = 'on'`, as `using` AND `with check`. Unset fails closed: no rows |
300
+ | policy | `enable` + `force row level security`, one `ultimate_tenant` policy: `case when current_setting('x.cross', true) = 'on' then true else org_id = nullif(current_setting('x.tenant', true), '')::<type> end`, as `using` AND `with check`. Unset fails closed: no rows. A `case`, not an `or`, `As of 2026-11`: same rows, but an `or`'s guessed selectivity made a tenant's keyset page (`where org_id = $1 order by … limit n` on an `(org_id, …)` index) a bitmap scan plus a sort for the runtime role; the `case` keeps the ordered index scan. A policy generated before keeps the `or` until a migration drops and re-creates it with this text |
301
301
  | the tenant | set per transaction through `setLocal` — `select set_config($1, $2, true)`, parameter-bound and local, so a pooled connection hands nothing on (pooler transaction mode is safe). `crossTenant()` sets `x.cross` |
302
302
  | bare statements | wrapped in one transaction: `BEGIN`, `set_config`, the statement, `COMMIT` |
303
303
  | who is subject | a role that is `nosuperuser nobypassrls` and owns no table. Anything else is `X_DB_ROW_SECURITY_BYPASSED` at boot. The migrator (`bypassrls`) owns the tables, so a backfill still sees every row |
@@ -220,7 +220,7 @@ export const queries = queryClient<Api['queries']>({ baseUrl }); // reads
220
220
  | Why two clients and not one | actions and queries are two registries (`defineApi`'s `actions:` and `queries:` keys) answering two methods. A read taken off the action client is a name that does not exist on `Api['actions']` — a compile error, which is the point |
221
221
  | Types | the read's own `input` and row type. A list read answers `readonly TRow[]`, `limit(1)` included; a `single: true` read answers `TRow` and rejects with `X_NOT_FOUND` when the route 404s |
222
222
  | Failures | the server's own code, off `problem+json` — `X_INPUT_INVALID` stays `X_INPUT_INVALID`. A gateway answering HTML, a network fault and a 2xx body that is not JSON are `X_CLIENT_TRANSPORT_FAILED`, the same code an action's client answers. It was `X_RPC_FAILED` until 21.0.0 |
223
- | Rows are JSON, with their instants revived | what the body parses to, plus every value the server answered as a `Date` handed back as one (`As of 2026-10`, #710): the route names them in `x-ultimate-dates` by path — one entry per column of a list — and `clientTransport` revives exactly those. The body and the OpenAPI document are unchanged; a client that ignores the header reads ISO strings. A query's rows are never parsed on the way out (a declared `rows:` publishes structure, it parses nothing), so the header is how the row type's `Date` stays true |
223
+ | Rows are JSON, with their instants revived | what the body parses to, plus every value the server answered as a `Date` handed back as one (`As of 2026-10`, #710): the route names them in `x-ultimate-dates` by path — one entry per column of a list — and `clientTransport` revives exactly those. The body and the OpenAPI document are unchanged; a client that ignores the header reads ISO strings. A query's rows are never parsed on the way out (a declared `rows:` publishes structure, it parses nothing), so the header is how the row type's `Date` stays true. The header is capped at 1,536 bytes (`WIRE_DATES_MAX_BYTES`): an answer whose instants need one path each — a `string \| Date` column, a `[label, instant]` tuple — past that is sent with no `x-ultimate-dates` (and no `dates:` line), the client reads those instants as ISO strings, and the operation is logged once at `warn` as `http.wire_dates_dropped`. `As of 2026-11-19`. |
224
224
  | `then` is not a read | the proxy answers `undefined` for it, so `await queries` resolves to the client instead of fetching `/_x/query/then`. Same rule in `rpc` |
225
225
 
226
226
  ## A file at a signed URL — `download:`
@@ -437,7 +437,7 @@ Fifty *counts* collapse neither way — one `count()` per row is fifty different
437
437
  | Not recorded | `explainQuery()`, `describeSql()`, the shared live window: built `unenforced`, no caller to attribute |
438
438
  | No sink installed | `X_QUERY_AUDIT_SINK_MISSING`, before the input parse |
439
439
  | The sink refuses | a denied/failed record: logged (`audit.sink.failed`), the caller gets the original error. An allowed record: the rows are withheld, `X_QUERY_AUDIT_SINK_FAILED` — a read commits nothing, so retry |
440
- | Group commit | opt-in, `As of 31.11.0`: `postgresAuditSink({ executor, groupCommit: true })` (`@ultimat3/action`) queues each record up to 5 ms or 256 records (`{ maxRecords, maxDelayMs }` to change either) and writes the batch as one `x_audit` insert. Each call waits on its own batch, so the rule above holds per call: a failed batch is `X_QUERY_AUDIT_SINK_FAILED` (an action's, `X_AUDIT_SINK_FAILED`) on every allowed call it carried. Flushed on drain, before the pool closes. Any sink with a `writeMany(records)`: `batchedAuditSink(sink, opts)` from `@ultimat3/action/adapter` |
440
+ | Group commit | opt-in, `As of 31.11.0`: `postgresAuditSink({ executor, groupCommit: true })` (`@ultimat3/action`) queues each record up to 5 ms or 256 records (`{ maxRecords, maxDelayMs }` to change either) and writes the batch as one `x_audit` insert. Each call waits on its own batch, so the rule above holds per call: a failed batch is `X_QUERY_AUDIT_SINK_FAILED` (an action's, `X_AUDIT_SINK_FAILED`) on every allowed call it carried. Flushed on drain, before the pool closes. Any sink with a `writeMany(records)`: `batchedAuditSink(sink, opts)` from `@ultimat3/action/adapter`. A batch that committed but lost its reply stores nothing twice (`As of 2026-11-19`): each accepted write keeps one row id through the single retry, and an insert skips a row already stored with identical facts — a different row under that id still fails `unique_violation` |
441
441
 
442
442
  ## Every cached query carries a tag
443
443
 
package/wiki/Realtime.md CHANGED
@@ -11,7 +11,7 @@ rather than a convention — the barrels are disjoint, and a test asserts it.
11
11
 
12
12
  | Entry | Holds | Reaches |
13
13
  |---|---|---|
14
- | `@ultimat3/realtime` | `useQuery`, `useRecord`, `useMutation`, `useConnection`, `installRealtime`, `hasPageSocket`, `RecordStore`, `channel()` and `topic()`, the offline queue, the wire protocol, cursors | an island, a browser bundle |
14
+ | `@ultimat3/realtime` | `useQuery`, `useRecord`, `useMutation`, `useConnection`, `installRealtime`, `hasPageSocket`, `hasSyncTarget`, `RecordStore`, `channel()` and `topic()`, the offline queue, the wire protocol, cursors | an island, a browser bundle |
15
15
  | `@ultimat3/realtime/server` | `syncNode`, `ChannelHub`, `SocketRegistry`, `LiveQueryRegistry`, `NatsTransport`, `openNatsClient`, the replicator, the change feed, pg replication | a `sync` node, a worker, `server.ts` |
16
16
 
17
17
  ```ts
@@ -19,7 +19,7 @@ import { useQuery } from '@ultimat3/realtime'; // island
19
19
  import { syncNode } from '@ultimat3/realtime/server'; // sync node
20
20
  ```
21
21
 
22
- A server render is not a missing install. With no DOM, every read hook answers `pending` with no subscription, and `useMutation()` refuses with `X_LIVE_SERVER_RENDER`. `hasPageSocket()` answers `false` there, every time, so it is **not** a guard that makes a page-body read safe: a browser-only read in code no island imports is `X_LIVE_ROUTE_NO_ISLAND` at the `budgets` step, `hasPageSocket()` included. In a **browser**, a hook in a bundle that never called `installRealtime()` is `X_REALTIME_UNINSTALLED`.
22
+ A server render is not a missing install. With no DOM, every read hook answers `pending` with no subscription, and `useMutation()` refuses with `X_LIVE_SERVER_RENDER`. `hasPageSocket()` answers `false` there, every time, so it is **not** a guard that makes a page-body read safe: a browser-only read in code no island imports is `X_LIVE_ROUTE_NO_ISLAND` at the `budgets` step, `hasPageSocket()` included. In a **browser**, a hook in a bundle that never called `installRealtime()` is `X_REALTIME_UNINSTALLED`. To ask, before any hook ran, whether a live hook could reach a sync node at all, call `hasSyncTarget()`: `true` when `installRealtime` was given a target or the document carries `<meta name="ultimate-sync">`; asking dials nothing. A page without one would answer `useChannel` with `X_SYNC_UNCONFIGURED`, so an island renders its static fallback instead. An events-only channel names no read: `channelRef('typing', { params: ['orgId'] })`.
23
23
 
24
24
  A file that needs both writes both imports. **Nothing was deleted in the split** — if an import
25
25
  stops resolving after upgrading to 8.0.0, the name moved to `./server`.
@@ -155,7 +155,7 @@ adapter, its sync URL and its `LiveClient`: the page's one socket is the framewo
155
155
 
156
156
  | Step | Where | What |
157
157
  |---|---|---|
158
- | 1. the dependency | root `package.json` | `bun add @ultimat3/realtime`. `x new` installs `@ultimat3/query` and **not** `@ultimat3/realtime` |
158
+ | 1. the dependency | root `package.json` | `x new` declares `@ultimat3/realtime` beside `@ultimat3/query`, at the framework's exact version (`As of 2026-11-19`). An app scaffolded before 31.49.0 adds it once, at the version its `@ultimat3/core` pin names: `bun add --exact @ultimat3/realtime@$(bun -p "require('./package.json').dependencies['@ultimat3/core']")` — a bare `bun add` writes a range `x doctor` refuses (`X_FRAMEWORK_PIN_RANGE`). Missing, the import is `TS2307: Cannot find module '@ultimat3/realtime'` |
159
159
  | 2. the query | `app/<feature>/live.ts` | `query({ …, live: true, subscribes: ['posts'] })`, bounded and ordered; `x g query <name> --feature <slice> --live` writes it |
160
160
  | 3. the ref | the island | `{ name: 'liveFeed', live: true }`, the query's registered **name**, never the query value: importing that drags its whole read path into the island. `live` is stated beside the name, not derived (see below) |
161
161
  | 4. the install | nothing to write | `x build` builds every island whose own import graph reaches `@ultimat3/realtime` from an entry that calls `installRealtime({ signal: createSignal, cleanup: onCleanup })` first, for about 100 B — `cleanup` releases every hook with the component that called it (31.14.0), so an island writes no `onCleanup(() => h.release())`. An island not reaching realtime pays nothing. The sync target is read from the document's `<meta name="ultimate-sync">` ([Configuration](Configuration), `SYNC_URL`) |
@@ -216,7 +216,7 @@ kept) until it mounts over the restored store.
216
216
  |---|---|---|
217
217
  | takes `useQuery`, `useRecord`, `useRecords`, `useMutation`, `useMutationQueue`, `useOutbox`, or any other name not listed below, anywhere in its own graph | yes — until it mounts, 3 s at most | yes, 1 s at most (`FIRST_PAINT_HOLD_MS`) |
218
218
  | takes `useQuery` or `useRecord` (and otherwise only the follow list below), in an app that declares no `persist: true` entity | **no** — the boot restores no record they could show | no |
219
- | takes only `useChannel`, `usePresence`, `useConnection`, `hasPageSocket`, `useRecordChanges`, `pollEvery`, `readPresence`, `channel`, `channelRef`, `topic` | **no** — its server markup is on screen from the first byte | no — it mounts as soon as the page runtime is there |
219
+ | takes only `useChannel`, `usePresence`, `useConnection`, `hasPageSocket`, `hasSyncTarget`, `useRecordChanges`, `pollEvery`, `readPresence`, `channel`, `channelRef`, `topic` | **no** — its server markup is on screen from the first byte | no — it mounts as soon as the page runtime is there |
220
220
  | takes the barrel with no list of names (`import * as`, `export *`, `import()`) | yes | yes |
221
221
  | reaches no realtime | no | no |
222
222
 
@@ -400,6 +400,15 @@ org's value is `X_TOPIC_FORBIDDEN` (cause `X_TENANCY_ACTOR_MISMATCH`), an actor
400
400
  is enough: the policy decides the permission, the mechanism decides the tenant — the same split an
401
401
  HTTP read has.
402
402
 
403
+ `As of 2026-11-19`. A channel keyed by any other param — `room-feed.<roomId>` on `records: [messages]` — carries every
404
+ org's rows that name that room, and its subscribe cannot know which. So the mechanism decides per
405
+ row: a tenanted row reaches only the members whose org is the row's tenant, live and on a `since`
406
+ replay alike; every other member receives that frame's `seq` alone, carrying no record, key or
407
+ `write`, so its cursor stays whole. A row naming no tenant reaches no member; an untenanted entity's
408
+ rows, and every row on a topic keyed by the tenant column, reach every member as before
409
+ (`channel-tenant.ts`, `rowTenant`). The catch-up read is a query, tenant-scoped by
410
+ `@ultimat3/entity` like every other.
411
+
403
412
  ## A channel event re-reads the page
404
413
 
405
414
  `As of 30.0.0`. For a server-rendered page with nothing to push but "this changed": the channel
@@ -712,8 +721,8 @@ A client on build `A` connecting to a `sync` node on build `B` is **accepted**,
712
721
 
713
722
  A long-lived socket for a client that is **not a browser** — a device agent that dials out and
714
723
  receives work. `deviceSocket()` is a factory over `route`: the value is a websocket mount (`path`,
715
- `fetch`, `websocket`) plus `request()`, which reaches one connected device from any process.
716
- From `@ultimat3/realtime/server`, `As of 2026-11-06`.
724
+ `fetch`, `websocket`) plus `request()`, which reaches one connected device from any process, and
725
+ `disconnect()`, which closes one from any process. From `@ultimat3/realtime/server`, `As of 2026-11-23`.
717
726
 
718
727
  ```ts
719
728
  import { userActor } from '@ultimat3/core';
@@ -726,11 +735,16 @@ export const deviceLink = deviceSocket({
726
735
  maxSocketsPerActor: 10,
727
736
  heartbeatMs: 15_000,
728
737
  onFrame: ({ frame, device }) => ({ ack: device.deviceId, received: frame }),
738
+ onOpen: ({ device, ctx }) => ctx.logger.info('device.online', { device: device.deviceId }),
739
+ onClose: ({ device, ctx, reason }) =>
740
+ ctx.logger.info('device.offline', { device: device.deviceId, reason }),
729
741
  });
730
742
 
731
743
  // From any action or job, on any node — scoped to the caller's tenant:
732
744
  export const ask = (ctx: { readonly actor: ReturnType<typeof userActor> }) =>
733
745
  deviceLink.request(ctx, 'desk-7', { job: 'sync' }, { deadlineMs: 30_000 });
746
+ export const revoke = (ctx: { readonly actor: ReturnType<typeof userActor> }) =>
747
+ deviceLink.disconnect?.(ctx, 'desk-7', 'revoked'); // true: closed; false: no socket under this tenant
734
748
  ```
735
749
 
736
750
  | Concern | Rule |
@@ -742,6 +756,9 @@ export const ask = (ctx: { readonly actor: ReturnType<typeof userActor> }) =>
742
756
  | Frames | JSON text. `DEVICE_FRAME_MAX_BYTES` (256 KiB) is the framework's and is not an option: Bun's `maxPayloadLength` and the handler both enforce it (`1009 X_DEVICE_FRAME_TOO_LARGE`); a `request()` over it throws before sending. `onFrame` runs one frame at a time per socket, as the device's actor; past 32 queued the socket closes `X_FRAME_RATE_LIMIT` |
743
757
  | Heartbeat | the node names `heartbeatMs` in its `hello`; a device silent for two beats is closed `4001` |
744
758
  | Addressing | the holder registers the device in the bus's shared set (TTL three beats) under `(tenant, deviceId)`; `request()` looks it up and publishes to that node. Nobody holds it, or another tenant does: `X_DEVICE_OFFLINE` at once. No answer in `deadlineMs` (default 30 s, max 600 s): `X_DEVICE_REQUEST_TIMEOUT`. A socket that closes answers its open requests `X_DEVICE_OFFLINE` |
759
+ | Open and close | `onOpen({ device, ctx })` and `onClose({ device, ctx, reason })` run as the device's actor, beside the socket and never in its path: a throw is reported (`device.on_open` / `device.on_close`) and the socket goes on. A socket's `onClose` runs after its `onOpen` settles. `reason` is the node's own close reason (`replaced`, `no beat`, `grant expired`, `drain`, a `disconnect()` reason, …) or `disconnected` when the device or its network ended it. At least once: a duplicate is possible, a missing close is not |
760
+ | A node that dies | with `onClose` declared, each socket is a record in the bus's shared set, kept on the holder's beat. Each beat the serving node with the lowest live id reads them, and a record whose node left the roster (three beats silent) is dropped and closed there: `reason: 'node lost'` (`DEVICE_NODE_LOST`), `ctx.actor` carrying kind, id and org only. A holder whose record was dropped while alive writes it again, with a second `onOpen`. No `onClose`, no record and no write |
761
+ | Disconnect | `disconnect(ctx, deviceId, reason)` from any role: the holding node closes the socket `1008` with `reason` (1 to 123 UTF-8 bytes, `DEVICE_CLOSE_REASON_MAX_BYTES`, else `X_CONFIG_INVALID`). `true` once closed; `false` when nobody holds it under the caller's tenant, as for another tenant's device. A holder that does not confirm within `DEVICE_DISCONNECT_DEADLINE_MS` (5 s): `X_DEVICE_REQUEST_TIMEOUT`. The device may redial: revoke its token first. Optional in the `DeviceSocket` type only, so an app's own implementation still compiles; `deviceSocket()` always sets it |
745
762
  | Drain | SIGTERM: stop accepting, then the sync node's own `drainPlan` + `reconnect` frame per socket, then close `1001` |
746
763
  | Reconnect | `deviceAgent()` (a Bun client) redials on realtime's one jittered backoff, or at the slot a `reconnect` frame assigned |
747
764
 
@@ -791,7 +808,7 @@ the listener's websocket paths are fixed when it binds. A container scans once,
791
808
  | `X_TRANSPORT_UNAVAILABLE` | the fanout bus is down. At boot only for `sync` and the replicator, after a bounded wait; on `web`, `worker` and `scheduler` it is what a publish rejects with while the bus is away ([what each role needs](#what-each-role-needs-from-the-bus)); on a socket it is the one refusal a client treats as transient ([a bus outage, seen from an open page](#a-bus-outage-seen-from-an-open-page)) | `x doctor — then check NATS_URL points at a reachable nats-server` |
792
809
  | `X_TRANSPORT_PROTOCOL` | the bus answers in a protocol this build does not speak | `the bus must be nats-server >= 2.11 with JetStream enabled (nats-server -js)` |
793
810
  | `X_DEVICE_OFFLINE` | `deviceLink.request()` named a device no node holds a socket for under the caller's tenant | `x doctor --json`, then retry once the device redials |
794
- | `X_DEVICE_REQUEST_TIMEOUT` | the device took the request and sent no `response` with its id before `deadlineMs` | a longer `deadlineMs`, or answer every request the node sends the device |
811
+ | `X_DEVICE_REQUEST_TIMEOUT` | the device took the request and sent no `response` with its id before `deadlineMs`; or the holding node did not confirm a `disconnect()` | a longer `deadlineMs`, or answer every request the node sends the device; a disconnect: retry, a dead holder closes on its own |
795
812
  | `X_DEVICE_FRAME_TOO_LARGE` | a device frame, or a `request()` frame, past `DEVICE_FRAME_MAX_BYTES` | split the payload, or store the bytes and send their key |
796
813
  | `X_BUILD_SKEW` | client build's contract is incompatible with the server's | reload the client; see the fix line on the error |
797
814
 
@@ -218,7 +218,7 @@ export const config = defineRoute({
218
218
 
219
219
  | Key | Default | What it decides |
220
220
  |---|---|---|
221
- | `onInvalidate: 'stale'` | yes | a tag bust marks the stored page stale; the next request is answered **that copy, however old**, while a fresh one renders behind it (`x-ultimate-isr: stale`). Right for a price list |
221
+ | `onInvalidate: 'stale'` | yes | a tag bust marks the stored page stale; the next request is answered **that copy, however old**, while a fresh one renders behind it (`x-ultimate-isr: stale`). That stale answer is **not leased to a shared cache**: it carries `public, max-age=0, s-maxage=0` and no `stale-while-revalidate`, with the same `surrogate-key`, so a CDN purged by the bust asks the origin again and gets the regenerated page, instead of holding the pre-write one for the whole `ttl` (`As of 2026-11-19`). Right for a price list |
222
222
  | `onInvalidate: 'purge'` | — | a tag bust **deletes** every stored page of the route carrying the tag — each locale, each keyed query, stored 404s included — and evicts any render of them in flight, so the next request renders and waits. For content that must come **down** (a withdrawn article, a corrected legal text). Needs `tags` **and `ttl`** (`X_ROUTE_MODE_INVALID` without either). The response carries no `stale-while-revalidate`, and its `s-maxage` is what is **left** of the `ttl` |
223
223
  | `maxStale` | unbounded; **`0` under `'purge'`** | how long **past its `ttl`** a stored page may still be answered stale: a duration, or `0` for never. Older, it is dropped and the request waits for a render. Also the `stale-while-revalidate` a shared cache is told (a day when omitted, absent at `0`). Needs `ttl` |
224
224
  | `query` | `[]`, none | the query parameters the page varies on. Only these are in the stored page's key **and** in the `url` / `query` that `load`, `meta` and the page receive; one value each (the first), sorted |
@@ -342,7 +342,7 @@ In a VDOM framework a streaming shell still pays for hydrating the whole tree, w
342
342
  | Async component | `X_ROUTE_ASYNC_PAGE` applies to `Page`, never to what renders under a hole |
343
343
  | A hole's island | hydrates from its chunk: the chunk carries the hydration runtime after its reveal, and the realtime boot if this is the first island that needs it |
344
344
  | A shell island while a hole is open | live: the runtime is `<script type="module" async>`, so it does not wait for parsing to end. With a realtime boot in the document it stays deferred ([Known gaps](Known-Gaps)) |
345
- | Client router | a soft visit reads the whole answer before it swaps ([Known gaps](Known-Gaps)); every reveal still runs |
345
+ | Client router | a soft visit swaps the shell in as soon as it arrives, then fills each hole as its chunk lands, through the same reveal ([Client navigation](Client-Navigation#the-swap)). A click that reuses a prefetch in flight waits for the whole answer: a prefetch reads it whole |
346
346
  | A hand-rolled swap | the reveal is an inline `<script>`, and a document parsed by `DOMParser` or set through `innerHTML` runs none, so its holes keep their fallback. Re-run the scripts, or call `refresh()` / `scheduleRefresh()` from `@ultimat3/render/client`, which the router swaps through (`navigation-swap.ts`'s `runScripts`) |
347
347
  | CSP | every chunk's inline script is a body `inlineScriptSources()` already hashes |
348
348
 
@@ -84,6 +84,8 @@ export const digestTask = sendDigest.schedule;
84
84
 
85
85
  Hand the job's module to `defineApi({ jobs })`; the task registers with it — it needs no `tasks` entry. A task that fires several jobs, or a job other code also enqueues, stays a `task()` beside its jobs.
86
86
 
87
+ **One job per org, from a schedule**: the schedule belongs to no org (`tenant: 'none'`), the org list is read inside `crossTenant()` as a service actor, and each child job is tenant-scoped and runs as its org — the whole pattern, with a test that runs it, is `x docs 'jobs.README#one-job-per-org-from-a-schedule'`. Fire it now in dev with `x tasks run <name>.schedule`.
88
+
87
89
  ## The fluent surface
88
90
 
89
91
  Every projection is a method on the task — `nightlyDigest.enqueue()`, never `runTask(nightlyDigest)` — and every declared field is lifted onto it. A task has no `.def`.
@@ -160,8 +162,9 @@ Role table and drain sequence: [Deployment](Deployment).
160
162
  |---|---|
161
163
  | `x tasks list --json` | the descriptor — `name`, `cron`, `tz`, `catchUp`, `maxCatchUp`, `jobs` — plus the resolved **`next`** occurrence, rendered in the task's own `tz`, and its `nextMs` epoch instant; and the **`last`** fire (`last`, `lastMs`, `lastFiredAtMs` — `null` before the first), read from the queue, which `x tasks` opens when a task is declared. All derived, never declared fields |
162
164
  | `x tasks show <name> --json` | the same, plus the cron in words (`describe`) and the next N occurrences (`--count`, default 5) |
165
+ | `x tasks run <name> --json` | fires the task now: each job its occurrence enqueues goes onto the app's queue (`TaskHandle.enqueue()`, the run-now path; the scheduler's watermark is untouched, so the next scheduled occurrence still fires). Beside an `x dev` on the embedded database it refuses with the stop–run–restart fix; where the environment resolves `production` it needs `--production` (or `ULTIMATE_TASK_RUN=<name>` in a container), else `X_TASK_RUN_PRODUCTION`. `x g cron-job` prints it as its next step. `As of 2026-11-19` |
163
166
  | `/admin/jobs/tasks` | the jobs dashboard every `defineAdmin()` serves: schedule, zone, last fire, next fire (`nextTaskRun`), paused; pause, resume and run now behind `job:manage` → [Admin dashboard](Admin-Dashboard#the-jobs-dashboard) |
164
- | MCP `admin.x_job_tasks.list`, `admin.action.job.task.run-now` | the same screen and actions as admin MCP tools, same authz (`job:read`, `job:manage`) |
167
+ | MCP `admin.x_job_tasks.list`, `admin.action.job.task.run-now` | the same screen and actions as admin MCP tools, same authz: listing needs `job:read`, run-now `job:manage` — which `x new`'s `admin` role does **not** hold (it holds `job:read`); grant it in `apps/web/shared/roles.ts` to see the tool |
165
168
  | `/_x` dev panel | the jobs tab: the dev process's tasks beside its queues and runs |
166
169
  | `x.manifest.json` | generated `tasks` section — the build-time source of truth |
167
170
  | `<task>.describe()` | in process: `kind`, `name`, `cron`, `tz`, `catchUp`, `maxCatchUp`, and the job names it enqueues |
@@ -62,8 +62,10 @@ hashed URL, in `x dev`, the container and `x build --target static` alike.
62
62
  → `src: url("/assets/fonts/inter-var.9c1d2e3f.woff2") format("woff2")`. A missing file or a path
63
63
  outside `assets/` is `X_ASSET_MISSING` at compile time, naming the path — not a Sass stack. The Sass
64
64
  disk cache re-checks every asset a cached sheet named, so a replaced font is never served under its
65
- old hash. Sass has no table without an app loaded, so a unit test that compiles such a sheet
66
- installs one with `setAssetResolver`, as below.
65
+ old hash. In a test process run from the app root, `@ultimat3/testing/preload` installs the app's
66
+ own table (again at every file boundary), so a test importing a module whose sheet calls `asset()`
67
+ compiles it to the URL the app serves, and a missing file is still `X_ASSET_MISSING`. Only a test
68
+ run outside an app root installs one itself, with `setAssetResolver`.
67
69
 
68
70
  ## Served types
69
71
 
@@ -90,7 +92,7 @@ unsatisfiable range gets a `416`. Safari will not play a `<video>` without this.
90
92
 
91
93
  | Question | Answer |
92
94
  |---|---|
93
- | the table | `packages/cli/src/site-assets.ts`: one table per app root, installed into `asset()` by `loadApp` |
95
+ | the table | `packages/render/src/site-assets.ts` (`@ultimat3/render/server`): one table per app root, installed into `asset()` by `loadApp`, and by `@ultimat3/testing/preload` in a test process at an app root |
94
96
  | the route | `packages/cli/src/site-asset-routes.ts`: `GET /assets/*file`, mounted by `assetRoutes()`, which both `x dev` and the container compose |
95
97
  | the export | `writeSiteAssets(root, out)` copies every asset to `out/assets/…/<name>.<hash>.<ext>` |
96
98
  | the helper | `packages/render/src/asset.ts`: `asset()`, `setAssetResolver()`, `assetPathProblem()` |
package/wiki/Testing.md CHANGED
@@ -234,7 +234,8 @@ export const summarizeEval = defineEval({
234
234
  ```
235
235
 
236
236
  `ULTIMATE_EVAL_RECORD=1 x test eval` re-records every baseline, so accepting a new number is a
237
- reviewable diff instead of an edited threshold. It is refused inside the gate: `x verify` with that
237
+ reviewable diff instead of an edited threshold. `0`, `false`, `no`, `off` or empty (any case) is
238
+ off and gates; any other value records (`As of 2026-11-19`). It is refused inside the gate: `x verify` with that
238
239
  variable set is `X_EVAL_RECORDING` and runs no eval suite, because recording passes by definition
239
240
  and would overwrite the committed baselines during the run.
240
241
 
@@ -392,6 +393,30 @@ test('the vendor map renders', async () => {
392
393
 
393
394
  An entry covers the reads after the call and ends with the test; a blank `because` is refused, as in `e2eTest`. Each `goto` now spends five CDP deadlines, not three (`E2E_GOTO_MS`), for the audit's two reads. Source: `packages/testing/src/e2e-a11y.ts` (rules), `e2e-a11y-run.ts` (one test's run), `e2e-a11y-tabs.ts` (raw tabs), `ax-node.ts` (the tree reader).
394
395
 
396
+ ## Passkeys and a second person in the e2e browser
397
+
398
+ `As of 2026-11`. Two free functions over the harness's own objects — `e2eBrowser()` in an app's e2e suite, `openE2eBrowser()` beside it — never a member a hand-rolled tab would lack:
399
+
400
+ ```ts
401
+ import { addVirtualAuthenticator, e2eBaseUrl, e2eBrowser, expect, newBrowserContext } from '@ultimat3/testing';
402
+
403
+ const { page, session } = e2eBrowser();
404
+ const passkey = await addVirtualAuthenticator(page); // CTAP2, resident key, user verified
405
+ // … the app's own register / sign-in buttons run navigator.credentials.create/get, unprompted
406
+ expect((await passkey.credentials()).map((one) => one.rpId)).toEqual(['localhost']);
407
+
408
+ const invitee = await newBrowserContext(session); // no cookie or storage of the first profile
409
+ const tab = await invitee.newTab();
410
+ await tab.goto(`${e2eBaseUrl()}/invite/accept`);
411
+ await invitee.close();
412
+ ```
413
+
414
+ | Call | Is |
415
+ |---|---|
416
+ | `addVirtualAuthenticator(tab, { transport?, residentKey?, userVerified? })` | CDP `WebAuthn` on that tab: `{ id, credentials(), setUserVerified(verified), remove() }`. Per tab, presence simulated; `userVerified: false` makes every user-verification fail. The rp id the ceremony names must be the page's host or a parent domain of it (`login.example.com` may register for `example.com`) and never an IP; locally, serve on `localhost`. `remove()` detaches that authenticator only |
417
+ | `newBrowserContext(session)` | `Target.createBrowserContext`: `{ id, newTab(), close() }`. Its tabs are attached, configured (offline switch, init scripts, `Accept-Language`) and audited as `session.newTab()`'s are; `close()` disposes every tab in it |
418
+ | a tab or session the harness did not build | `X_TEST_FIXTURE_UNAVAILABLE`, naming what it needs |
419
+
395
420
  ## Matchers
396
421
 
397
422
  Installed by the preload on `expect`.
@@ -402,7 +427,7 @@ Installed by the preload on `expect`.
402
427
  | `toDenyPolicy(context)` | the policy refuses that context |
403
428
  | `toEmitSteps(names)` | a job runs exactly those steps, in order |
404
429
  | `toMatchOpenApi(committed)` | no operation removed, no parameter newly required |
405
- | `toBeWithinBudget(limit)` | a measured number is at or under the limit |
430
+ | `toBeWithinBudget(limit)` | a measured number is at or under the limit; a limit that is not a finite number (`undefined` from a renamed budget key, `NaN`, `Infinity`) throws `X_TEST_NUMBER_EXPECTED`, under `.not` too (`As of 2026-11-19`) |
406
431
  | `toRejectInput(input)` / `toAcceptInput(input)` | a schema's verdict on one input |
407
432
  | `toEqualRow(expected)` | equality over every OWN property — the one that sees a `.sealed()` column |
408
433
  | `toBeVisible(options?)` | waits for a locator to show; `.not` waits for it to go |
@@ -449,11 +474,17 @@ unitTest('the dashboard counts the posts of the org that is looking', async () =
449
474
  | Answer | Is |
450
475
  |---|---|
451
476
  | `view.html` | the markup, as the document carries it |
452
- | `view.text` | what a reader sees — tags and script/style bodies removed, entities decoded. Compare it with `t('<key>')` |
477
+ | `view.text` | what a reader sees — tags and script/style bodies removed, character references decoded (every numeric one, and the common named ones: `&quot;`, `&apos;`, `&nbsp;`, typographic quotes and dashes …) as a browser reads them; a no-break space is kept. Compare it with `t('<key>')` |
453
478
  | `view.data` · `view.meta` | what `load` resolved, and what `meta` answered for that same object |
454
479
  | `view.islands` | the islands the render emitted. Empty on a page that ships no JavaScript |
455
480
 
456
- `actor` runs `load` and the page inside a request context holding that actor. `renderView` refuses
481
+ `actor` runs `load` and the page inside a request context holding that actor. A `url` whose first
482
+ segment is a routed locale (`https://example.test/es/precios`) renders `load`, `meta` and the page
483
+ in that locale, as the router reads the prefix. Unprefixed and with no `actor`, no request context is
484
+ opened: standalone that is the default locale, inside your own `runWithContext` it is that context's.
485
+ `cookies: { sid: '…' }` runs them inside a GET request for `url` carrying those cookies, read by
486
+ `useRequestCookie(name)` as a browser's are (`As of 2026-11`); with `actor` or a locale prefix too,
487
+ the actor still acts and the locale still holds. `renderView` refuses
457
488
  a component that renders an `island()` — its hydration timing is a route's. `As of 2026-10`.
458
489
 
459
490
  ## Asserting on what an element carries
@@ -622,6 +653,29 @@ What the rendered result is then held to: [Interface rules](Interface-Rules).
622
653
  | `subscribe` | one subscriber's `rows()` `patches()` `settled()` `lsn()` | a replicator |
623
654
  | `seed`, and anything else | the app's own graph | the app's `scripts/test-setup.ts` |
624
655
 
656
+ **Keys and the console: `pressKey(page, key)`, `consoleMessages(page)`, `expectNoConsoleErrors(page)`** (`@ultimat3/testing`). Free functions over the `page` an `e2eTest` or the `{ page }` fixture hands you, so `PageLike` itself does not grow:
657
+
658
+ ```ts
659
+ import { e2eTest, expect, expectNoConsoleErrors, pressKey } from '@ultimat3/testing';
660
+
661
+ e2eTest('the dialog is keyboard-reachable and the page logs no error', async ({ page }) => {
662
+ await page.goto('/settings');
663
+ await pressKey(page, 'Tab'); // a real key: focus moves, Enter submits
664
+ await pressKey(page, 'Control+k'); // a chord: Alt, Control, Meta, Shift held
665
+ await pressKey(page, 'Escape');
666
+ expect(await page.evaluate(() => document.activeElement?.id)).toBe('search');
667
+ await expectNoConsoleErrors(page); // X_E2E_CONSOLE_ERRORS, quoting each
668
+ });
669
+ ```
670
+
671
+ | Call | Answers |
672
+ |---|---|
673
+ | `pressKey(page, key)` | a trusted key press at the focused element: a name in `PRESS_KEYS` (`Tab` `Enter` `Escape` `Backspace` `Delete` `Home` `End` `PageUp` `PageDown` the arrows, `' '`), one ASCII letter or digit, or a chord `Mod+…+key` (`Shift+Tab`, `Control+k`) — Shift makes the key a US keyboard makes (`Shift+1` is `!`), Control/Meta/Alt type nothing. A chord the grammar refuses is `X_SCRAPE_KEY_INVALID` (the one chord grammar, `@ultimat3/scraping`'s); a key it does not know, `X_CDP_CALL_FAILED` |
674
+ | `consoleMessages(page)` | `readonly E2eConsoleMessage[]`, `{ level: 'debug' \| 'log' \| 'info' \| 'warning' \| 'error', text, source: 'console' \| 'exception' }`, since the running test began — each `e2eTest` and each test that takes the `{ page }` fixture starts it, after flushing the previous test's lines in flight — and after one round trip, so a line printed just before is in it. A cross-site iframe's console counts. `text` is the raw arguments joined by a space (no `%d` substitution). The tab keeps 1,000 lines of 2,000 characters at most, dropping the oldest non-error first, so an error survives a noisy page |
675
+ | `expectNoConsoleErrors(page)` | resolves when no `error` arrived since the test began (`console.error`, a failed `console.assert`, an uncaught throw); else `X_E2E_CONSOLE_ERRORS` listing them all. Warnings pass; filter `consoleMessages` for another rule |
676
+
677
+ A page no e2e driver built, or a hand-rolled `E2eBrowserPage` without `press` / `consoleMessages` (with `clearConsole` to start each test's console), is refused by name (`X_TEST_FIXTURE_UNAVAILABLE`). `As of 2026-11`.
678
+
625
679
  **`waitForServiceWorker({ timeoutMs? })` hands the first page over** (25.0.0, #678). The framework's register script runs on `load`, so the first page of a run is committed before its worker activates and `clients.claim()` can miss it: `ready` resolves and no `controllerchange` ever fires. The wait answers `ready`, gives the claim a second (`CLAIM_GRACE_MS`), and reloads an uncontrolled page ONCE — that navigation is answered by the worker — within one budget (`serviceWorkerTimeoutMs`, 10 s, or this call's `timeoutMs`). A page with no worker is refused without a reload, and a reload still uncontrolled is refused saying so (`X_E2E_SERVICE_WORKER_ABSENT`). Proven against a real worker that never claims: `packages/testing/e2e/service-worker-handover.e2e.test.ts`.
626
680
 
627
681
  The last five are **declared, not built**. The framework does not bundle a browser, so the name resolves and asking for it without a driver fails as `X_TEST_FIXTURE_UNAVAILABLE` naming what is missing — different from `X_TEST_FIXTURE_UNKNOWN`, whose fix ("register it") would have the app inventing its own idea of what a page is. A driver installs through the same registry:
@@ -1098,7 +1152,7 @@ coverage floor counts that suite alone, so a body only a typed suite reaches is
1098
1152
  |---|---|---|
1099
1153
  | `x g action` | input parse; the handler through `.as(actor, input)` — the refusal first, then what it answers | `contract`: the action contract (the exercise as a member of the input's org), the foreign-org denial, the OpenAPI operation |
1100
1154
  | `x g mutator` | the same, plus `local()` against `memoryLocalTx()`, applied twice | `contract` |
1101
- | `x g query` | the SQL's bound, total order and direction; the read through `.as()` — no grant refused, an empty org reads empty, stored rows read back newest first and never another org's, the read costing one `statements` count however many rows it answers | `--live`: the declaration in `.live.test.ts` |
1155
+ | `x g query` | the SQL's bound, total order and direction; the read through `.as()` — no grant refused, an empty org reads empty, stored rows read back newest first and never another org's — a read through the slice's `<Feature>View` answers exactly its keys, no `orgId` — the read costing one `statements` count however many rows it answers | `--live`: the declaration in `.live.test.ts` |
1102
1156
  | `x g job` · `x g task` | the body under `runJobs`: which steps one run takes, what it answers, and how it ends | `job`: key, tenant, retry policy, enqueue dedupe |
1103
1157
  | `x g backfill` | one whole pass over rows in two tenants; the projection replayed | `job`: durable name, dedupe |
1104
1158
  | `x g route` | the page rendered (`renderRoute`): heading, metadata, mode, budget, islands | `e2e`: the offline fallback |
@@ -1150,6 +1204,7 @@ shape, same unreached code. `As of 2026-11`.
1150
1204
  | Rule | |
1151
1205
  |---|---|
1152
1206
  | Database | a scratch one with the framework tables and every migration applied; never the developer's. The pass commits, so the tenant proof can read rows after the call |
1207
+ | Services | what a server's boot installs beside its database, over the scratch one: a memory storage disk (unless the app defined its own), the fleet-wide rate-limit store, the fleet-wide auth limiter (`postgresAuthLimiter` per declared policy, so `defineAuth({ rateLimit: { scope: 'shared' } })` is judged, not refused with `X_AUTH_LIMITER_NOT_SHARED`, `As of 2026-11`), and a Web Push runtime whose sends are captured |
1153
1208
  | Rows | one seed graph for the pass, a fresh pair of tenants per primitive in it — the first the actor's (A), the second the tenant proof's intruder (B); every table seeded off its declaration, parents first, same-tenant keys (`x db seed --generate`'s graph). A view and a `readOnly: '<why>'` table get no row; a NOT NULL key into a `readOnly` one is `X_SEED_GRAPH_UNSATISFIED` naming it ([Read-only tables](Entities-And-Migrations#read-only-tables)) |
1154
1209
  | Actor | the entry's `actor` when it declares one, seated in the primitive's tenant — and a top-level value of its bound input — or of its `facts`, a string or an array holding it — equal to the org the entry declared becomes that tenant too, so `input: (drawn) => ({ ...drawn, orgId: '<the actor's org>' })` holds in every tenant the pass seeds; otherwise the first of `x policy explain`'s actors the policy allows, in the primitive's tenant (an `{ input }`-only entry keeps this pick and still binds its input). None allowed is `refused`, by design. Its id has a user's shape: a uuid per role × tenant, the same on every run (`exerciseActorId`), never the role's name. Where the database has `x_users` (the framework schema every pass database is built with) each actor the pass acts as gets its row first — `<id>@exercise.invalid`, its tenant, roles, permissions, scopes — so `findUserById(ctx.actor.id)` finds it; a refused insert is `X_EXERCISE_ACTOR_USER_UNSEATED`. `defineExercise(…, { actor: members })` makes the id a seeded row's key instead (`As of 2026-11-08`) |
1155
1210
  | Input | the override, then an id field whose stem names a seeded entity (`postId` → `posts`), then the schema's minimal draw. A wrong guess shows as `unreached` |
@@ -1267,7 +1322,7 @@ Source: `packages/testing/src/scale-sweep*.ts`, `plan-oracle.ts`, `plan-sweep*.t
1267
1322
  | Sweep | What | Red |
1268
1323
  |---|---|---|
1269
1324
  | scale | every reached primitive once more in a tenant at 2 rows a table, once in one at 8; per statement shape, the counts compared. Each sized seed is written beside the graph before it: row positions (a generated integer, a factory's `index`) continue past that graph's, so ``code: `c${index}` `` on a unique column never repeats the pass's own row | a shape sent more often at 8 than at 2, where it was sent at least once: `X_QUERY_SCALES_WITH_ROWS`, fix `preload()` or `expectedQueryLoop('<why>', fn)`. A shape sent only at 8, nothing else grown, is another path (a branch on the handed row), `unproven` (`As of 31.16.0`); the 8-row graph opens on the 2-row graph's values in every non-unique column, so the handed row is the same at both sizes |
1270
- | plans | every distinct statement whose first relation is an app table, `PREPARE`d and explained as a generic plan with `enable_seqscan`, `enable_bitmapscan` off — and, for a statement with a `Limit`, planned again with `enable_sort` off for its sort alone — in a read-only transaction | `Seq Scan`, or an index scan with no `Index Cond` no `Limit` stops: `X_QUERY_UNINDEXED`. `Sort` under `Limit`: `X_QUERY_SORT_UNSERVED`, on the table its key names. Each prints an `indexes:` entry, one per arm for an `or`; a sort no declarable index serves (an expression, an aggregate, a derived column, keys across tables, mixed directions) or an index the entity already declares prints a rewrite or `expectedSeqScan` instead |
1325
+ | plans | every distinct statement whose first relation is an app table, `PREPARE`d and explained as a generic plan with `enable_seqscan`, `enable_bitmapscan` off — and, for a statement with a `Limit`, planned again with `enable_sort` off for its sort alone — in a read-only transaction | `Seq Scan`, or an index scan with no `Index Cond` no `Limit` stops: `X_QUERY_UNINDEXED`. `Sort` under `Limit`: `X_QUERY_SORT_UNSERVED`, on the table its key names. Each prints an `indexes:` entry, one per arm for an `or`; a sort no declarable index serves (an expression, an aggregate, a derived column, keys across tables, mixed directions) or an index the entity already declares prints a rewrite or `expectedSeqScan` instead. An index WALK that an index the entity already holds would serve (its equality columns, then the order) is green: on a seed of a few rows a partial index such as `where revoked_at is null` costs as little as the keyed one and the generic plan walks it. A schema heuristic, not a promise about production plans: with many revoked rows sharing a key and few active ones, the walk can stay cheaper at volume (`As of 2026-11`) |
1271
1326
 
1272
1327
  With the planner's scans and sorts disabled it picks one only when no index can answer, so the
1273
1328
  verdict reads the schema on empty tables — no volume, no statistics. Never red: `scale.verdict`
@@ -1384,7 +1439,9 @@ gates at once — and it is held to a **memory budget**, not to whatever looks f
1384
1439
 
1385
1440
  - **Width.** `max(2.75 GiB, 25% of total RAM)` divided by 1.25 GiB a worker, clamped to `1..cores`:
1386
1441
  3 workers on a 16 GB box, 12 on a 62 GB 16-core one, 2 on an 8 GB one (the 2.75 GiB floor). Never more workers than cores. The step line says
1387
- what it chose and why — `3 workers (budget 4.0 GB)`. `ULTIMATE_TEST_MEMORY_BUDGET=3g` replaces
1442
+ what it chose and why — `3 workers (budget 4.0 GB)`; fewer files than that read
1443
+ `1 worker, one per file (plan: …)`, and a run the machine held narrower reads
1444
+ `ran 2 at once (peak), planned 3 — …`. `ULTIMATE_TEST_MEMORY_BUDGET=3g` replaces
1388
1445
  the budget, `ULTIMATE_TEST_MAX_WORKERS=2` caps the width, `--workers N` wins over both. Total RAM,
1389
1446
  never "free": page cache counts as free, and two gates each planning on it took a 45 GB box down.
1390
1447
  - **One budget per machine.** Each batch of workers reserves its measured memory in the
package/wiki/Theming.md CHANGED
@@ -228,8 +228,9 @@ brandStyleTag(brand); // '<style>…</style>' — for a page you render yo
228
228
  | `shadows` | `Partial<Record<'light' \| 'dark', Partial<Record<ShadowName, string>>>>` | elevation is themed like colour |
229
229
  | `radius` | `Partial<Record<RadiusName, string>>` | `none sm md lg xl pill full` |
230
230
  | `font` | `Partial<Record<'sans' \| 'mono' \| 'data', string>>` | the font slots |
231
+ | `motion` | `{ duration?: Partial<Record<DurationName, string>>; easing?: Partial<Record<EasingName, string>> }` | the app's own tempo: `t.duration(base)` reads `--duration-base`, so one rung re-times every component. Declaring `--duration-base` with a literal time (`180ms`, `.5s`; lowercase `ms` or `s`) or `cubic-bezier(…)` in a stylesheet is `X_RAW_MOTION`, whose fix names this slot with the value spelled as the slot takes it; a zero (`0ms`) or a plain `var(--…)` read is not reported, but a literal nested in one (`var(--x, calc(180ms * 2))`) is |
231
232
 
232
- Returns a frozen `{ css: string }`. It emits `:root`, `html[data-theme='light']`, the `prefers-color-scheme: dark` block and `html[data-theme='dark']` — radius and font ride `:root` only. Output is ordered by the canonical scale arrays rather than by your object, so re-rendering the same input is byte-identical. Empty input gives `css: ''`, which the framework emits nothing for.
233
+ Returns a frozen `{ css: string }`. It emits `:root`, `html[data-theme='light']`, the `prefers-color-scheme: dark` block and `html[data-theme='dark']` — radius, font and motion ride `:root` only. Output is ordered by the canonical scale arrays rather than by your object, so re-rendering the same input is byte-identical. Empty input gives `css: ''`, which the framework emits nothing for.
233
234
 
234
235
  ### Values are validated, never escaped
235
236
 
@@ -239,12 +240,14 @@ The output can land in a `<style>` element (`brandStyleTag`), so a value that co
239
240
  |---|---|---|
240
241
  | colour | `^\d{1,3} \d{1,3} \d{1,3}$`, each channel ≤ 255 | `#1e6eb2`, `rgb(1,2,3)`, `1 1 1; } html { display: none }` |
241
242
  | radius | `^(0\|\d+(\.\d+)?(px\|rem\|em\|ch\|%))$` | `calc(…)`, `var(…)`, `1` with no unit |
243
+ | duration | `^(0\|\d+(\.\d+)?(ms\|s))$`; `0` is emitted as `0ms`, a unitless zero being no CSS time | `180`, `calc(…)`, `-10ms` |
244
+ | easing | `cubic-bezier(x1, y1, x2, y2)`, numbers only, x1 and x2 in [0, 1] | `ease-in`, `steps(4)`, `cubic-bezier(1.2, 0, 0, 1)` |
242
245
  | font | `^[\w\s,'"-]{1,200}$` | anything with `;` `}` `<` `>` `(` `)` `/` `:` — so `Menlo</style><script>` cannot get through |
243
246
 
244
247
  | Failure | Code | Means |
245
248
  |---|---|---|
246
- | unknown role, radius name or font slot | `X_TOKEN_UNKNOWN` | the key is not in the scale; `cause` lists every name that is |
247
- | known key, unusable value | `X_UI_INVALID_VALUE` | `cause` names the slot and what was expected |
249
+ | unknown role, radius name, font slot, motion scale or rung | `X_TOKEN_UNKNOWN` | the key is not in the scale; `cause` lists every name that is |
250
+ | known key, unusable value — or a `motion`, `duration` or `easing` that is not an object (`null` from JSON) | `X_UI_INVALID_VALUE` | `cause` names the slot and what was expected |
248
251
 
249
252
  ## Resolution and first paint
250
253
 
@@ -66,7 +66,11 @@ and `Calendar` take and post `YYYY-MM-DD` and know no zone. Month and weekday na
66
66
  `Intl.DateTimeFormat` with `timeZone: 'UTC'` on the plain date's UTC midnight, which names the date
67
67
  and never shifts it; the week starts on the locale's day (`Intl.Locale#getWeekInfo`). A *window* is
68
68
  instants: `timeRangeUrl(url, { presets, default, timeZone, now })` reads a custom `from`/`to` as
69
- wall-clock time in `timeZone` (a spring-forward gap resolves forward) and `TimeRangePicker` requires
69
+ wall-clock time in `timeZone` (a spring-forward gap resolves forward); `href({ from, to })` writes
70
+ `:ss` when an instant has seconds and writes the end so it reads back at or after the instant
71
+ asked for, so a window touching a fall-back hour reads back as one containing the window given,
72
+ never `invalid` or an hour early (`As of 2026-11-19`). Every list cursor on the page, a namespaced
73
+ one (`runs.after`) included, is dropped when the window changes. And `TimeRangePicker` requires
70
74
  the same `timeZone` as a prop — omitting it is a type error. "Today" is the caller's: pass `month`
71
75
  (or `now`) computed with `plainDateIn(now(), actor.tz)`; with none, `Calendar` opens on today in
72
76
  `useUi().timeZone`, the request's zone, never the device's.
@@ -40,6 +40,7 @@ The `--json` form is the same content as the terminal form. Paste the JSON into
40
40
  | `X_APP_IMPORT_UNRESOLVED` | an app module imports a package nobody installed, or a path with no file behind it. One finding per specifier | `bun add <pkg>`, or edit the import in the file the finding names. `x doctor` reports it too |
41
41
  | `X_DB_DRIFT` on a brand-new app, cause *packages/db has a schema but no migration recorded it* | expected: `x new` writes no migration, and `x db gen` is the only writer of `packages/db/migrations`. Only an app that declares an entity reports it — zero declared against zero recorded is agreement | `x db gen "initial"` then `x db migrate` — `bun run setup` does both |
42
42
  | `X_DB_DRIFT` after deleting the last entity, migrations still committed | correct, and not the case above: the migrations record tables the source no longer declares | `x db gen "drop <table>"` → it refuses with `X_MIGRATION_IRREVERSIBLE` → re-run as `x db gen "drop <table>" --allow-destructive`, or put the entity back |
43
+ | `X_MIGRATION_FORKED` after merging two branches | each ran `x db gen` from one parent, so the newest `.snapshot.json` omits the other's work | `x db gen --merge-fork`: no SQL changes, nothing is deleted. Do not generate a `record …` migration. If the cause says a migration creates something *again*, follow its `x db status --json` check, and never delete a migration a database applied |
43
44
  | `X_MIGRATION_SNAPSHOT_MISSING`, and `x db gen` refuses before writing anything | the newest migration on disk carries no `.snapshot.json` — hand-written, or the sidecar was deleted | `git checkout -- packages/db/migrations/<id>.snapshot.json`; if it was never written, `rm packages/db/migrations/<id>.* && x db gen "<name>"` — the delete **first**, or the generate refuses again |
44
45
  | `ROLE=migrate` sits there doing nothing | another version's `ROLE=migrate` holds the session-pinned migration lock. This one **waits up to 60s**, polling once per 500ms, then exits non-zero with `X_MIGRATE_CONCURRENT` (`As of 2026-08`; on 1.2.0 it waits forever) | let the first exit 0 — the second then applies. If nothing else is deploying, the holder is a wedged backend: `psql "$DATABASE_URL" -c "select pid, application_name, state from pg_stat_activity join pg_locks using (pid) where locktype = 'advisory'"`, then `pg_terminate_backend(pid)` it |
45
46
  | `ROLE=migrate` exits non-zero, deploy blocked | migration failure — correct, the roll is supposed to stop | read the SQL error, fix the migration, re-run. Do not start `web` on the old schema |
@@ -40,7 +40,7 @@ cd myapp && bun run setup
40
40
  setup complete — next: bun run dev
41
41
  ```
42
42
 
43
- `bun run setup` is `bun install`, an `.env.development.local` touch, `x db gen "initial"`, `x db migrate`, `x db seed`, then `x manifest` — so the database is migrated and `x.manifest.json` exists before the gate asks for either. `x new` installs nothing, so this is not optional.
43
+ `bun run setup` is `bun install`, `x merge-driver install`, an `.env.development.local` touch, `x db gen "initial"`, `x db migrate`, `x db seed`, then `x manifest` — so the database is migrated and `x.manifest.json` exists before the gate asks for either. `x new` installs nothing, so this is not optional.
44
44
 
45
45
  `x` is a workspace dependency, not a global install. `bunx x <command>` resolves `node_modules/.bin/x`; the `package.json` scripts (`bun run verify`, `bun run dev`) resolve the same binary. A globally installed `x` (`bun link`, `bun add -g`) run inside the app **hands over** to that same file, `As of 2026-09-05`, and says so on stderr: a global copy carries its own `@ultimat3/entity` with an empty registry, and it wrote a zero-entity manifest under a green exit code before it did. `ULTIMATE_KEEP_GLOBAL_CLI=1` is the opt-out — [`@ultimat3/cli`'s README](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/README.md) has the measurement.
46
46
 
@@ -79,7 +79,7 @@ The default scaffold, after `bun run setup`, with no `.x/build-stats.json` befor
79
79
  ✓ unit 2790ms 3 workers (budget 4.0 GB)
80
80
  ✓ contract 1233ms 3 workers (budget 4.0 GB)
81
81
  ✓ live 840ms serial
82
- ✓ job 345ms 1 of 3 workers (budget 4.0 GB)
82
+ ✓ job 345ms 1 worker, one per file (plan: 3 workers (budget 4.0 GB))
83
83
  ✓ exercise 1952ms
84
84
  ✓ e2e 12124ms serial
85
85
  ✓ eval 91ms
@@ -240,7 +240,7 @@ bunx x db gen "initial" # entities → <id>.sql, <id>.snapshot.json, <id>.has
240
240
  bunx x db migrate # applies them, then diffs the live schema against the ledger it wrote
241
241
  ```
242
242
 
243
- `bun run setup` runs both — `bun install`, an `.env.development.local` touch, `x db gen "initial"` when the directory holds no `.sql`, `x db migrate`, `x db seed`, then `x manifest`. `x db migrate` is `@ultimat3/db`'s own migrator, the one `ROLE=migrate` runs, so nothing extra has to be installed.
243
+ `bun run setup` runs both — `bun install`, `x merge-driver install`, an `.env.development.local` touch, `x db gen "initial"` when the directory holds no `.sql`, `x db migrate`, `x db seed`, then `x manifest`. `x db migrate` is `@ultimat3/db`'s own migrator, the one `ROLE=migrate` runs, so nothing extra has to be installed.
244
244
 
245
245
  Until the generate has run, `x verify` is **red on its `drift` step** — correct behaviour with a runnable fix, not a defect:
246
246
 
@@ -249,7 +249,7 @@ bunx x db gen "add todos"
249
249
  ```
250
250
 
251
251
  ```text
252
- ✓ migration …_add_todos generated
252
+ ✓ migration …_add_todos generated — tables: todos
253
253
  ```
254
254
 
255
255
  The 1.1.0 workaround this step used to carry (a hand-written `db-gen.ts` script, and two manual
@@ -83,14 +83,14 @@ bunx x policy explain todo:write
83
83
 
84
84
  ```text
85
85
  action archiveTodo — policy todo:write
86
- actor verdict deciding reason
87
- anonymous deny todo:write no actor for todo:write
88
- admin deny todo:write todo:write predicate returned false
89
- member deny todo:write actor lacks todo:write
86
+ actor verdict deciding reason
87
+ anonymous deny todo:write no actor for todo:write
88
+ admin needs input todo:write not denied — every actor-only clause passes, and todo:write has a predicate that reads the request input
89
+ member deny todo:write actor lacks todo:write
90
90
  evaluated with no request input and no row — a rule reading either decides again on the real request
91
91
  action createTodo — policy todo:write
92
92
  …
93
- ✓ todo:write — allowed for 0 of 6 actor evaluation(s)
93
+ ✓ todo:write — allowed for 0 of 6 actor evaluation(s); 1 not denied, decided by a predicate that reads the request input — x policy explain todo:write --input '<the request input as JSON>'
94
94
  ```
95
95
 
96
96
  Read the `reason` column, not the verdict:
@@ -98,7 +98,8 @@ Read the `reason` column, not the verdict:
98
98
  | Reason | Means |
99
99
  |---|---|
100
100
  | `actor lacks todo:write` | the grant is missing — a role problem, fix it in `defineRoles` |
101
- | `predicate returned false` | the grant is held, the predicate said no. Here that is tenancy, with no `input.orgId` to compare against outside a request |
101
+ | `predicate returned false` | the grant is held, the predicate said no |
102
+ | `needs input` | the grant is held and every clause that reads only the actor passes; the rest reads the request input — here archive's tenancy rule, `input.orgId`. Not a denial: run the summary's own command with the input a request sends, `x policy explain todo:write --input '{"orgId":"…"}'` |
102
103
  | `no actor for …` | anonymous. Every surface agrees on this one |
103
104
 
104
105
  `<subject>` resolves against a permission, an action name, a query name, then an action's HTTP path — so the `fix:` line an `X_FORBIDDEN` prints is runnable whichever of the four the throwing surface had. Verdicts come from `policyMatrix()` over the app's real `Policy` objects, never a second evaluation.
@@ -151,6 +151,7 @@ One mode per use, and the type holds it: `hrefFor` beside `onCursor`, `onPage`,
151
151
  - **Which list, when.** Records with columns: `DataTable`. Thousands of one-shape rows: `VirtualList` (no script, every row renders; with script, under 100 mounted). Things inside things: `Tree` — `hrefFor` is `<details>` and links at 0 B, `onSelect` is the island's `role="tree"`. What happened: `Timeline` (+ `InfiniteScroll` + `RelativeTime` is the activity feed; there is no feed component). Facts about one thing: `DescriptionList`, never a two-column `Table`.
152
152
  - **Dates are the native input first.** `DatePicker`/`DateRangePicker` are `<input type="date">` with a `Calendar` popover only on a fine pointer with script. A date is a `PlainDate`; a window (`TimeRangePicker`, `timeRangeUrl`) is instants and takes a REQUIRED `timeZone`. Presets are the app's. `Slider` is `<input type="range">`; a segmented control is `Radio appearance="segmented"`; there is no number stepper.
153
153
  - **Reordering is `SortableList` and `Board`, a split is `SplitPane`** — one Pointer Events gesture, never HTML5 drag. A drop calls `onMove` once and is a request: the row holds until it settles, a rejection restores it and says so. `canDrop(item, group)` is the one seam for a WIP limit or a status machine. With `action`, each row is a real `<form>` (Up/Down, or a target `select` per card). The handle alone has `touch-action: none`, so a phone still scrolls from a row's body. `SplitPane` is one column below `md`; `onResize` + `value` is how a split persists — storage is the app's.
154
+ - **Selecting rows is `selection` on `DataTable` and `Board`, one shape for both** (`As of 2026-11`). `selection: { name, form?, value, onChange?, label, matching?, actions? }`. Scripting off, every row is a native checkbox posting its key under `name` in one `form`, and the caller's `actions` in the `BulkBar` submit it. With `onChange`: Shift+click ranges from the last row clicked; on a row's box Down/Up move, Shift+Down/Up extend, Ctrl/Cmd+A ticks the page, Escape clears (the ARIA grid pattern; Space stays the checkbox's); a table adds a tick-all header box; a finger held on a board card ticks it. `value` is a `RowSelection`: `{ kind: 'keys', keys }` or `{ kind: 'matching', filter }`. **"All matching" carries the filter, never ids** — its box posts `matching.filter` under `matching.name`, and a server that receives it re-runs the filter and ignores the keys beside it. A key that left `rows`, or a `matching` from another filter, is pruned through `onChange` (never while a first page loads), and with `onChange` the bar's status region counts the ticked rows still on the list — or, under "all matching", the filter's whole `matching.count`; scripting off it shows no count, which could not follow the boxes. `matching.name` must differ from `name` (`X_UI_INVALID_VALUE`). A `Board` with `action` already draws a `<form>` per card, so its bulk form stands apart from the board, named by `form`, with its submit buttons carrying the same `form`. The bar is `BulkBar`, usable alone.
154
155
  - **What a model wrote is `Markdown`; code is `CodeBlock`; never `innerHTML`.** Raw HTML prints as text, links only http/https/mailto/relative, a remote image prints its alt as a link unless `resolveImage` vouches for it, `baseLevel` defaults to 2. Fences go through `CodeBlock`, highlighted only by the `languages` the caller passes (`allLanguages` on a server page; one named language in an island). Structured payloads are `JsonView`, changes `DiffView` (two texts or a unified patch), structured logs `LogViewer`, terminal output `TerminalView` (SGR colours as roles). A rich-text editor is `Textarea` plus a `Markdown` preview.
155
156
 
156
157
  ## Error codes
package/wiki/Upgrading.md CHANGED
@@ -61,6 +61,15 @@ Each entry changes a surface the table below covers.
61
61
  | that the tarball is attested | `npm view @ultimat3/core dist.attestations` | a `provenance` object |
62
62
  | every name that must move together | `bun run scripts/release-workflow.ts --json` | the 30 derived names — check each |
63
63
 
64
+ **A hop's gate, handed to CI in part.** `As of 2026-11-19`. A bare `x upgrade --json` runs the full `x verify` and is the default. On a loaded machine, `x upgrade --only <step>[,<step>…] --json` runs the hop's `x verify` on those steps alone — the list `x verify --only` takes, refused the same way — and every other stage of the hop unchanged. It is **not the full gate**, and the report says so: `proof: "verify-only"`, `verify.only[]` the steps run, `verify.notRun[]` the rest, a summary reading `NOT THE FULL GATE`, and `then` naming `x verify --only <the rest> --json`. Commit the hop on a branch and let CI run the rest; the hop is proven when that is green.
65
+
66
+ ```sh
67
+ x upgrade --only typecheck,lint --json # here: two steps, and the hop
68
+ # then, in CI on the hop's commit: x verify --only <data.verify.notRun, comma-joined> --json
69
+ ```
70
+
71
+ To leave only `unit`, `live` and `e2e` to CI, name every other step: `x help verify` lists them in the gate's order.
72
+
64
73
  ## 30.x → 31.0.0, entry by entry
65
74
 
66
75
  `As of 2026-11-10`, released: the 74 breaking entries of `CHANGELOG.md`'s `## 31.0.0` section, in their order. No legacy path, no codemod, no shim. v31 is the stable line — the next major waits for its window ([Stability](Stability)).
@@ -319,6 +328,35 @@ A setter still on a package's `.` barrel is `X_ADAPTER_PORT_INCOMPLETE` on the `
319
328
  | an offline replay sends `x-ultimate-replay-scope`, and the action route answers a session other than the queue's owner `409 X_REPLAY_PRINCIPAL_MISMATCH`, the entry kept `pending` (**31.47.0**, [Realtime](Realtime#tier-3-shipped-in-2100)); `DEFAULT_CORS.allowHeaders` lists the header | an app setting `cors.allowHeaders` replaces that list (`packages/http/src/config.ts`): add `x-ultimate-replay-scope` to it. A cross-origin caller sending the header needs this; the page outbox replays to a same-origin path, which has no preflight. An app on several processes sets `SESSION_SECRET` (32+ characters), or a replay reaching another process is refused |
320
329
  | `x exercise` with no `--seed`, and so `x verify`'s `exercise` step, runs one constant seed (**31.47.0**) where each run drew a random one, and `seed` in `.x/exercise.json` is always the number used, never `null`. One tree now gets one verdict, but an `exercise.unprovenMax` measured under random seeds can sit just below the constant seed's figure, so the first gate after the hop can be `X_EXERCISE_UNPROVEN_ABOVE_FLOOR`. `x upgrade` writes a figure only where the app states none, and never raises one | `x exercise --json`, then fix the helper or override each `unproven` record names: pick rows by what they are, never by id order, and assume no order between sized calls ([Testing](Testing)). If the figure that remains is the honest one, raising `unprovenMax` to it is your own reviewed edit of `x.verify.json`. `x exercise --seed random` looks for seed-dependent helpers |
321
330
  | `x upgrade` stops requiring an `e2e` suite no codemod wrote (**31.47.1**): an app with pages but no `apps/web/site/page.tsx` was left on `X_VERIFY_SUITE_VANISHED`. Rerunning `x upgrade` at the target no longer replays every codemod | nothing: `x upgrade` applies codemod `e2e-suite-floor`, which writes a `page.e2e.test.ts` beside the shortest parameter-free page, or moves `e2e` to `skip` with its why when no page can be visited. To apply codemods an older CLI left behind: `x upgrade codemods --from 0.0.0 --json` |
331
+ | 24 shipped guards' fixes change (**31.49.0**), built in; their findings do not: `animated-layout-property`, `bare-error`, `error-declared`, `focus-visible`, `image-dimensions`, `island-mount-clears`, `native-confirm`, `raw-breakpoint`, `raw-colour`, `raw-fetch`, `raw-interval`, `raw-length`, `raw-motion`, `raw-shadow`, `raw-z-index`, `repo-await-in-loop`, `repo-raw-sql`, `repo-unbounded`, `runtime-pin`, `semantic-interactive`, `unbounded-fanout`, `undeclared-custom-property`, `undefined-style-class` and `unzoned-date` end their fix on the one step that re-checks it (`then: x verify --only boundaries`) in place of `then: x verify`, which started the whole gate. A copy still in `guards/` keeps the old text until `x upgrade` migrates it to the release after 31.48.0 | nothing |
332
+ | **Upgrading to the next release: what to check**, in this order. `As of 2026-11-19`; each row below names one check, and [`CHANGELOG.md`](https://github.com/developerz-ai/ultimate/blob/main/CHANGELOG.md)'s `[Unreleased]` carries the detail. Five `app.config.ts` keys that were validated and read by nothing are **read** now (the next row) | run the rows in order, then `x verify` |
333
+ | the shipped `raw-motion` guard's fix changes (**31.50.0**), built in; its findings do not: a stylesheet re-declaring a motion scale property (`--duration-base: 180ms`, `--easing-out: cubic-bezier(…)`) is still `X_RAW_MOTION`, and the fix now names `defineTheme({ motion: { duration: { base: '180ms' } } })` in `apps/web/shared/theme.ts` instead of a token that reads the property itself. A copy still in `guards/` keeps the old text until `x upgrade` migrates it to the release after 31.49.0 | nothing; an app that wants its own tempo moves the declaration into `defineTheme({ motion })` |
334
+ | `app.config.ts` keys now read (**31.49.0**): `roles` — a `ROLE` it does not list refuses to boot (`X_CONFIG_INVALID`, `meta.key: 'roles'`; `ROLE=migrate` exempt); `database.ssl: true` adds `sslmode=require` on **every** pool — serving roles, `x dev`, migrate, the replicator's `DATABASE_URL` and `REPLICATION_URL`, `x doctor`'s probes, `x db branch`, `x deploy verify` — unless the URL or `PGSSLMODE` states a mode; `cache.defaultTtlMs` sets the boot-built `lru`/`redis` lease (a Redis rung held such values 300 s, now 60 s by default; `0` is refused); `jobs.maxAttempts` (default now `3`, not the documented `5`) and `jobs.backoff` apply to every job declaring no `retry` | `grep -n 'roles\|ssl\|defaultTtlMs\|maxAttempts\|backoff' app.config.ts`. `roles`: every `ROLE` your compose services, Helm values or platform processes start is listed, or drop the key. `ssl: true` against a Postgres without TLS: `database: { ssl: false }` or `?sslmode=disable` in each URL. `defaultTtlMs: 0`: a positive lease. `maxAttempts` / `backoff`: keep them only if they are the retry you want for every job declaring none |
335
+ | `pwa.enabled`, `pwa.backgroundSync` and `pwa.push` must be real booleans (**31.49.0**), checked even when `enabled` is false: `'false'` used to turn the PWA **on**; a non-list `pwa.categories` / `shortcuts` / `screenshots`, a non-string `neverCache` entry or `site.favicon` are refused too — `X_CONFIG_INVALID` at boot | each a literal `true` or `false` in `app.config.ts`'s `pwa` block |
336
+ | a records channel keyed by a param that is not the tenant column (a `roomId` topic) delivers a tenanted row only to members of that row's tenant, live and on replay (**31.49.0**); every other member receives the seq alone | nothing, unless a channel deliberately fanned one org's rows out to members of other orgs: that feed needs its own untenanted table or a channel keyed by the tenant column |
337
+ | `directionOf` / `isRtl` read an explicit script subtag first, and bare `ku` is `ltr` (Kurmanji, Latin script) (**31.49.0**) | an app serving Kurdish in Arabic script under `ku`: rename the locale `ku-Arab` or `ckb`, or its pages render `dir="ltr"` |
338
+ | outside dev, an undeclared non-`X_` code on an unclassified 5xx (a driver's `23505`, `ENOENT`, an app's `E_UPSTREAM`) is served as `X_INTERNAL` (**31.49.0**); a hang-up is `499 X_ABORTED`, no longer a reported 500, and `hooks.onError` receives the coded error; the request deadline ends at the headers, so a streamed answer is bounded only by the caller leaving | a client switching on such a code: declare it — `defineError`, or `registerErrorStatus({ E_UPSTREAM: 502 })`. An `onError` matching `AbortError` matches `code === 'X_ABORTED'`. A streamed agent answer that needs a cap: `withChildContext({ signal: AbortSignal.timeout(ms) }, …)` |
339
+ | `redisJobDriver()` (**31.49.0**): failed, dead and expired rows expire after 90 days (`deadTtlMs`), and with no `clock` injected leases, retries and gauges are measured on the Redis server's clock | to keep dead rows: `redisJobDriver({ deadTtlMs: 0 })`. A test freezing time against a real Redis driver: `redisJobDriver({ clock })`. Postgres apps: nothing |
340
+ | `x g sign-in --oidc` now passes `mfaPath` and writes the second-factor page (**31.49.0**); an app generated before still answers an MFA-enrolled SSO user 401 `X_MFA_REQUIRED` | an OIDC app with MFA users: `mfaPath: '<your second-factor page>'` in its `oauthLogin` / `identityProviderRoutes` call, and that page calling `completeMfa(auth, readMfaChallenge(request) ?? '', code)` then sending `clearMfaChallengeCookie()` ([Auth](Auth)). A fresh `x g sign-in --oidc --dry-run` in a scratch app shows the six files. No codemod |
341
+ | beside an `x dev` holding the embedded database (**31.49.0**): `x db migrate` is applied by that dev server; `x db seed`, `x db backfill --write`, the writing `x jobs` verbs and `x auth seal-mfa` refuse `X_DEV_ALREADY_RUNNING`; `x jobs pause\|resume` refuses a queue the app does not serve (`X_CLI_BAD_FLAG`) | a script or agent loop running those beside `x dev`: `x stop --json && <the command> && x dev`. A runbook pausing a queue reached only by `enqueue({ queue })`: add it to `jobs.queues` |
342
+ | `x db gen` asks for a plain column made `generated` as a drop (**31.49.0**): `X_MIGRATION_ROLLING_UNSAFE`, then `X_MIGRATION_IRREVERSIBLE` | `x db gen "<name>" --allow-destructive --rolling-unsafe`, or retire the column first. The stored values are lost either way |
343
+ | `.search()` inside `crossTenant()` through an external `SearchIndex` refuses a chain naming no tenant (**31.49.0**, `X_INVARIANT_VIOLATED`); `matches(/…/)` refuses an astral literal, a bound above 255, a `-` after a range in a class and a quantified lookaround at declaration; a natural-key `upsertAll` is reported to `entity.row` as `update` with its `before` | an external index: `andWhere('<tenant>', 'in', [<orgId>, …]).search(…)`. A refused pattern: the refusal names the portable spelling. A subscriber or test expecting `insert` there: `update` |
344
+ | OAuth (**31.49.0**): `/oauth/register` takes at most 10 `redirect_uris` of 2,048 characters, self-registered clients get `d_` ids that `purge()` reaps once idle and unnamed, limits are per IPv6 /64; `mcpOAuthClient().begin()` refuses a non-loopback `http:` server or issuer, and `refresh()` answers the token it was passed when the server sends none | a hand-written `AuthServerStore`: re-run `authServerStoreConformance` — its `purge` must reap those clients. An internal MCP server on plain `http:` by hostname: serve it over TLS. Consent pages: show `client.host` beside `client.name` |
345
+ | a push service's 401/403 keeps the subscription (**31.49.0**), refused by code and logged; a served-stale `isr` answer is `public, max-age=0, s-maxage=0` | after a real VAPID key rotation, old rows stay until each browser re-subscribes or the row expires. Behind a CDN: one extra origin request per stale serve, no stale window at the edge |
346
+ | AI and tests (**31.49.0**): `postgresVectorStore()` lexical search matches any word and reads no websearch syntax; `defineEval` refuses a `NaN`, infinite or negative `tolerance` (`X_INVARIANT`); `ULTIMATE_EVAL_RECORD=0` / `false` / `no` / `off` gates; `toBeWithinBudget` refuses a non-finite limit (`X_TEST_NUMBER_EXPECTED`); `chunkDocument` cuts a little earlier | drop `"…"` / `-word` from vector queries; `grep -rn 'tolerance\|toBeWithinBudget' apps packages` — a number ≥ 0, a finite limit. Re-indexing may change chunk ids: re-run `indexDocument` for every document, not a subset |
347
+ | `x env check` with no `ULTIMATE_ENV`, `NODE_ENV` or `CI` set checks as **development** (**31.49.0**), as `x dev` runs there; it checked as production. Under `CI`, or with either name set, nothing changes | a deploy script running a bare `x env check` on a host that sets none of the three: `ULTIMATE_ENV=production x env check` |
348
+ | `x test <type>` exits 1 with `X_TEST_FAILED` when every test it selected skipped itself (**31.49.0**), where it exited 0 having checked nothing; `x verify` is unaffected | a script calling `x test live` (or any type) without the services: `docker compose -f docker/docker-compose.test.yml up -d --wait && set -a && . docker/test-services.env && set +a` first, or drop the call |
349
+ | `x dev` is `✗ dev ready` while migrations on disk are ahead of its database (`X_APP_MIGRATIONS_UNAPPLIED`) or an applied one was edited (**31.49.0**), and a schema finding no longer restarts it; on the embedded database `x db gen` refuses an edited applied migration (`X_MIGRATION_CONFLICT`, nothing written) | a workflow starting `x dev` before its first migrate: `x db migrate`. A script waiting for a fresh `✓` banner after `x db gen`: read `/_x` (or `x dev --json --once`). An edited applied migration: restore it (`git checkout <rev> -- packages/db/migrations/<id>.sql`), or rebuild the dev database with `x stop --json && x db reset` |
350
+ | `x policy explain --json` (**31.49.0**): a row whose predicate reads request input it was not given is `verdict: "needs-input"`, `allowed: null`, counted in `data.pending` — it was `allowed: false` | a script reading `!allowed` as denied: `verdict === "deny"`. To decide such a row: `x policy explain <subject> --input '<json>'` |
351
+ | an action's `Date` output now reaches the typed client as a `Date` (**31.49.0**), on the plain and enveloped 200 and in streamed `chunk` / `done` frames; past 1,536 bytes of `x-ultimate-dates` an answer's instants stay ISO strings (`http.wire_dates_dropped`, logged once) | island code that called string methods on such a value (`.slice`, `.localeCompare`) must change: `grep -rn 'useAction\|clientStream' apps/web`, then read each such field as a `Date` |
352
+ | a scheduled fan-out entry whose `tenant()` throws or answers empty (**31.49.0**) fails the whole occurrence: nothing queued, `jobs.scheduler.entry-refused` logged naming the task, job and entry, retried every tick until repaired | nothing, unless the log shows that line: repair the declaration or the data, and the next tick queues the whole occurrence |
353
+ | `x db rollback` against an external `DATABASE_URL` on another machine (**31.49.0**) needs `ROLLBACK_ALLOW_DESTRUCTIVE` naming each id, whatever `ULTIMATE_ENV` says (a compose service host like `db` included) | a script rolling back such a database: `ROLLBACK_ALLOW_DESTRUCTIVE=<id>[,<id>…] x db rollback --json` |
354
+ | `x dev` runs only the roles `app.config.ts` `roles` declares, when set (**31.49.0**), and logs the ones it left out; `x dev --role` naming only undeclared roles is `X_CONFIG_INVALID` | an app declaring `roles`: list every role `x dev` should run (the scheduler and sync included) |
355
+ | `x tasks run <name>` (new, **31.49.0**) under `ULTIMATE_ENV=production` fires only with `--production` or `ULTIMATE_TASK_RUN=<name>`, else `X_TASK_RUN_PRODUCTION` | nothing |
356
+ | `X_JOB_OUTLASTS_DRAIN` with `drain.workerRetireMs: 0` grades against the drain's real cancel (**31.49.0**), the later hooks' reserve and the 2 s margin before the deadline: 21 s of a 25 s `drain.deadlineMs`, was 23 s | `x verify --only manifest --json`; a job it names: raise `drain.workerRetireMs` or lower its `timeout` |
357
+ | fix text changed, codes unchanged (**31.49.0**): `X_ENV_MISSING` is the line to add to the file the environment loads; `X_CATALOG_MISSING_KEYS`'s comment half; `X_TEST_FAILED` reruns the first failing file; on the embedded development database `X_MIGRATION_CONFLICT` and `X_MIGRATION_ROLLBACK_DESTRUCTIVE` lead with `x stop --json && x db reset` | anything matching those strings exactly: `grep -rn 'x env check\|as ⟦key⟧' <your scripts>` and match the new text |
358
+ | new scaffolds (**31.49.0**): `docker/docker-compose.test.yml` is named `<app>-test-<hash of the directory>` with ports picked per directory, and `package.json` declares `@ultimat3/realtime` | nothing; an existing app keeps its `name:` and dependency set. One importing `@ultimat3/realtime` without declaring it: `bun add --exact @ultimat3/realtime@$(bun -p "require('./package.json').dependencies['@ultimat3/core']")`. Sharing a test stack with a same-named app: its own `name:` and ports in the compose file and `docker/test-services.env` |
359
+ | a production container runs one process per declared CPU (**31.49.0**, `ULTIMATE_PROCESSES=auto`, [Processes per container](Deployment#processes-per-container)), and `jobs.concurrency`, `jobs.maxInFlight` and `DATABASE_POOL_MAX` are per **container**, split across its processes. A no-op for a container that declares no CPU quota (no `cpus:` in Compose, no CPU limit in Kubernetes — every scaffold before this): it still runs one process, where container and process are the same. A service that **already** declares `cpus:` of 2 or more, or a Kubernetes CPU limit of 2 or more, runs that many processes once every clamp passes (shared state, the pool, a prebuilt image). The new scaffold's compose declares `cpus:` per role and `init: true`, and carries `sysctls: { net.ipv4.tcp_migrate_req: 1 }` on `web`/`sync` commented out (Linux ≥ 5.14 only: on an older kernel Docker refuses to create the container); its chart pins `ULTIMATE_PROCESSES: "1"` | with no CPU quota anywhere: nothing. A service with `cpus:` or a CPU limit ≥ 2: `x doctor` names the count each role would run; set `ULTIMATE_PROCESSES=1` on it to keep one process, or keep N and, on a host ≥ Linux 5.14, add `sysctls: { net.ipv4.tcp_migrate_req: 1 }` to `web`/`sync`. To use a second core on purpose: `cpus: '2'` on the service (and 256 MiB of `mem_limit` per process), `init: true`, the same `sysctls:` line where the kernel has it, then `x doctor`. A worker with `concurrency: 1` stays serial across the container |
322
360
 
323
361
  ## 29.x → 30.0.0, entry by entry
324
362