@ultimat3/cli 30.9.0 → 31.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/CLAUDE.md +80 -64
  2. package/README.md +4 -1
  3. package/package.json +30 -29
  4. package/src/admin-registration.ts +1 -1
  5. package/src/affected-base.ts +51 -0
  6. package/src/affected.ts +34 -11
  7. package/src/app-boundaries.ts +88 -9
  8. package/src/app-load-async.ts +133 -0
  9. package/src/app-load-batch.ts +203 -0
  10. package/src/app-load-prebuilt.ts +147 -0
  11. package/src/app-load-register.ts +175 -0
  12. package/src/app-load.ts +143 -175
  13. package/src/app-loader-imports.ts +31 -0
  14. package/src/app-root.ts +13 -0
  15. package/src/app-runtime.ts +5 -1
  16. package/src/boundary-findings.ts +12 -0
  17. package/src/browser-launcher-port.ts +3 -7
  18. package/src/browser-launcher.ts +1 -1
  19. package/src/budgets-scan.ts +8 -0
  20. package/src/budgets.ts +10 -1
  21. package/src/build-registry-background.ts +59 -0
  22. package/src/build-registry.ts +207 -0
  23. package/src/cdp-shot-clock.ts +3 -11
  24. package/src/cdp-shot-driver.ts +3 -2
  25. package/src/cdp-shot-element.ts +3 -2
  26. package/src/cdp-shot-page.ts +2 -2
  27. package/src/cdp-shot-watch.ts +4 -3
  28. package/src/ci-log.ts +76 -13
  29. package/src/cmd-affected-spec.ts +7 -3
  30. package/src/cmd-affected.ts +91 -77
  31. package/src/cmd-auth.ts +3 -3
  32. package/src/cmd-ci.ts +6 -3
  33. package/src/cmd-db-recount.ts +15 -0
  34. package/src/cmd-drill.ts +10 -6
  35. package/src/cmd-exercise.ts +2 -1
  36. package/src/cmd-generate-spec.ts +6 -0
  37. package/src/cmd-generate.ts +22 -4
  38. package/src/cmd-mail.ts +1 -1
  39. package/src/cmd-pr-spec.ts +1 -1
  40. package/src/cmd-pr.ts +72 -1
  41. package/src/cmd-routes.ts +2 -2
  42. package/src/cmd-secrets-spec.ts +4 -1
  43. package/src/cmd-shot.ts +14 -262
  44. package/src/cmd-test-spec.ts +2 -2
  45. package/src/cmd-verify-spec.ts +21 -1
  46. package/src/cmd-verify.ts +16 -4
  47. package/src/coverage-source.ts +4 -1
  48. package/src/db-diagnostics.ts +8 -1
  49. package/src/dev-boot.ts +29 -15
  50. package/src/dev-dashboard-invalidations.ts +43 -0
  51. package/src/dev-dashboard.ts +13 -16
  52. package/src/dev-n-plus-one.ts +7 -3
  53. package/src/dev-rebuild.ts +2 -1
  54. package/src/dev-route-table.ts +1 -1
  55. package/src/dev-traces.ts +16 -15
  56. package/src/document-options.ts +12 -1
  57. package/src/drift-store.ts +55 -0
  58. package/src/error-catalog.ts +8 -3
  59. package/src/error-codes-boundary.ts +32 -0
  60. package/src/error-codes-package.ts +38 -0
  61. package/src/error-codes.ts +28 -40
  62. package/src/errors.ts +17 -7
  63. package/src/exercise-database.ts +13 -1
  64. package/src/exercise-findings.ts +36 -18
  65. package/src/exercise-services.ts +84 -0
  66. package/src/exercise-subject.ts +38 -13
  67. package/src/failure-capture-boot.ts +9 -5
  68. package/src/framework-schema.ts +5 -5
  69. package/src/generate-exercise.ts +1 -1
  70. package/src/generate-files.ts +27 -7
  71. package/src/generate-kinds.ts +5 -0
  72. package/src/generate-refresh.ts +53 -0
  73. package/src/generate-workspace.ts +169 -0
  74. package/src/generate-write.ts +8 -2
  75. package/src/hold.ts +19 -8
  76. package/src/image-prepare.ts +6 -2
  77. package/src/index.ts +5 -20
  78. package/src/island-bundle.ts +7 -3
  79. package/src/island-capture.ts +2 -2
  80. package/src/island-harness.ts +1 -1
  81. package/src/job-registration.ts +43 -6
  82. package/src/jobs-driver.ts +4 -5
  83. package/src/mcp-errors.ts +20 -4
  84. package/src/mcp-host.ts +5 -1
  85. package/src/mcp-ui-interact.ts +3 -0
  86. package/src/messages-gate.ts +10 -0
  87. package/src/new-shapes-generate.ts +1 -1
  88. package/src/otlp-export.ts +94 -29
  89. package/src/output.ts +24 -10
  90. package/src/page-sync.ts +3 -1
  91. package/src/pr-activity.ts +150 -0
  92. package/src/pr-bots.ts +109 -0
  93. package/src/pr-threads.ts +7 -2
  94. package/src/role-load.ts +17 -11
  95. package/src/role-start.ts +5 -4
  96. package/src/role-sync.ts +7 -8
  97. package/src/route-islands-preload.ts +46 -0
  98. package/src/route-islands.ts +6 -2
  99. package/src/runtime-admin.ts +5 -1
  100. package/src/runtime-bindings.ts +25 -19
  101. package/src/runtime-boot-ports.ts +66 -0
  102. package/src/runtime-bus.ts +29 -5
  103. package/src/runtime-cache-bus.ts +53 -0
  104. package/src/runtime-cache.ts +43 -13
  105. package/src/runtime-isr-outcome.ts +5 -4
  106. package/src/runtime-jobs.ts +2 -2
  107. package/src/runtime-keys.ts +37 -0
  108. package/src/runtime-overrides.ts +148 -42
  109. package/src/runtime-port-bindings-queue.ts +36 -0
  110. package/src/runtime-port-bindings.ts +117 -0
  111. package/src/runtime-ports.ts +164 -0
  112. package/src/runtime-purge.ts +41 -28
  113. package/src/runtime-push.ts +7 -3
  114. package/src/runtime-queue.ts +70 -55
  115. package/src/runtime-realtime.ts +5 -5
  116. package/src/runtime-render-document.ts +4 -1
  117. package/src/runtime-services.ts +110 -158
  118. package/src/runtime-storage-boot.ts +111 -0
  119. package/src/runtime-storage-upload.ts +9 -7
  120. package/src/runtime-storage.ts +7 -1
  121. package/src/serve-boot.ts +8 -4
  122. package/src/serve-entry.ts +3 -0
  123. package/src/serve-env.ts +47 -14
  124. package/src/serve-prebuilt-paths.ts +3 -0
  125. package/src/serve-prebuilt.ts +15 -4
  126. package/src/serve.ts +2 -2
  127. package/src/shot-gpu.ts +61 -0
  128. package/src/shot-route.ts +95 -0
  129. package/src/shot-run.ts +189 -0
  130. package/src/shot-verdict.ts +5 -0
  131. package/src/static-cards.ts +3 -2
  132. package/src/static-report.ts +2 -2
  133. package/src/style-bundle.ts +1 -1
  134. package/src/sync-authenticator.ts +17 -18
  135. package/src/templates/action-tests.ts +4 -4
  136. package/src/templates/backfill.ts +5 -8
  137. package/src/templates/entity.ts +3 -0
  138. package/src/templates/github/ci.yml.ts +3 -1
  139. package/src/templates/github/dependabot.yml.ts +73 -0
  140. package/src/templates/job.ts +13 -22
  141. package/src/templates/naming.ts +20 -1
  142. package/src/templates/pinned/docker-compose.yml +1 -1
  143. package/src/templates/query.ts +7 -8
  144. package/src/templates/route.ts +5 -3
  145. package/src/templates/scaffold-api.ts +1 -1
  146. package/src/templates/scaffold-auth.ts +5 -3
  147. package/src/templates/scaffold-claude-commands.ts +6 -3
  148. package/src/templates/scaffold-claude.ts +4 -4
  149. package/src/templates/scaffold-container-compose.ts +2 -4
  150. package/src/templates/scaffold-domain-package.ts +1 -1
  151. package/src/templates/scaffold-entries.ts +6 -1
  152. package/src/templates/scaffold-helm-fences.ts +3 -2
  153. package/src/templates/scaffold-helm.ts +35 -6
  154. package/src/templates/scaffold-repo.ts +47 -135
  155. package/src/templates/scaffold-runtime-ports.ts +62 -0
  156. package/src/templates/scaffold-verify-floor.ts +97 -0
  157. package/src/templates/shapes/overlay.ts +1 -1
  158. package/src/templates/sign-in-oidc.ts +5 -3
  159. package/src/templates/sign-in-shared.ts +28 -10
  160. package/src/templates/workspace.ts +75 -0
  161. package/src/test-ignores.ts +5 -2
  162. package/src/test-select.ts +4 -1
  163. package/src/tsconfig-aliases.ts +85 -0
  164. package/src/upgrade-gate.ts +30 -5
  165. package/src/upgrade-report.ts +7 -1
  166. package/src/verify-changed-facts.ts +53 -0
  167. package/src/verify-changed-scope.ts +162 -0
  168. package/src/verify-changed.ts +174 -0
  169. package/src/verify-checks.ts +33 -19
  170. package/src/verify-drift-owner.ts +30 -0
  171. package/src/verify-e2e.ts +2 -1
  172. package/src/verify-factories.ts +86 -0
  173. package/src/verify-run.ts +13 -11
  174. package/src/verify-step.ts +13 -0
  175. package/src/verify-tests.ts +58 -6
  176. package/src/workspace-external-deps.ts +164 -0
  177. package/src/write-line.ts +21 -6
  178. package/wiki/Actions.md +2 -2
  179. package/wiki/Adapters.md +400 -0
  180. package/wiki/Admin-Dashboard.md +1 -1
  181. package/wiki/Agents.md +9 -9
  182. package/wiki/Auth.md +78 -2
  183. package/wiki/Building-Your-Own-Base.md +1 -1
  184. package/wiki/CLI-Reference.md +45 -14
  185. package/wiki/Caching-And-Invalidation.md +17 -5
  186. package/wiki/Compared.md +8 -2
  187. package/wiki/Configuration.md +14 -14
  188. package/wiki/Deployment.md +28 -1
  189. package/wiki/Entities-And-Migrations.md +47 -1
  190. package/wiki/FAQ.md +8 -2
  191. package/wiki/Feature-Flags.md +1 -1
  192. package/wiki/Home.md +3 -2
  193. package/wiki/Jobs-And-Workflows.md +107 -6
  194. package/wiki/Known-Gaps.md +4 -3
  195. package/wiki/MCP-And-AI.md +18 -4
  196. package/wiki/Mail.md +14 -5
  197. package/wiki/Migrations-And-Backfills.md +29 -4
  198. package/wiki/Money.md +2 -0
  199. package/wiki/N-Plus-One-Detection.md +24 -22
  200. package/wiki/Notify.md +28 -4
  201. package/wiki/Observability.md +121 -15
  202. package/wiki/Queries-And-Live-Queries.md +2 -2
  203. package/wiki/Realtime.md +9 -4
  204. package/wiki/Routes-And-Render-Modes.md +5 -0
  205. package/wiki/Scraping.md +57 -11
  206. package/wiki/Shapes.md +2 -2
  207. package/wiki/Stability.md +7 -5
  208. package/wiki/Storage-And-Uploads.md +56 -4
  209. package/wiki/Testing.md +65 -52
  210. package/wiki/Troubleshooting.md +1 -1
  211. package/wiki/Tutorial-01-First-App.md +1 -1
  212. package/wiki/Tutorial-04-Jobs-And-Realtime.md +1 -1
  213. package/wiki/Tutorial-05-Deploy-Free.md +1 -1
  214. package/wiki/Tutorial-06-Growing-Up.md +8 -8
  215. package/wiki/Upgrading.md +136 -5
package/wiki/Testing.md CHANGED
@@ -619,7 +619,8 @@ A `compensates: true` job is also forced to fail for good and killed while it un
619
619
  `echoProvider()` answers text; it cannot call a tool. A test that drives an `agent()` through its tools scripts the model with `scriptedProvider({ turns })`: each provider call answers the next turn, and `.seen` keeps every request in order.
620
620
 
