@ultimat3/cli 31.48.0 → 31.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/CLAUDE.md +30 -23
  2. package/README.md +96 -4
  3. package/package.json +30 -30
  4. package/src/api-registration.ts +45 -14
  5. package/src/api-routes.ts +1 -0
  6. package/src/app-load.ts +7 -3
  7. package/src/app-openapi.ts +7 -1
  8. package/src/app-root.ts +7 -1
  9. package/src/budgets.ts +2 -1
  10. package/src/clean-services.ts +142 -0
  11. package/src/cmd-auth.ts +3 -0
  12. package/src/cmd-clean-spec.ts +10 -3
  13. package/src/cmd-clean.ts +23 -9
  14. package/src/cmd-db-backfill.ts +6 -0
  15. package/src/cmd-db-branch.ts +10 -4
  16. package/src/cmd-db-recount.ts +5 -12
  17. package/src/cmd-db-rollback.ts +77 -0
  18. package/src/cmd-db-spec.ts +18 -2
  19. package/src/cmd-db-status.ts +5 -10
  20. package/src/cmd-db.ts +105 -33
  21. package/src/cmd-deploy-verify.ts +14 -6
  22. package/src/cmd-docs-topic.ts +94 -0
  23. package/src/cmd-docs.ts +15 -1
  24. package/src/cmd-doctor.ts +109 -41
  25. package/src/cmd-drill.ts +80 -18
  26. package/src/cmd-env.ts +30 -8
  27. package/src/cmd-errors-app.ts +63 -0
  28. package/src/cmd-errors.ts +50 -14
  29. package/src/cmd-generate.ts +17 -4
  30. package/src/cmd-heavy-spec.ts +9 -1
  31. package/src/cmd-heavy.ts +111 -27
  32. package/src/cmd-i18n.ts +33 -1
  33. package/src/cmd-jobs.ts +27 -1
  34. package/src/cmd-merge-driver-spec.ts +12 -0
  35. package/src/cmd-merge-driver.ts +95 -0
  36. package/src/cmd-new.ts +23 -3
  37. package/src/cmd-policy-spec.ts +9 -1
  38. package/src/cmd-policy.ts +72 -17
  39. package/src/cmd-stop.ts +18 -4
  40. package/src/cmd-tasks-run.ts +87 -0
  41. package/src/cmd-tasks-spec.ts +10 -3
  42. package/src/cmd-tasks.ts +8 -5
  43. package/src/cmd-test.ts +2 -1
  44. package/src/cmd-upgrade-spec.ts +8 -1
  45. package/src/cmd-upgrade.ts +15 -1
  46. package/src/cmd-verify.ts +9 -41
  47. package/src/codemods/agents-doc-row.ts +73 -0
  48. package/src/codemods/define-error-leaf.ts +37 -12
  49. package/src/codemods/docs-many-agents.ts +11 -15
  50. package/src/codemods/docs-worker-commands.ts +26 -0
  51. package/src/codemods/engine-fs.ts +9 -2
  52. package/src/codemods/index.ts +4 -0
  53. package/src/codemods/merge-drivers.ts +147 -0
  54. package/src/command.ts +3 -0
  55. package/src/db-applied-edits.ts +117 -0
  56. package/src/db-dev-wire.ts +18 -0
  57. package/src/db-diagnostics.ts +5 -10
  58. package/src/db-generate.ts +82 -7
  59. package/src/db-migrate-pass.ts +51 -0
  60. package/src/db-migrate-through-dev.ts +209 -0
  61. package/src/db-rollback-consent.ts +128 -0
  62. package/src/db-rollback-pass.ts +76 -0
  63. package/src/db-seed-generate.ts +5 -1
  64. package/src/db-seed.ts +7 -1
  65. package/src/deploy-verify-findings.ts +3 -0
  66. package/src/deploy-verify-grade.ts +3 -0
  67. package/src/deploy-verify-processes.ts +32 -0
  68. package/src/dev-boot.ts +3 -0
  69. package/src/dev-db-migrate.ts +155 -0
  70. package/src/dev-db-rollback.ts +33 -0
  71. package/src/dev-db-settled.ts +22 -0
  72. package/src/dev-lock-errors.ts +78 -0
  73. package/src/dev-lock-holder-dir.ts +64 -0
  74. package/src/dev-lock-live.ts +44 -0
  75. package/src/dev-lock.ts +59 -84
  76. package/src/dev-policy.ts +11 -8
  77. package/src/dev-rebuild-schema.ts +116 -13
  78. package/src/dev-rebuild.ts +13 -4
  79. package/src/dev-route-table.ts +7 -0
  80. package/src/dispatch.ts +21 -1
  81. package/src/doctor-api-listing.ts +114 -0
  82. package/src/doctor-guarded.ts +41 -0
  83. package/src/doctor-port.ts +90 -17
  84. package/src/doctor-probe.ts +36 -5
  85. package/src/doctor-processes-probe.ts +127 -0
  86. package/src/doctor-processes.ts +136 -0
  87. package/src/doctor-warnings.ts +17 -0
  88. package/src/error-codes-agents.ts +35 -0
  89. package/src/error-codes-processes.ts +30 -0
  90. package/src/error-codes-tooling.ts +2 -0
  91. package/src/error-codes.ts +12 -13
  92. package/src/errors-suite.ts +27 -0
  93. package/src/errors.ts +18 -22
  94. package/src/exercise-registration.ts +4 -3
  95. package/src/exercise-services.ts +13 -3
  96. package/src/framework-env.ts +7 -3
  97. package/src/framework-schema.ts +15 -5
  98. package/src/generate-files.ts +1 -0
  99. package/src/generate-grant-findings.ts +7 -5
  100. package/src/generate-grants.ts +9 -8
  101. package/src/generate-kinds.ts +30 -6
  102. package/src/generate-roles-file.ts +30 -0
  103. package/src/generate-slice-policy.ts +3 -3
  104. package/src/guard-sources.ts +1 -2
  105. package/src/guards.ts +2 -2
  106. package/src/heavy-env.ts +2 -0
  107. package/src/heavy-errors.ts +18 -0
  108. package/src/heavy-holders.ts +78 -0
  109. package/src/heavy-ledger.ts +56 -14
  110. package/src/heavy-pressure.ts +104 -0
  111. package/src/heavy.ts +31 -13
  112. package/src/i18n-registration.ts +22 -2
  113. package/src/island-harness.ts +2 -2
  114. package/src/job-budget.ts +4 -2
  115. package/src/job-registration.ts +64 -8
  116. package/src/jobs-queue-known.ts +43 -0
  117. package/src/mcp-errors-agents.ts +20 -0
  118. package/src/mcp-errors-doctor.ts +27 -0
  119. package/src/mcp-errors-processes.ts +23 -0
  120. package/src/mcp-errors.ts +15 -29
  121. package/src/mcp-host.ts +2 -2
  122. package/src/merge-driver-catalog.ts +58 -0
  123. package/src/merge-driver-config.ts +43 -0
  124. package/src/merge-driver-lines.ts +140 -0
  125. package/src/merge-state.ts +105 -0
  126. package/src/messages-db.ts +22 -1
  127. package/src/messages-processes.ts +13 -0
  128. package/src/messages-upgrade.ts +10 -0
  129. package/src/messages.ts +54 -4
  130. package/src/output-findings.ts +48 -21
  131. package/src/page-navigation.ts +5 -2
  132. package/src/parse.ts +37 -6
  133. package/src/policy-facts.ts +38 -21
  134. package/src/policy-row.ts +99 -0
  135. package/src/port-pair-free.ts +28 -0
  136. package/src/pwa-artifacts.ts +1 -1
  137. package/src/registry-lines.ts +110 -0
  138. package/src/registry.ts +2 -0
  139. package/src/retain-sweep.ts +1 -1
  140. package/src/retained-assets-boot.ts +1 -1
  141. package/src/role-replicator.ts +4 -1
  142. package/src/role-select.ts +86 -0
  143. package/src/role-start.ts +13 -55
  144. package/src/role-sync.ts +10 -5
  145. package/src/runtime-assets-site.ts +2 -2
  146. package/src/runtime-assets.ts +1 -1
  147. package/src/runtime-cache-frame.ts +46 -0
  148. package/src/runtime-cache-ttl.ts +23 -0
  149. package/src/runtime-cache.ts +33 -16
  150. package/src/runtime-database-ssl.ts +84 -0
  151. package/src/runtime-idempotency-scope.ts +16 -2
  152. package/src/runtime-jobs-share.ts +52 -0
  153. package/src/runtime-jobs.ts +43 -12
  154. package/src/runtime-queue.ts +18 -3
  155. package/src/runtime-render-document.ts +1 -2
  156. package/src/runtime-services.ts +8 -1
  157. package/src/schema-drift.ts +19 -2
  158. package/src/schema-dump-drift.ts +4 -1
  159. package/src/serve-boot-probe.ts +30 -2
  160. package/src/serve-boot.ts +11 -1
  161. package/src/serve-env.ts +39 -3
  162. package/src/serve.ts +61 -10
  163. package/src/site-asset-routes.ts +2 -2
  164. package/src/site-assets.ts +5 -158
  165. package/src/stop-run-start.ts +12 -0
  166. package/src/supervise-boot.ts +61 -0
  167. package/src/supervise-cgroup.ts +84 -0
  168. package/src/supervise-child.ts +206 -0
  169. package/src/supervise-count.ts +244 -0
  170. package/src/supervise-errors.ts +83 -0
  171. package/src/supervise-facts.ts +40 -0
  172. package/src/supervise-messages.ts +84 -0
  173. package/src/supervise-policy.ts +46 -0
  174. package/src/supervise-pool.ts +10 -0
  175. package/src/supervise-probe.ts +158 -0
  176. package/src/supervise-run.ts +54 -0
  177. package/src/supervise.ts +383 -0
  178. package/src/sw-precache-plan.ts +1 -1
  179. package/src/templates/generate-purge.ts +6 -6
  180. package/src/templates/guard-animated-layout-property.ts +2 -2
  181. package/src/templates/guard-bare-error.ts +1 -1
  182. package/src/templates/guard-error-declared.ts +2 -2
  183. package/src/templates/guard-focus-visible.ts +1 -1
  184. package/src/templates/guard-image-dimensions.ts +2 -2
  185. package/src/templates/guard-island-mount-clears.ts +1 -1
  186. package/src/templates/guard-native-confirm.ts +1 -1
  187. package/src/templates/guard-raw-breakpoint.ts +2 -2
  188. package/src/templates/guard-raw-colour.ts +2 -2
  189. package/src/templates/guard-raw-fetch.ts +1 -1
  190. package/src/templates/guard-raw-interval.ts +1 -1
  191. package/src/templates/guard-raw-length.ts +3 -3
  192. package/src/templates/guard-raw-motion.ts +97 -1
  193. package/src/templates/guard-raw-shadow.ts +1 -1
  194. package/src/templates/guard-raw-z-index.ts +1 -1
  195. package/src/templates/guard-released-forms.ts +58 -9
  196. package/src/templates/guard-repo-await-in-loop.ts +1 -1
  197. package/src/templates/guard-repo-raw-sql.ts +4 -4
  198. package/src/templates/guard-repo-unbounded.ts +1 -1
  199. package/src/templates/guard-runtime-pin.ts +1 -1
  200. package/src/templates/guard-semantic-interactive.ts +2 -2
  201. package/src/templates/guard-unbounded-fanout.ts +1 -1
  202. package/src/templates/guard-undeclared-custom-property.ts +3 -3
  203. package/src/templates/guard-undefined-style-class.ts +3 -3
  204. package/src/templates/guard-unzoned-date.ts +3 -3
  205. package/src/templates/query-slice.ts +82 -0
  206. package/src/templates/query.ts +76 -30
  207. package/src/templates/resource-page.ts +3 -2
  208. package/src/templates/scaffold-bin.ts +2 -0
  209. package/src/templates/scaffold-claude-commands.ts +6 -0
  210. package/src/templates/scaffold-claude.ts +4 -4
  211. package/src/templates/scaffold-container-compose.ts +47 -7
  212. package/src/templates/scaffold-docs.ts +7 -3
  213. package/src/templates/scaffold-gitattributes.ts +18 -1
  214. package/src/templates/scaffold-helm-templates.ts +9 -0
  215. package/src/templates/scaffold-repo.ts +5 -2
  216. package/src/templates/scaffold-test-services.ts +33 -11
  217. package/src/templates/shapes/offline.ts +0 -7
  218. package/src/templates/shapes/realtime.ts +2 -6
  219. package/src/templates/sign-in-action-tests.ts +6 -4
  220. package/src/templates/sign-in-challenge.ts +62 -0
  221. package/src/templates/sign-in-oidc-mfa.ts +31 -0
  222. package/src/templates/sign-in-oidc.ts +11 -3
  223. package/src/templates/sign-in-password.ts +18 -56
  224. package/src/test-only-shipped.ts +29 -2
  225. package/src/test-shards.ts +134 -42
  226. package/src/test-verdict.ts +79 -0
  227. package/src/test-workers.ts +15 -0
  228. package/src/upgrade-coverage-ratchet.ts +95 -0
  229. package/src/upgrade-gate-codemods.ts +5 -3
  230. package/src/upgrade-gate.ts +42 -4
  231. package/src/upgrade-merge-drivers.ts +25 -0
  232. package/src/upgrade-report.ts +32 -4
  233. package/src/upgrade-scope.ts +62 -0
  234. package/src/verify-checks.ts +2 -8
  235. package/src/verify-coverage-run.ts +4 -1
  236. package/src/verify-e2e.ts +21 -3
  237. package/src/verify-live.ts +38 -14
  238. package/src/verify-only.ts +67 -0
  239. package/src/verify-progress.ts +7 -3
  240. package/src/verify-run.ts +20 -2
  241. package/src/verify-services-stack.ts +165 -0
  242. package/src/verify-services.ts +84 -2
  243. package/src/verify-test-run.ts +6 -7
  244. package/src/verify-tests.ts +8 -2
  245. package/src/verify-typecheck.ts +25 -2
  246. package/src/workspace-checks.ts +4 -1
  247. package/wiki/Actions.md +66 -3
  248. package/wiki/Admin-Dashboard.md +2 -2
  249. package/wiki/Agents.md +5 -5
  250. package/wiki/Auth.md +20 -6
  251. package/wiki/Bare-VM.md +1 -1
  252. package/wiki/CI-Parallel-Gate.md +2 -1
  253. package/wiki/CLI-Reference.md +115 -42
  254. package/wiki/Caching-And-Invalidation.md +1 -1
  255. package/wiki/Client-Navigation.md +35 -5
  256. package/wiki/Configuration.md +12 -10
  257. package/wiki/Deployment.md +44 -4
  258. package/wiki/Entities-And-Migrations.md +17 -3
  259. package/wiki/FAQ.md +1 -1
  260. package/wiki/Getting-Started.md +2 -2
  261. package/wiki/Home.md +3 -3
  262. package/wiki/I18n.md +6 -4
  263. package/wiki/Installation.md +12 -11
  264. package/wiki/Interface-Rules.md +3 -1
  265. package/wiki/Jobs-And-Workflows.md +24 -4
  266. package/wiki/Known-Gaps.md +2 -2
  267. package/wiki/MCP-And-AI.md +48 -13
  268. package/wiki/Many-Agents.md +69 -2
  269. package/wiki/Migrations-And-Backfills.md +18 -0
  270. package/wiki/Notify.md +5 -3
  271. package/wiki/Observability.md +13 -0
  272. package/wiki/Outbound-HTTP.md +53 -2
  273. package/wiki/Policies-And-Authz.md +1 -1
  274. package/wiki/Queries-And-Live-Queries.md +2 -2
  275. package/wiki/Realtime.md +24 -7
  276. package/wiki/Routes-And-Render-Modes.md +2 -2
  277. package/wiki/Scheduled-Tasks.md +4 -1
  278. package/wiki/Static-Assets.md +5 -3
  279. package/wiki/Testing.md +64 -7
  280. package/wiki/Theming.md +6 -3
  281. package/wiki/Timezones-And-Dates.md +5 -1
  282. package/wiki/Troubleshooting.md +1 -0
  283. package/wiki/Tutorial-01-First-App.md +3 -3
  284. package/wiki/Tutorial-02-First-Feature.md +1 -1
  285. package/wiki/Tutorial-03-Auth-And-Admin.md +7 -6
  286. package/wiki/UI-Components.md +1 -0
  287. package/wiki/Upgrading.md +38 -0
