@ultimat3/cli 31.46.0 → 31.47.1

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 (111) hide show
  1. package/CLAUDE.md +1 -1
  2. package/README.md +1 -1
  3. package/package.json +29 -29
  4. package/src/affected.ts +3 -2
  5. package/src/app-config-load.ts +8 -5
  6. package/src/app-mcp.ts +2 -5
  7. package/src/app-runtime.ts +4 -4
  8. package/src/cmd-cache.ts +8 -4
  9. package/src/cmd-deploy-compose.ts +11 -12
  10. package/src/cmd-deploy-helm.ts +5 -8
  11. package/src/cmd-exercise-spec.ts +2 -2
  12. package/src/cmd-exercise.ts +7 -19
  13. package/src/cmd-new.ts +4 -3
  14. package/src/cmd-planned.ts +11 -76
  15. package/src/cmd-shot-matrix.ts +3 -2
  16. package/src/cmd-token.ts +11 -3
  17. package/src/cmd-upgrade.ts +5 -7
  18. package/src/codemods/ci-weekly-schedule.ts +61 -0
  19. package/src/codemods/e2e-suite-floor.ts +42 -0
  20. package/src/codemods/e2e-suite.ts +71 -0
  21. package/src/codemods/index.ts +4 -0
  22. package/src/codemods/pending.ts +2 -2
  23. package/src/codemods/test-ports.ts +40 -33
  24. package/src/codemods/test-suites.ts +11 -22
  25. package/src/codemods/vendored-guards.ts +3 -5
  26. package/src/codemods/verify-floor-skips.ts +22 -12
  27. package/src/codemods/verify-floor-steps.ts +4 -3
  28. package/src/db-seed.ts +3 -2
  29. package/src/dispatch.ts +2 -11
  30. package/src/duplicate-packages.ts +4 -4
  31. package/src/exercise-findings.ts +4 -3
  32. package/src/exercise-floor.ts +1 -1
  33. package/src/exercise-seed.ts +34 -0
  34. package/src/fix-command.ts +2 -3
  35. package/src/flag-reads.ts +6 -3
  36. package/src/generate-files.ts +10 -6
  37. package/src/gitignore.ts +4 -3
  38. package/src/guards-built-in.ts +3 -6
  39. package/src/guards.ts +5 -8
  40. package/src/island-bundle.ts +3 -2
  41. package/src/island-sources.ts +4 -3
  42. package/src/island-states-load.ts +4 -3
  43. package/src/island-store.ts +3 -2
  44. package/src/json-merge.ts +8 -6
  45. package/src/lint-findings.ts +4 -7
  46. package/src/mcp-errors.ts +2 -2
  47. package/src/messages.ts +1 -0
  48. package/src/prerender-out.ts +4 -3
  49. package/src/publish-closure.ts +4 -6
  50. package/src/pwa-manifest-locales.ts +5 -8
  51. package/src/registry.ts +0 -7
  52. package/src/root-env.ts +3 -2
  53. package/src/runtime-admin.ts +2 -4
  54. package/src/runtime-keys.ts +5 -2
  55. package/src/static-report.ts +5 -8
  56. package/src/templates/github/ci-schedule.ts +86 -0
  57. package/src/templates/github/ci.yml.ts +6 -8
  58. package/src/templates/github/dependabot.yml.ts +6 -1
  59. package/src/templates/guard-released-forms.ts +30 -8
  60. package/src/templates/scaffold-docs.ts +1 -0
  61. package/src/templates/scaffold-suites.ts +22 -0
  62. package/src/templates/shapes/overlay.ts +4 -7
  63. package/src/upgrade-gate-codemods.ts +1 -18
  64. package/src/upgrade-guards-baseline.ts +3 -5
  65. package/src/verify-merge-skips.ts +2 -4
  66. package/src/verify-merge.ts +13 -8
  67. package/src/verify-part-step.ts +5 -7
  68. package/src/worker-bundle.ts +4 -2
  69. package/wiki/Actions.md +69 -5
  70. package/wiki/Agents.md +13 -0
  71. package/wiki/Auth.md +4 -0
  72. package/wiki/Batching-And-Preloading.md +77 -3
  73. package/wiki/CLI-Reference.md +19 -6
  74. package/wiki/Caching-And-Invalidation.md +76 -23
  75. package/wiki/Client-Navigation.md +2 -0
  76. package/wiki/Compared.md +13 -11
  77. package/wiki/Configuration.md +17 -4
  78. package/wiki/Entities-And-Migrations.md +168 -6
  79. package/wiki/FAQ.md +1 -1
  80. package/wiki/Feature-Flags.md +3 -0
  81. package/wiki/Getting-Started.md +27 -1
  82. package/wiki/Jobs-And-Workflows.md +70 -13
  83. package/wiki/Known-Gaps.md +58 -49
  84. package/wiki/MCP-And-AI.md +43 -3
  85. package/wiki/Mail.md +6 -0
  86. package/wiki/Migrations-And-Backfills.md +13 -0
  87. package/wiki/Money.md +20 -1
  88. package/wiki/N-Plus-One-Detection.md +31 -1
  89. package/wiki/Notify.md +13 -2
  90. package/wiki/PWA-And-Offline.md +34 -4
  91. package/wiki/Policies-And-Authz.md +27 -5
  92. package/wiki/Queries-And-Live-Queries.md +41 -4
  93. package/wiki/Realtime.md +22 -0
  94. package/wiki/Resource-Management.md +6 -1
  95. package/wiki/Routes-And-Render-Modes.md +54 -6
  96. package/wiki/SEO.md +24 -2
  97. package/wiki/Scheduled-Tasks.md +29 -11
  98. package/wiki/Scraping.md +33 -2
  99. package/wiki/Stability.md +1 -1
  100. package/wiki/Static-Assets.md +1 -0
  101. package/wiki/Storage-And-Uploads.md +8 -1
  102. package/wiki/Testing.md +120 -13
  103. package/wiki/The-Eight-Primitives.md +125 -6
  104. package/wiki/Timezones-And-Dates.md +13 -5
  105. package/wiki/Troubleshooting.md +1 -1
  106. package/wiki/Tutorial-02-First-Feature.md +6 -0
  107. package/wiki/Tutorial-03-Auth-And-Admin.md +8 -0
  108. package/wiki/Tutorial-04-Jobs-And-Realtime.md +40 -2
  109. package/wiki/Tutorial-06-Growing-Up.md +1 -2
  110. package/wiki/UI-Components.md +14 -5
  111. package/wiki/Upgrading.md +43 -5
@@ -5,8 +5,8 @@ Defects and unfinished seams named here rather than left to be discovered. Each
5
5
  A reference manual that hides these is lying to the reader.
6
6
 