621
621
  ```ts
622
- import { configureAi, meteredRun, providerGateway, scriptedProvider } from '@ultimat3/ai';
622
+ import { meteredRun, providerGateway, scriptedProvider } from '@ultimat3/ai';
623
+ import { installAiGateway } from '@ultimat3/ai/adapter';
623
624
 
624
625
  declare const draft: { id: string; orgId: string };
625
626
  declare function reviewDraft(input: { postId: string; orgId: string }): Promise<unknown>;
@@ -631,7 +632,7 @@ const model = scriptedProvider({
631
632
  { answer: { verdict: 'revise', notes: 'Say which rounding rule the body defends.' } },
632
633
  ],
633
634
  });
634
- configureAi({ gateway: providerGateway({ providers: [model] }) });
635
+ const release = installAiGateway(providerGateway({ providers: [model] })); // release() in the afterEach
635
636
 
636
637
  // The agent's turns and its tool's model call, as one bill: three calls.
637
638
  const { billed } = await meteredRun(() => reviewDraft({ postId: draft.id, orgId: draft.orgId }));
@@ -747,7 +748,7 @@ empty `users` are `X_INVARIANT`.
747
748
 
748
749
  ## Log lines under test
749
750
 
750
- | `LOG_LEVEL` | The terminal shows | A `setLogSink` a test installs receives |
751
+ | `LOG_LEVEL` | The terminal shows | A sink a test installs with `installLogSink` receives |
751
752
  |---|---|---|
752
753
  | unset | nothing | `info` and above |
753
754
  | `info` · `debug` · `trace` | that level and above | that level and above |
@@ -759,7 +760,7 @@ terminal and never the logger, so a test asserting on an `info` audit line passe
759
760
 
760
761
  ## An N+1 fails the test it happened in
761
762
 
762
- `x dev` warns about a query loop; CI is where nobody is watching. Destructuring `statements` installs the same detector in **throw** mode for the length of one test:
763
+ `x dev` warns about a query loop; CI is where nobody is watching. Destructuring `statements` installs the same detector in **strict** mode for the length of one test:
763
764
 
764
765
  ```ts