package/src/mcp-errors.ts CHANGED
@@ -7,6 +7,9 @@ import type { ErrorExplanation } from '@ultimat3/mcp';
7
7
  import type { CliErrorCode } from './error-codes';
8
8
  import { CLI_ERROR_CODES } from './error-codes';
9
9
  import { codeFixes, codeFixScan } from './error-fixes';
10
+ import { AGENTS_FIXES } from './mcp-errors-agents';
11
+ import { DOCTOR_FIXES } from './mcp-errors-doctor';
12
+ import { PROCESSES_FIXES } from './mcp-errors-processes';
10
13
  import { SHOT_FIXES } from './mcp-errors-shot';
11
14
  import { VERIFY_FIXES } from './mcp-errors-verify';
12
15
 
@@ -61,7 +64,12 @@ const CLI_FIXES: Readonly<Record<CliErrorCode, string>> = {
61
64
  X_PACKAGE_DUPLICATED:
62
65
  'x i18n check --json # the finding names both copies and the package.json to pin',
63
66
  // `x shot` and the `ui.*` tools: their own family, in `mcp-errors-shot.ts`.
67
+ ...AGENTS_FIXES,
64
68
  ...SHOT_FIXES,
69
+ // `x doctor`'s warnings and `x upgrade`'s: their own family, in `mcp-errors-doctor.ts`.
70
+ ...DOCTOR_FIXES,
71
+ // `ULTIMATE_PROCESSES`: their own family, in `mcp-errors-processes.ts`.
72
+ ...PROCESSES_FIXES,
65
73
  // The gate's floor, run and split: their own family, in `mcp-errors-verify.ts`.
66
74
  ...VERIFY_FIXES,
67
75
  X_GH_UNAVAILABLE: 'gh auth login # install first from https://cli.github.com',
@@ -77,8 +85,8 @@ const CLI_FIXES: Readonly<Record<CliErrorCode, string>> = {
77
85
  'x verify --json # the finding names the file, the line and the name it could not resolve',
78
86
  X_ERROR_CODE_UNTHROWN: 'x errors explain X_ERROR_CODE_UNTHROWN --json',
79
87
  X_CLI_UNEXPECTED: 'x doctor --json',
80
- // `-p .`: an app root has no `references`, so the gate's own step runs this form (#450).
81
- X_TYPECHECK_FAILED: 'bunx tsc -p . --pretty false',
88
+ // The step and not raw `tsc`: it queues in the machine ledger and takes the compiler lock.
89
+ X_TYPECHECK_FAILED: 'x verify --only typecheck --json',
82
90
  X_LINT_FAILED: 'bunx @biomejs/biome check .',
83
91
  X_TEST_FAILED: 'x test --json # the finding carries the exact bun test invocation that failed',
84
92
  X_FILE_TOO_LONG: 'x verify --json # the finding names the file to split',
@@ -137,12 +145,6 @@ const CLI_FIXES: Readonly<Record<CliErrorCode, string>> = {
137
145
  'x new my-app --json # a name with letters or digits; it becomes the directory',
138
146
  X_APP_EMPTY:
139
147
  'x doctor --json # then check the app root: no module under apps/ or packages/ loaded',
140
- X_PORT_IN_USE: 'x dev --port 3001 --json',
141
- X_DEV_ALREADY_RUNNING:
142
- 'x dev --json # after stopping the x dev that already owns this checkout',
143
- // The path, not `x dev`: the boot has already refused and rerunning it refuses again. The
144
- // error's own `fix:` carries the resolved `.x/dev.lock`; this table cannot know the state dir.
145
- X_DEV_LOCK_UNREADABLE: 'rm .x/dev.lock # then: x dev --json',
146
148
  // `x doctor`, not `x db status`: generation failing is a reachability question, and `x db status`
147
149
  // reads the migration ledger only. `x doctor` is already this table's answer for
148
150
  // X_DB_STUDIO_FAILED.
@@ -327,7 +329,7 @@ const CLI_FIXES: Readonly<Record<CliErrorCode, string>> = {
327
329
  X_REPRO_CAPTURE_OFF:
328
330
  'x jobs list --json # a job id replays with capture off; for requests set failureCapture: { enabled: true } in app.config.ts',
329
331
  X_ENTITY_RETAIN_UNSWEPT:
330
- "add export const retention = purge({ entities: 'declared' }) to a jobs module named in jobs: [...] in apps/web/api/index.ts, then x verify",
332
+ "add export const retention = purge({ entities: 'declared' }) to a jobs module named in jobs: [...] in apps/web/api/index.ts, then x manifest",
331
333
  X_NEW_SHAPE_UNKNOWN: 'bunx @ultimat3/cli help new',
332
334
  X_NEW_SHAPE_CONFLICT: 'bunx @ultimat3/cli new myapp --shape blog',
333
335
  X_SEO_CARD_ROUTE_UNKNOWN:
@@ -368,24 +370,10 @@ const CLI_FIXES: Readonly<Record<CliErrorCode, string>> = {
368
370
  "native: { success: (output) => '/where-it-lands' } in the action's declaration, then x verify --only manifest",
369
371
  X_ASSET_RETAIN_UNDECLARED:
370
372
  "edit app.config.ts: add assets: { retain: { disk: 'assets', builds: 3 } }, naming a disk your defineStorage({ disks }) declares that every web pod reads",
371
- X_EXERCISE_UNPROVEN_ABOVE_FLOOR:
372
- 'x exercise --json # re-measures at the constant seed the gate runs (a floor from before 31.47.0 was measured under random seeds); each unproven record in .x/exercise.json names the proof and its reason: fix the seed helper or override it names, assuming no order between sized calls; the floor only falls',
373
- X_ENV_NAME_RESERVED:
374
- 'edit app.config.ts: add an APP_ prefix to the envSchema name the finding cites (or delete it where the value is meant for the framework); then: x env example --json && x doctor --json',
375
- X_FRAMEWORK_PIN_RANGE:
376
- 'x doctor --json # each X_FRAMEWORK_PIN_RANGE names a package.json line and the exact version: write it there, then: bun install',
377
- X_VERIFY_STEP_UNFLOORED:
378
- 'x doctor --json # its X_VERIFY_STEP_UNFLOORED fix names the steps: run that x verify --only, then add each step that passed, not skipped, to "steps" in x.verify.json',
379
- X_DB_ROW_SECURITY_OFF:
380
- 'database: { rowSecurity: true } # in defineConfig, app.config.ts; then: x db gen "row security" --json && x db migrate --json && x doctor --json',
381
373
  X_DEV_DATA_UNOPENABLE:
382
374
  'x db migrate --json # the fresh database has no tables yet; then x db seed --json if the app declares a seed. The moved directory (meta.aside) is kept: delete it once its rows are not needed',
383
375
  X_EXPLAIN_PRODUCTION_DATABASE:
384
376
  'env -u DATABASE_URL x queries list --json # then the same prefix on x explain <query> --json: it plans on the embedded dev database; for a copy of production data, point DATABASE_URL at a staging restore with ULTIMATE_ENV=staging',
385
- X_DB_INDEX_UNDECLARED:
386
- 'x verify --only drift --json # each X_DB_INDEX_UNDECLARED warning names the index: its DROP INDEX CONCURRENTLY IF EXISTS "<name>"; goes in a new hand-written migration (-- transaction: false), or declare it in the entity\'s indexes: [...] and x db gen "<change>"',
387
- X_SHIPPED_GUARD_MISSING:
388
- "x doctor --json # each X_SHIPPED_GUARD_MISSING warning's fix is the command that writes its guard, then x verify --only boundaries --json",
389
377
  X_DEV_LOG_ABSENT:
390
378
  'x dev --json # the dev server writes the dev log as it boots; then: x logs tail --json',
391
379
  X_DEV_PEER_REFUSED:
@@ -393,20 +381,18 @@ const CLI_FIXES: Readonly<Record<CliErrorCode, string>> = {
393
381
  X_PROFILE_ROUTE_FAILED: 'x routes --json',
394
382
  X_ROWS_SLICE_ENTITY:
395
383
  'x help g --json # then generate a job with the name and feature the finding names, and declare exportRows/importRows in it over the table that entity.ts declares',
396
- X_SUPERSEDED_WORKAROUND:
397
- 'x doctor --json # each finding names the file, the release that retired the workaround and its replacement',
398
- X_GUARD_VENDORED: 'x upgrade --json',
399
384
  X_GUARD_BUILT_IN:
400
385
  'x verify --only boundaries --json # set its severity in guards/shipped.json, or generate an app guard under another name',
401
386
  X_REPRO_BUNDLE_INVALID:
402
387
  'x repro --json # lists the failing jobs and error groups; then run it again with one id and --bundle, and attach the file it writes',
403
- X_ADVISORY_FLOOR_UNMET: 'bun update source-map-js immutable',
404
- X_UPGRADE_CODEMODS_PENDING: 'x upgrade codemods --from 0.0.0 --json',
405
- X_UPGRADE_LOCKED: 'cat .x/upgrade.lock',
406
388
  X_APP_MIGRATIONS_UNAPPLIED: 'x db migrate --json',
407
389
  X_HEAVY_LEDGER_UNAVAILABLE: 'x heavy status --json',
408
390
  X_HEAVY_MEMORY_INVALID: 'export ULTIMATE_HEAVY_MEMORY=8g',
409
391
  X_HEAVY_COMMAND_NOT_FOUND: 'x heavy run --json -- bun test',
392
+ // `X_SEED_ENVIRONMENT`'s form: which task to consent to is what this table cannot know, and the
393
+ // raised error's own `fix:` carries the named invocation; `ULTIMATE_TASK_RUN` stays in the cause.
394
+ X_TASK_RUN_PRODUCTION:
395
+ 'x tasks list --json # then name the task: x tasks run <name> --production --json',
410
396
  };
411
397
 
412
398
  const isCliCode = (code: string): code is CliErrorCode =>
package/src/mcp-host.ts CHANGED
@@ -40,7 +40,7 @@ import { appManifest, policyFacts } from './app-manifest';
40
40
  import { loadAppRuntime } from './app-runtime';
41
41
  import { loadAppGraph, resolveNode } from './cmd-graph-load';
42
42
  import { declareDevEnvironment, needsDevEnvironmentDeclaration } from './dev-environment';
43
- import { liveDevLock } from './dev-lock';
43
+ import { liveDevLockChecked } from './dev-lock-live';
44
44
  import { loadCodeFixes } from './error-fixes';
45
45
  import type { Runner } from './exec';
46
46
  import { assertExplainTarget, devNotRunning, narrowVerify, searchDocs } from './mcp-agent-host';
@@ -253,7 +253,7 @@ function capabilities(
253
253
 
254
254
  async requestStatements(ask) {
255
255
  // The lock `x dev` writes names its URL; a missing or stale one is no server to ask.
256
- const lock = liveDevLock(lazy.services.stateDir);
256
+ const lock = await liveDevLockChecked(lazy.services.stateDir);
257
257
  if (lock === undefined) throw devNotRunning();
258
258
  return requestStatements({ devUrl: lock.url, ...ask });
259
259
  },
@@ -0,0 +1,58 @@
1
+ // The catalog half of `x merge-driver`: a three-way merge of the JSON, key by key. Lines cannot do
2
+ // it — the entry before an addition gains a comma on both sides. Two values for one key stay a
3
+ // conflict: which wording ships is a decision, and this file does not make decisions.
4
+
5
+ import { isJsonObject } from '@ultimat3/core';
6
+ import type { JsonObject } from './json-merge';
7
+ import { sortJsonDeep } from './json-merge';
8
+
9
+ const CONFLICT = Symbol('conflict');
10
+ const ABSENT = Symbol('absent');
11
+
12
+ const same = (a: unknown, b: unknown): boolean => Bun.deepEquals(a, b, true);
13
+
14
+ function mergeValue(base: unknown, ours: unknown, theirs: unknown): unknown {
15
+ if (same(ours, theirs) || same(theirs, base)) return ours;
16
+ if (same(ours, base)) return theirs;
17
+ if (!isJsonObject(ours) || !isJsonObject(theirs)) return CONFLICT;
18
+ return mergeObject(isJsonObject(base) ? base : {}, ours, theirs);
19
+ }
20
+
21
+ function mergeObject(base: JsonObject, ours: JsonObject, theirs: JsonObject): unknown {
22
+ const merged: [string, unknown][] = [];
23
+ for (const key of new Set([...Object.keys(ours), ...Object.keys(theirs)])) {
24
+ const read = (side: JsonObject): unknown => (Object.hasOwn(side, key) ? side[key] : ABSENT);
25
+ const value = mergeValue(read(base), read(ours), read(theirs));
26
+ if (value === CONFLICT) return CONFLICT;
27
+ if (value !== ABSENT) merged.push([key, value]);
28
+ }
29
+ return Object.fromEntries(merged);
30
+ }
31
+
32
+ const parsed = (text: string): JsonObject | undefined => {
33
+ try {
34
+ const value: unknown = JSON.parse(text.trim() === '' ? '{}' : text);
35
+ return isJsonObject(value) ? value : undefined;
36
+ } catch {
37
+ // Not JSON is an answer here: the caller falls back to a text merge, with markers.
38
+ return undefined;
39
+ }
40
+ };
41
+
42
+ const isSortedDeep = (value: unknown): boolean =>
43
+ JSON.stringify(value) === JSON.stringify(sortJsonDeep(value));
44
+
45
+ /**
46
+ * The merged catalog as `x g` prints one, or `undefined` when a side is not JSON or two sides
47
+ * disagree on a key. Sorted where both sides were, which is every catalog a generator wrote, so
48
+ * the merge order leaves no trace; a hand-grouped catalog keeps its order, the other side's new
49
+ * keys after it.
50
+ */
51
+ export function mergeCatalogText(base: string, ours: string, theirs: string): string | undefined {
52
+ const [b, o, t] = [parsed(base), parsed(ours), parsed(theirs)];
53
+ if (b === undefined || o === undefined || t === undefined) return undefined;
54
+ const merged = mergeObject(b, o, t);
55
+ if (merged === CONFLICT) return undefined;
56
+ const value = isSortedDeep(o) && isSortedDeep(t) ? sortJsonDeep(merged) : merged;
57
+ return `${JSON.stringify(value, null, 2)}\n`;
58
+ }
@@ -0,0 +1,43 @@
1
+ // The two git merge drivers `.gitattributes` names, and whether this clone has them. Git keeps a
2
+ // driver's command in `.git/config`, which no clone inherits, so `x merge-driver install` (a step
3
+ // of `bun run setup`) writes it; an attribute naming an unknown driver is an ordinary text merge.
4
+
5
+ import type { Runner } from './exec';
6
+ import { quoteArg } from './shell-quote';
7
+
8
+ export const GENERATED_DRIVER = 'x-generated';
9
+ export const REGISTRY_DRIVER = 'x-registry';
10
+
11
+ /**
12
+ * Through the installed binary, never `bunx x`: a clone with no install would fetch an unrelated
13
+ * npm package named `x` and run it on the merge. With none, this is git's own text merge.
14
+ */
15
+ export const registryDriverCommand = (prefix: string): string => {
16
+ const bin = quoteArg(`${prefix}node_modules/.bin/x`);
17
+ return `if [ -x ${bin} ]; then ${bin} merge-driver run %O %A %B %P; else git merge-file -L ours -L base -L theirs %A %O %B; fi`;
18
+ };
19
+
20
+ /** Every `git config` key and value, in the order they are written. */
21
+ export const driverConfig = (prefix: string): readonly (readonly [string, string])[] => [
22
+ [`merge.${GENERATED_DRIVER}.name`, 'keep ours: x manifest rebuilds this file'],
23
+ // `true` exits 0 and leaves our side in place: the file is a projection, rebuilt after the merge.
24
+ [`merge.${GENERATED_DRIVER}.driver`, 'true'],
25
+ [`merge.${REGISTRY_DRIVER}.name`, 'keep what both sides added to an x registry'],
26
+ [`merge.${REGISTRY_DRIVER}.driver`, registryDriverCommand(prefix)],
27
+ ];
28
+
29
+ /** `undefined` outside a git checkout. */
30
+ export async function gitPrefix(root: string, runner: Runner): Promise<string | undefined> {
31
+ const found = await runner(['git', 'rev-parse', '--show-prefix'], { cwd: root });
32
+ return found.ok ? found.stdout.trim() : undefined;
33
+ }
34
+
35
+ /** Whether `.gitattributes` names the driver and this clone does not define it. */
36
+ export async function driverUnset(root: string, runner: Runner): Promise<boolean> {
37
+ const attributes = Bun.file(`${root}/.gitattributes`);
38
+ if (!(await attributes.exists())) return false;
39
+ if (!(await attributes.text()).includes(`merge=${REGISTRY_DRIVER}`)) return false;
40
+ if ((await gitPrefix(root, runner)) === undefined) return false;
41
+ const key = `merge.${REGISTRY_DRIVER}.driver`;
42
+ return !(await runner(['git', 'config', '--get', key], { cwd: root })).ok;
43
+ }
@@ -0,0 +1,140 @@
1
+ // The registry half of `x merge-driver`: conflicts that are only "both sides ADDED here" keep both.
2
+ // Not `merge=union`, which also keeps a line one side deleted (a revoked grant in `roles.ts` comes
3
+ // back) and splices multi-line entries together. A conflict touching an existing line stays one.
4
+
5
+ import { maskOf } from './source-list-edit';
6
+
7
+ export const OURS_MARKER = '<<<<<<< ours';
8
+ const BASE_MARKER = '||||||| base';
9
+ const SPLIT_MARKER = '=======';
10
+ const THEIRS_MARKER = '>>>>>>> theirs';
11
+
12
+ export interface LineMerge {
13
+ readonly text: string;
14
+ /** The conflicts left in `text`, each still between its markers. */
15
+ readonly conflicts: number;
16
+ }
17
+
18
+ const indentOf = (line: string): number => /^[ \t]*/.exec(line)?.[0].length ?? 0;
19
+
20
+ const depthOf = (masked: string): number => {
21
+ let depth = 0;
22
+ for (const ch of masked) {
23
+ if ('([{'.includes(ch)) depth += 1;
24
+ else if (')]}'.includes(ch)) depth -= 1;
25
+ }
26
+ return depth;
27
+ };
28
+
29
+ /** Brackets balanced and the last code a `,` or `;`: nothing a neighbour could be spliced into. */
30
+ const isWhole = (lines: readonly string[]): boolean => {
31
+ const masked = maskOf(lines.join('\n')).trimEnd();
32
+ return depthOf(masked) === 0 && /[,;]$/.test(masked);
33
+ };
34
+
35
+ /**
36
+ * The added lines as whole entries — an entry starts at the block's own indent and runs until it
37
+ * is complete, so `foo: {`…`},` is one and a comment joins what it precedes. `undefined` when they
38
+ * do not divide that way: such a hunk is not a list of additions.
39
+ */
40
+ function entriesOf(lines: readonly string[]): readonly string[] | undefined {
41
+ if (lines.some((line) => line.trim() === '')) return undefined;
42
+ const indent = Math.min(...lines.map(indentOf));
43
+ const entries: string[][] = [];
44
+ for (const line of lines) {
45
+ const last = entries.at(-1);
46
+ if (last === undefined || (indentOf(line) === indent && isWhole(last))) entries.push([line]);
47
+ else last.push(line);
48
+ }
49
+ return entries.every(isWhole) ? entries.map((entry) => entry.join('\n')) : undefined;
50
+ }
51
+
52
+ const SPECIFIER = /\bfrom\s+'([^']+)';\s*$/;
53
+
54
+ /** What may appear once: an import's binding or module, an object entry's key. */
55
+ function identityOf(entry: string): string | undefined {
56
+ const code = entry.trimStart();
57
+ if (code.startsWith('import ')) {
58
+ const namespace = /^import \* as ([\w$]+)/.exec(code)?.[1];
59
+ return namespace === undefined ? `from:${SPECIFIER.exec(code)?.[1]}` : `as:${namespace}`;
60
+ }
61
+ const key = /^(?:([\w$]+)|'([^']+)'|"([^"]+)")\s*:/.exec(code);
62
+ return key === null ? undefined : `key:${key[1] ?? key[2] ?? key[3]}`;
63
+ }
64
+
65
+ const sortKeyOf = (entry: string): string => SPECIFIER.exec(entry)?.[1] ?? entry.trimStart();
66
+
67
+ /**
68
+ * Both sides' entries, each once, in one order. Sorted so that merging A into B and B into A write
69
+ * the same bytes, and so an import block stays in the order Biome requires. `undefined` when the
70
+ * two sides declare one name differently, which is a real conflict.
71
+ */
72
+ function bothSides(ours: readonly string[], theirs: readonly string[]): string[] | undefined {
73
+ const left = entriesOf(ours);
74
+ const right = entriesOf(theirs);
75
+ if (left === undefined || right === undefined) return undefined;
76
+ const entries = [...new Set([...left, ...right])];
77
+ const identities = entries.flatMap((entry) => identityOf(entry) ?? []);
78
+ if (new Set(identities).size !== identities.length) return undefined;
79
+ return entries
80
+ .sort((a, b) => {
81
+ const [x, y] = [sortKeyOf(a), sortKeyOf(b)];
82
+ return x < y ? -1 : x > y ? 1 : 0;
83
+ })
84
+ .flatMap((entry) => entry.split('\n'));
85
+ }
86
+
87
+ /**
88
+ * A marker line, with or without the `\r` git ends it with on a CRLF file. The `\r` stays on every
89
+ * line this module passes through or reorders, so the merged file keeps its own line ending.
90
+ */
91
+ const isMarker = (line: string | undefined, marker: string): boolean =>
92
+ line === marker || line === `${marker}\r`;
93
+
94
+ /** The first `marker` line at or after `from`; -1 when there is none, or no `from` to start at. */
95
+ export const markerAt = (lines: readonly string[], marker: string, from: number): number => {
96
+ if (from < 0) return -1;
97
+ for (let at = from; at < lines.length; at += 1) {
98
+ if (isMarker(lines[at], marker)) return at;
99
+ }
100
+ return -1;
101
+ };
102
+
103
+ /** `text` — `git merge-file --diff3 -L ours -L base -L theirs` output — with additions resolved. */
104
+ export function resolveAdditions(text: string): LineMerge {
105
+ const lines = text.split('\n');
106
+ const out: string[] = [];
107
+ let conflicts = 0;
108
+ for (let index = 0; index < lines.length; index += 1) {
109
+ const line = lines[index] as string;
110
+ if (!isMarker(line, OURS_MARKER)) {
111
+ out.push(line);
112
+ continue;
113
+ }
114
+ const baseAt = markerAt(lines, BASE_MARKER, index);
115
+ const splitAt = markerAt(lines, SPLIT_MARKER, baseAt);
116
+ const endAt = markerAt(lines, THEIRS_MARKER, splitAt);
117
+ if (baseAt === -1 || splitAt === -1 || endAt === -1) {
118
+ out.push(line);
119
+ continue;
120
+ }
121
+ const merged =
122
+ splitAt === baseAt + 1
123
+ ? bothSides(lines.slice(index + 1, baseAt), lines.slice(splitAt + 1, endAt))
124
+ : undefined;
125
+ if (merged === undefined) conflicts += 1;
126
+ out.push(...(merged ?? lines.slice(index, endAt + 1)));
127
+ index = endAt;
128
+ }
129
+ return { text: out.join('\n'), conflicts };
130
+ }
131
+
132
+ /**
133
+ * The count the driver exits on. `resolved` is `resolveAdditions`' own; the rest is a backstop for
134
+ * a marker it did not recognise: when git reported conflicts and a line of the result still opens
135
+ * one, the file is not merged whatever was counted, and git's number stands.
136
+ */
137
+ export function conflictsLeft(text: string, resolved: number, gitReported: number): number {
138
+ if (resolved > 0 || gitReported <= 0) return resolved;
139
+ return /^<{7} /m.test(text) ? gitReported : 0;
140
+ }
@@ -0,0 +1,105 @@
1
+ // What a merge left behind, as findings: paths git still holds unmerged, and i18n catalogs that do
2
+ // not parse. A catalog is imported by nearly every page, so one stray marker used to surface as a
3
+ // SyntaxError blamed on each importer, with the catalog itself named nowhere.
4
+
5
+ // why: `Bun.Glob.scan` throws on a missing directory, and an app need not have any catalog.
6
+ import { existsSync } from 'node:fs';
7
+ import { ERROR_DOCS_URL, renderThrowable } from '@ultimat3/core';
8
+ import type { Runner } from './exec';
9
+ import { exec } from './exec';
10
+ import type { Finding } from './output';
11
+ import { quoteArg } from './shell-quote';
12
+
13
+ /**
14
+ * `templates/locales.ts`'s `CATALOG_ROOT`, restated: `loadApp` reaches this module, and the serve
15
+ * graph carries no template (`serve-graph.test.ts`). `merge-state.test.ts` holds the two equal.
16
+ */
17
+ export const CATALOG_ROOT = 'packages/i18n/catalogs';
18
+
19
+ export const UNMERGED_FIX = 'git diff --name-only --diff-filter=U';
20
+
21
+ const MARKER = /^(?:<{7}|\|{7}|={7}|>{7})(?: |$)/m;
22
+
23
+ const finding = (code: string, cause: string, fix: string, at: string): Finding => ({
24
+ code,
25
+ cause,
26
+ fix,
27
+ docs: ERROR_DOCS_URL,
28
+ at,
29
+ });
30
+
31
+ /** Every path git holds unmerged, relative to `root`; none outside a checkout. */
32
+ export async function unmergedPaths(
33
+ root: string,
34
+ runner: Runner = exec,
35
+ ): Promise<readonly string[]> {
36
+ const argv = ['git', 'diff', '--name-only', '--relative', '--diff-filter=U'];
37
+ const found = await runner(argv, { cwd: root }).catch(() => undefined);
38
+ if (found?.ok !== true) return [];
39
+ return found.stdout.split('\n').filter((path) => path !== '');
40
+ }
41
+
42
+ export async function unmergedFindings(root: string, runner?: Runner): Promise<readonly Finding[]> {
43
+ return (await unmergedPaths(root, runner)).map((path) =>
44
+ finding(
45
+ 'X_MERGE_UNRESOLVED',
46
+ `${path} is still unmerged: git holds conflicting versions of it`,
47
+ UNMERGED_FIX,
48
+ path,
49
+ ),
50
+ );
51
+ }
52
+
53
+ /** One finding per catalog that will not load, naming the file every importer failed on. */
54
+ export async function catalogFileFindings(root: string): Promise<readonly Finding[]> {
55
+ const findings: Finding[] = [];
56
+ const directory = `${root}/${CATALOG_ROOT}`;
57
+ if (!existsSync(directory)) return findings;
58
+ for await (const name of new Bun.Glob('*.json').scan(directory)) {
59
+ const at = `${CATALOG_ROOT}/${name}`;
60
+ const text = await Bun.file(`${root}/${at}`).text();
61
+ if (MARKER.test(text)) {
62
+ findings.push(
63
+ finding(
64
+ 'X_MERGE_UNRESOLVED',
65
+ `${at} holds conflict markers, so it is not JSON and no page importing it loads`,
66
+ `grep -nE '^(<{7}|={7}|>{7})' ${quoteArg(at)} # keep the right side of each, delete the markers`,
67
+ at,
68
+ ),
69
+ );
70
+ continue;
71
+ }
72
+ try {
73
+ JSON.parse(text);
74
+ } catch (error) {
75
+ findings.push(
76
+ finding(
77
+ 'X_CATALOG_UNPARSEABLE',
78
+ `${at} is not valid JSON (${renderThrowable(error)}), so no page importing it loads`,
79
+ `bunx biome check ${quoteArg(at)} # names the line to correct`,
80
+ at,
81
+ ),
82
+ );
83
+ }
84
+ }
85
+ return findings;
86
+ }
87
+
88
+ const isCatalogSymptom = (one: Finding): boolean =>
89
+ one.code === 'X_CLI_UNEXPECTED' && one.cause.includes('JSON Parse error');
90
+
91
+ /**
92
+ * A failed app load, its causes first: an unparseable catalog replaces the parse errors it caused
93
+ * in every importer, and an unmerged path leads, because it explains whatever else failed. Asked
94
+ * only once the load has already failed, so a healthy app pays nothing.
95
+ */
96
+ export async function withMergeCauses(
97
+ root: string,
98
+ findings: readonly Finding[],
99
+ ): Promise<readonly Finding[]> {
100
+ const catalogs = await catalogFileFindings(root);
101
+ const held = new Set(catalogs.map((one) => one.at));
102
+ const unmerged = (await unmergedFindings(root)).filter((one) => !held.has(one.at));
103
+ const rest = catalogs.length > 0 ? findings.filter((one) => !isCatalogSymptom(one)) : findings;
104
+ return [...unmerged, ...catalogs, ...rest];
105
+ }
@@ -38,14 +38,35 @@ export const DB_MESSAGES = {
38
38
  // The fourth: no DDL and no sidecar moved, but `packages/db/schema/` did — a hand edit repaired,
39
39
  // or a framework table that changed under an upgrade. `unchanged` would deny a write the lines
40
40
  // below it list, and this command is `X_SCHEMA_DUMP_DRIFT`'s whole `fix:`.
41
- 'cli.db.gen.dumped': 'no migration needed — schema dump rewritten ({count} file(s))',
41
+ // Names the migration, because in a shared checkout another agent's concurrent `x db gen` may be
42
+ // what recorded this run's table: the entities are one registry, so its migration carries them.
43
+ 'cli.db.gen.dumped':
44
+ 'no migration needed — {newest} already records every entity (a concurrent x db gen may have written it); schema dump rewritten ({count} file(s))',
45
+ // A sidecar moved and no migration exists: `written` would name one nobody can apply.
46
+ 'cli.db.gen.forkMerged':
47
+ 'forked migrations merged — {count} object(s) corrected in {id}.snapshot.json; no SQL changed, no migration deleted',
48
+ 'cli.db.gen.newest': ' newest migration: {id}',
42
49
  'cli.db.gen.written': 'migration {id} generated',
50
+ 'cli.db.gen.writtenTables': 'migration {id} generated — tables: {tables}',
51
+ // A diff that needs a step outside the transaction writes TWO: a line naming one hid the other.
52
+ 'cli.db.gen.writtenPair': 'migrations {id} and {followUp} generated',
53
+ 'cli.db.gen.writtenPairTables': 'migrations {id} and {followUp} generated — tables: {tables}',
54
+ 'cli.db.gen.editsUnchecked':
55
+ ' applied migrations were not compared with the ledger ({reason}) — x db status --json reports an edited one',
43
56
  // Exit 1 and a migration on disk at once: the summary carries the half the exit code hides.
44
57
  'cli.db.gen.writtenDumpFailed':
45
58
  'migration {id} generated and written — the schema dump was not; do not generate it again',
46
59
  'cli.db.migrate.applied': 'migrations applied',
47
60
  'cli.db.migrate.failed': 'migration failed',
48
61
  'cli.db.reset.done': 'database reset and migrated',
62
+ 'cli.db.rollback.done': 'rolled back {count} migration(s): {ids}',
63
+ 'cli.db.rollback.none': 'no applied migration to roll back',
64
+ 'cli.db.rollback.failed': 'rollback failed — nothing past the failing migration was reversed',
65
+ 'cli.db.rollback.deferredHalf':
66
+ ' {id} is the step x db gen writes beside {base} to run outside its transaction — {base} is still applied: x db rollback reverses it next',
67
+ // The file outlives its ledger row, so the migration is pending again: both next moves, named.
68
+ 'cli.db.rollback.kept':
69
+ ' each file is still on disk and pending — x db migrate re-applies it; to drop the change, delete the .sql with its .snapshot.json and .hash, then x db gen',
49
70
  // Every seed counted per outcome, exactly as the backfill summary is: a replayed seed writes
50
71
  // nothing and skips everything, and a total that hid that would make the second run look idle.
51
72
  'cli.db.seed.done':
@@ -0,0 +1,13 @@
1
+ // The `x doctor` processes rows of the CLI catalog (`messages.ts` composes them): how many processes
2
+ // a production container of each role runs here, and the connections one container holds. Data only.
3
+
4
+ export const PROCESSES_MESSAGES = {
5
+ 'cli.doctor.processes':
6
+ 'processes per container, as a production container here would run them — {cores} core(s) seen, CPU budget {budget}:',
7
+ 'cli.doctor.processesUndeclared': 'undeclared — auto runs 1 process',
8
+ 'cli.doctor.processesRole':
9
+ ' {role}: {count} process(es), bound by {binding} · pool {pool} + {listen} LISTEN = {connections} connection(s) per container',
10
+ 'cli.doctor.processesRefused': ' {role}: ULTIMATE_PROCESSES refused — {code}',
11
+ 'cli.doctor.processesConnections':
12
+ ' one container of each role holds {total} connection(s); the server allows max_connections {max} — multiply by your replicas',
13
+ } as const;
@@ -29,6 +29,12 @@ export const UPGRADE_MESSAGES = {
29
29
  'cli.upgrade.typescript':
30
30
  'typescript, by hand: {file} declares {from}, below the {to} the framework is checked with — run: {fix}',
31
31
  'cli.upgrade.done': '{from} -> {to}: the gate is green',
32
+ 'cli.upgrade.doneScoped':
33
+ '{from} -> {to}: green on {only} only — NOT THE FULL GATE; not run: {notRun}',
34
+ 'cli.upgrade.notRun':
35
+ 'not run by this hop, so not proven yet — CI, or this machine, owes: x verify --only {steps} --json',
36
+ 'cli.upgrade.then.scoped':
37
+ 'review the diff and commit this hop to {to}; it is done only once x verify --only {steps} --json (or a bare x verify) is green on it, in CI or here, then re-run x upgrade --json for the next one',
32
38
  'cli.upgrade.dryRun': '{from} -> {to}: nothing written, no gate run',
33
39
  'cli.upgrade.guard': 'guard, yours to take or leave: {fix}',
34
40
  'cli.upgrade.doctorWarning': 'doctor warning: {code}, red on the next major — fix: {fix}',
@@ -40,6 +46,10 @@ export const UPGRADE_MESSAGES = {
40
46
  'guard not installed, its findings could not be counted — yours to take: {fix}',
41
47
  'cli.upgrade.coverage':
42
48
  'coverage floor: {file} {fromLines} / {fromFuncs} -> {toLines} / {toFuncs}, measured {lines}% / {funcs}% after the Bun floor moved — review the why',
49
+ 'cli.upgrade.coverageRaised':
50
+ "coverage floor raised: {file} {fromLines} / {fromFuncs} -> {toLines} / {toFuncs}, measured {lines}% / {funcs}% by this hop's unit run (X_COVERAGE_FLOOR_STALE) — it may only rise",
51
+ 'cli.upgrade.coverageRejudged':
52
+ '{summary}; the coverage floor rose to what unit measured, and unit re-run: {unit}',
43
53
  'cli.upgrade.exerciseFloor':
44
54
  'exercise floor: {file} "exercise" {figures}, measured by this hop\'s x exercise — it may only fall',
45
55
  'cli.upgrade.coverage.unpinned': 'no engines.bun',