7
7
  **Read the section headings first.** [Open](#open) is what is wrong with the code you can install
8
- today. [Open by decision](#open-by-decision) will not be fixed and says why. [Not built yet](#not-built-yet)
9
- is unfinished work, not a defect. [Carried backlog](#carried-backlog) is owed work with a tracking
8
+ today and is still to change, each row with its decision. [Open by decision](#open-by-decision) will not be fixed and says why, with
9
+ what to do instead. [Not built yet](#not-built-yet) is empty. [Carried backlog](#carried-backlog) is owed work with a tracking
10
10
  issue each. [Deferred by plan 101](#deferred-by-plan-101) is ranked work a later plan owns. [Closed](#closed) is history — every row there carries the release
11
11
  that fixed it and the workaround for anyone still pinned below it.
12
12
 
@@ -29,36 +29,14 @@ CHANGELOG.md` finds its bounds, and it changes on any commit.
29
29
 
30
30
  ## Open
31
31
 
32
- | Gap | Symptom | Work around it by |
33
- |---|---|---|
34
- | `pdf()` prints with no session of its own | `As of 2026-11-09`. The Chrome that `pdf()` drives opens the app's route as nobody: no cookie jar is handed across, so a route behind a session answers exactly as it would a signed-out visitor — its 4xx is `X_SCRAPE_PDF_ROUTE_FAILED`, a sign-in page it renders is what gets printed. pin: none — the gap is an absence no assertion can hold (nothing hands the browser a cookie); the workaround is held by `packages/scraping/src/pdf-render-fence.test.ts`, 'a same-origin request carries the headers; a cross-origin one is blocked without them' | issue a short-lived token the print route accepts and send it through `pdf({ headers })` — [Scraping](Scraping#a-route-printed-to-pdf--pdf) |
35
- | A purge that a replica never hears is bounded by `ttl`, not by the next request | `As of 2026-10-10`. The purge reaches the other replicas through the invalidation broadcast. With the bus down, a replica with its own store answers its copy as a fresh hit until that copy's `ttl` (and tells an edge the ttl's remainder), then renders. `'purge'` therefore requires a `ttl` | choose the `ttl` as the longest a missed purge may last; or share one `runtime.isrStore` with a `tagFence`, where the delete is every replica's at once |
36
- | A bust purges by the **route's** tags | `As of 2026-10-10`. A stored `isr` page records no tags of its own, so `post:1` reaches every stored page of a route tagged `post` — one render too many per page, never one too few. Each bust reads the store's keys once; the route of each key is remembered, not re-matched [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/render-isr-purge.test.ts#every%20stored%20key%20of%20the%20route%20goes%3A%20both%20locales%2C%20and%20every%20keyed%20query) | tag a route as narrowly as its data allows; a very large shared store pays one `paths()` per bust per replica |
37
- | A declared `isr` query parameter's **values** are unbounded | `As of 2026-10-10`. `query: ['page']` puts `page` in the key, and `?page=1` … `?page=999999` are each a key: the framework cannot know which values name a page. The store is bounded (least recently generated out first), so it thrashes rather than grows [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/render-isr-query.test.ts#only%20a%20declared%20parameter%20is%20part%20of%20the%20key%2C%20and%20of%20the%20URL%20load%20is%20given) | answer `withStatus(404, …)` from `load` for a value that names nothing, and rate-limit the route at the ingress; put a small closed set in the path instead (`/blog/page/[n]` with `prerender()`) |
38
- | A `grantUpload` with a `target` is never sniffed | `As of 2026-11-02`. A presigned PUT signs `host` and the size, so on an s3 disk the uploader chooses the stored type and the bytes. `promoteAttachment` is what checks them (`X_STORAGE_TYPE_REJECTED`), and a grant with a `target` lands straight on the row's key with no promotion step. With an `uploadScanner` installed such a grant is refused outright (`X_STORAGE_TARGET_UNSCANNED`, `As of 31.0.0`), so the gap is only an app's with no scanner. Served, it is contained: `objectResponse` sandboxes a type a browser would run, and a false `image/png` is shown under `nosniff` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/storage/src/grant.test.ts#naming%20a%20target%20puts%20the%20key%20on%20the%20row%20instead%20of%20in%20pending) | declare the pair with `uploadFlow()` (`@ultimat3/action`, `As of 31.11.0`), which never grants a target and sniffs at `confirm`; or by hand, grant with no `target` and call `promoteAttachment({ …, policy })`. Keeping a targeted grant: read the head yourself with `validateStoredHead(…)` before writing the key to the row → [Storage and uploads](Storage-And-Uploads) |
39
- | A queued offline write is not bound to its principal **on the server** | `As of 2026-10`. The fence is in the page: a principal change abandons the running replay, refuses a write in flight (`X_OFFLINE_QUEUE_ABANDONED`) and wipes the queue. A second TAB whose replay is already past its store read when another tab changes the session cookie still sends its remaining entry under the new session — one entry, one in-flight pass, on a shared browser | sign out by full navigation (`signOutHeaders()` clears site data, and every boot wipes other principals' queues); do not share a browser profile between accounts with offline writes queued |
40
- | Presence leaves past the lease roster cap | the sweep leader ships at most 4,096 member ids on its lease (`PRESENCE_LEASE_ROSTER_LIMIT`). When the leader's node dies, members beyond that whose TTL expired before the successor's first leading pass are never announced as left. A successor cannot diff against the shared store: the expired members are already gone from it | nothing to do: each client's next beat is answered with the whole roster, so it heals within one beat (10 s by default) |
41
- | An **offline** scrape reads `/robots.txt` over the real network | every `fakeBrowser` / `fixtureBrowser` run takes the default `robots: 'obey'`, and the gate reads `https://<host>/robots.txt` with the platform `fetch` before the first navigation, so outside `bun test` one request still leaves the process. **The silent half is closed `As of 2026-10-04`**: an unreachable robots.txt (5xx, 429, network error, timeout) now refuses the origin with `X_SCRAPE_ROBOTS_DISALLOWED` (RFC 9309 §2.3.1.4 for 5xx, network error and timeout; refusing on `429` is Ultimate's stricter policy — the RFC calls a `4xx` unavailable), so under `bun test` the sealed network's refusal turns the run red instead of reading as allow-everything | declare the policy in the definition under test — `robots: { ignore: 'fixture host, no live origin' }` — which returns a gate that reads nothing at all. There is no boolean and no ambient off switch, by design — see [Scraping](Scraping#testing-offline) |
42
- | The cache fill fence crosses nodes for **tag busts through Redis only** | `As of 2026-10`. A read-through fill re-checks a fence before it writes. Inside one process that covers everything. Across nodes: the Redis tier keeps leased generation keys a bust writes and a fill samples before `load()` and re-reads after its `SET` ([`packages/cache/src/redis-fence.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cache/src/redis-fence.ts)), so a tag bust on another pod withdraws the fill even when the broadcast is lost — at one extra round trip before each `load()` and one after the `SET`. Three things still do not cross. **Key busts**: `CacheStack.write` and `.drop` mark `{ key }` locally and the wire form carries tags only. **A deployment with no Redis tier**: there is no shared store to hold a generation, so the window is the broadcast's. **Another pod's LRU**: a value it cached before the bust stays until its TTL when the broadcast is lost | give a `cache:` query a TTL you can afford to be wrong for on one pod, keep `redis` in `cache.tiers` on a multi-pod deploy, and prefer a **tag** bust over `cache.drop(key)`: only the first one is broadcast and fenced |
43
- | A replicated table with **no** replica identity is warned about, never refused | `As of 2026-10-02`. A **channel declared with params** does need `REPLICA IDENTITY FULL` on its `records` tables — a DELETE is routed by the old row's params, which a key-only image does not carry, so members keep the deleted record; `x db gen` grants it since 24.0.0 (one migration for an app that already declares such a channel), and the replicator warns (`replication.channel_identity_partial`) about a table that still lacks it. Live queries do **not** need `REPLICA IDENTITY FULL` on a keyed table: the shared window holds the whole row, so a row leaving the result set and a delete are decided from the window — proved on real WAL by [`pg-identity-window.live.test.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/realtime/src/pg-identity-window.live.test.ts) (out-of-filter update, into-filter update, delete with a key-only before-image, updates to rows never held). What still breaks is a table with no identity at all — `NOTHING`, or `DEFAULT` with no primary key — whose `UPDATE`/`DELETE` Postgres refuses once published. `X_LIVE_REPLICA_IDENTITY` names exactly those at preflight, and warns rather than throws; no `x verify` step reads it. The `REPLICA IDENTITY FULL` the app's declarations need is checked at the gate: since 24.0.0 the `drift` step reports a params-channel table whose FULL no migration recorded (`X_DB_SCHEMA_UNMIGRATED`) — against the migrations, never the live database. A live query's `subscribes:` tables are **not** granted FULL, `As of 2026-10` (#518): `x db gen` validates the names and emits no `ALTER`; a table already on FULL keeps it, and the drift step reads that as agreement | give the table a primary key, or `ALTER TABLE <t> REPLICA IDENTITY FULL;` — the warning names every table that needs it |
44
- | HPAs read `<unknown>` without a metrics adapter | the chart half is done — `values.yaml` declares `metricsPort: 9090`, every role but `migrate` emits the container port, `service.yaml` publishes it and `templates/servicemonitor.yaml` ships the scrape target, rendered wherever the cluster serves the Prometheus operator's kind (`serviceMonitor.enabled: auto`, `As of 2026-11`). One thing still stands and it is not the chart's to fix: turning scraped series into the `Pods` metrics an HPA reads needs a **custom-metrics adapter**, which is the cluster's pin: none — what is missing is the cluster's custom-metrics adapter, outside this repository | install a metrics adapter (and the Prometheus operator, if the cluster has none; an app chart from before the scrape object gets it from `x g chart-alerts`); until then disable the HPAs and pin `replicas`. **Do not hand-add a metrics container port** — the chart emits one and a duplicate is rejected by the API server → [Observability](Observability) |
45
- | `--target binary` is a **launcher** for an app tree, and has never been served from a bare VM | `As of 2026-10-06`. It boots: `x build --target binary` compiles `apps/web/server.ts` with `--compile-autoload-package-json`, `--compile-autoload-tsconfig` and `@ultimat3/*` external (`binaryArgs`, `packages/cli/src/cmd-build.ts`), and the required `windows` CI job starts the result from a scaffold and gets `200` from `/healthz`; `packages/cli/e2e/binary-launch.e2e.test.ts` proves the same on Linux. **It is not a self-contained artifact**: at run time it reads the app's `package.json` and `tsconfig.json`, imports `app.config.ts` and every module under `apps/*`, and loads the framework from the app's `node_modules` — one instance, so the app's registrations reach the server. Unmeasured: a scaffold compiled, copied with its tree to a VM with no Bun, and served under systemd [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/e2e/binary-launch.e2e.test.ts#the%20compiled%20launcher%20resolves%20its%20app%20tree%20at%20run%20time%2C%20against%20ONE%20framework%20instance) | ship the app root, its installed `node_modules` (installed for the target OS and CPU) and the binary together, and start the binary from that root. Prove it for your own app first — `./app --version`, then `ROLE=web PORT=3000 ./app` and `curl /readyz`. Prefer `--target docker`, the self-contained artifact → [Deployment](Deployment) |
46
- | A local `typecheck` step can report green on a tree CI fails, on the same commit — **one sighting, unreproduced** | `As of 2026-10`. Observed once (2026-09-17, TypeScript 7.0.2): after a `git stash -u` → branch switch → `x verify` on the other branch → switch back → `stash pop` sequence, a type error that surfaces in an UNCHANGED file (a widened index signature in a file it imports) passed locally and failed CI; deleting `tsconfig.tsbuildinfo` then reproduced CI's red locally. Five faithful reproduction attempts against 7.0.2 all stayed correctly red ([#450](https://github.com/developerz-ai/ultimate/issues/450)). **[#450](https://github.com/developerz-ai/ultimate/issues/450) itself is closed `As of 2026-09-23`** — read from the shipped fix, not from the tracker: plan 101 row 14 r ("Close #450", `docs/plans/2026/09/23/101-framework-deep-sweep/14-guards-gate.md:37`; plan `status.yml` `complete`), recorded in `CHANGELOG.md` under 22.0.0 and pinned by `packages/cli/src/verify-typecheck.test.ts`. `tsc -b` decides "up to date" by **mtime**, and Bun installs a dependency as **hardlinks** carrying its cache's old mtimes, so an upgrade to an already-cached version left every input older than the buildinfo and a root without `references` — every scaffolded app — skipped the program and reported green while a cold CI was red. A scaffolded app's `typecheck` is now `tsc -p .` ([`packages/cli/src/templates/scaffold-repo.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/templates/scaffold-repo.ts), its `"typecheck"` script), which is incremental by **content hash**, and `x verify`'s `typecheck` step picks `-p .` over `-b` for any such root ([`packages/cli/src/verify-typecheck.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/verify-typecheck.ts)); the framework root keeps `-b`. **Still open**: a *second* `tsc` racing the same buildinfo is the one suspect not excluded, and no cause for it has been shown. `x verify` deliberately takes two flags and no `--cold` pin: none — one sighting, and five faithful reproductions stayed red, so no test can hold it | CI is always cold and is the judge of record. If a local `typecheck` disagrees with it again, capture the command, its argv and its exit code before deleting any `tsconfig.tsbuildinfo` |
47
- | A `stream` page with a realtime island keeps every island on the page inert until its slowest hole closes | `As of 2026-11-02`. The runtime goes `async` so a shell island answers while a hole is open, but only with no realtime boot in the document: the boot (`script defer`) has to run first (`bootScript`, [`packages/cli/src/route-islands.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/route-islands.ts)), and a deferred script waits for parsing to end. Bound by the hole's 15 s deadline | keep the slow read out of such a page's holes, or give it a short deadline of its own: `fetch(url, { signal: AbortSignal.timeout(2_000) })` |
48
- | An open tab can meet a dead island across a deploy | `As of 2026-11-12`. A web process serves only the hashed files it built, so with `assets.retain` unset (the default) a tab holding the previous build's document gets a `no-store` 404 for its stylesheet, or for its island chunk on the first click, after every deploy; during a rolling update a new document that reaches an old pod gets no stylesheet either. What the framework does about the stylesheet half without a window: a soft navigation whose next sheet fails never swaps an unstyled page in (a GET becomes a full load, the old sheet stays) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/navigation-stylesheet-skew.test.ts#a%20GET%20is%20loaded%20by%20the%20browser%3B%20the%20page%20on%20screen%20keeps%20its%20sheet); a full load whose sheet 404s stays unstyled — the framework does not reload it, as a reload it cannot tell from a missing file offline or under a test harness is a navigation nobody asked for. A web role booted outside development and test with no window logs `X_ASSET_RETAIN_UNDECLARED` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/retained-assets-boot.test.ts#undeclared%3A%20nothing%20is%20published%20and%20there%20is%20no%20reader). Declared, a tab survives six deploys with build 0's island alive [evidence](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/e2e/six-deploys.e2e.test.ts#with%20assets.retain%2C%20the%20click%20boots%20build%200%E2%80%99s%20island%3A%20its%20chunk%20200%2C%20no%20404%2C%20an%20update%20offered) | declare `assets: { retain: { disk, builds } }` over a disk every web pod reads → [Deployment](Deployment#hashed-assets-across-a-deploy--assetsretain) |
49
- | A soft visit waits for the slowest hole | `As of 2026-11-02`. The client router reads `response.text()` ([`packages/render/src/navigation-fetch.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/navigation-fetch.ts)) and swaps the whole answer, so holes fill through the re-run scripts and the first paint of an in-app navigation is as late as a full `ssr` render. A full load streams. No incremental parse here [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/navigation-fetch.test.ts#a%20page%3A%20its%20text%2C%20its%20build%2C%20no-store%20read%20off%20cache-control) | nothing to do in an app; a page that must paint first on a soft visit declares `navigation: 'document'` |
50
- | A pod evaluates the framework from **source**, one module at a time — ~28 Mi of resident memory per pod that a bundle would not hold | `As of 2026-10-01`, measured on the framework serve graph alone: 1,071 modules from source settle at **80.4 Mi**; the same graph as one `bun build --target=bun` file is 5 modules and settles at **51.8 Mi** — ~34 kB of RSS per source module, the runtime's cost and not the code's. It is the largest saving left after the per-role load and the prebuilt store (a web pod of the demo app settles at 97–102 Mi, a worker at 80–85 Mi). **Not a patch**: a registry is a module instance, so the framework bundled apart from the app is two `@ultimat3/jobs`, two `@ultimat3/entity` — the app registers into one and the boot reads the other. The unit has to be the app **and** the framework as one graph, per role, built inside the image build from a generated entry that imports what `scanAppModules` would, with the `.tsx`/`.scss` loaders as build plugins. Containers only either way (axiom 7). Design note: [`docs/architecture/13-topology-runtime.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/architecture/13-topology-runtime.md#not-built-one-bundle-per-role) pin: none — a resident-memory measurement of a running pod, not a behaviour a unit test can assert | nothing to do in an app. Size a pod's memory request from `process_resident_memory_bytes` on `/metrics`, not from a guess |
51
- | Every role evaluates all of `@ultimat3/jobs` — 96 modules (`As of 2026-10-02`, by file) — whatever it runs | `As of 2026-10-01`, read off the serve graph by the names each role's code uses: a `web` pod needs 43 of them (enqueue, the outbox relay, the purge task), a `scheduler` 46, a `worker` 62. The rest ride the barrel: `worker.ts` and its eighteen dependencies in a web pod, the `backfill()` / `exportJob()` / `webhook()` factories (17 modules, 123 kB of source) in an app that declares none, and the memory driver (3 modules) outside a test. ~1.6 Mi per web pod at the measured 34 kB a module. Closing it means subpath entries (`@ultimat3/jobs/worker`, one per factory) and every importer rewritten — a breaking move for a saving the per-role bundle above makes moot, so it waits on that decision. The operator surface is **not** in this list: `JobIntrospection` is a member of the driver, and the worker announces itself and counts settles through it pin: none — a module count read off a role's serve graph, measured rather than asserted | nothing to do in an app |
52
- | A job's `runAt` is stamped from the enqueuer's clock | `As of 2026-10`. An enqueuer running ahead of the database delays its own "immediate" jobs; up to 1 s ahead still wakes a worker, beyond that the job starts on the poll. A delayed job enqueued by another process starts within the idle ceiling after its `runAt` — 5 s with a proven wake, 2 s without; only a retry or a sleep the worker itself handed back gets a due-time timer | NTP on every pod; for a deadline tighter than the ceiling, enqueue at the moment the work is due rather than with `runAt` |
53
- | `onSettled` for a completion that **returned a value** runs at most once across a crash | `As of 2026-11-14`. Every other ending is at least once: the write that settles the row records the debt (`x_jobs.settle_owed`) and the scheduler leader re-drives a dead worker's with `redriven: true, reason: 'lost'` — failures, dead letters, refusals, completions whose body returned `undefined`, and the rows the CLAIM settles (a final-attempt lease lapse buried `dead`, an expired row: `ClaimOptions.settleOwed`, `packages/jobs/src/claim-exhausted.ts`). A body's return value is never stored (`x_jobs` has no result column), so a re-drive could only hand `result: undefined` to a hook typed for a value; on a minor that would break every `onSettled` reading `result`. Storing the result, and so at-least-once for every completion, is planned for `next` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/settle-redrive.test.ts#a%20completion%20that%20returned%20a%20value%20owes%20nothing%3A%20told%20once%2C%20at%20most%20once) | write what must be recorded for certain inside the body, in a `step.run`; or have the body return nothing and read what it wrote from there |
54
- | A `step.run` output past 256 KiB is stored with a warning, not refused | `As of 2026-11-12`. Undeclared, `STEP_OUTPUT_MAX_BYTES` logs `jobs.step.output-too-large` (`X_STEP_OUTPUT_TOO_LARGE`) once per job and step and stores the output, because refusing by default would fail shipped jobs on a minor; every attempt still loads it. Refusal by default is planned for `next` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/steps-output.test.ts#the%20default%20256%20KiB%20warns%20once%20per%20job%20and%20step%2C%20with%20the%20code%2C%20and%20still%20stores) | declare `job({ stepOutputMax: 262_144 })` to be refused now, and persist the payload, returning its key from the step |
55
- | The CDP driver cannot PIN a name, and a page's WebSocket is not screened at all | `As of 2026-11`. Measured on Chrome 150 with `localBrowser()`: interception (page-level and the browser-level `Fetch` that now covers popups) never pauses a WebSocket handshake, so `new WebSocket('ws://off-list/…')` from a scraped page connects. Since 31.0.0 a host a wildcard admitted is resolved before the browser leg releases it, and an inward or unresolvable answer is refused (`packages/scraping/src/browser-dial.ts`). But the browser then resolves again for itself, so a name that answers public to the screen and private to Chrome (DNS rebinding) is reached — the HTTP leg and the robots read resolve and pin (`packages/scraping/src/pinned-host.ts`), the browser cannot be pinned through this port — [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/scraping/src/cdp-arm-dial.test.ts#a%20screened%20name%20is%20continued%20by%20request%20id%20only%2C%20never%20pinned%20to%20the%20approved%20address) | list exact hosts rather than `'*'` on a scrape that runs where private addresses are reachable, and dial a scrape through an `egress` proxy outside that network |
56
- | `ScrapeReport.usage.bytesIn` counts the HTTP leg only | `As of 2026-10`. The CDP port subscribes to requests, not to their sizes, so the browser leg's bytes are not in the figure (`packages/scraping/src/usage.ts`) | treat `bytesIn` as a lower bound; a provider's own byte count, returned through the resolver's `cost`, is the billable one |
57
- | An org-scoped operator's runs list reads `x_jobs` with no index on `tenant_id` | `As of 2026-10`. The jobs dashboard keeps an actor with an `orgId` to its own org's runs through `JobFilter.tenantId`, and `x_jobs.tenant_id` is a plain column: the only index naming it is the idempotency one, led by `name` (`packages/jobs/src/driver-pg-ddl.ts`). A platform operator's list is unaffected [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/driver-pg-sql.test.ts#no%20x_jobs%20index%20leads%20with%20tenant_id%3A%20an%20org-scoped%20runs%20list%20scans) | on a large queue, add `create index on x_jobs (tenant_id, created_at desc, id desc)` in an app migration, or operate the dashboard as a platform operator (an actor with no `orgId`) |
58
- | Retry-from-step on the jobs dashboard is a free-text field | `As of 2026-10`. `job.retry-from-step` takes `{ step: t.string.min(1) }` (`packages/admin/src/jobs/job-actions.ts`); the run's detail page shows its steps, but the form does not offer them as a choice. | copy the step name from the run's `steps` section on the same page |
59
- | The admin MCP batch tool takes `ids` only | `As of 2026-10`. A `batch` action is one MCP tool, `admin.action.<name>`, and it takes the rows by id; "all matching" — the list's own filter — is a screen control only | list the rows with `admin.<entity>.list` and its `where`, then pass their ids |
60
- | No counts on the jobs dashboard's state tabs | `As of 2026-10`. `stats()` counts per queue across every tenant, so a count on a tab would show an org-scoped operator other orgs' numbers; the tabs carry none and the overview's tiles carry the counts, for a platform operator only. A per-tenant count is a second query nothing issues yet | a platform operator reads the overview tiles; an org-scoped operator reads a tab's own page |
61
- | `x drill` proves one node per role on one machine, and drills no object store and no CDN | `As of 2026-11-06`. The fleet is one `web`, one `worker` (and one `sync` for `nats-down`) on one host, every dependency a local container behind a Bun TCP proxy: a multi-node NATS cluster, a Postgres failover to a real standby, a real S3 bucket and a real CDN in front of the web role are never faulted. `nats-down`'s sync lane is proven on a stand-in node (`packages/testing/src/drill-sync.test.ts`), not on `examples/dummy`, whose transport is in-memory; its client subscribes to nothing by default, so a gap counts only what the node volunteers. CI runs four of the nine (`fault-drills`, `roll-before-migrate` among them) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/testing/src/drills.test.ts#the%20nine%20drills%2C%20once%20each) | the rest by hand: `x drill --list --json`, then `x drill <name> --json` with `docker/test-services.env` loaded. A multi-node or object-store fault is a staging drill of your own, against [`docs/ops/06-runbooks.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/06-runbooks.md) |
32
+ Every row carries its decision, `As of 2026-11-18`: **build** is owed work, a defect still to fix; **deferred** waits on the reason in the row.
33
+
34
+ | Gap | Decision | Symptom | Work around it by |
35
+ |---|---|---|---|
36
+ | A pod evaluates the framework from **source**, one module at a time — ~28 Mi of resident memory per pod that a bundle would not hold | deferred | `As of 2026-10-01`, measured on the framework serve graph alone: 1,071 modules from source settle at **80.4 Mi**; the same graph as one `bun build --target=bun` file is 5 modules and settles at **51.8 Mi** — ~34 kB of RSS per source module, the runtime's cost and not the code's. It is the largest saving left after the per-role load and the prebuilt store (a web pod of the demo app settles at 97–102 Mi, a worker at 80–85 Mi). **Not a patch**: a registry is a module instance, so the framework bundled apart from the app is two `@ultimat3/jobs`, two `@ultimat3/entity` — the app registers into one and the boot reads the other. The unit has to be the app **and** the framework as one graph, per role, built inside the image build from a generated entry that imports what `scanAppModules` would, with the `.tsx`/`.scss` loaders as build plugins. Containers only either way (axiom 7). Design note: [`docs/architecture/13-topology-runtime.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/architecture/13-topology-runtime.md#not-built-one-bundle-per-role). Deferred `As of 2026-11-18`: it changes what an image contains and how a role resolves its app, so it needs a plan of its own. pin: none — a resident-memory measurement of a running pod, not a behaviour a unit test can assert | nothing to do in an app. Size a pod's memory request from `process_resident_memory_bytes` on `/metrics`, not from a guess |
37
+ | Every role evaluates all of `@ultimat3/jobs` — 96 modules (`As of 2026-10-02`, by file) — whatever it runs | deferred | `As of 2026-10-01`, read off the serve graph by the names each role's code uses: a `web` pod needs 43 of them (enqueue, the outbox relay, the purge task), a `scheduler` 46, a `worker` 62. The rest ride the barrel: `worker.ts` and its eighteen dependencies in a web pod, the `backfill()` / `exportJob()` / `webhook()` factories (17 modules, 123 kB of source) in an app that declares none, and the memory driver (3 modules) outside a test. ~1.6 Mi per web pod at the measured 34 kB a module. Closing it means subpath entries (`@ultimat3/jobs/worker`, one per factory) and every importer rewritten — a breaking move for a saving the per-role bundle above makes moot, so it waits on that decision. The operator surface is **not** in this list: `JobIntrospection` is a member of the driver, and the worker announces itself and counts settles through it pin: none — a module count read off a role's serve graph, measured rather than asserted | nothing to do in an app |
38
+ | `onSettled` for a completion that **returned a value** runs at most once across a crash | deferred | `As of 2026-11-14`. Every other ending is at least once: the write that settles the row records the debt (`x_jobs.settle_owed`) and the scheduler leader re-drives a dead worker's with `redriven: true, reason: 'lost'` — failures, dead letters, refusals, completions whose body returned `undefined`, and the rows the CLAIM settles (a final-attempt lease lapse buried `dead`, an expired row: `ClaimOptions.settleOwed`, `packages/jobs/src/claim-exhausted.ts`). A body's return value is never stored (`x_jobs` has no result column), so a re-drive could only hand `result: undefined` to a hook typed for a value; on a minor that would break every `onSettled` reading `result`. Storing the result, and so at-least-once for every completion, is planned for `next` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/settle-redrive.test.ts#a%20completion%20that%20returned%20a%20value%20owes%20nothing%3A%20told%20once%2C%20at%20most%20once) | write what must be recorded for certain inside the body, in a `step.run`; or have the body return nothing and read what it wrote from there |
39
+ | A `step.run` output past 256 KiB is stored with a warning, not refused | deferred | `As of 2026-11-12`. Undeclared, `STEP_OUTPUT_MAX_BYTES` logs `jobs.step.output-too-large` (`X_STEP_OUTPUT_TOO_LARGE`) once per job and step and stores the output, because refusing by default would fail shipped jobs on a minor; every attempt still loads it. Refusal by default is planned for `next` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/steps-output.test.ts#the%20default%20256%20KiB%20warns%20once%20per%20job%20and%20step%2C%20with%20the%20code%2C%20and%20still%20stores) | declare `job({ stepOutputMax: 262_144 })` to be refused now, and persist the payload, returning its key from the step |
62
40
 
63
41
  ## Open by decision
64
42
 
@@ -68,7 +46,7 @@ Each of these is a defect, or a target, somebody has already argued about, and t
68
46
  |---|---|
69
47
  | `x token`'s `grant` | removed from the registry `As of 2026-11-15`, where it was planned and exited `X_NOT_IMPLEMENTED`; now `X_CLI_UNKNOWN_COMMAND`, exit 1 as before. A key's scopes are fixed when it is issued (`AuthApiKeyRecord.scopes`, never widened; `ApiKeyStore` has no update), so a grant is a new key: `x token create --scopes post:read,post:write --json`, then `x token revoke <old-id>`. A second verb for that pair would be the second path axiom 1 refuses |
70
48
  | `x db`'s `studio` | removed from the registry `As of 2026-11-15`, where it was planned and exited `X_NOT_IMPLEMENTED`; now `X_CLI_UNKNOWN_COMMAND`, exit 1 as before. The schema browser is the `/_x` db panel (`x dev`): schema, rows and a guarded SQL console. `X_DB_STUDIO_FAILED` stays reserved and unthrown; the old `bunx drizzle-kit studio` shell-out was a second schema engine for one subcommand |
71
- | `x jobs`'s `drain` | removed from the registry `As of 2026-11-15`, where it was planned and exited `X_NOT_IMPLEMENTED`; now `X_CLI_UNKNOWN_COMMAND`, exit 1 as before. Postgres is the one durable job driver, so there is nowhere to drain to (25.0.0 deleted the Redis and NATS stubs and the drain body). To stop a queue for maintenance: `x jobs pause <queue>`, then `x jobs list --queue <queue> --state running --json` until it is empty |
49
+ | `x jobs`'s `drain` | removed from the registry `As of 2026-11-15`, where it was planned and exited `X_NOT_IMPLEMENTED`; now `X_CLI_UNKNOWN_COMMAND`, exit 1 as before. 25.0.0 deleted the drain body with the all-throw Redis and NATS stubs, and moving in-flight rows between drivers is a migration no command owns. To stop a queue for maintenance: `x jobs pause <queue>`, then `x jobs list --queue <queue> --state running --json` until it is empty |
72
50
  | A local write that died after its last rename is listed with no content type until the key is written again | `As of 2026-10`. `localDriver` commits in four steps (marker, sidecar, bytes, clear marker) and a marker left behind means "re-check this pair". `get()` and `stat()` do re-check against the bytes and answer correctly; `list()` never reads bytes, so it reports that object with no `contentType` and `etag: ''` — honest, and it stays that way until the next `put()` of that key. `stream()` returns bytes only and checks nothing. Two files cannot be committed in one step without changing the on-disk layout |
73
51
  | A `delete_resource` preview checks only the policy's actor half | `As of 2026-10-18`. Without `live: true` the framework answers a preview without running the action, so the part of a policy that reads the input never runs; a preview can be granted for a call the commit then refuses. Running the policy would mean running the action. An action that needs an exact preview declares `live` in its input and answers its own |
74
52
  | `localDriver` cannot hold a key and a key beneath it (`a` and `a/b`) | `As of 2026-10`. An object is a file at its key, and a POSIX path is a file or a directory. The second `put()` is refused by code (`X_STORAGE_KEY_CONFLICT`) where it used to be a bare `ENOTDIR`; `s3Driver` and `memoryStorageDriver` hold both. Storing objects under suffixed names would lift it, at the price of a layout migration for every existing root — and the keys `grantUpload` and `scopedKey` build never nest an object under another, so the limit is met only by hand-built keys |
@@ -83,15 +61,45 @@ Each of these is a defect, or a target, somebody has already argued about, and t
83
61
  | `x branch`, a whole branch environment with a preview URL | not planned, `As of 2026-11-16`. The extension point is `x db branch create <name>`, the database half, shipped; the rest is a container of the one image with `DATABASE_URL` pointed at that branch, which the platform runs (axiom 7: no platform primitive in the framework). The `PLANNED_COMMANDS` row is gone, so `x branch` is `X_CLI_UNKNOWN_COMMAND`. |
84
62
  | `x ai`: eval scores, semantic-cache stats, vector reindex | not planned, `As of 2026-11-16`. Each half has its shipped extension point: evals run with `x test eval --json`, scored against their committed baselines; a vector reindex is a `backfill()` job over the vectors' source rows; cache hit rate and tokens saved are metrics on the bus. `x ai` is `X_CLI_UNKNOWN_COMMAND`. |
85
63
  | `x money add-currency`, a generator for one currency | not planned, `As of 2026-11-16`. The extension point is `registerCurrency({ code, exponent, name })` from `@ultimat3/money`, once at boot, which `X_CURRENCY_UNKNOWN`'s fix already names. A generator would write that one call into the app's source and nothing else. `x money` is `X_CLI_UNKNOWN_COMMAND`. |
86
-
87
- ## Not built yet
88
-
89
- | Open | Where it stands |
90
- |---|---|
64
+ | `pdf()` prints with no session of its own | `As of 2026-11-09`. The Chrome that `pdf()` drives opens the app's route as nobody: no cookie jar is handed across, so a route behind a session answers exactly as it would a signed-out visitor — its 4xx is `X_SCRAPE_PDF_ROUTE_FAILED`, a sign-in page it renders is what gets printed. The workaround is held by `packages/scraping/src/pdf-render-fence.test.ts`, 'a same-origin request carries the headers; a cross-origin one is blocked without them'. **Why it stays** (`As of 2026-11-18`): The print runs in a browser process launched for that render (`packages/scraping/src/pdf-render.ts`), and handing it the caller's cookie would put a live session in a second process. The extension point is `pdf({ headers })`, sent to the route's origin only (`packages/scraping/src/pdf-fence.ts`), so the credential can be one scoped to the document. **Do instead:** issue a short-lived token the print route accepts and send it through `pdf({ headers })` — [Scraping](Scraping#a-route-printed-to-pdf--pdf) |
65
+ | A purge that a replica never hears is bounded by `ttl`, not by the next request | `As of 2026-10-10`. The purge reaches the other replicas through the invalidation broadcast. With the bus down, a replica with its own store answers its copy as a fresh hit until that copy's `ttl` (and tells an edge the ttl's remainder), then renders. `'purge'` therefore requires a `ttl`. **Why it stays** (`As of 2026-11-18`): A replica cannot detect a broadcast it never received, so only its own clock can bound the copy; that is why `'purge'` without a `ttl` is refused (`packages/render/src/revalidate-shape.ts`). The extension point is `runtime.isrStore` with `tagFence`. **Do instead:** choose the `ttl` as the longest a missed purge may last; or share one `runtime.isrStore` with a `tagFence`, where the delete is every replica's at once. |
66
+ | A bust purges by the **route's** tags | `As of 2026-10-10`. A stored `isr` page records no tags of its own, so `post:1` reaches every stored page of a route tagged `post` — one render too many per page, never one too few. Each bust reads the store's keys once; the route of each key is remembered, not re-matched [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/render-isr-purge.test.ts#every%20stored%20key%20of%20the%20route%20goes%3A%20both%20locales%2C%20and%20every%20keyed%20query) **Why it stays** (`As of 2026-11-18`): The error is in the safe direction: one render too many, never a page left stale. Per-page tags would add a tag set to every stored entry and to every `IsrStore` an app implements. **Do instead:** tag a route as narrowly as its data allows; a very large shared store pays one `paths()` per bust per replica. |
67
+ | A declared `isr` query parameter's **values** are unbounded | `As of 2026-10-10`. `query: ['page']` puts `page` in the key, and `?page=1` … `?page=999999` are each a key: the framework cannot know which values name a page. The store is bounded (least recently generated out first), so it thrashes rather than grows [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/render-isr-query.test.ts#only%20a%20declared%20parameter%20is%20part%20of%20the%20key%2C%20and%20of%20the%20URL%20load%20is%20given) **Why it stays** (`As of 2026-11-18`): Which values name a page is the app's knowledge. The framework bounds the cost (a bounded store), and `load` is the extension point that says a value names nothing. **Do instead:** answer `withStatus(404, …)` from `load` for a value that names nothing, and rate-limit the route at the ingress; put a small closed set in the path instead (`/blog/page/[n]` with `prerender()`) |
68
+ | A `grantUpload` with a `target` is never sniffed | `As of 2026-11-02`. A presigned PUT signs `host` and the size, so on an s3 disk the uploader chooses the stored type and the bytes. `promoteAttachment` is what checks them (`X_STORAGE_TYPE_REJECTED`), and a grant with a `target` lands straight on the row's key with no promotion step. With an `uploadScanner` installed such a grant is refused outright (`X_STORAGE_TARGET_UNSCANNED`, `As of 31.0.0`), so the gap is only an app's with no scanner. Served, it is contained: `objectResponse` sandboxes a type a browser would run, and a false `image/png` is shown under `nosniff` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/storage/src/grant.test.ts#naming%20a%20target%20puts%20the%20key%20on%20the%20row%20instead%20of%20in%20pending) **Why it stays** (`As of 2026-11-18`): A presigned PUT goes to the bucket with no server in its path, and a targeted key has no promotion step to read the bytes afterwards. Refusing `target` outright would break the grants apps already issue; with a scanner installed it is refused, and serving is contained. **Do instead:** declare the pair with `uploadFlow()` (`@ultimat3/action`, `As of 31.11.0`), which never grants a target and sniffs at `confirm`; or by hand, grant with no `target` and call `promoteAttachment({ …, policy })`. Keeping a targeted grant: read the head yourself with `validateStoredHead(…)` before writing the key to the row → [Storage and uploads](Storage-And-Uploads) |
69
+ | Presence leaves past the lease roster cap | the sweep leader ships at most 4,096 member ids on its lease (`PRESENCE_LEASE_ROSTER_LIMIT`). When the leader's node dies, members beyond that whose TTL expired before the successor's first leading pass are never announced as left. A successor cannot diff against the shared store: the expired members are already gone from it. **Why it stays** (`As of 2026-11-18`): The cap bounds the lease row, the successor has nothing left to diff against, and the roster repairs itself on the next beat. **Do instead:** nothing to do: each client's next beat is answered with the whole roster, so it heals within one beat (10 s by default) |
70
+ | An **offline** scrape reads `/robots.txt` over the real network | every `fakeBrowser` / `fixtureBrowser` run takes the default `robots: 'obey'`, and the gate reads `https://<host>/robots.txt` with the platform `fetch` before the first navigation, so outside `bun test` one request still leaves the process. **The silent half is closed `As of 2026-10-04`**: an unreachable robots.txt (5xx, 429, network error, timeout) now refuses the origin with `X_SCRAPE_ROBOTS_DISALLOWED` (RFC 9309 §2.3.1.4 for 5xx, network error and timeout; refusing on `429` is Ultimate's stricter policy — the RFC calls a `4xx` unavailable), so under `bun test` the sealed network's refusal turns the run red instead of reading as allow-everything. **Why it stays** (`As of 2026-11-18`): `robotsGate` is built in `packages/scraping/src/scrape-run.ts` before the driver exists, and obeying robots is the default that must not have an ambient off switch. The extension point is the explicit, reasoned `robots: { ignore }`. **Do instead:** declare the policy in the definition under test — `robots: { ignore: 'fixture host, no live origin' }` — which returns a gate that reads nothing at all. There is no boolean and no ambient off switch, by design — see [Scraping](Scraping#testing-offline) |
71
+ | The cache fill fence crosses nodes for **tag busts through Redis only** | `As of 2026-10`. A read-through fill re-checks a fence before it writes. Inside one process that covers everything. Across nodes: the Redis tier keeps leased generation keys a bust writes and a fill samples before `load()` and re-reads after its `SET` ([`packages/cache/src/redis-fence.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cache/src/redis-fence.ts)), so a tag bust on another pod withdraws the fill even when the broadcast is lost — at one extra round trip before each `load()` and one after the `SET`. Three things still do not cross. **Key busts**: `CacheStack.write` and `.drop` mark `{ key }` locally and the wire form carries tags only. **A deployment with no Redis tier**: there is no shared store to hold a generation, so the window is the broadcast's. **Another pod's LRU**: a value it cached before the bust stays until its TTL when the broadcast is lost. **Why it stays** (`As of 2026-11-18`): A generation needs a store every pod reads, and the broadcast carries tags alone (`packages/cache/src/invalidate.ts`), so a tag is the unit that crosses a process. The `ttl` is the bound on everything else. **Do instead:** give a `cache:` query a TTL you can afford to be wrong for on one pod, keep `redis` in `cache.tiers` on a multi-pod deploy, and prefer a **tag** bust over `cache.drop(key)`: only the first one is broadcast and fenced. |
72
+ | A replicated table with **no** replica identity is warned about, never refused | `As of 2026-10-02`. A **channel declared with params** does need `REPLICA IDENTITY FULL` on its `records` tables — a DELETE is routed by the old row's params, which a key-only image does not carry, so members keep the deleted record; `x db gen` grants it since 24.0.0 (one migration for an app that already declares such a channel), and the replicator warns (`replication.channel_identity_partial`) about a table that still lacks it. Live queries do **not** need `REPLICA IDENTITY FULL` on a keyed table: the shared window holds the whole row, so a row leaving the result set and a delete are decided from the window — proved on real WAL by [`pg-identity-window.live.test.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/realtime/src/pg-identity-window.live.test.ts) (out-of-filter update, into-filter update, delete with a key-only before-image, updates to rows never held). What still breaks is a table with no identity at all — `NOTHING`, or `DEFAULT` with no primary key — whose `UPDATE`/`DELETE` Postgres refuses once published. `X_LIVE_REPLICA_IDENTITY` names exactly those at preflight, and warns rather than throws; no `x verify` step reads it. The `REPLICA IDENTITY FULL` the app's declarations need is checked at the gate: since 24.0.0 the `drift` step reports a params-channel table whose FULL no migration recorded (`X_DB_SCHEMA_UNMIGRATED`) — against the migrations, never the live database. A live query's `subscribes:` tables are **not** granted FULL, `As of 2026-10` (#518): `x db gen` validates the names and emits no `ALTER`; a table already on FULL keeps it, and the drift step reads that as agreement. **Why it stays** (`As of 2026-11-18`): Logged and never thrown because a replicator that will not start is worse than the tables it names (`ReplicaIdentityError`, `packages/realtime/src/replication-errors.ts`). **Do instead:** give the table a primary key, or `ALTER TABLE <t> REPLICA IDENTITY FULL;` — the warning names every table that needs it. |
73
+ | HPAs read `<unknown>` without a metrics adapter | the chart half is done — `values.yaml` declares `metricsPort: 9090`, every role but `migrate` emits the container port, `service.yaml` publishes it and `templates/servicemonitor.yaml` ships the scrape target, rendered wherever the cluster serves the Prometheus operator's kind (`serviceMonitor.enabled: auto`, `As of 2026-11`). One thing still stands and it is not the chart's to fix: turning scraped series into the `Pods` metrics an HPA reads needs a **custom-metrics adapter**, which is the cluster's. **Why it stays** (`As of 2026-11-18`): The adapter is a cluster component, and axiom 7 keeps platform primitives out of the framework. The chart ships everything up to the scrape target. **Do instead:** install a metrics adapter (and the Prometheus operator, if the cluster has none; an app chart from before the scrape object gets it from `x g chart-alerts`); until then disable the HPAs and pin `replicas`. **Do not hand-add a metrics container port** — the chart emits one and a duplicate is rejected by the API server → [Observability](Observability) |
74
+ | `--target binary` is a **launcher** for an app tree, and has never been served from a bare VM | `As of 2026-10-06`. It boots: `x build --target binary` compiles `apps/web/server.ts` with `--compile-autoload-package-json`, `--compile-autoload-tsconfig` and `@ultimat3/*` external (`binaryArgs`, `packages/cli/src/cmd-build.ts`), and the required `windows` CI job starts the result from a scaffold and gets `200` from `/healthz`; `packages/cli/e2e/binary-launch.e2e.test.ts` proves the same on Linux. **It is not a self-contained artifact**: at run time it reads the app's `package.json` and `tsconfig.json`, imports `app.config.ts` and every module under `apps/*`, and loads the framework from the app's `node_modules` — one instance, so the app's registrations reach the server. Unmeasured: a scaffold compiled, copied with its tree to a VM with no Bun, and served under systemd [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/e2e/binary-launch.e2e.test.ts#the%20compiled%20launcher%20resolves%20its%20app%20tree%20at%20run%20time%2C%20against%20ONE%20framework%20instance) **Why it stays** (`As of 2026-11-18`): A registry is a module instance, so the launcher loads one framework from the app's `node_modules` rather than bundling a second copy. `--target docker` is the self-contained artifact. **Do instead:** ship the app root, its installed `node_modules` (installed for the target OS and CPU) and the binary together, and start the binary from that root. Prove it for your own app first — `./app --version`, then `ROLE=web PORT=3000 ./app` and `curl /readyz`. Prefer `--target docker`, the self-contained artifact → [Deployment](Deployment) |
75
+ | A local `typecheck` step can report green on a tree CI fails, on the same commit — **one sighting, unreproduced** | `As of 2026-10`. Observed once (2026-09-17, TypeScript 7.0.2): after a `git stash -u` → branch switch → `x verify` on the other branch → switch back → `stash pop` sequence, a type error that surfaces in an UNCHANGED file (a widened index signature in a file it imports) passed locally and failed CI; deleting `tsconfig.tsbuildinfo` then reproduced CI's red locally. Five faithful reproduction attempts against 7.0.2 all stayed correctly red ([#450](https://github.com/developerz-ai/ultimate/issues/450)). **[#450](https://github.com/developerz-ai/ultimate/issues/450) itself is closed `As of 2026-09-23`** — read from the shipped fix, not from the tracker: plan 101 row 14 r ("Close #450", `docs/plans/2026/09/23/101-framework-deep-sweep/14-guards-gate.md:37`; plan `status.yml` `complete`), recorded in `CHANGELOG.md` under 22.0.0 and pinned by `packages/cli/src/verify-typecheck.test.ts`. `tsc -b` decides "up to date" by **mtime**, and Bun installs a dependency as **hardlinks** carrying its cache's old mtimes, so an upgrade to an already-cached version left every input older than the buildinfo and a root without `references` — every scaffolded app — skipped the program and reported green while a cold CI was red. A scaffolded app's `typecheck` is now `tsc -p .` ([`packages/cli/src/templates/scaffold-repo.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/templates/scaffold-repo.ts), its `"typecheck"` script), which is incremental by **content hash**, and `x verify`'s `typecheck` step picks `-p .` over `-b` for any such root ([`packages/cli/src/verify-typecheck.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/verify-typecheck.ts)); the framework root keeps `-b`. **Still open**: a *second* `tsc` racing the same buildinfo is the one suspect not excluded, and no cause for it has been shown. `x verify` has no `--cold` flag: one sighting, and five faithful reproductions stayed red. **Why it stays** (`As of 2026-11-18`): There is no cause to fix: the one known mechanism is fixed, and no reproduction of the remainder exists. CI, always cold, is the judge of record. **Do instead:** CI is always cold and is the judge of record. If a local `typecheck` disagrees with it again, capture the command, its argv and its exit code before deleting any `tsconfig.tsbuildinfo`. |
76
+ | A `stream` page with a realtime island keeps every island on the page inert until its slowest hole closes | `As of 2026-11-02`. The runtime goes `async` so a shell island answers while a hole is open, but only with no realtime boot in the document: the boot (`script defer`) has to run first (`bootScript`, [`packages/cli/src/route-islands.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/route-islands.ts)), and a deferred script waits for parsing to end. Bound by the hole's 15 s deadline. **Why it stays** (`As of 2026-11-18`): The realtime boot has to run before the hydration runtime (`streamScripts`, `packages/cli/src/route-islands.ts`), or an island mounts over a store not yet restored, and a deferred script waits for parsing to end. `DEFAULT_HOLE_TIMEOUT_MS` bounds the wait. **Do instead:** keep the slow read out of such a page's holes, or give it a short deadline of its own: `fetch(url, { signal: AbortSignal.timeout(2_000) })`. |
77
+ | An open tab can meet a dead island across a deploy | `As of 2026-11-12`. A web process serves only the hashed files it built, so with `assets.retain` unset (the default) a tab holding the previous build's document gets a `no-store` 404 for its stylesheet, or for its island chunk on the first click, after every deploy; during a rolling update a new document that reaches an old pod gets no stylesheet either. What the framework does about the stylesheet half without a window: a soft navigation whose next sheet fails never swaps an unstyled page in (a GET becomes a full load, the old sheet stays) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/navigation-stylesheet-skew.test.ts#a%20GET%20is%20loaded%20by%20the%20browser%3B%20the%20page%20on%20screen%20keeps%20its%20sheet); a full load whose sheet 404s stays unstyled — the framework does not reload it, as a reload it cannot tell from a missing file offline or under a test harness is a navigation nobody asked for. A web role booted outside development and test with no window logs `X_ASSET_RETAIN_UNDECLARED` [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/src/retained-assets-boot.test.ts#undeclared%3A%20nothing%20is%20published%20and%20there%20is%20no%20reader). Declared, a tab survives six deploys with build 0's island alive [evidence](https://github.com/developerz-ai/ultimate/blob/main/packages/cli/e2e/six-deploys.e2e.test.ts#with%20assets.retain%2C%20the%20click%20boots%20build%200%E2%80%99s%20island%3A%20its%20chunk%20200%2C%20no%20404%2C%20an%20update%20offered) **Why it stays** (`As of 2026-11-18`): Retention needs a disk every web pod reads, and only the app can name one. Undeclared, boot says so by code. **Do instead:** declare `assets: { retain: { disk, builds } }` over a disk every web pod reads → [Deployment](Deployment#hashed-assets-across-a-deploy--assetsretain) |
78
+ | A soft visit waits for the slowest hole | `As of 2026-11-02`. The client router reads `response.text()` ([`packages/render/src/navigation-fetch.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/navigation-fetch.ts)) and swaps the whole answer, so holes fill through the re-run scripts and the first paint of an in-app navigation is as late as a full `ssr` render. A full load streams. No incremental parse here [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/render/src/navigation-fetch.test.ts#a%20page%3A%20its%20text%2C%20its%20build%2C%20no-store%20read%20off%20cache-control) **Why it stays** (`As of 2026-11-18`): The router swaps one whole answer, so head, scripts and holes land together. The extension point is the route's `navigation` declaration. **Do instead:** nothing to do in an app; a page that must paint first on a soft visit declares `navigation: 'document'`. |
79
+ | A job's `runAt` is stamped from the enqueuer's clock | `As of 2026-10`. An enqueuer running ahead of the database delays its own "immediate" jobs; up to 1 s ahead still wakes a worker, beyond that the job starts on the poll. A delayed job enqueued by another process starts within the idle ceiling after its `runAt` — 5 s with a proven wake, 2 s without; only a retry or a sleep the worker itself handed back gets a due-time timer. **Why it stays** (`As of 2026-11-18`): `runAt` comes from the injected `Clock` (`packages/jobs/src/driver-pg.ts`, `enqueue-record.ts`), the one a frozen-clock test drives and the outbox stamps at stage time, before any row exists. A database clock would split those. **Do instead:** NTP on every pod; for a deadline tighter than the ceiling, enqueue at the moment the work is due rather than with `runAt`. |
80
+ | The CDP driver cannot PIN a name, and a page's WebSocket is not screened at all | `As of 2026-11`. Measured on Chrome 150 with `localBrowser()`: interception (page-level and the browser-level `Fetch` that now covers popups) never pauses a WebSocket handshake, so `new WebSocket('ws://off-list/…')` from a scraped page connects. Since 31.0.0 a host a wildcard admitted is resolved before the browser leg releases it, and an inward or unresolvable answer is refused (`packages/scraping/src/browser-dial.ts`). But the browser then resolves again for itself, so a name that answers public to the screen and private to Chrome (DNS rebinding) is reached — the HTTP leg and the robots read resolve and pin (`packages/scraping/src/pinned-host.ts`), the browser cannot be pinned through this port — [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/scraping/src/cdp-arm-dial.test.ts#a%20screened%20name%20is%20continued%20by%20request%20id%20only%2C%20never%20pinned%20to%20the%20approved%20address) **Why it stays** (`As of 2026-11-18`): Interception never pauses the handshake and this port cannot hand Chrome a resolved address, so no driver code closes it. The boundary that can is the network's: the `egress` proxy. **Do instead:** list exact hosts rather than `'*'` on a scrape that runs where private addresses are reachable, and dial a scrape through an `egress` proxy outside that network. |
81
+ | `ScrapeReport.usage.bytesIn` counts the HTTP leg only | `As of 2026-10`. The CDP port subscribes to requests, not to their sizes, so the browser leg's bytes are not in the figure (`packages/scraping/src/usage.ts`) **Why it stays** (`As of 2026-11-18`): The field is defined as the HTTP leg (`packages/scraping/src/usage.ts`): this port sees requests, not sizes, and a browser figure would be a guess. The extension point is the resolver's `cost`. **Do instead:** treat `bytesIn` as a lower bound; a provider's own byte count, returned through the resolver's `cost`, is the billable one. |
82
+ | An org-scoped operator's runs list reads `x_jobs` with no index on `tenant_id` | `As of 2026-10`. The jobs dashboard keeps an actor with an `orgId` to its own org's runs through `JobFilter.tenantId`, and `x_jobs.tenant_id` is a plain column: the only index naming it is the idempotency one, led by `name` (`packages/jobs/src/driver-pg-ddl.ts`). A platform operator's list is unaffected [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/jobs/src/driver-pg-sql.test.ts#no%20x_jobs%20index%20leads%20with%20tenant_id%3A%20an%20org-scoped%20runs%20list%20scans) **Why it stays** (`As of 2026-11-18`): Every enqueue would pay one more index on the queue's hottest table for a read only an org-scoped dashboard issues, and the index is one migration for the app that needs it. **Do instead:** on a large queue, add `create index on x_jobs (tenant_id, created_at desc, id desc)` in an app migration, or operate the dashboard as a platform operator (an actor with no `orgId`) |
83
+ | Retry-from-step on the jobs dashboard is a free-text field | `As of 2026-10`. `job.retry-from-step` takes `{ step: t.string.min(1) }` (`packages/admin/src/jobs/job-actions.ts`); the run's detail page shows its steps, but the form does not offer them as a choice. **Why it stays** (`As of 2026-11-18`): An action's `input` is one static schema shared by the form, the MCP tool and the audit entry, so it has no per-row list of choices to offer. **Do instead:** copy the step name from the run's `steps` section on the same page. |
84
+ | The admin MCP batch tool takes `ids` only | `As of 2026-10`. A `batch` action is one MCP tool, `admin.action.<name>`, and it takes the rows by id; "all matching" — the list's own filter — is a screen control only. **Why it stays** (`As of 2026-11-18`): An agent names every row it changes, so the per-row gate and the `<entity>:<n> rows` confirmation state a set it chose. "All matching" stays a control a person reads the list beside. **Do instead:** list the rows with `admin.<entity>.list` and its `where`, then pass their ids. |
85
+ | No counts on the jobs dashboard's state tabs | `As of 2026-10`. `stats()` counts per queue across every tenant, so a count on a tab would show an org-scoped operator other orgs' numbers; the tabs carry none and the overview's tiles carry the counts, for a platform operator only. A per-tenant count is a second query nothing issues yet. **Why it stays** (`As of 2026-11-18`): A per-tenant count per tab is one more read per state on every page view, over a column with no leading index (the org-scoped runs-list row). **Do instead:** a platform operator reads the overview tiles; an org-scoped operator reads a tab's own page. |
86
+ | `x drill` proves one node per role on one machine, and drills no object store and no CDN | `As of 2026-11-06`. The fleet is one `web`, one `worker` (and one `sync` for `nats-down`) on one host, every dependency a local container behind a Bun TCP proxy: a multi-node NATS cluster, a Postgres failover to a real standby, a real S3 bucket and a real CDN in front of the web role are never faulted. `nats-down`'s sync lane is proven on a stand-in node (`packages/testing/src/drill-sync.test.ts`), not on `examples/dummy`, whose transport is in-memory; its client subscribes to nothing by default, so a gap counts only what the node volunteers. CI runs four of the nine (`fault-drills`, `roll-before-migrate` among them) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/testing/src/drills.test.ts#the%20nine%20drills%2C%20once%20each) **Why it stays** (`As of 2026-11-18`): A drill runs where a CI runner or one machine can hold the whole fleet. A real standby, bucket or CDN is a staging environment, which is the app's. **Do instead:** the rest by hand: `x drill --list --json`, then `x drill <name> --json` with `docker/test-services.env` loaded. A multi-node or object-store fault is a staging drill of your own, against [`docs/ops/06-runbooks.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/06-runbooks.md) |
91
87
  | `x cache`'s `stats` | removed from the registry `As of 2026-11-15`, where it was planned and exited `X_NOT_IMPLEMENTED`; now `X_CLI_UNKNOWN_COMMAND`, exit 1 as before. A hit rate is `cache.hit`/`cache.miss` on each serving process's instrumentation bus (`packages/cache/src/tiers.ts`), and no process aggregates them: the `/_x` cache panel shows the tag graph and the invalidation log, not hits. The route is a counter on each role's `/metrics`, read by whatever scrapes it; a CLI process has served nothing to count |
92
88
  | `x status` for sync, scheduler and replicator | `As of 2026-11-15`, `x status` reads every live worker's build from `x_job_workers` and samples each `--url` origin's `/readyz` for `x-ultimate-build`. No fleet-wide record exists for the other roles: a sync node keeps its connected clients' builds in its own memory (the `/_x` live panel in `x dev`), and the scheduler and replicator write no row. Each answers `/readyz` on its health port, so `x status --url http://<pod>:9091` reads one pod; the build-ID distribution of connected clients needs an aggregate the realtime package does not keep (`data.unrecorded` names these roles) |
93
89
  | `api/**/route.ts` | not a file kind — owner decision 1 ([#648](https://github.com/developerz-ai/ultimate/issues/648)), `As of 2026-10`. `api/` holds the action and query projections `defineApi()` collects; a route file there is refused at registration (`X_ROUTE_FILE_INVALID`), and 26.0.0 deleted `ROUTE_FILENAME`'s `api` row ([#709](https://github.com/developerz-ai/ultimate/issues/709)). A wire format an action cannot speak — a webhook receiver, an OAuth endpoint — is a plain HTTP route in the `routes` runtime override ([Configuration](Configuration)) |
94
- | Deferred, `As of 2026-10-07` | the plugin API and multi-region replication. The Redis **job** driver shipped (`redisJobDriver()`, #710) without the operator surface, backfill bookkeeping or fleet-wide `concurrency` — those answer on Postgres only; the NATS job driver stub that threw `X_NOT_IMPLEMENTED` was deleted in 25.0.0. |
90
+ | A plugin API | not planned, `As of 2026-11-18`. Extension points earn their existence from real forks, and none has asked: a primitive is a function returning a value, so an app wraps it ([axiom 8](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/19-mechanism-not-convention.md)). |
91
+ | Multi-region replication | not planned, `As of 2026-11-18`. Nothing has been measured past one region ([scale ladder](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/17-scale-ladder.md), rung 4), and its reason to exist is multi-region write locality, which one Postgres does not offer. The extension point is the database an app points `DATABASE_URL` at. |
92
+ | `redisJobDriver()` has no operator surface | `As of 2026-11-18`. It ships without `introspect`, `backfills` or `leases` (`packages/jobs/src/driver-redis.ts`), so the operator surface, backfill bookkeeping and fleet-wide `concurrency` answer on Postgres only. An app that needs them runs `postgresJobDriver()`. There is no NATS job driver: its stub was deleted in 25.0.0. |
93
+ | `x db reset` refuses an external Postgres (`packages/cli/src/cmd-db.ts`) | `As of 2026-11-18`, a refusal and not missing work. The reset deletes the embedded data directory this process owns; on `DATABASE_URL` it would be `DROP DATABASE` on a server other clients may be using, and the usual way here is a variable exported by the shell. The fix names both ways out: `env -u DATABASE_URL x db reset`, or drop and recreate it yourself and run `x db migrate`. It stays `X_NOT_IMPLEMENTED` because an emitted code is covered by semver (`wiki/Stability.md`); a code of its own waits for a major. |
94
+ | `requests.statements` needs a running `x dev` (`packages/cli/src/mcp-agent-host.ts`) | `As of 2026-11-18`. The per-request statement ledger exists only in the memory of the `x dev` process, so with no live dev lock there is nothing to read, and an empty answer would read as "no statements ran". The fix starts `x dev`. The code stays `X_NOT_IMPLEMENTED` because an emitted code is covered by semver; a code of its own waits for a major. |
95
+ | `branchPglite` refuses an in-memory database (`packages/db/src/pglite-branch.ts`) | `As of 2026-11-18`. A branch is a copy of a data directory, and the function takes a location, not a live client: `memory://` names no bytes this call can reach, because they live inside whichever process opened them. Branching one would need a handle to that instance, and no caller has one: `x dev` runs on disk. The fix points there. |
96
+ | A `DevHost` without an agent capability answers that tool `X_NOT_IMPLEMENTED` (`packages/mcp/src/dev-agent-tools.ts`) | `As of 2026-11-18`. The four agent capabilities on `DevCapabilities` are optional so a host written against an earlier 31.x still compiles, and the CLI host implements all four, so only such a host reaches this. Making them required is a breaking change to a public type and waits for a major; until then one tool refuses and the rest of the catalog keeps working. |
97
+ | `notImplementedDriver()` builds `X_NOT_IMPLEMENTED` (`packages/seo/src/errors.ts`) | `As of 2026-11-18`, public vocabulary and not a stub. `builtinImageDriver` implements both entry points and never calls it; it exists for an app's own `ImageTransformDriver` (a CDN with no blur endpoint) to report a capability it lacks instead of returning the untransformed original. |
98
+ | `plannedSubcommand()` still builds `X_NOT_IMPLEMENTED` (`packages/cli/src/cmd-planned.ts`) | `As of 2026-11-18`. No command calls it, and both planned tables are empty; a subcommand a command lacks is `X_CLI_UNKNOWN_COMMAND`. It is exported from `@ultimat3/cli`, so it is marked `@deprecated` and stays until a major may remove it (`X_RELEASE_UNDEPRECATED_REMOVAL`). |
99
+
100
+ ## Not built yet
101
+
102
+ Nothing, `As of 2026-11-18`. `x cache`'s `stats`, `x status` for sync, scheduler and replicator, `api/**/route.ts`, the plugin API and multi-region replication are decided: [Open by decision](#open-by-decision).
95
103
 
96
104
  ## Carried backlog
97
105
 
@@ -109,15 +117,15 @@ and B27 (one `PgExecutor` builder, `dbExecutor()`, #688), in PRs #701, #703 and
109
117
  ranked them — a later plan's, not this release's. Evidence is from read-only surveys of a
110
118
  downstream app on Ultimate and of systems built without it; no row is a defect in what ships.
111
119
 
112
- | Gap | Evidence | Precedent |
113
- |---|---|---|
114
- | route-group defaults | 111 routes × ~25 repeated lines | layouts, `before_action`, controller inheritance |
115
- | a view-scoped lazy lookup for `t()` inside an island — the subset itself ships (`catalogSubset` / `subsetTranslator`, #710), named key by key | 94 label types, 3,092 lines of label files | lazy lookup `t('.title')` scoped to the view |
116
- | a server-first dialog, menu and combobox with a small enhancer | ~2,200 app-side lines; 13 catalog components at 0 imports | HTML first, a small controller second |
117
- | `QueryRef` derived from the declaration | [Queries and live queries](Queries-And-Live-Queries) "Not derived" row | — |
118
- | a boot hook — the task half closed: `cronJob()` declares a job and its task once ([Scheduled tasks](Scheduled-Tasks#a-job-on-its-own-cron--cronjob)) | 2 boot stand-ins | initializers |
119
- | batches with completion callbacks, argument encryption — debounce and job expiry closed (`enqueue({ onConflict: 'replace', expiresAt })`, [Jobs](Jobs-And-Workflows#debounce-and-expiry)); priority is decided out: a separate queue ([Jobs](Jobs-And-Workflows#concurrency-rate-limits-queues-retry)) | each present in a surveyed job system; none asked for by the proving case | batches and limiters in established job systems; queue priorities |
120
- | proxy inventory, captcha, OTP relay | product features of a scraping service — the app's, by [axiom 8](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/19-mechanism-not-convention.md) | — |
120
+ | Gap | Decision | Evidence | Precedent |
121
+ |---|---|---|---|
122
+ | route-group defaults | deferred | 111 routes × ~25 repeated lines | layouts, `before_action`, controller inheritance |
123
+ | a view-scoped lazy lookup for `t()` inside an island — the subset itself ships (`catalogSubset` / `subsetTranslator`, #710), named key by key | deferred | 94 label types, 3,092 lines of label files | lazy lookup `t('.title')` scoped to the view |
124
+ | a server-first dialog, menu and combobox with a small enhancer | deferred | ~2,200 app-side lines; 13 catalog components at 0 imports | HTML first, a small controller second |
125
+ | `QueryRef` derived from the declaration | deferred | [Queries and live queries](Queries-And-Live-Queries) "Not derived" row | — |
126
+ | a boot hook — the task half closed: `cronJob()` declares a job and its task once ([Scheduled tasks](Scheduled-Tasks#a-job-on-its-own-cron--cronjob)) | deferred | 2 boot stand-ins | initializers |
127
+ | batches with completion callbacks, argument encryption — debounce and job expiry closed (`enqueue({ onConflict: 'replace', expiresAt })`, [Jobs](Jobs-And-Workflows#debounce-and-expiry)); priority is decided out: a separate queue ([Jobs](Jobs-And-Workflows#concurrency-rate-limits-queues-retry)) | deferred | each present in a surveyed job system; none asked for by the proving case | batches and limiters in established job systems; queue priorities |
128
+ | proxy inventory, captcha, OTP relay | rejected | product features of a scraping service — the app's, by [axiom 8](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/19-mechanism-not-convention.md) | — |
121
129
 
122
130
  The test-kit row of that plan's table shipped in 23.0.0 work (`renderView`, `runJobs({ actor })`,
123
131
  `mountIslandState`) and is not repeated here.
@@ -148,7 +156,7 @@ step (`X_ROADMAP_TRACKER_STALE`), so this list, not a stale tracker, is where op
148
156
  | Rolling the replicator only when its own image or config changed | deferred | the image updater repins every container naming the image and every build is a new digest, so a digest test rolls it every time; needs a per-role change signal. 2026/11/11 slice 30, I13 |
149
157
  | Sign-in e2e against an out-of-process stub identity provider, in the reference app | deferred | the e2e suites sign in with the development viewer, which answers only a cookie-less request under `x dev`; a stub provider is a second process the e2e harness does not start. 2026/11/11 slice 18, A7 |
150
158
  | A sync-node subscribe fixture for the deployed demo app (`dummy/social-media-clone`) | deferred | needs the app's API importable without its demo seeding side effect (`apps/web/api/index.ts`). 2026/11/11 slice 18, A8 |
151
- | The reference app's three hourly task + job pairs, as `cronJob()` | build | the reference app shows every primitive once and idiomatically, and a hand-written pair beside the factory teaches the second way. 2026/11/11 slice 18, A13 |
159
+ | The reference app's three hourly task + job pairs, as `cronJob()` | rejected | `cronJob()` is one job on its own cron, and `hourlyLikes` and `hourlyRetention` each enqueue two jobs; `hourlyPurge` fires a `purge()` job, a factory of its own. The reference app shows `task` here and `cronJob()` in `app/digest/jobs/send-digest.ts`. 2026/11/11 slice 18, A13 |
152
160
  | One shared `OnTheWire<T>` type | deferred | named once by the tracked-app pass with no second caller measured. 2026/11/11 slice 18 |
153
161
  | The reference app's identity model (`members.userId` against `x_users.id == members.id`) | deferred | a schema change in the reference app with no defect behind it. 2026/11/11 slice 18 |
154
162
 
@@ -161,6 +169,7 @@ the release that fixed it. Upgrading is the fix, and the breaking entries are th
161
169
 
162
170
  | Gap | Fixed in | If you are pinned below that |
163
171
  |---|---|---|
172
+ | A queued offline write was not bound to its principal on the server: a second tab's sign-in could send it as the new session | **31.47.0** | A replay now names its queue's principal in `x-ultimate-replay-scope`, and the action route refuses any other session with `409 X_REPLAY_PRINCIPAL_MISMATCH` before the body is read. The entry stays `pending` for its owner, as it does on a 401 to a signed-in queue, and is sent when that account is back; entries stored by older builds are bound by the queue that holds them [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/realtime/src/page-outbox-principal.test.ts#the%20entry%20behind%20the%20one%20on%20the%20wire%20is%20refused%2C%20kept%2C%20and%20sent%20once%20its%20owner%20is%20back). Loading a page as another account still wipes the queue, deliberately. Below 31.47.0: sign out by full navigation, and do not share a browser profile between accounts with offline writes queued |
164
173
  | A browser's own `<form method="post">` to an action got JSON back on a refusal — `setRedirect` covered success only (deferred by plan 101: 234 wrapper calls in 142 files of one app) | **31.11.0** | `action({ native: { success, refusal? } })`: a `303` either way, the outcome in a one-read flash `useActionAnswer()` reads in `load`; a `page.tsx` form posting to an action without it is an `X_NATIVE_FORM_UNANSWERED` warning ([Actions](Actions#native-forms-native)). Below it: `if ((useRequestHeader('accept') ?? '').includes('text/html')) setRedirect(next)` in `handle` (both from `@ultimat3/http`) answers success; a refusal still answers the error page |
165
174
  | `bun run error-render` could not see a `catch (error)` binding | **8.0.0** | The gate matched a **parameter** annotated `unknown`/`any`; a `catch (error)` binding is `unknown` by inference and carries no annotation, which is how `String(error)` echoing a caller's request body into a 422 `cause:` stayed green in `packages/http/src/request.ts` through 3.0.0. `error-render` now joins `catchRenderFindings` ([`scripts/catch-render.ts`](https://github.com/developerz-ai/ultimate/blob/main/scripts/catch-render.ts)), which reads the catch binding and a `.catch((error: unknown) => …)` callback; its header lists what it still cannot see (a helper in a third file, a field laundered by another package). Below it: review every `catch` by hand — a caught value reaches a `cause:`/`fix:` only through `renderThrowable(error)` from `@ultimat3/core` |
166
175
  | The manifest did not record an admin action's `readonly` or `matching`, a scope's `count`, or a resource's permission noun | **25.0.0** | [B29](https://github.com/developerz-ai/ultimate/blob/main/docs/plans/2026/10/04/101-squeaky-clean-sweep/10-carried-backlog.md), #691. `AdminActionFact` records `readonly` and `matching` and `x manifest diff` reports the gate moving between `admin:write` and `admin:read` ([`packages/manifest/src/diff-admin.ts`](https://github.com/developerz-ai/ultimate/blob/main/packages/manifest/src/diff-admin.ts)); a scope's `count` is diffed; the permission noun reaches the diff through each admin route's `permissions` (`<noun>:read`). Below it: read them from the declaration in `apps/admin/app/admin/admin.ts` |
@@ -239,9 +239,13 @@ The same catalog as data, for a test: `mcp.server.catalog(caller)` — every act
239
239
  in the transcript all session:
240
240
 
241
241
  ```ts
242
- import { assertMcpSurfaceBudget } from '@ultimat3/mcp';
242
+ import { type AppMcp, assertMcpSurfaceBudget, type McpCaller } from '@ultimat3/mcp';
243
+ import { unitTest } from '@ultimat3/testing';
243
244
 
244
- test('the staff surface stays small', async () => {
245
+ declare const mcp: AppMcp;
246
+ declare const staffCaller: McpCaller;
247
+
248
+ unitTest('the staff surface stays small', async () => {
245
249
  // The derivation beside the number: the size measureMcpSurface reported, × a margin.
246
250
  await assertMcpSurfaceBudget(mcp.server, staffCaller, { toolsList: 4_000, listResources: 12_000 });
247
251
  });
@@ -339,6 +343,20 @@ name, same file; the order is the contract:
339
343
 
340
344
  ```ts
341
345
  // apps/web/mcp.ts
346
+ import { defineAppMcp, type DefineAppMcpInput, type McpOAuth, type McpScopes } from '@ultimat3/mcp';
347
+
348
+ type Input = DefineAppMcpInput;
349
+ declare const oauth: McpOAuth;
350
+ declare const groups: NonNullable<Input['groups']>;
351
+ declare const CUSTOMER_SCOPES: McpScopes;
352
+ declare const STAFF_SCOPES: McpScopes;
353
+ declare const AFFILIATE_SCOPES: McpScopes;
354
+ declare const customerToken: NonNullable<Input['resolveToken']>;
355
+ declare const staffToken: NonNullable<Input['resolveToken']>;
356
+ declare const affiliateToken: NonNullable<Input['resolveToken']>;
357
+ declare const staffTools: NonNullable<Input['tools']>;
358
+ declare const affiliateTools: NonNullable<Input['tools']>;
359
+
342
360
  export const mcp = [
343
361
  defineAppMcp({ name: 'acme', include: 'exposed', scopes: CUSTOMER_SCOPES, resolveToken: customerToken, oauth }),
344
362
  defineAppMcp({ name: 'acme-admin', path: '/mcp/admin', tools: staffTools, surface: 'meta', groups, scopes: STAFF_SCOPES, resolveToken: staffToken, oauth }),
@@ -373,6 +391,11 @@ where `2025-06-18` required it; `2025-03-26` defines none, its discovery being R
373
391
  authorization-server metadata at the origin:
374
392
 
375
393
  ```ts
394
+ import { defineAppMcp, type DefineAppMcpInput, type McpScopes } from '@ultimat3/mcp';
395
+
396
+ declare const MCP_SCOPES: McpScopes;
397
+ declare const resolveToken: NonNullable<DefineAppMcpInput['resolveToken']>;
398
+
376
399
  export const mcp = defineAppMcp({
377
400
  include: 'exposed',
378
401
  scopes: MCP_SCOPES,
@@ -618,11 +641,28 @@ LLM-generated context files measurably reduce task success. A model writing "her
618
641
  One typed entry point for model calls — provider-agnostic, observable, cached, evaluated.
619
642
 
620
643
  ```ts
644
+ import { t } from '@ultimat3/action';
645
+ import { llm, type Prompt } from '@ultimat3/ai';
646
+ import { can } from '@ultimat3/policy';
647
+
648
+ declare module '@ultimat3/core' {
649
+ interface CtxServices {
650
+ readonly posts: {
651
+ publish(id: string): Promise<{ id: string; orgId: string; title: string }>;
652
+ like(id: string): Promise<{ likeCount: number; likedByMe: boolean }>;
653
+ body(id: string): Promise<string>;
654
+ };
655
+ }
656
+ }
657
+
658
+ declare const summarizePrompt: Prompt<{ body: string }>;
659
+
621
660
  export const summarize = llm({
622
661
  model: 'claude-sonnet-5-5',
623
662
  input: t.object({ postId: t.uuid }),
624
- output: t.object({ summary: t.string, tags: t.string.array() }),
663
+ output: t.object({ summary: t.string, tags: t.array(t.string) }),
625
664
  prompt: summarizePrompt, // versioned artifact
665
+ vars: async ({ input, ctx }) => ({ body: await ctx.posts.body(input.postId) }),
626
666
  cache: { semantic: { threshold: 0.97, ttl: '7d' } },
627
667
  budget: { tokensIn: 8000, costPerCall: { minor: 5, currency: 'USD' } },
628
668
  policy: can('post:read'),
package/wiki/Mail.md CHANGED
@@ -7,6 +7,12 @@ Package: `@ultimat3/mail` (tier 4) — the full reference is
7
7
 
8
8
  ```ts
9
9
  import { blocks, defineMail, send, t } from '@ultimat3/mail';
10
+ import { type Ctx } from '@ultimat3/core';
11
+
12
+ declare const user: { readonly id: string; readonly name: string; readonly email: string; readonly role: string };
13
+
14
+ declare const url: string;
15
+ declare const ctx: Ctx;
10
16
 
11
17
  export const receiptMail = defineMail({
12
18
  id: 'receipt',
@@ -340,6 +340,15 @@ The marker is SQL the migration's checksum covers, so it must be added **before*
340
340
  Same rule `llm()` follows for a model call ([`docs/idea/02-primitives.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/02-primitives.md)): a one-pass sweep over a table is durable background work with an input schema, a retry policy, an idempotency key and a queue — the definition of a `job` — so `backfill()` *returns* one instead of the framework growing a ninth kind of thing. That single line is what gives a backfill `.enqueue()`, the worker's cancellation, the dead-letter path, `x jobs show` and a manifest row for free, with nothing declared twice. See [Jobs and workflows](Jobs-And-Workflows) for the `job` primitive itself.
341
341
 
342
342
  ```ts
343
+ import { backfill } from '@ultimat3/jobs';
344
+ import { database, entity, text, uuid } from '@ultimat3/entity';
345
+
346
+ const posts = entity('posts', {
347
+ tenant: 'orgId',
348
+ columns: { id: uuid().primaryKey(), orgId: uuid(), title: text() },
349
+ });
350
+ const db = database({ posts });
351
+
343
352
  export const normalizePostTitles = backfill({
344
353
  name: 'normalize-post-titles',
345
354
  tenant: 'none', // a sweep spans every tenant; the PASS opens the cross-tenant scope, not you
@@ -422,6 +431,10 @@ The batch runs inside its own durable step, and the checkpoint is written **afte
422
431
  Re-enqueueing a backfill that has already run to completion runs a **real job** whose pass is the no-op. The two are different facts and only the second one is dedupe:
423
432
 
424
433
  ```ts
434
+ import { type JobHandle } from '@ultimat3/jobs';
435
+
436
+ declare const normalizePostTitles: JobHandle<{ force?: boolean }>;
437
+
425
438
  const first = await normalizePostTitles.enqueue({});
426
439
  first.deduped; // false — this is the run
427
440
 
package/wiki/Money.md CHANGED
@@ -31,6 +31,8 @@ That is deliberate. `minor` is not a `bigint` because money is projected onto ev
31
31
  `scale` names the decimal places `minor` counts, **when they are not the currency's own**. Absent — the shape every value and every row already had — means the currency's natural minor unit: 2 for USD, 0 for JPY, 3 for KWD.
32
32
 
33
33
  ```ts
34
+ import { fromMinor, toDecimalString } from '@ultimat3/money';
35
+
34
36
  fromMinor(1999, 'USD'); // $19.99 — no scale key, the currency's own minor unit
35
37
  fromMinor(2, 'USD', 6); // $0.000002 — minor counts millionths
36
38
  toDecimalString(fromMinor(2, 'USD', 6)); // '0.000002'
@@ -314,11 +316,28 @@ the person, never round or guess.
314
316
  | OTel span attributes | `cost.minor` + `cost.currency` as separate attributes, never a formatted string |
315
317
 
316
318
  ```ts
319
+ import { t } from '@ultimat3/action';
320
+ import { llm, type Prompt } from '@ultimat3/ai';
321
+ import { can } from '@ultimat3/policy';
322
+
323
+ declare module '@ultimat3/core' {
324
+ interface CtxServices {
325
+ readonly posts: {
326
+ publish(id: string): Promise<{ id: string; orgId: string; title: string }>;
327
+ like(id: string): Promise<{ likeCount: number; likedByMe: boolean }>;
328
+ body(id: string): Promise<string>;
329
+ };
330
+ }
331
+ }
332
+
333
+ declare const summarizePrompt: Prompt<{ body: string }>;
334
+
317
335
  export const summarize = llm({
318
336
  model: 'claude-sonnet-5-5',
319
337
  input: t.object({ postId: t.uuid }),
320
- output: t.object({ summary: t.string, tags: t.string.array() }),
338
+ output: t.object({ summary: t.string, tags: t.array(t.string) }),
321
339
  prompt: summarizePrompt, // versioned artifact
340
+ vars: async ({ input, ctx }) => ({ body: await ctx.posts.body(input.postId) }),
322
341
  cache: { semantic: { threshold: 0.97, ttl: '7d' } },
323
342
  budget: { tokensIn: 8000, costPerCall: { minor: 5, currency: 'USD' } },
324
343
  policy: can('post:read'),
@@ -30,15 +30,41 @@ Full row, verbatim: [Error codes → `@ultimat3/entity`](Error-Codes-entity).
30
30
  ## Before / after
31
31
 
32
32
  ```ts
33
+ import { entity, postgresRepo, uuid } from '@ultimat3/entity';
34
+
35
+ const members = entity('members', {
36
+ tenant: 'orgId',
37
+ columns: { id: uuid().primaryKey(), orgId: uuid() },
38
+ });
39
+ const repo = postgresRepo(members);
40
+ declare const posts: readonly { readonly authorId: string }[];
41
+
33
42
  // naive: one statement per row
34
43
  const authors = [];
35
44
  for (const post of posts) {
36
- authors.push(await db.members.findById(post.authorId));
45
+ authors.push(await repo.findById(post.authorId));
37
46
  }
38
47
  ```
39
48
 
40
49
  ```ts
41
50
  // one statement for the page
51
+ import { database, entity, uuid } from '@ultimat3/entity';
52
+
53
+ const members = entity('members', {
54
+ tenant: 'orgId',
55
+ columns: { id: uuid().primaryKey(), orgId: uuid() },
56
+ });
57
+ const posts = entity('posts', {
58
+ tenant: 'orgId',
59
+ columns: {
60
+ id: uuid().primaryKey(),
61
+ orgId: uuid(),
62
+ authorId: uuid().references(() => members.id),
63
+ },
64
+ });
65
+ const db = database({ members, posts });
66
+ declare const orgId: string;
67
+
42
68
  const page = await db.posts.where({ orgId }).preload('author').page();
43
69
  ```
44
70
 
@@ -164,6 +190,10 @@ detector in **strict** mode for the length of one test — its verdict fails the
164
190
  opt-in, there is no `strict: true` flag to forget:
165
191
 
166
192
  ```ts
193
+ import { expect, test } from '@ultimat3/testing';
194
+
195
+ declare function loadFeed(): Promise<void>;
196
+
167
197
  test('the feed reads its authors once', async ({ statements }) => {
168
198
  await loadFeed();
169
199
  // X_N_PLUS_ONE_QUERY: members.findById ran 5 times in one request — one read per row
package/wiki/Notify.md CHANGED
@@ -9,14 +9,25 @@ dead-letter path, cancellation, `x jobs show` and its manifest row — the same
9
9
  and `llm()` take ([The eight primitives](The-Eight-Primitives)). It is not a ninth primitive.
10
10
 
11
11
  ```ts
12
- import { inAppChannel, mailChannel, notifier, t } from '@ultimat3/notify';
12
+ import { inAppChannel, mailChannel, type Mailer, notifier, type Recipient, t } from '@ultimat3/notify';
13
+
14
+ interface Commented {
15
+ readonly postId: string;
16
+ readonly orgId: string;
17
+ readonly author: string;
18
+ }
19
+ declare const mailer: Mailer<Commented>;
20
+ declare function subscribersOf(postId: string, signal: AbortSignal): Promise<readonly Recipient[]>;
21
+ declare const postId: string;
22
+ declare const orgId: string;
23
+ declare const author: string;
13
24
 
14
25
  export const commentPosted = notifier({
15
26
  name: 'post.commented',
16
27
  input: t.object({ postId: t.uuid, orgId: t.uuid, author: t.string }),
17
28
  tenant: (params) => params.orgId, // required, as on job()
18
29
  key: (params) => `comment:${params.postId}`, // the queue's dedupe key AND the ledger's event key
19
- recipients: ({ input, ctx }) => posts.subscribers(input.postId, ctx.signal),
30
+ recipients: ({ input, ctx }) => subscribersOf(input.postId, ctx.signal),
20
31
  deliver: [
21
32
  { channel: inAppChannel() }, // immediately
22
33
  {