765
766
  test('the feed reads its authors once', async ({ statements }) => {
@@ -770,7 +771,7 @@ test('the feed reads its authors once', async ({ statements }) => {
770
771
  });
771
772
  ```
772
773
 
773
- The loop's fifth statement is what rejects, so the failing line is the loop's own — not a summary at teardown. Opting in is naming the fixture: there is no `strict: true` to remember and no switch left on for the next file.
774
+ The loop runs to its end and the verdict is raised when the fixture is disposed — the bus never lets an observer fail the read it observes — naming the shape and its count; `statements.verdicts()` reads it earlier. Opting in is naming the fixture: there is no `strict: true` to remember and no switch left on for the next file.
774
775
 
775
776
  | What | Rule |
776
777
  |---|---|
@@ -789,64 +790,73 @@ await expectedQueryLoop('one indexed lookup per searchable field', () => searchE
789
790
 
790
791
  ## Factories
791
792
 
792
- One row shape per entity, deterministic, with named variations. `defineFactory` is the only entry point — there is no bare `factory()`.
793
+ One row shape per entity, deterministic, with named variations, FactoryBot-grade (`As of 31.0.0`). `defineFactory` is the only entry point — there is no bare `factory()`.
793
794
 
794
795
  ```ts
795
- import { associate, defineFactory } from '@ultimat3/testing';
796
- import { boolean, entity, integer, text, uuid } from '@ultimat3/entity';
796
+ import { belongsTo, defineFactory, hasMany } from '@ultimat3/testing';
797
+ import { entity, text, timestamp, uuid } from '@ultimat3/entity';
797
798
 
798
- const org = entity('orgs', { columns: { id: uuid().primaryKey(), name: text() } });
799
- const post = entity('posts', {
799
+ const orgs = entity('orgs', {
800
+ columns: { id: uuid().primaryKey(), slug: text(), name: text() },
801
+ });
802
+ const posts = entity('posts', {
800
803
  columns: {
801
804
  id: uuid().primaryKey(),
802
- orgId: uuid().references(() => org.id).tenant(), // the column `associations` fills
805
+ orgId: uuid().references(() => orgs.id).tenant(),
806
+ slug: text(),
803
807
  title: text(),
804
- published: boolean().default(false),
805
- views: integer().default(0),
808
+ status: text().default('draft'),
809
+ publishedAt: timestamp().nullable(),
806
810
  },
807
811
  });
808
-
809
- const orgFactory = defineFactory(org, {
810
- defaults: (index, ids) => ({ id: ids.uuid(), name: `org-${index}` }),
812
+ const comments = entity('comments', {
813
+ columns: {
814
+ id: uuid().primaryKey(),
815
+ orgId: uuid().references(() => orgs.id).tenant(),
816
+ postId: uuid().references(() => posts.id),
817
+ body: text(),
818
+ },
811
819
  });
812
820
 
813
- const postFactory = defineFactory(post, {
814
- // `defaults` names every column; `associations` replaces `orgId` with the parent's id.
815
- defaults: (index, ids) => ({
816
- id: ids.uuid(),
817
- orgId: '',
818
- title: `post-${index}`,
819
- published: false,
820
- views: 0,
821
- }),
822
- traits: {
823
- published: { published: true },
824
- popular: (index) => ({ views: index * 100 }),
821
+ const orgFactory = defineFactory(orgs, {
822
+ defaults: (n, ids) => ({ id: ids.uuid(), slug: `org-${n}`, name: `Org ${n}` }),
823
+ });
824
+ const postBase = defineFactory(posts, {
825
+ defaults: (n, ids) => ({ id: ids.uuid(), orgId: '', slug: `post-${n}`, title: `Post ${n}` }),
826
+ traits: { published: { status: 'published', publishedAt: new Date('2026-01-05T09:00:00Z') } },
827
+ transient: { shout: false },
828
+ belongsTo: { org: belongsTo(orgFactory, 'orgId') },
829
+ afterBuild: (post, { transient }) => {
830
+ if (transient.shout) post.title = post.title.toUpperCase();
825
831
  },
826
- associations: { orgId: associate(orgFactory, (row) => row.id) },
827
832
  });
833
+ const commentFactory = defineFactory(comments, {
834
+ defaults: (n, ids) => ({ id: ids.uuid(), orgId: '', postId: '', body: `Comment ${n}` }),
835
+ belongsTo: { post: belongsTo(postBase, 'postId') },
836
+ });
837
+ const postFactory = postBase.extend({ hasMany: { comments: hasMany(commentFactory, 'postId') } });
838
+
839
+ postFactory.build(); // memory: org built alongside, nothing written
840
+ const post = await postFactory.with('published').create({ comments: 2 }); // the STORED row
841
+ const org = await orgFactory.create();
842
+ await postFactory.createList(3, { org }); // reuses that org, makes none
843
+ postFactory.attributesFor(); // an action input: no id, no orgId
828
844
  ```
829
845
 
830
- | Member | Does |
846
+ | | |
831
847
  |---|---|
832
- | `build(over?)` | an in-memory row. Pure — no database, no persister |
833
- | `buildMany(count, over?)` | the same, `count` times |
834
- | `create(over?)` | builds, creates its association parents, then persists. Returns the row |
835
- | `createMany(count, over?)` | the same, `count` times |
836
- | `with(...traits)` | a view with those traits applied |
837
- | `traits` | the declared trait names, sorted |
838
- | `table` | the entity's table |
839
- | `reset()` | restarts the sequence and both generators, and **cascades to every association** |
840
-
841
- ### Traits
842
-
843
- A trait is a `Partial<Row>` or a `(index, ids) => Partial<Row>`. Merge order is: defaults, then traits in the order applied, then the call's own `over` — last wins.
844
-
845
- A view from `with()` **shares the base sequence**, so ids never repeat across views of one factory. An unknown trait throws `X_TEST_FACTORY_TRAIT_UNKNOWN` **at the `with()` call**, not three calls later, and `cause` lists every declared trait — a typo and a trait nobody added have the same symptom, and the list is what separates them.
846
-
847
- ### Associations
848
-
849
- A column whose value comes from another factory, built with the **same strategy**: `build()` builds the parent, `create()` creates it. Parents are created **sequentially, never `Promise.all`** — concurrent parents would interleave draws from the shared seeded generators and the ids would stop being reproducible. An association is skipped entirely when the caller supplies that column.
848
+ | **strategies** | `build` (memory, never a database), `create` (writes, answers the row AS STORED: declared defaults, generated columns, timestamps), `attributesFor` (an input: no primary key, no `belongsTo` key, no transient), `buildList` / `createList` |
849
+ | **sequence** | `index` (`n` above), per factory, shared by every `with()` view and `extend()` child — ids never repeat |
850
+ | **trait** | a named partial (or `(n, ids, transient) => partial`). `with('a', 'b')` composes left to right; a call's override wins. An undeclared one fails at `with()` (`X_TEST_FACTORY_TRAIT_UNKNOWN`), and `cause` lists every declared trait |
851
+ | **transient** | declared defaults a call may override; read by `defaults`, traits and callbacks; never written |
852
+ | **callbacks** | `afterBuild(row, ctx)` on both strategies before any write; `afterCreate(storedRow, ctx)` after the row and its children are stored |
853
+ | **inheritance** | `factory.extend({ defaults, traits, transient, hasMany, afterBuild, afterCreate })` — same table, same sequence, its defaults over the parent's, callbacks chained after |
854
+ | **`belongsTo`** | the parent made with the child's strategy; `{ org: row }` reuses a row; `{ orgId }` makes none. The `defaults` must name the key, so a key that is not a column does not compile. Parents are made **sequentially, never `Promise.all`**: concurrent parents would interleave draws from the seeded generators |
855
+ | **`hasMany`** | `{ comments: 2 }` or `{ comments: [{ body: 'a' }, {}] }`: made after the parent, key set from the stored parent; on the answer as a non-enumerable `post.comments`, so the row itself `toEqual`s a read of the table |
856
+ | **tenant** | the tenant column follows the parent; the tenant's own association resolves first, so a comment, its post and its post's org share one org |
857
+ | **seeded per table** | the default seed is derived from the table name, so two tables never draw the same uuid |
858
+ | **lint** | `await assertFactoriesValid({ orgFactory, postFactory, … })` (or `lintFactories`, which answers the findings): every factory and each trait alone, built and created against its entity on a throwaway driver; one `X_TEST_FACTORY_INVALID` naming each `factory.with('trait').strategy()` and the entity's own code |
859
+ | **seeds** | `factorySeed('demo', async ({ id }) => { await postFactory.create({ org: await orgFactory.create({ id: id('org:acme') }) }) })` is a `Seed` (`x db seed demo`, or `.run({ driver })`): every sequence restarts, every write is the seed's idempotent insert — a replay writes nothing |
850
860
 
851
861
  ### Determinism
852
862
 
@@ -858,14 +868,17 @@ A column whose value comes from another factory, built with the **same strategy*
858
868
 
859
869
  ### Persisting
860
870
 
861
- `create()` needs a persister; there is one seam and it is process-global.
871
+ `create()` writes through the entity's own repository on `defaultDriver()` — no setup for an app on the default driver. An app that names its own driver installs it once, in its test preload:
862
872
 
863
873
  ```ts
864
874
  // scripts/test-setup.ts
865
- usePersister({ insert: (table, row) => repoFor(table).insert(row) });
875
+ import { entityPersister, usePersister } from '@ultimat3/testing';
876
+ import { driver } from '@app/db';
877
+
878
+ usePersister(entityPersister({ driver })); // or { client }
866
879
  ```
867
880
 
868
- Without one, `create()` throws `X_TEST_FACTORY_NOT_PERSISTED` — which means **nothing was attempted**, distinct from an insert that failed. `build()` needs no persister. `clearPersister()` and `persisterInstalled()` round out the seam.
881
+ `build()` needs no persister. `clearPersister()` and `persisterInstalled()` round out the seam.
869
882
 
870
883
  ### A whole graph: `seedGraph`
871
884
 
@@ -930,7 +943,7 @@ describe(testName('unit', 'publishPost'), () => {
930
943
 
931
944
  `behavesLike` wraps the body in `describe('behaves like <name>')`, so a failure reads `publishPost > behaves like an authenticated action > denies an anonymous actor` — the subject and the contract both named. Because it calls `describe`, it belongs at declaration scope and never inside a test body. The body runs once per `behavesLike` call.
932
945
 
933
- Two contracts ship as shared examples, for the ports an app may implement itself: `behavesLike(jobDriverConformance, () => myDriver)` holds a custom `JobDriver` to claim / ack / nack, the claim fence, lease expiry and the burial of a row whose lease lapsed on its final attempt (`onExhausted`, `dropExhausted`); `behavesLike(budgetStoreConformance, () => myStore)` races 24 concurrent `take`s on one key against an `@ultimat3/ai` `BudgetStore`. The memory and Postgres job drivers and `memoryBudgetStore()` run the same suites in `@ultimat3/testing`'s own tests.
946
+ Every adapter port's contract ships as shared examples on `@ultimat3/testing/conformance` — never `.` (31.0.0, Upgrading #46), one suite per `ADAPTER_PORTS` row, named as its `conformance` field: `behavesLike(jobDriverConformance, () => myDriver)` holds a custom `JobDriver` to claim / ack / nack, the claim fence, lease expiry and the burial of a row whose lease lapsed on its final attempt (`onExhausted`, `dropExhausted`); `behavesLike(budgetStoreConformance, () => myStore)` races 24 concurrent `take`s on one key against an `@ultimat3/ai` `BudgetStore`. Every suite and its subject: [the README's table](https://github.com/developerz-ai/ultimate/blob/main/packages/testing/README.md#conformance-a-ports-contract); per port, with the reference to copy: [Adapters](Adapters).
934
947
 
935
948
  ## Generated scaffolds
936
949
 
@@ -23,7 +23,7 @@ The `--json` form is the same content as the terminal form. Paste the JSON into
23
23
  | Symptom | Likely cause | Fix |
24
24
  |---|---|---|
25
25
  | Process exits in ~40ms, `X_ENV_MISSING` | a key in the `defineEnv` schema is missing, or present but fails its schema (short secret, non-URL, bad enum) | the cause names every offending key and its constraint at once; `x doctor --json` lists them too |
26
- | `X_CONFIG_INVALID` at load | `app.config.ts` field invalid — `defaultLocale` not in `locales`, `db.pool < 1`, non-IANA `timeZone`, `realtime.transport` set without `realtime.urlEnv` | `x config show --json`, then edit the field named in `cause` |
26
+ | `X_CONFIG_INVALID` at load | `app.config.ts` field invalid — `defaultLocale` not in `locales`, `db.pool < 1`, non-IANA `timeZone`, a removed key such as `realtime.transport` | `x config show --json`, then edit the field named in `cause` |
27
27
  | `X_ROLE_INVALID` | `ROLE` is not one of `web sync worker scheduler migrate replicator all` | fix the env var on that service |
28
28
  | `X_BUN_VERSION` | below the Bun floor, `>= 1.4.4` (`engines.bun`) | `bun upgrade` |
29
29
  | Container starts then loops | `/readyz` failing, not `/healthz` — a registered check answers `failing`, and which one is in the body | `curl /readyz` **from the container itself** (`docker exec`, `kubectl exec`, a port-forward — the detail goes to `healthDetailPeers`, default `['loopback']`) and read `checks`, a map of name → `ok`/`failing`: `database` is registered always, `transport` whenever it can report a connection, so a disconnected NATS node fails on that one. Read `registered` with it: `0` means nothing was checked, so the 200 meant only that the socket was bound |
@@ -163,7 +163,7 @@ bunx x dev --once --port 3100
163
163
  ```text
164
164
  {"ts":"2026-11-03T16:48:57.124Z","level":"info","msg":"ultimate web listening on http://localhost:3100"}
165
165
  {"ts":"2026-11-03T16:48:57.118Z","level":"info","msg":"sync node ready","buildId":"e6af64a2077e5d60","path":"/_x/sync"}
166
- {"ts":"2026-11-03T16:48:57.134Z","level":"info","msg":"jobs.worker.started","workerId":"worker-01a1a250-…","queues":["myapp-default","default"]}
166
+ {"ts":"2026-11-03T16:48:57.134Z","level":"info","msg":"jobs.worker.started","workerId":"worker-01a1a250-…","queues":["default"]}
167
167
  {"ts":"2026-11-03T16:48:57.137Z","level":"info","msg":"jobs.scheduler.started","tasks":1}
168
168
  {"ts":"2026-11-03T16:48:57.142Z","level":"info","msg":"live feed in-process","detail":"the embedded database has no walsender; repository writes in this process reach subscribers"}
169
169
  roles web, sync, worker, scheduler
@@ -86,7 +86,7 @@ export const dailyDigest = task({
86
86
 
87
87
  ### Registration names it
88
88
 
89
- Export names become primitive names, and only `defineApi` (or `registerTasks`) stamps them. A task no `defineApi` lists keeps a positional name (`anonymous-task-1`, enqueuing `anonymous-job-2`); `x verify`'s `manifest` step refuses that job as `X_JOB_UNREGISTERED`. With the generator's edit to `apps/web/api/index.ts` in place:
89
+ Export names become primitive names, and only `defineApi` stamps them. A task no `defineApi` lists keeps a positional name (`anonymous-task-1`, enqueuing `anonymous-job-2`); `x verify`'s `manifest` step refuses that job as `X_JOB_UNREGISTERED`. With the generator's edit to `apps/web/api/index.ts` in place:
90
90
 
91
91
  ```bash
92
92
  bunx x tasks list
@@ -221,7 +221,7 @@ Scaling the two serving roles is the next rung, and it is not an edit to this fi
221
221
  | `/metrics` on the **app** port | `X_ROUTE_NOT_FOUND`, and that is deliberate. Every role — `web` included — serves `/metrics` on `METRICS_PORT`, default **9090**, because the Helm ingress routes `/` with no path exclusion and metrics on 3000 would be public. Scrape `http://<host>:9090/metrics`, not `:3000/metrics` |
222
222
  | `x logs tail` | planned — `X_NOT_IMPLEMENTED`, with `x dev` → the `/_x` timeline panel as its fix |
223
223
  | `x status` | planned — `x doctor --json` is the shipped answer |
224
- | OTLP export, on by default | the exporter **ships** — `otlpSpanExporter()` / `otlpMetricExporter()`, OTLP/HTTP JSON — but the default is still the no-op, so nothing leaves the process until you register one: `configureTelemetry({ exporter: otlpSpanExporter() })` with `OTEL_EXPORTER_OTLP_ENDPOINT` set to a collector's HTTP receiver (`:4318` — `:4317` is gRPC and is refused) |
224
+ | OTLP export, on by default | on when **configured**: the production boot (`apps/web/server.ts`, every `ROLE`) wires traces, metrics and logs (OTLP/HTTP JSON) from `OTEL_EXPORTER_OTLP_ENDPOINT` set to a collector's HTTP receiver (`:4318` — `:4317` is gRPC and is refused). Unset, nothing leaves the process; there is no code to write |
225
225
  | a Helm chart in your app | **`x new` writes one** `As of 2026-11-03` — `docker/helm`, 10 files — so `x deploy --method helm` works here. On 3.0.0 and below it writes none: copy [`docker/helm`](https://github.com/developerz-ai/ultimate/tree/main/docker/helm) from the framework repo, or stay on `--method compose` |
226
226
 
227
227
  ## Next
@@ -24,7 +24,7 @@ Skipping a rung to look serious buys a second product to maintain. A Kubernetes
24
24
  |---|---|
25
25
  | `DATABASE_URL`, `REDIS_URL`, `NATS_URL`, `S3_ENDPOINT` | any file under `apps/` or `packages/` |
26
26
  | `ROLE` — which process this container is | the eight primitives, their shapes, their authz |
27
- | driver constructors at boot (`setJobDriver`, `setDbClient`, `configureTelemetry`) | call sites: `db()`, `ctx.jobs.enqueue()`, `query()`, `live()` |
27
+ | driver constructors at boot (`apps/<app>/runtime.ts`, `setDbClient`, `configureTelemetry`) | call sites: `db()`, `ctx.jobs.enqueue()`, `query()`, `live()` |
28
28
  | replica counts, HPA targets | the manifest, the OpenAPI, the typed client, the MCP tools |
29
29
  | `app.config.ts` declarations | migrations already applied |
30
30
 
@@ -95,27 +95,27 @@ Per-role HPAs target `rps`, `connections` and `queue_demand` — CPU is a laggin
95
95
  | custom Kubernetes over a managed chart | node pools with real taints, affinity to node-local storage, an ingress you control | wanting the chart to look impressive |
96
96
  | distributed SQL over one Postgres | multi-region **write** locality; surviving a zone loss with no manual failover | write throughput one Postgres has not actually failed to deliver |
97
97
 
98
- Observability is the part that is not optional here, and the framework's half is done `As of 2026-08` — but **the default exporter is still the no-op**, so it emits nothing until you say so. Two lines at boot:
98
+ Observability is the part that is not optional here, and the framework's half is done `As of 2026-11`: there is no code to write. The production boot (`apps/web/server.ts`, every `ROLE`) reads the variables the OpenTelemetry SDKs read and wires all three signals — traces, metrics and **logs** — from them at boot:
99
99
 
100
- ```ts
101
- configureTelemetry({ exporter: otlpSpanExporter() }); // OTEL_EXPORTER_OTLP_ENDPOINT
102
- configureMetrics({ exporter: otlpMetricExporter() }); // same endpoint, metrics signal
100
+ ```sh
101
+ OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318 # all three signals
102
+ OTEL_LOGS_EXPORTER=none # optional: one signal off
103
103
  ```
104
104
 
105
- Point `OTEL_EXPORTER_OTLP_ENDPOINT` at your collector's **HTTP** receiver, `:4318` — `:4317` is gRPC and is refused with `X_OTLP_PROTOCOL_UNSUPPORTED`, permanently, because HTTP/2 plus protobuf is a dependency and a second wire format. Metrics also stay scrapeable at `METRICS_PORT` if you prefer an agent. [`docs/ops/03-observability.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/03-observability.md) says what to scrape, what to alert on, and what is still missing — no logs signal, and a rejected export is dropped rather than retried.
105
+ Point it at your collector's **HTTP** receiver, `:4318` — `:4317` is gRPC and is refused with `X_OTLP_PROTOCOL_UNSUPPORTED`, permanently, because HTTP/2 plus protobuf is a dependency and a second wire format. A credential goes in `OTEL_EXPORTER_OTLP_HEADERS`, never in the URL (`X_OTLP_ENDPOINT_INVALID`). `OTEL_SDK_DISABLED=true` turns all three off. Metrics also stay scrapeable at `METRICS_PORT` if you prefer an agent. [`docs/ops/03-observability.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/03-observability.md) says what to scrape and what to alert on; anything else that wants the stream subscribes to it — `subscribe('span.end', …)`, `subscribe('log.record', …)` ([Observability](Observability)).
106
106
 
107
107
  ## The seams, so nothing surprises you
108
108
 
109
109
  | Concern | Interface | Decided by |
110
110
  |---|---|---|
111
111
  | rows | `@ultimat3/db` · `DbClient` | `DATABASE_URL` — unset is PGlite, and PGlite is `x dev` only |
112
- | job queue | `@ultimat3/jobs` · `JobDriver` | `setJobDriver(postgresJobDriver({ executor }))` — there is no `jobs.driver` config line, and 5.0.0 deleted the one that never worked. Redis is an interface-complete stub that throws `X_NOT_IMPLEMENTED`; there is no NATS job driver since 25.0.0 |
112
+ | job queue | `@ultimat3/jobs` · `JobDriver` | `postgresJobDriver()`, installed by the boot; another is `jobs:` in `apps/<app>/runtime.ts` — there is no `jobs.driver` config line, and 5.0.0 deleted the one that never worked. Redis is an interface-complete stub that throws `X_NOT_IMPLEMENTED`; there is no NATS job driver since 25.0.0 |
113
113
  | realtime fanout | `@ultimat3/realtime` · `Transport` | `NATS_URL` |
114
114
  | change feed | `@ultimat3/realtime` · `ChangeFeed` | `REPLICATION_*` |
115
115
  | cache | `@ultimat3/cache` · `CacheTier` | `cache.tiers` + `REDIS_URL` |
116
116
  | object storage | `@ultimat3/storage` · `Driver` | `S3_ENDPOINT` |
117
117
  | mail | `@ultimat3/mail` · `Driver` | mail env |
118
- | tracing | `@ultimat3/core` · `SpanExporter` | `configureTelemetry()` — default no-op |
118
+ | tracing | `@ultimat3/core` · `SpanExporter`, a `span.end` subscriber | `OTEL_EXPORTER_OTLP_ENDPOINT` — unset exports nothing |
119
119
 
120
120
  Every one keys on env or a boot-time constructor. One image resolves `x dev`, a Compose host and a cluster identically.
121
121
 
package/wiki/Upgrading.md CHANGED
@@ -2,12 +2,13 @@
2
2
 
3
3
  **`As of 2026-08`. Semver applies from here.** A breaking change to a documented API needs a major. Every `@ultimat3/*` package moves in lockstep — never mix versions. `x new` declares them at `^<version>`, so `bun update` takes a same-major fix before the first hop; `x upgrade` rewrites every pin it moves exact (`20.1.0`, no caret), on purpose — a caret is how `^19.0.0` beside `^19.4.0` came to be mixed, and a range is a silent upgrade. `bun.lock` pins the exact build either way.
4
4
 
5
- > **From v30, one major per 90 days.** The window, what semver covers, the support window and the security exception: [Stability](Stability). A removal now ships its `@deprecated` alias for at least one minor before a major takes it, so `x upgrade` across one major names no edit a minor did not already warn about. The 29 sections below stay as they are.
5
+ > **From v31, one major per 90 days.** The window, what semver covers, the support window and the security exception: [Stability](Stability). A removal now ships its `@deprecated` alias for at least one minor before a major takes it, so `x upgrade` across one major names no edit a minor did not already warn about. The 30 sections below stay as they are.
6
6
 
7
- **Twenty-nine majors have shipped, and this page walks all twenty-nine** — 2.0.0's 33 entries joined it `As of 2026-08`, and `scripts/changelog-check.ts` now refuses a summary row whose section the page does not carry, which is how they were missing for six releases. [`CHANGELOG.md`](https://github.com/developerz-ai/ultimate/blob/main/CHANGELOG.md) is the source for the majors it still carries, and `git show v<tag>:CHANGELOG.md` for the ones it has archived; none ships a codemod, so every entry is a manual edit the entry itself names. **One section per major**, newest first — read the ones between your pin and your target, oldest first.
7
+ **Thirty majors have shipped since 1.0.0, and this page walks all thirty** — 2.0.0's 33 entries joined it `As of 2026-08`, and `scripts/changelog-check.ts` now refuses a summary row whose section the page does not carry, which is how they were missing for six releases. [`CHANGELOG.md`](https://github.com/developerz-ai/ultimate/blob/main/CHANGELOG.md) is the source for the majors it still carries, and `git show v<tag>:CHANGELOG.md` for the ones it has archived; none ships a codemod, so every entry is a manual edit the entry itself names. **One section per major**, newest first — read the ones between your pin and your target, oldest first.
8
8
 
9
9
  | From → to | Breaking entries | Read |
10
10
  |---|---|---|
11
+ | 30.x → 31.0.0 | **74** — plan 101 final hardening: an `AuthServerStore` with a required `getCode` and a `pollDevice` that takes the client; a drain that abandoned work exits 70; validation issues capped at 100 and causes at 4 KiB; storage keys, header values and revision-pinned reads; one policy gate for action and query; a paged read capped at 500 rows over the wire; a `PreferenceStore` asked once per 500 recipients; remote MCP tools not re-exposed unless opted in; **a `(tenant, pk)` index on every tenant table that needs one `x db gen`**; an `IsrStore` that may answer with a promise; `localhost` no longer admitted by a wildcard `allowHosts`; span exporters installed by subscribing to `span.end` on the one instrumentation bus; an app's own Sentry transport replacing the `SENTRY_DSN` one, local sinks marked; `jobs.queues` defaulting to `['default']`; OpenTelemetry's stable http, messaging and gen_ai span attributes; a `defineStorage` disk that reports on the bus; OTLP logs and the semconv histograms on every boot; db, entity, policy and cache observer slots replaced by bus events; a database span for every statement in production; a bus installed from `runtime.ts`, never a realtime setter; one `ADAPTER_PORTS` table and core installers on `@ultimat3/core/adapter`; a `SecretSource` port for the master key; `realtime.transport`/`urlEnv` removed from `app.config.ts`; job, event-bus, mail, idempotency, meter and notify installers on each package's `./adapter`, swapped from `runtime.ts`; the rate-limit store, auth limiters, TOTP guard and scrape driver installed the same way, `httpServer` taking no store; one core clock for scraping and flags; admin audit sinks typed by core's `AuditSink`; the AI gateway installed only as `aiGateway`, never through `configureAi`; factories with `belongsTo`/`hasMany`, `buildList`/`createList` and a `create()` that answers the stored row; `runtime.syncAuthenticate` removed, every port a `runtime.ts` field and `<app>/packages/db/factories.ts` linted on `unit`; the audit sink, error reporter and KDF gate installed on `./adapter`, `runtime.storage` a `StorageDriver` and the last four ports `runtime.ts` fields; port suites on `@ultimat3/testing/conformance` only; a malformed uuid refused before the statement; a push subscription that always names its person; no memory delivery ledger outside development; the embedder and semantic cache as `runtime.ts` ports, `configureAi` keeping `redact` only; metric exporters subscribing to `metric.export` on the bus; sign-in routes at `/auth/sso/:provider` for OAuth and SAML alike; the raw-CDP launcher imported from `@ultimat3/scraping/cdp` only; no framework mails — an app declares its own; `noopMetricExporter` deleted; `AuditPrimitive` gaining `'job'` for GDPR erases; the storage quarantine flow replaced by the scanner's `hold` verdict; one retry shape, core's `RetryPolicy`, for the AI gateway, realtime redials and job `jitter`; `setLogSink` replaced by `installLogSink`, which answers its release; realtime's `Row` renamed `LiveRow`; `Surface` and `SURFACES` imported from `@ultimat3/core` only; a `SearchIndex` with a required `list` and a `reindex()` that sweeps what the table lost; `defineApi` the one way to register actions and queries; `x g app`/`package` refusing slice flags; a searchable row's version strictly increasing, advanced by a custom store in its own write; a targeted upload grant refused while a scanner is installed; a write-path search document replacing a tombstone; an instant in a key spelled ISO 8601; every package's `.` barrel cut to the app API, ports on `./adapter` | [the `31.0.0` section](#30x--3100-entry-by-entry), in order |
11
12
  | 29.x → 30.0.0 | **143** — plan 101 (ten waves), issues #990–#999 and two find-and-fix sweeps: a write past its deadline that rolls back, a closed-transaction refusal, a two-release column drop, **same-tenant composite keys that need one `x db gen`**, `upsertAll` overwriting only what it names, every agent and MCP call held by `mcpConfirmations`, `'null'` refused in `cors.origins`, `isr` and `static` that render as nobody, a query-free `isr` key by default, a pool that refuses past `acquireTimeoutMs`, an upload grant bound to its declared size, mail that refuses an unresolved key, a problem document with `retry`, a worker retire on by default, required `StorageDriver`, `JobDriver` and `PoolProfile` members, a `budgets` step that builds before it weighs, no `bin/check` in a new app, `ui`'s Standard Schema copies removed, no vendor link on the default error page, the render brands at `@ultimat3/core/render-node` only, a required `enqueueMany` on every `JobHandle`, `JobsFacade` and `JobDriver`, an outbox relay that claims 500 rows a pass, `'browser'` in `ERROR_SOURCES`, `assets` and `clientErrors` on `AppConfig`, `pwa`'s `retentionPlan` and `retainBuildIds` removed, a `DefineEvalInput` union, `MCP_PROTOCOL_VERSION` deleted, an MCP revision decided per request with `2026-07-28` the newest, a cross-origin `POST /mcp` refused with `'origin-refused'` in `McpAuthRefusal`, `x mcp serve` answering only a loopback Host, a raw `WorkloadToken` payload, a role that refuses a half-loaded app, a query's own MCP tool wording, no `QueryPoll.ms`, an exercise refused outside `bun test`, an accessibility audit on every `e2eTest`, factory values read off each column's declaration, a memory transaction that holds every write inside it, a 21st gate step that runs every primitive with no test written, a finding for an untenanted child of a tenant-owned table, a memory transaction that refuses a write after it ended and runs nested effects at the root's commit, required `failureCapture` and `time` on `AppConfig`, an `x_failures` table in the schema dump, a description on every page `/llms.txt` lists, a required `TimeZoneConfig.detectedCookie`, an MCP resource read handed its caller, a required `DevCapabilities.queryGraph` and `DevSources.mailTemplates`, an exercise step that plans every statement and reds an unindexed read or a loop over rows, an `OpenGraph` that is a hosted `image` or a captured page and never both, a `postgresAuthAdapter()` that reads the ambient client per call, a `refetch()` that returns a promise, 48 more `UI_KEYS` in a module namespace, charts that draw `null` and negative values and refuse a series that does not match its keys, a two-mode `TabsProps`, a command palette that ranks, two more contrast pairs on `bg-soft`, every `mock.module` put back at its file boundary, a static export that writes image variants as files, `/assets` answering only the variants it declares, an island `mount` that must return its disposer, passkey storage on every `AuthAdapter`, a per-call rate limit split from the fixed one, a signed vote in `McpConfirmationStore.decide`, a meter in the manifest and its contract diff, a hand-rolled websocket refused, bad-token counting on every `PushDeviceStore`, exact history images on Postgres, a policy on every multipart part and completion, `LiveHandle.retry`, a Bearer-only CSRF exemption, no `enqueueInTx`, and an event id from `EventLookup.find` | [the `30.0.0` section](#29x--3000-entry-by-entry), in order |
12
13
  | 28.x → 29.0.0 | **2** — **Bun 1.4.4 as the floor**; a `WORKER_QUEUES` entry the app does not know refuses the worker's boot | [the `29.0.0` section](#28x--2900-entry-by-entry), in order |
13
14
  | 27.x → 28.0.0 | **2** — **Bun 1.4.3 as the floor**; `@ultimat3/ui/jsx-probe` and its `probe`/`unprobe` removed | [the `28.0.0` section](#27x--2800-entry-by-entry), in order |
@@ -43,7 +44,7 @@ An entry is a line `CHANGELOG.md` marks `BREAKING —`. The count is derived, ne
43
44
 
44
45
  ```sh
45
46
  grep -cE '^(- \*\*|### )BREAKING —' <(awk '/^## /{u = ($0 == "## [Unreleased]")} !u' CHANGELOG.md)
46
- # 560 As of 2026-11-07 — every RELEASED section, which is the sum of every row above whose section
47
+ # 634 As of 2026-11-10 — every RELEASED section, which is the sum of every row above whose section
47
48
  # the changelog still carries.
48
49
  ```
49
50
 
@@ -60,9 +61,139 @@ Each entry changes a surface the table below covers.
60
61
  | that the tarball is attested | `npm view @ultimat3/core dist.attestations` | a `provenance` object |
61
62
  | every name that must move together | `bun run scripts/release-workflow.ts --json` | the 30 derived names — check each |
62
63
 
64
+ ## 30.x → 31.0.0, entry by entry
65
+
66
+ `As of 2026-11-10`, released: the 74 breaking entries of `CHANGELOG.md`'s `## 31.0.0` section, in their order. No legacy path, no codemod, no shim. v31 is the stable line — the next major waits for its window ([Stability](Stability)).
67
+
68
+ ### The upgrade, top to bottom
69
+
70
+ | # | Do | What you see until you do | Entries |
71
+ |---|---|---|---|
72
+ | 1 | commit, then `bunx @ultimat3/cli@latest upgrade --json`: it pins every `@ultimat3/*`, installs and runs the gate | `X_UPGRADE_DIRTY_TREE` on a dirty tree | — |
73
+ | 2 | `x verify --only typecheck` and close every error: a hand-written `AuthServerStore` or `PreferenceStore`, an import of a removed Redis script or of `MAX_WIRE_ISSUES`, a hand-built `ActionDeniedError`/`QueryDeniedError`, a `set*` job/event-bus/mail/idempotency/meter/notify setter (a `runtime.ts` field), a factory's `associate()` or `buildMany`, a `setAuditSink`/`configureKdfGate`/`configureErrorReporting({ reporter })` call, a `runtime.storage` built with `defineStorage`, a `PushSubscriptionRecord` with `actorId: null`, a `configureAi({ embedder, semanticCache })` or `configureMetrics({ exporter })` call, an import of a framework mail or `noopMetricExporter`, an exhaustive `switch` over `AuditPrimitive` or `ScanVerdict`, `grantUpload({ quarantine })` or `releaseQuarantine`, an import of a name that left a package's `.` (entry 74's list), a gateway `retry` or realtime `backoff` in the old field names, a boolean job `retry.jitter`, a `setLogSink` call, realtime's `Row`, `Surface` from seo or `SURFACES` from render, a hand-written `SearchIndex` without `list`, a `registerActions`/`registerQuery` call | TS2741, TS2554, TS2305, TS2322 | 1, 6, 10, 14, 18, 29, 36, 40, 43–45, 48, 50, 51, 54–65, 67, 71, 72, 74 |
74
+ | 3 | `x verify --only unit,contract`: shorten a name over 63 bytes, write each `cors.origins` entry as its own `URL.origin`, rename an unsafe storage key or header value, switch a `fromDecimal` branch to `X_MONEY_NOT_DECIMAL`, read a truncated validation through `issuesTruncated`, pass `expose: true` to an `mcpTools()` whose tools your `/mcp` serves, name `localhost` exactly in an `allowHosts` that reaches it through `'*'`, compare a resolved disk by `.name`, advance the version in a custom store's `upsert`, drop `target` from a grant while a scanner is installed | `X_SQL_UNSAFE`, `X_CORS_CONFIG_INVALID` at boot, `X_STORAGE_PATH_UNSAFE`, `X_INVARIANT`, `X_MONEY_NOT_DECIMAL`, a remote tool missing from your `tools/list`, `X_SCRAPE_HOST_BLOCKED` for a `localhost` URL, `X_STORAGE_TARGET_UNSCANNED` | 2, 4, 7, 9, 11, 12, 19, 22, 27, 69, 70 |
75
+ | 4 | **before the deploy:** list stored objects whose keys the new rule refuses and copy them; cache a projection where a value passes 1 MiB; keep `redisTier`'s default `buildId` or plan the one-time bust; on `docker/helm`, move a pod that reads the metadata endpoint to a workload identity; name a Postgres `notifyStores.ledger` in `runtime.ts` if a notifier runs; add `/auth/sso/<provider>/callback` as a redirect URI at every OAuth IdP and point sign-in links at `/auth/sso/<provider>`; with objects still under `org/*/pending/quarantine/`, install an `uploadScanner` answering `hold` for them | a read of an old key refused; a cache miss logged `X_CACHE_TOO_LARGE`; stale tagged keys until their TTL; a metadata-endpoint timeout; `X_NOTIFY_STORE_MISSING` on the first notification | 5, 6, 11, 16, 49, 52, 57 |
76
+ | 5 | **after the deploy:** declare `maxPage` on a read a client pages past 500 rows (`X_INPUT_INVALID` until you do); treat exit `70` as "drained, work abandoned" in alerts; read rate-limit keys through `addressNetwork`; switch on `denial.surface === 'mcp'` for an MCP read; honour `{ etag }` in a hand-written storage driver; give the collector a logs pipeline or set `OTEL_LOGS_EXPORTER=none`; with an external search index, run each `reindex()` once with `x db backfill <name> --write --force --json` so its sweep drops what the table lost | nothing fails: an alert, a dashboard filter or an ETag answers differently | 3, 8, 13, 14, 17, 28, 30, 66, 73 |
77
+ | 6 | `x db gen "tenant indexes"`, commit `packages/db/migrations` and `packages/db/schema/`; the new index builds `concurrently`, so a hot table keeps taking writes | `X_DB_DRIFT` from `x verify --only drift` | 20 |
78
+
79
+ ### Entry by entry
80
+
81
+ Tier 0 — `@ultimat3/core` (3), (23), (25), (31), (33–35), (43), (51), (55), (61), `@ultimat3/core` with `@ultimat3/cli` (24), `@ultimat3/core` with `@ultimat3/scraping` (22), `@ultimat3/schema` with `@ultimat3/core` (4), `@ultimat3/core` with `@ultimat3/jobs` (56). Tier 1 — `@ultimat3/db` (2), (30), `@ultimat3/db` with `@ultimat3/entity`, `@ultimat3/policy` and `@ultimat3/cache` (29), `@ultimat3/cache` (5–6), `@ultimat3/money` (7), `@ultimat3/seo` (63), `@ultimat3/storage` (11–13), (27), (57), (70), `@ultimat3/flags` with `@ultimat3/scraping` (38). Tier 2 — `@ultimat3/auth` (1), (44), (52), `@ultimat3/http` (8–9), `@ultimat3/entity` (20), (47), (65), (69), (71–73), `@ultimat3/http` with `@ultimat3/jobs` and `@ultimat3/ai` (26), `@ultimat3/http` with `@ultimat3/auth` and `@ultimat3/scraping` (37). Tier 3 — `@ultimat3/action` (10), `@ultimat3/action` with `@ultimat3/query` (14), (67), `@ultimat3/realtime` (15), (32), (59), (62), `@ultimat3/query` (17), `@ultimat3/jobs` with `@ultimat3/action`, `@ultimat3/mail` and `@ultimat3/notify` (36), `@ultimat3/jobs` (60), (66). Tier 4 — `@ultimat3/notify` (18), `@ultimat3/mcp` (19), `@ultimat3/render` (21), (64), `@ultimat3/ai` (41), (50), (58), `@ultimat3/pwa` (48), `@ultimat3/notify` (49), `@ultimat3/mail` (54). Tier 5 — `@ultimat3/cli` (28), (42), (45), (68), `@ultimat3/admin` (39), `@ultimat3/testing` (40), (46), `@ultimat3/testing` with `@ultimat3/scraping` (53). The framework chart — `docker/helm` (16). Every package's barrel (74).
82
+
83
+ | # | Surface | Costs you an edit if |
84
+ |---|---|---|
85
+ | 1 | `AuthServerStore` (`@ultimat3/auth`) | you wrote your own store: TS2741, TS2554. Add `getCode(codeHash)` — the code row, used or not, spending nothing (`select … where code_hash = $1`) — and take `clientId` as `pollDevice`'s second argument, answering `null` and stamping nothing when the row's `clientId` differs. `memoryAuthServerStore()` and `postgresAuthServerStore()` already do |
86
+ | 2 | `identifier()` (`@ultimat3/db`) | you pass it a name over 63 bytes or holding a NUL: `X_SQL_UNSAFE` now, where Postgres truncated the name without an error (two long names sharing their first 63 bytes were one object). Shorten the name to the one the server already holds — `psql "$DATABASE_URL" -c "select relname from pg_class where relname like '<first 20 chars>%'"` — and pass that |
87
+ | 3 | the exit code after a drain (`@ultimat3/core`) | you alert on, or script around, a non-zero exit after SIGTERM: `installSignalHandlers({ exit: true })` now exits `70` (`DRAIN_TIMEOUT_EXIT_CODE`) when a hook or in-flight work was abandoned at the deadline (`X_SHUTDOWN_TIMEOUT`), where it exited `0`. The same 70 when the drain itself threw before its last phase, or a served role's own teardown (`apps/<app>/server.ts`, through `runRole`) overran its budget. A clean drain still exits `0`. Raise the budget — `drain: { deadlineMs: 600_000 }` in `app.config.ts` — or treat `70` as "drained, work abandoned"; `drainExitCode()` answers the same number for your own exit |
88
+ | 4 | validation issues and error causes are bounded (`@ultimat3/schema`, `@ultimat3/core`) | you read more than 100 entries off a failed validation, or a `cause` past 4 KiB: `validate`/`parse`/`safeParse` stop at `MAX_ISSUES` (100) and set `issuesTruncated: true`, and every `UltimateError`/`SchemaError` cause is cut at `MAX_CAUSE_LENGTH` (4096) with `... (N more characters)`. Pass `validate(schema, value, { maxIssues: 1000 })` for a longer list; read the structured `meta`/`issues`, never a parsed `cause` |
89
+ | 5 | `redisTier()` (`@ultimat3/cache`) | you cache a value whose encoded form is over 1 MiB in the shared tier: its `set` is now `X_CACHE_TOO_LARGE` (recorded by `bestEffort`, read as a miss), where Redis took it. Cache a projection, or raise the cap where the tier is built — `redisTier({ maxValueBytes: 4_194_304 })` |
90
+ | 6 | `REDIS_INVALIDATE_SCRIPT`, `REDIS_TAG_MEMBER_SCRIPT` (`@ultimat3/cache`) | you imported either: both are gone — tag buckets are sorted sets (`t2:`/`e2:`) read with plain paged commands, and the one script left is internal. Delete the import. With `redisTier({ buildId: null })`, a v30 and a v31 pod mid-deploy do not see each other's buckets, so a bust on one misses keys the other wrote until their TTL: deploy with the default `buildId`, or run `redis-cli -u "$REDIS_URL" --scan --pattern '<prefix>:c:*' \| xargs -r redis-cli -u "$REDIS_URL" UNLINK` once the rollout completes |
91
+ | 7 | `fromDecimal()` (`@ultimat3/money`) | you match on the code of a parse failure: a string that is not a plain decimal (`'1,299.00'`, `'1e3'`) — and now a non-string (`12.99`, `null`, `undefined`), which was a bare `TypeError` — is `X_MONEY_NOT_DECIMAL` (HTTP 422), where it was `X_MONEY_NOT_INTEGER`. `grep -rn X_MONEY_NOT_INTEGER src/` and switch the branches that guard a `fromDecimal` parse; excess precision and fractional minors keep `X_MONEY_NOT_INTEGER` |
92
+ | 8 | anonymous rate-limit keys (`@ultimat3/http`) | you read, seed or alert on an `ip:` key, or count on two IPv6 addresses having two allowances: an anonymous caller's key, and the failed-credential `unauthenticated\|ip:` key, is now its `/64` — `@ultimat3/core`'s `addressNetwork(ip)`: IPv4 whole, an IPv4-mapped IPv6 its IPv4, any other IPv6 `<first four hextets>::/64`. A deploy starts every IPv6 bucket full once. Read keys through `addressNetwork`; a dashboard filtering `ip:2001:db8::1` filters `ip:2001:db8:0:0::/64` |
93
+ | 9 | `cors.origins` (`@ultimat3/http`) | an entry is not its own `URL.origin` — a trailing slash, a capital, the scheme's default port, no scheme: `X_CORS_CONFIG_INVALID` at boot, where it was accepted and matched nothing. Write the form the `fix:` names: `configureHttp({ cors: { origins: ['https://app.com'] } })` |
94
+ | 10 | `MAX_WIRE_ISSUES` (`@ultimat3/action`) | you import it: TS2305. Import `MAX_ISSUES` from `@ultimat3/schema` — the same 100, now the cap validation itself stops at, so the server and the typed client cannot disagree |
95
+ | 11 | object keys (`@ultimat3/storage`) | a key has a segment ending in `.` or a Win32 device name (`CON`, `nul.txt`, `com1.log`): `X_STORAGE_PATH_UNSAFE` on every disk, where s3 took it (Windows drops the trailing dot, so `.meta.` IS the reserved `.meta`). A `:` is refused only by a local disk on Windows (an NTFS stream); the fix names the key with `-`. Find them with `aws s3 ls s3://<bucket> --recursive \| grep -iE '\.(/\|$)\|(^\|/)(con\|prn\|aux\|nul\|com[0-9]\|lpt[0-9])(\.\|/\|$)'`, copy each to a key without them, and build keys with `scopedKey`/`joinKey` |
96
+ | 12 | `put()`/`putStream()` `contentType`, `cacheControl` (`@ultimat3/storage`) | either holds a byte outside printable ASCII (a line break, a non-ASCII character): `X_INVARIANT` on every disk, where local stored it and s3 answered `X_STORAGE_WRITE_OUTCOME_UNKNOWN`. Pass a plain header value — `put(key, body, { contentType: 'text/plain' })` |
97
+ | 13 | `StorageDriver.stream` / `streamRange` (`@ultimat3/storage`) | you implement a driver: both take an optional last argument `{ etag }`, and `/_storage` passes it. Honour it — another revision is `X_STORAGE_OBJECT_CHANGED` (409) — or the route serves an overwrite under the old ETag. A driver that ignores it still compiles |
98
+ | 14 | an MCP read's denial, and the `ActionDeniedError` / `QueryDeniedError` constructors (`@ultimat3/query`, `@ultimat3/action`) | you read `QueryDeniedError.denial` from an MCP tool call, or filter `PolicyDecisionEvent.surface` for agent reads: an MCP read is judged on policy's `mcp` surface, as an MCP action always was, so `.denial` is `{ surface: 'mcp', isError, content }` and the event says `'mcp'`, where both said `'job'`. Read the code and reason off the error (`error.code`, `error.cause`), or switch on `denial.surface`. If you construct either error yourself: TS2554 — pass `guardPrimitive(kind, policy, subject, surface)`'s answer from `@ultimat3/policy`, the one argument both now take |
99
+ | 15 | `channel()` with a `catchUp` query (`@ultimat3/realtime`) | the query's `policy` is not the very object the `channel()` call passes: `X_CHANNEL_CATCHUP_POLICY_MISMATCH` at load. The catch-up read is served at `GET /_x/query/<name>` with the channel params as input, so a wider rule (a bare `can('<resource>:read')` beside a channel rule comparing a param to the actor) answered any caller what the subscribe refuses. Export the channel's rule from the feature's `policy.ts` and pass it as both `policy:`s. A name-only `catchUp: { name }` (a browser `channelRef`) is not checked |
100
+ | 16 | `networkPolicy.egress` in the framework chart and the one `x new` writes (`docker/helm`) | a pod dials a link-local address — `169.254.0.0/16`, `fe80::/10`, `fd00:ec2::254`, `64:ff9b::a9fe:a9fe` — or a port-53 resolver outside the cluster: egress is filtered by default, where `egress: []` left it open. The cloud metadata endpoint is the point; a pod reading node credentials from it now times out. Private ranges, every cluster pod and every public address stay reachable. Give the pod a workload identity (IRSA, Workload Identity) instead of the node's, or set `networkPolicy: { egress: [] }` to keep v30's open egress. An existing app's `docker/helm/values.yaml` is its own and keeps what it has until you paste the default in |
101
+ | 17 | `?_first=` over HTTP (`@ultimat3/query`) | a client pages a read past 500 rows: `_first` above `MAX_WIRE_PAGE_SIZE` (500) is `400 X_INPUT_INVALID`, where the route took up to 10,000. Declare the read's own bound — `query({ maxPage: 2000, ... })`, up to 10,000 (`X_QUERY_MAX_PAGE_INVALID` outside it) — or page with a smaller `first`. A server `read.page()` is unchanged; `openapi.json`'s `maximum` follows `maxPage` |
102
+ | 18 | `PreferenceStore` (`@ultimat3/notify`) | you wrote your own store: TS2741 / TS2353. `allows(query)` is replaced by `allowsMany(query)`, asked once per chunk of at most `NOTIFY_CHUNK_SIZE` (500) recipients per channel and answering the ids that may be reached (an id it omits is suppressed on that channel only). Turn the per-recipient read into one: `allowsMany: ({ recipients, notifier, channel, ctx }) => prefs.allowed(recipients.map((r) => r.id), notifier, channel, ctx.now())`. `allowAllPreferences()` and `memoryPreferenceStore()` already do. A fan-out's delivery steps are now `deliver:<channel>:chunk-<n>`; a run mid-flight across the deploy re-runs its chunks and the delivery ledger answers `sent` for whoever it already reached |
103
+ | 19 | `mcpTools()` (`@ultimat3/mcp`) | you serve a remote server's tools on your own `/mcp` through `include: 'exposed'`: the remote actions are built `expose: false`, so they leave your `tools/list` (an in-app `agent()` is still offered them — they are declared `agents: true`). Opt that server in — `mcpTools({ name, url, allow, policy, lock, expose: true })` — knowing your `/mcp` then answers for the third party's tools. A remote whose tool list moves without a `list_changed` notification is now refused `X_MCP_REMOTE_TOOL_CHANGED` within `reverifyMs` (default 3,600,000) rather than at the next restart: run `x mcp lock <name>` after reviewing the diff |
104
+ | 20 | the index a tenant table carries (`@ultimat3/entity`) | an entity has a tenant column — `.tenant()`, `entity(name, { tenant })` or an inferred `orgId`: `$describe().indexes` gains `<table>_<tenant>_<pk>_idx` on `(tenant, pk)`, built `concurrently`, unless a key or index already starts with `(tenant, pk)`, and `.tenant()`'s own `<table>_<tenant>_idx` is gone, so `x verify`'s `drift` step is red until `x db gen "tenant indexes"` writes the migration (create the composite concurrently, drop the single-column one). An unindexed tenant page was a sequential scan: 43.7 ms at 500k rows, 1.5 ms on the composite. A table name long enough that the new name passes 63 bytes is `X_INVARIANT_VIOLATED` at `entity()` — rename with `entity(name, { table })` |
105
+ | 21 | `IsrStore`, `IsrController.revalidateByTags` / `markStale` (`@ultimat3/render`) | you wrote your own store, or call either controller method: a store method may now answer a promise (`IsrAnswer<T>`) and the controller awaits each one; `revalidateByTags` answers `Promise<readonly string[]>` and `markStale` `Promise<boolean>` — TS2339 on `.length`/`.includes` of the result, or a test asserting on the promise. `await` both. A synchronous store keeps compiling unchanged. Shared across replicas: `runtime.isrStore = storageIsrStore({ disk: disk('isr') })` |
106
+ | 22 | a wildcard `allowHosts` rule and `localhost` (`@ultimat3/core`'s `hostDecision`, so `@ultimat3/scraping` and `x shot`) | a scrape or shot under `'*'` or `'*.localhost'` loads `localhost`, `*.localhost` or `localhost.`: refused (`X_SCRAPE_HOST_BLOCKED`, or a `refused: 'host'` ring entry), as `127.0.0.1` already was — the name is loopback by definition, and Chrome sends it around an egress proxy. Name it exactly: `allowHosts: ['*', 'localhost']`. A launched browser with an exit also gets `--proxy-bypass-list=<-loopback>`, so loopback goes through the proxy too; a local target behind a proxy session must be reachable from the proxy |
107
+ | 23 | `configureTelemetry({ exporter })`, `noopExporter`, `ReadableSpan` (`@ultimat3/core`) | you installed a span exporter: TS2353 on `exporter` and TS2305 on `noopExporter` — spans are the `span.end` event on the instrumentation bus. Write `const off = subscribe('span.end', (event) => exporter.export(event.payload))` and call `off()` where you used to hand back `noopExporter`; a test does the same with `memoryExporter()`. You build a `ReadableSpan` by hand: add `droppedEventsCount: 0` (TS2741). A span now keeps 128 events (`MAX_SPAN_EVENTS`) and counts the rest. A `switch` over `OtlpSignal` gains `'logs'` |
108
+ | 24 | `SENTRY_DSN` beside reporters an app installed itself (the boot in `@ultimat3/cli`; `sentryTransport`, `localErrorSink` in `@ultimat3/core`) | you set `SENTRY_DSN` AND install an error reporter of your own. Your `sentryErrorReporter` is now the only transport — each error is sent once, through your hooks, where the boot used to send it a second time unscrubbed; a reporter that WRAPS it (`{ report: (r) => inner.report(…) }`) is marked with `sentryTransport(wrapper)`. Local sinks keep the DSN transport beside them: `errorGroupsSink` and `memoryErrorReporter` are marked already, and a sink you wrote that keeps reports on the box is marked with `localErrorSink(sink)`. A reporter marked neither way logs `X_ERROR_REPORTER_DSN_UNCLAIMED` once and the DSN goes unused until you mark it |
109
+ | 25 | the `jobs.queues` default (`@ultimat3/core`) and `x new`'s `app.config.ts` | `jobs.queues` unset now serves `['default']`, not `['<name>-default']` — the queue a `job()` naming none lands on. Rows still queued on `<name>-default` (`x jobs list --json`), an `enqueue({ queue: '<name>-default' })`, or `WORKER_QUEUES=<name>-default` (`X_WORKER_QUEUE_UNKNOWN` now): list the queue in `jobs.queues`. A config written by `x new` before 31.0.0 says `['<app>-default']`: change it to `['default']` once that queue is empty, or every boot keeps logging the worker's `queue-unregistered` line |
110
+ | 26 | the span attributes `@ultimat3/http`, `@ultimat3/jobs` and `@ultimat3/ai` write | a dashboard, alert or trace query reading the old names: the request span says `http.request.method`, `http.response.status_code`, `url.scheme`, `server.address` and `ultimate.request_id` (was `http.method`, `http.status_code`, `http.request_id`); a job's run span is kind `consumer` with `messaging.system`, `messaging.operation.type`, `messaging.destination.name` (the queue), `messaging.message.id`, `ultimate.job.name`, `ultimate.job.attempt`, `ultimate.job.enqueued_by` (was `job.name`, `job.id`, `job.attempt`, `job.enqueued_by`), and a CHILD of the new `job.<name>.enqueue` producer span, not of the request — the row's `traceparent` names the producer, and an enqueue outside any trace now starts one; `ai.llm` is kind `client` with `gen_ai.request.model`, `gen_ai.provider.name`, `gen_ai.response.model`, `gen_ai.usage.input_tokens` / `output_tokens` (was `llm.model`, `llm.provider`, `llm.tokens`), and every other `llm.*` attribute — on `ai.agent` and its `agent.turn` events too — is `ultimate.llm.*`. Rename the keys in the query |
111
+ | 27 | `disk()` / `storage().disk()` (`@ultimat3/storage`) | you compare a resolved disk to the driver you declared — `expect(storage.disk('uploads')).toBe(uploads)` fails: `defineStorage` hands out an instrumented view of each driver (every call is a `storage.<verb>` event and client span), the same object on every resolution. Compare `.name`, or keep and call the driver you constructed — a driver held directly reports nothing. A driver's own members (`multipart`, a memory disk's `objects()`) still answer through the view |
112
+ | 28 | the container's telemetry boot (`@ultimat3/cli`) | `OTEL_EXPORTER_OTLP_ENDPOINT` is set and the collector has no logs pipeline: the generic endpoint now names logs too, so every process-logger line is posted to `/v1/logs` and a collector without a logs receiver answers each batch with a 404. Add a logs pipeline, or switch the signal off with `OTEL_LOGS_EXPORTER=none` (also `OTEL_TRACES_EXPORTER` / `OTEL_METRICS_EXPORTER`). Every boot also declares `db_client_operation_duration_seconds`, `job_duration_seconds` and `gen_ai_client_token_usage` on `/metrics`: a scrape with a series allowlist drops them until listed |
113
+ | 29 | `setStatementObserver`, `statementObserver`, `StatementObserver`, `StatementEvent`, `STATEMENT_ATTRIBUTE` (`@ultimat3/db`); `setRowObserver`, `rowObserver`, `RowObserver`, `RowChange`, `RowBulkChange`, `setCrossTenantObserver` (`@ultimat3/entity`); `setDecisionSink` and its siblings (`@ultimat3/policy`); `recentInvalidations`, `recentTierFailures`, `InvalidationEvent`, `TierFailure` (`@ultimat3/cache`) | you install or read any of them: TS2305. Subscribe on the bus instead — `const off = subscribe('db.statement', (e) => observer.onStatement(e.payload))`, `subscribe('entity.row' \| 'entity.bulk' \| 'entity.cross_tenant', …)`, `subscribe('policy.decision', (e) => sink.record(e.payload))`, `subscribe('cache.invalidate' \| 'cache.tier_failure', …)` from `@ultimat3/core` — and call `off()` where you restored the previous observer; keep your own bounded buffer where you read a `recent*()` list (a cache event carries no `at`: read the clock in the handler). Types: `DbStatementEvent`, `EntityRowEvent`, `EntityBulkEvent`, `PolicyDecisionEvent`, `CacheInvalidateEvent`, `CacheTierFailureEvent`. Every subscriber hears every event — nothing is displaced — and a throwing subscriber is contained by the bus (logged once as `instrument.subscriber_failed`), never the statement's, evaluation's or read's failure; `@ultimat3/testing`'s `statements` fixture now raises its N+1 verdict when it is disposed, not at the looping statement (`statements.verdicts()` reads it earlier) |
114
+ | 30 | database spans (`@ultimat3/db`) | a trace backend, dashboard or sampling budget: every statement is now a `db.<verb>` client span in production, not only under `x dev`, with `db.system.name`, `db.query.text` and `db.operation.name` — the old `db.statement` attribute is gone. Rename the key in a trace query; raise the span budget or lower the sample ratio (`OTEL_TRACES_SAMPLER_ARG`) if a statement-heavy request now exceeds it |
115
+ | 31 | `addLogSink` (`@ultimat3/core`) | you tee the process logger's lines: TS2305 on `addLogSink` — the tee is the `log.record` event on the instrumentation bus. Write `const off = subscribe('log.record', (event) => store(event.payload))`: the payload is the line's `at`, `level`, `message` and redacted `fields` (not the rendered JSON string — `JSON.stringify` it if you stored lines), and `off()` is the unsubscribe `addLogSink` returned. A throwing subscriber is still swallowed, and is no longer reported as `log.sink_failed`. The test seam that replaces the streams is `installLogSink` (it was `setLogSink`) |
116
+ | 32 | `setChannelTransport`, `resetChannelTransport`, `selectTransport` (`@ultimat3/realtime`) | you called a setter or the selector yourself: TS2305 on `setChannelTransport`/`resetChannelTransport` — an app's bus is `transport` in `export const runtime = { … }` (`apps/<app>/runtime.ts`); a driver or a boot imports `installChannelTransport` from `@ultimat3/realtime/adapter`, whose release is the test reset. TS2559 on `selectTransport(env, config.realtime, opts)`: drop the second argument. `NATS_URL` set now selects NATS with no config key, and any other variable selects nothing — an app that named `urlEnv: 'BUS_URL'` renames its variable to `NATS_URL` or hands a `NatsTransport` to `runtime.ts` |
117
+ | 33 | `setFailureStore` (`@ultimat3/core`) | you installed a failure store yourself: TS2305 — set `failureStore` in `export const runtime = { … }` (`apps/<app>/runtime.ts`); a boot or a test harness imports `installFailureStore` from `@ultimat3/core/adapter`, and calls the function it returns to restore (it no longer returns the previous store) |
118
+ | 34 | `MasterKeySource`, `MasterKeyRef.source`, `SecretsInstallReport.keySource` (`@ultimat3/core`) | you named the type or switched on `'env' \| 'file'`: TS2305 on `MasterKeySource` — the field is the source's `name`, a `string`; compare it as before or widen your switch. A KMS/Vault key is a `SecretSource` (`{ name, masterKey({ root, env }) }`, from `@ultimat3/core/adapter`) set as `secretSource` in `runtime.ts`, never an exported `ULTIMATE_SECRETS_KEY` written by a wrapper script |
119
+ | 35 | `realtime.transport`, `realtime.urlEnv`, `REALTIME_TRANSPORTS`, `RealtimeTransport` (`@ultimat3/core`), all removed | your `app.config.ts` writes either key: `X_CONFIG_INVALID` naming its replacement — delete the line; set `NATS_URL` for every realtime role (rename a variable `urlEnv` named), or pass any other `Transport` as `transport` in `runtime.ts`. TS2305 on the two type names |
120
+ | 36 | `setJobDriver`, `setEventBus` (`@ultimat3/jobs`), `setMailDriver` (`@ultimat3/mail`), `setIdempotencyStore`, `setMeterStore` (`@ultimat3/action`), `setNotifyStores` (`@ultimat3/notify`), and their resets | you installed a backend or reset one yourself: TS2305 — set it in `export const runtime = { … }` (`apps/<app>/runtime.ts`): `jobs`, `eventBus`, `mail`, `idempotencyStore`, `meterStore`, `notifyStores`. A driver's author, a boot or a test harness imports `installJobDriver`, `installEventBus`, `installMailDriver`, `installIdempotencyStore`, `installMeterStore`, `installNotifyStores` and `resetJobDriver`, `resetEventBus`, `resetMailDriver`, `resetIdempotency`, `resetMeterStore`, `resetNotifyStores` from `@ultimat3/<pkg>/adapter` — never the `.` barrel. Each `install*` returns a release that removes that install alone, in any order: call it where you called the old setter a second time to put one back |
121
+ | 37 | `httpServer({ rateLimitStore })`, `installRateLimitStore`, `adoptRateLimitStore` (`@ultimat3/http`), `configureAuthLimiters`, `configureTotpReplay` (`@ultimat3/auth`), `setScrapeDriver` (`@ultimat3/scraping`), and their resets | you passed a store to `httpServer` or called an installer yourself: TS2353/TS2305 — set `rateLimitStore`, `authLimiter`, `totpReplay` or `scrapeDriver` in `export const runtime = { … }` (`apps/<app>/runtime.ts`); every server's limiter counts in that one store. A boot or test harness imports `installRateLimitStore` from `@ultimat3/http/adapter`, `installAuthLimiters`/`installTotpReplay` (renamed from `configure*`) from `@ultimat3/auth/adapter`, `installScrapeDriver` from `@ultimat3/scraping/adapter` — each answers its release — and `resetRateLimitStore`, `resetAuthLimiters`, `resetTotpReplay`, `resetScrapeDriver` from the same subpaths, never `.` |
122
+ | 38 | `ScrapeClock`, `TestScrapeClock`, `systemScrapeClock`, `noWaitClock`, `testScrapeClock`, `scrapeClock`, `setScrapeClock`, `resetScrapeClock` (`@ultimat3/scraping`), `configureFlags({ clock })` (`@ultimat3/flags`) | TS2305 / TS2353 — import `SleepClock`, `FrozenClock`, `systemClock`, `noWaitClock`, `frozenClock`, `ambientClock` from `@ultimat3/core`; replace `setScrapeClock(c)` … `resetScrapeClock()` with `const release = installClock(c)` (`@ultimat3/core/adapter`) … `release()`; drop `clock` from `configureFlags` and set `clock` in `apps/<app>/runtime.ts`. A test that asserted a frozen clock advanced on an already-aborted sleep now reads 0 |
123
+ | 39 | `AuditSink` (`@ultimat3/admin`) | TS2305 on the import — `import type { AuditSink } from '@ultimat3/core/adapter'` and type the sink `AuditSink<AuditEntry>` |
124
+ | 40 | `associate`, `associations`, `Association`, `AssociationMap`, `buildMany`, `createMany`, `Persister` (`@ultimat3/testing`) | TS2305/TS2353/TS2339 — `associations: { orgId: associate(orgs, (o) => o.id) }` becomes `belongsTo: { org: belongsTo(orgs, 'orgId') }` (keep `orgId` in `defaults`); rename `buildMany`/`createMany` to `buildList`/`createList`; a hand-written persister is `insert(entity, row)` answering the stored row — or delete it and `usePersister(entityPersister({ driver }))`. A test that asserted `create()` returned the BUILT row now sees the stored one (defaults filled); a test that expected `X_TEST_FACTORY_NOT_PERSISTED` for a real `entity()` now writes to `defaultDriver()` |
125
+ | 41 | `configureAi({ gateway })` (`@ultimat3/ai`) | TS2353 on `gateway` — set `aiGateway` in `export const runtime = { … }` (`apps/<app>/runtime.ts`); keep `configureAi` for `embedder`, `semanticCache`, `redact` only. A test installs one with `const release = installAiGateway(gateway)` from `@ultimat3/ai/adapter` and calls `release()` after |
126
+ | 42 | `RuntimeOverrides.syncAuthenticate` (`@ultimat3/cli`) | TS2353 on `syncAuthenticate` in `runtime.ts` — delete it; state a token's lifetime as `configureAuthenticator(resolve, { credentialTtlMs })`. A `<app>/packages/db/factories.ts` exporting `factories` is now linted by `unit`: `X_TEST_FACTORY_INVALID` names the factory and trait to fix |
127
+ | 43 | `setAuditSink`, `resetAuditSink`, `configureErrorReporting({ reporter })` (`@ultimat3/core`) | TS2305 / TS2322 (`reporter` is `never`) — set `auditSink` / `errorReporter` in `export const runtime = { … }` (`apps/<app>/runtime.ts`), not at module scope. A test: `const release = installAuditSink(sink)` / `installErrorReporter(reporter)` from `@ultimat3/core/adapter`, `release()` after — or `swapAdapter('auditSink', sink)` from `@ultimat3/testing`. `configureErrorReporting` keeps `clock`, `release`, `environment`, `enabled` |
128
+ | 44 | `configureKdfGate`, `resetKdfGate` (`@ultimat3/auth`) | TS2305 — `const release = installKdfGate({ maxConcurrent, maxQueued })` from `@ultimat3/auth/adapter`, `release()` (or `resetKdfGate()`, same subpath) after |
129
+ | 45 | `RuntimeOverrides.storage` (`@ultimat3/cli`) | TS2322 when `runtime.ts` passes `defineStorage({ … })` — pass the driver (`storage: s3Driver({ … })`): it is the default disk under the driver's `name`. Several disks: `defineStorage()` in `app.config.ts`, which wins |
130
+ | 46 | `jobDriverConformance`, `budgetStoreConformance`, `BudgetStoreLike` (`@ultimat3/testing`) | TS2305 — import them from `@ultimat3/testing/conformance`, where every port's suite lives; `behavesLike` stays on `@ultimat3/testing` |
131
+ | 47 | a malformed uuid in a repository write (`@ultimat3/entity`) | a test that expected `X_DB_STATEMENT_FAILED` (Postgres 22P02) for `repo.insert({ id: 'not-a-uuid' })` now sees `X_INVARIANT_VIOLATED`, raised before the statement in both drivers — and memory no longer stores the row: expect the new code |
132
+ | 48 | `PushSubscriptionRecord.actorId` (`@ultimat3/pwa`) | TS2322 where code builds a record with `actorId: null` — store it for `ctx.actor.id`, as `pushSubscribe()` does; an anonymous visitor has no subscription. At runtime both stores now refuse a missing or empty `actorId` with `X_PWA_PUSH_SUBSCRIPTION_INVALID` before writing (Postgres answered a not-null violation; memory stored it). A custom `PushSubscriptionStore` proves the same with `pushSubscriptionStoreConformance` |
133
+ | 49 | the default delivery ledger (`@ultimat3/notify`) | you deploy (staging or production) with no `notifyStores.ledger` in `runtime.ts` and a notifier runs: its first claim is `X_NOTIFY_STORE_MISSING`, where a memory ledger answered — one per process, so a replay on another replica or after a restart sent twice. Set `notifyStores: { ledger: postgresDeliveryLedger({ executor: dbExecutor() }) }` in `export const runtime = { … }` (`apps/<app>/runtime.ts`); the boot already applies `x_notify_deliveries`. Name every store you keep in that one object — it replaces, never merges. Development and test keep the memory default |
134
+ | 50 | `configureAi({ embedder, semanticCache })` (`@ultimat3/ai`) | TS2353 on `embedder` / `semanticCache` — set them in `export const runtime = { embedder, semanticCache }` (`apps/<app>/runtime.ts`); `semanticCache` is the same `(scope) => SemanticCache` factory. `configureAi` keeps `redact` only. A test: `const release = installAiEmbedder(embedder)` / `installSemanticCache(factory)` from `@ultimat3/ai/adapter`, `release()` after — or `swapAdapter('embedder', …)` from `@ultimat3/testing`. Prove one with `embedderConformance` / `semanticCacheFactoryConformance` from `@ultimat3/testing/conformance` |
135
+ | 51 | `configureMetrics({ exporter })` (`@ultimat3/core`) | TS2353 on `exporter` — subscribe it: `const release = subscribe('metric.export', (event) => exporter.export(event.payload))`, `release()` to uninstall; `exportMetrics()` / `startMetricExport(ms)` publish the tick as before. `configureMetrics` keeps `clock` and `enabled`. With `OTEL_EXPORTER_OTLP_ENDPOINT` set the boot already subscribes `otlpMetricExporter()` |
136
+ | 52 | `oauthLogin` (`@ultimat3/auth`) — its paths, cookie and `restartAt` | the routes moved from `/auth/oauth/:provider[/callback]` to `/auth/sso/:provider[/callback]` (`oauthStartPath`/`oauthCallbackPath`/`OAUTH_*_ROUTE_PATH` answer the new values; the call and its options are unchanged). **Before deploying, add `https://<origin>/auth/sso/<provider>/callback` as an allowed redirect URI at each IdP** (GitHub, Google, your OP) — keep the old one until the deploy is out — and point every sign-in link at `/auth/sso/<provider>`. A login started before the deploy fails its callback once (`X_OAUTH_STATE_INVALID`: the state cookie is now `__Host-x_sso_<provider>`); the user starts again. `restartAt(provider)` and every OAuth `fix:` name `/auth/sso/<provider>`. `oauthDenied` and `OAUTH_ROUTE_STATUS` keep their names on `@ultimat3/auth`; a deep import from `./oauth-route` moves to the barrel |
137
+ | 53 | the raw-CDP launcher (`@ultimat3/testing` → `@ultimat3/scraping/cdp`) | an e2e suite imports `findChrome`, `launchChrome`, `CHROME_PATH_ENV`, a `Cdp*Error` or `E2E_BROWSER_CLOSE_MS` from `@ultimat3/testing` (TS2305, no exported member): `bun add -d @ultimat3/scraping`, then `import { findChrome, LAUNCHED_CLOSE_MS } from '@ultimat3/scraping/cdp';` — `E2E_BROWSER_CLOSE_MS` is `LAUNCHED_CLOSE_MS`, the same value. Everything e2e-shaped (`openE2eBrowser`, `E2E_BROWSER_OPEN_MS`, `installE2eDriver`, …) stays on `@ultimat3/testing` |
138
+ | 54 | `welcomeMail`, `verifyEmailMail`, `resetPasswordMail`, `inviteMail`, `mfaEnrolledMail`, `securityAlertMail`, their `*Input` schemas and types, `MFA_METHODS`, `FRAMEWORK_MAILS` (`@ultimat3/mail`) | you import one (TS2305), or send a mail by one of the ids `welcome`, `verify-email`, `reset-password`, `invite`, `mfa-enrolled`, `security-alert` without declaring it — importing the package no longer registers them. Declare your own: `export const welcomeMail = defineMail<{ name: string }>({ id: 'welcome', subject: 'mail.welcome.subject', input: t.object({ name: t.string }), template: ({ data }) => [blocks.heading('mail.welcome.heading', { name: data.name })] })`, and carry every `mail.<id>.*` key it renders in `packages/i18n/catalogs/<locale>.json` — the base catalog keeps `mail.footer.*` only. Email verification and password reset are untouched: `@ultimat3/auth` sends `auth.email-verify` / `auth.password-reset` from your catalog, as before |
139
+ | 55 | `noopMetricExporter` (`@ultimat3/core`) | you import it (TS2305): delete the import and what it was handed to — exporting nothing is subscribing nothing to `metric.export` (entry 51). A test that needs an exporter value uses `memoryMetricExporter()` |
140
+ | 56 | `AuditPrimitive`, `AuditRecord.primitive` (`@ultimat3/core`); `subjectErase()`'s audit record (`@ultimat3/jobs`) | an exhaustive `switch (record.primitive)` in your audit sink: add `case 'job':`. A report over `x_audit.primitive = 'action'` that meant to include GDPR erases adds `'job'` — an erase now records `{ primitive: 'job', surface: 'job' }`. An action a job enqueued still records `primitive: 'action'` on surface `'job'` |
141
+ | 57 | `grantUpload({ quarantine })`, `releaseQuarantine`, `ReleaseQuarantineInput`, `quarantineKey`, `quarantinePrefix`, `isQuarantinedKey`, `QUARANTINE_SEGMENT` (`@ultimat3/storage`) | you use the quarantine flow: TS2353 on `quarantine`, TS2305 on the rest. Delete the option; a review queue or async vendor scan becomes an `uploadScanner` in `apps/<app>/runtime.ts` that answers `{ verdict: 'hold', reason }` for an upload — keyed by the new `ScanInput.pendingKey` — until your own store says cleared, then `{ verdict: 'clean' }`. A hold is `X_STORAGE_QUARANTINED` (409; `meta` is now `{ key, scanner, reason }`), the upload kept pending. That scanner declares `holds: true` — `{ name, holds: true, scan }` — or its `hold` is `X_INVARIANT` and nothing is attached; with it, a scanner that cannot answer is always `X_STORAGE_SCAN_UNAVAILABLE`, even under `onScanUnavailable: 'accept'`. An exhaustive `switch` over `ScanVerdict` gains `'hold'`. **Before deploying, with objects still under `org/*/pending/quarantine/`:** install the holding scanner first, or those keys promote like any pending key — unscanned if no scanner is installed |
142
+ | 58 | `RetryPolicy`, `providerGateway({ retry })`, `DEFAULT_GATEWAY_RETRY`, `backoffMs` (`@ultimat3/ai`) | you import the type (TS2305) or pass a gateway `retry` (TS2353 on `baseDelayMs`): `import type { RetryPolicy } from '@ultimat3/core'`, and `retry: { attempts: 3, baseDelayMs: 500, maxDelayMs: 8_000 }` becomes `retry: { attempts: 3, base: 500, max: 8_000, jitter: 'full' }` — `jitter` is required. `curve`, `factor` and `timeBudgetMs` (the whole call, across every provider) are now honoured |
143
+ | 59 | `BackoffPolicy` and every `backoff:` option (`@ultimat3/realtime`: `clientTransport`, `socketEngine`, `natsTransport`, the replicator, `deviceAgent`) | you import `BackoffPolicy` (TS2305) or pass a `backoff` (TS2353 on `baseMs`): `backoff: { baseMs: 500, maxMs: 30_000, factor: 2, jitter: 'full' }` becomes `backoff: { base: 500, max: 30_000, factor: 2, jitter: 'full' }`; type it `Pick<RetryPolicy, 'base' \| 'max' \| 'factor' \| 'curve' \| 'jitter'>` with `RetryPolicy` from `@ultimat3/core`. Reading `defaultBackoff.baseMs` / `.maxMs`: `.base` / `.max`. `curve` is now honoured |
144
+ | 60 | `retry.jitter` on a `job()` (`@ultimat3/jobs`) | you set it (TS2322 on a boolean): `jitter: false` → `jitter: 'none'`, `jitter: true` → `jitter: 'equal'` — the same delays; `'full'` is new. Omitted is unchanged (`'equal'`). A boolean that reaches `job()` from JS or JSON config is refused at declaration: `X_JOB_DECLARATION_INVALID` |
145
+ | 61 | `setLogSink` (`@ultimat3/core`) | you install a log sink in a test or preload (TS2305): `const previous = setLogSink(sink); … setLogSink(previous)` becomes `const release = installLogSink(sink); … release()` — the release removes only this install, in any order. `installLogSink(undefined)` routes lines back to the real streams until released. An app scaffolded by `x new` (or given `x g sign-in`) before 31.0.0 has `apps/web/app/auth/dev-actor.test.ts` calling `setLogSink`: the same edit |
146
+ | 62 | `Row` (`@ultimat3/realtime`) | you import realtime's `Row` (TS2305): `import type { LiveRow } from '@ultimat3/realtime'` — same shape, new name. A `Row` imported from `@ultimat3/core` is a different type and unchanged |
147
+ | 63 | `Surface` (`@ultimat3/seo`) | you import it from seo (TS2305): `import type { Surface } from '@ultimat3/core'`. `RouteRecord.surface` is `Exclude<Surface, 'shared'>` — still `'site' \| 'app' \| 'api'` |
148
+ | 64 | `SURFACES` (`@ultimat3/render`) | you import the value from render (TS2305): `import { SURFACES } from '@ultimat3/core'`. The `Surface` type still comes from either |
149
+ | 65 | `SearchIndex` (`@ultimat3/entity`) | you wrote your own adapter (Meilisearch, Typesense) — TS2741: add `list({ entity, tenant?, after, limit }) → { entries: { tenant, id, version }[], next: string \| null }`, every live (non-removed) document of the entity, paged in a stable order, `tenant` omitted = every tenant. Prove it with `behavesLike(searchIndexConformance, () => yours)` from `@ultimat3/testing/conformance`; a Postgres-backed subject may pass `everyTenant: (read) => crossTenant(reason, read)` |
150
+ | 66 | `reindex({ source })` (`@ultimat3/jobs`) | your `source` is narrowed by a filter (`db.posts.where({ published: true })`): the new sweep removes every indexed document that `source` does not read, so it now EMPTIES the index of the other rows — pass the whole table (`source: () => db.posts`). The backfill's checksum changed: a pass already recorded completed re-runs only with `{ force: true }` (`x db backfill <name> --write --force --json`) |
151
+ | 67 | `registerAction`, `registerActions` (`@ultimat3/action`), `registerQuery`, `registerQueries` (`@ultimat3/query`) | you call one (TS2305): hand the module to `defineApi({ actions, queries })` — the one path — or, if you are writing a loader, import it from `@ultimat3/action/loader` / `@ultimat3/query/loader`. A `<slice>/live/<name>.live.test.ts` that `x g query --live` wrote before 31.0.0 says `const live = registerQuery('feed', feed);`: write `const live = defineApi({ queries: { feed } }).queries.feed;` with `import { defineApi } from '@ultimat3/action';`. An app module or test importing a `./loader` is `X_BOUNDARY_LOADER_IMPORT` on `x verify --only boundaries` |
152
+ | 68 | `x g app` / `x g package` (`@ultimat3/cli`) | a script passes a slice flag (`--feature`, `--surface`, `--live`, `--admin`, `--locales`, `--at`, `--app`, `--permission`): `X_CLI_BAD_FLAG` where the flag was ignored. Drop it — a workspace generator reads `--force` and `--dry-run` only |
153
+ | 69 | a `defineDriver` store declaring `'upsert'` (`@ultimat3/entity`) | your store merges an upsert collision itself: pass the merged row through `advanceVersion(entity, stored, merged, (p) => plan.set.includes(p))` from `@ultimat3/entity/adapter`, or `entityDriverConformance` fails "a searchable entity's upsert collision in the same ms is a newer version" Every searchable entity's version is now strictly increasing per row: a test asserting `updatedAt` equals a frozen clock after a second write in the same ms expects `+1 ms`, and a `defineDriver` store's `updateWhere` on a searchable entity past `MAX_ASSERTED_ROWS` rows is `X_INVARIANT_VIOLATED` |
154
+ | 70 | `grantUpload({ target })`, `grantMultipart({ target })` with an `uploadScanner` installed (`@ultimat3/storage`) | a targeted grant: `X_STORAGE_TARGET_UNSCANNED` (500). Drop `target` and call `promoteAttachment({ disk, key, orgId, target, policy })` once the upload lands, so the scanner sees it. Without a scanner nothing changes |
155
+ | 71 | `SearchIndex.index` (`@ultimat3/entity`) | you wrote your own adapter: `index(documents, options?)` takes `{ committed?: boolean }`. `committed: true` (the write path) replaces a TOMBSTONE whatever the versions say — a key deleted and written again is live — and against a held document still keeps only newer; unset (`reindex()`) keeps the tombstone's stale guard. `searchIndexConformance` checks it |
156
+ | 72 | `DriverRepo.update` in a `defineDriver` store (`@ultimat3/entity`) | your store's `update` takes a third argument `advance?: { property, stepMs }` (`DriverAdvance`, `@ultimat3/entity/adapter`): write `advance.property` per matched row as the later of the patch's instant and that row's stored one + `stepMs`, atomically with the write — in code, `advanceVersion(entity, row, { ...row, ...patch }, (p) => p === advance.property)`. A store that ignores it fails `entityDriverConformance` |
157
+ | 73 | `rowKey` of a key holding a `timestamp()` (`@ultimat3/entity`) | a searchable entity has an instant in its primary key (every partitioned table): its search-index ids are now spelled ISO 8601 UTC, where they were `String(date)` in the process zone. Run its `reindex()` once — `x db backfill <name> --write --force --json` if a pass completed: the sweep removes the old spellings, the rows phase writes the new. Cursors are unaffected |
158
+ | 74 | every package's `.` barrel (all `@ultimat3/*` but `create-ultimate`) | you import one of the 1,409 names that left `.` — TS2305, no exported member. Look it up in [`v31-barrel-removals.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/history/v31-barrel-removals.md): listed under "now on `./adapter`" (46 names), import it from `@ultimat3/<pkg>/adapter`; listed under "no longer exported" (1,363), it was internal — an error factory or class is matched by code instead (`import { isUltimateError } from '@ultimat3/core'`, then `isUltimateError(e) && e.code === 'X_…'`), a `*_ERROR_CODES` table by the package's `<Pkg>ErrorCode` type where it has one; otherwise compare `e.code` to the code string — and anything else through the kept factory and its option and result types, which stay on `.` |
159
+
160
+ ### Every removed setter, and the `runtime.ts` field that replaced it
161
+
162
+ One lookup for entries 32–38, 41, 43 and 50. A backend is swapped in ONE place, `export const runtime = { … }` in `apps/<app>/runtime.ts`; the installer beside each field is what the boot calls, and what a harness of your own imports — a test uses `await swapAdapter(port, impl)` from `@ultimat3/testing`. Each port's interface, reference implementation and conformance suite: [Adapters](Adapters).
163
+
164
+ | Removed in 31.0.0 | `runtime.ts` field | The installer, on the package's `./adapter` | Entry |
165
+ |---|---|---|---|
166
+ | `setJobDriver` (`@ultimat3/jobs`) | `jobs` | `installJobDriver` (`@ultimat3/jobs/adapter`) | 36 |
167
+ | `setEventBus` (`@ultimat3/jobs`) | `eventBus` | `installEventBus` (`@ultimat3/jobs/adapter`) | 36 |
168
+ | `setMailDriver` (`@ultimat3/mail`) | `mail` | `installMailDriver` (`@ultimat3/mail/adapter`) | 36 |
169
+ | `setIdempotencyStore` (`@ultimat3/action`) | `idempotencyStore` | `installIdempotencyStore` (`@ultimat3/action/adapter`) | 36 |
170
+ | `setMeterStore` (`@ultimat3/action`) | `meterStore` | `installMeterStore` (`@ultimat3/action/adapter`) | 36 |
171
+ | `setNotifyStores` (`@ultimat3/notify`) | `notifyStores` | `installNotifyStores` (`@ultimat3/notify/adapter`) | 36 |
172
+ | `setFailureStore` (`@ultimat3/core`) | `failureStore` | `installFailureStore` (`@ultimat3/core/adapter`) | 33 |
173
+ | `setChannelTransport`, `selectTransport` (`@ultimat3/realtime`); the two deleted realtime transport config keys (entry 35) | `transport` | `installChannelTransport` (`@ultimat3/realtime/adapter`) | 32, 35 |
174
+ | `MasterKeySource` (`'env' \| 'file'`, `@ultimat3/core`) | `secretSource` | `installSecretSource` (`@ultimat3/core/adapter`) | 34 |
175
+ | `setScrapeDriver` (`@ultimat3/scraping`) | `scrapeDriver` | `installScrapeDriver` (`@ultimat3/scraping/adapter`) | 37 |
176
+ | `httpServer({ rateLimitStore })`, `installRateLimitStore` on the barrel (`@ultimat3/http`) | `rateLimitStore` | `installRateLimitStore` (`@ultimat3/http/adapter`) | 37 |
177
+ | `configureAuthLimiters` (`@ultimat3/auth`) | `authLimiter` | `installAuthLimiters` (`@ultimat3/auth/adapter`) | 37 |
178
+ | `configureTotpReplay` (`@ultimat3/auth`) | `totpReplay` | `installTotpReplay` (`@ultimat3/auth/adapter`) | 37 |
179
+ | `setScrapeClock` (`@ultimat3/scraping`), `configureFlags({ clock })` (`@ultimat3/flags`) | `clock` | `installClock` (`@ultimat3/core/adapter`) | 38 |
180
+ | `configureAi({ gateway })` (`@ultimat3/ai`) | `aiGateway` | `installAiGateway` (`@ultimat3/ai/adapter`) | 41 |
181
+ | `setAuditSink` (`@ultimat3/core`) | `auditSink` | `installAuditSink` (`@ultimat3/core/adapter`) | 43 |
182
+ | `configureErrorReporting({ reporter })` (`@ultimat3/core`) | `errorReporter` | `installErrorReporter` (`@ultimat3/core/adapter`) | 43 |
183
+ | `configureAi({ embedder })` (`@ultimat3/ai`) | `embedder` | `installAiEmbedder` (`@ultimat3/ai/adapter`) | 50 |
184
+ | `configureAi({ semanticCache })` (`@ultimat3/ai`) | `semanticCache` | `installSemanticCache` (`@ultimat3/ai/adapter`) | 50 |
185
+
186
+ A setter still on a package's `.` barrel is `X_ADAPTER_PORT_INCOMPLETE` on the `boundaries` step unless `scripts/lib/adapter-port-pins.ts` names why it selects no backend.
187
+
188
+ ### Not breaking, but you will see it
189
+
190
+ | What moved | Do |
191
+ |---|---|
192
+ | `x verify`'s `manifest` step is red, `X_MCP_APP_UNMOUNTED`, when `ai.mcp.expose` is `true` — **the default**, so an `app.config.ts` that never names it counts — and no `apps/web/mcp.ts` exports `mcp` (`As of 30.4.0`; before, the boot only logged it while `POST /mcp` answered 404). An app scaffolded before `x new` wrote that file hits it on its first 31.0.0 gate | mount it as `x new` does: `apps/web/mcp.ts` exporting `export const mcp = appMcp({ resolveToken: resolveAgentToken })`, `appMcp` from your `@<app>/mcp` package and `resolveAgentToken` from `./app/auth/agent-token` — copy those files (and `packages/mcp/src/index.ts`, if you have no `@<app>/mcp`) from a fresh `bunx create-ultimate`. With no catalog package, the error's own fix is the whole file: `export const mcp = defineAppMcp({ include: 'exposed', resolveToken })` (`@ultimat3/mcp`), `resolveToken` answering an agent or `null`. No agent surface wanted: `ai: { mcp: { expose: false } }` in `app.config.ts` |
193
+
63
194
  ## 29.x → 30.0.0, entry by entry
64
195
 
65
- `As of 2026-11-05`, unpublished: `CHANGELOG.md`'s `[Unreleased]` breaking entries in their order, grouped by package, lowest tier first. No legacy path, no codemod, no shim. A later slice appends its rows below the last one and never renumbers; each row's `CHANGELOG.md` line names it as `(#N)` after the dash.
196
+ Released 2026-11-07: `CHANGELOG.md`'s `## 30.0.0` breaking entries in their order, grouped by package, lowest tier first. No legacy path, no codemod, no shim. Rows are never renumbered; each row's `CHANGELOG.md` line names it as `(#N)` after the dash.
66
197
 
67
198
  ### The upgrade, top to bottom
68
199
 
@@ -3635,7 +3766,7 @@ Job code never changes across a driver: `steps` is a driver member, so step pers
3635
3766
  |---|---|---|
3636
3767
  | tier 1 → tier 2 | `live: true` on the query | needs a `replicator` role and `orderBy` + `limit` on the `sql` |
3637
3768
  | tier 2 → tier 3 | `persist: true` on the **entity** | shipped in 21.0.0, opt-in per entity. No new mutators, no new authz, no new server code ([Realtime](Realtime#tier-3-shipped-in-2100)) |
3638
- | `memory` → `nats` transport | `realtime.transport: 'nats'`, and **`realtime.urlEnv`** — the env *key name*, not a URL (default `NATS_URL`). There is no `realtime.url` field | roll `sync` and `replicator`; clients reconnect with server-directed backoff. **`realtime.transport` decides the bus** (`selectTransport(env, { transport, urlEnv })`), `As of 2026-09-23` (in the tree, not yet tagged): `'nats'` with its variable unset refuses the boot, and so does `'memory'` with `NATS_URL` set (`X_CONFIG_INVALID`). On 21.x the presence of `NATS_URL` decided it and the config field was never read ([Configuration](Configuration)) |
3769
+ | `memory` → `nats` transport | set **`NATS_URL`** for every realtime role — the variable decides the bus. There is no `realtime.transport` or `realtime.urlEnv` key (removed in 31.0.0, entry 35); any other `Transport` is `transport` in `apps/<app>/runtime.ts` | roll `sync` and `replicator`; clients reconnect with server-directed backoff. From 22.0.0 to 30.x `realtime.transport` decided the bus and `'nats'` with its variable unset refused the boot (`X_CONFIG_INVALID`); on 21.x, as again from 31.0.0, the presence of `NATS_URL` decides it ([Realtime](Realtime), [Adapters](Adapters#transport)) |
3639
3770
 
3640
3771
  ## Where the facts live
3641
3772