@ultimat3/cli 31.28.0 → 31.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +1 -0
- package/package.json +29 -29
- package/src/app-migrations-verdict.ts +84 -0
- package/src/cmd-drill.ts +23 -9
- package/src/codemods/helm-alerts-deploy.ts +85 -0
- package/src/codemods/index.ts +4 -0
- package/src/codemods/migrate-job-ordered.ts +81 -0
- package/src/codemods/migrate-job-stock.ts +41 -0
- package/src/drill-schema-behind.ts +26 -0
- package/src/error-codes.ts +3 -0
- package/src/framework-schema-apply.ts +7 -19
- package/src/framework-schema-stamp.ts +38 -3
- package/src/framework-schema-verify.ts +120 -0
- package/src/framework-schema-wait.ts +125 -0
- package/src/mcp-errors.ts +1 -0
- package/src/role-pg-stats.ts +21 -0
- package/src/role-start.ts +4 -0
- package/src/runtime-queue.ts +27 -6
- package/src/serve-boot-probe.ts +97 -0
- package/src/serve-boot.ts +26 -1
- package/src/serve-retire.ts +16 -3
- package/src/templates/chart-dashboard-panels.ts +178 -0
- package/src/templates/chart-dashboard.ts +9 -135
- package/src/templates/scaffold-container.ts +2 -2
- package/src/templates/scaffold-helm-alert-deploy.ts +105 -0
- package/src/templates/scaffold-helm-alert-rules.ts +7 -1
- package/src/templates/scaffold-helm-alerts.ts +3 -0
- package/src/templates/scaffold-helm-migrate.ts +85 -0
- package/src/templates/scaffold-helm-templates.ts +2 -36
- package/src/templates/scaffold-helm.ts +1 -0
- package/wiki/CLI-Reference.md +12 -1
- package/wiki/Deployment.md +2 -1
- package/wiki/Known-Gaps.md +1 -1
- package/wiki/Upgrading.md +1 -0
package/wiki/CLI-Reference.md
CHANGED
|
@@ -51,7 +51,7 @@ x version # CLI version
|
|
|
51
51
|
| `x tasks` | cron tasks, their timezone and their next run | shipped |
|
|
52
52
|
| `x policy` | which clause decided a permission, and why | shipped |
|
|
53
53
|
| `x exercise [<name>] [--seed n] [--shard i/n]` | run every action, query, job and route `load` once on generated rows, with no test written; the gate's `exercise` step | shipped |
|
|
54
|
-
| `x drill [<name>] [--list] [--budget-ms n]` | the app's
|
|
54
|
+
| `x drill [<name>] [--list] [--budget-ms n]` | the app's roles as real processes on real Postgres, Redis and NATS, each dependency faulted through a proxy, each role signalled, or every role started before `ROLE=migrate`, red on any framework contract that does not hold. Not a gate step: it needs the services | shipped |
|
|
55
55
|
| `x i18n` | add, sync, check catalogs | shipped |
|
|
56
56
|
| `x mail preview <id>` | render a mail's declared `preview` in every locale, nothing sent | shipped |
|
|
57
57
|
| `x test <type>` | run one of the six test types, or the whole suite | shipped |
|
|
@@ -1597,6 +1597,17 @@ sampled throughout.
|
|
|
1597
1597
|
| `worker-sigkill` | `SIGKILL` the worker, then a fresh one | `jobs-terminal`, `jobs-once`, `requests-coded` |
|
|
1598
1598
|
| `worker-sigterm` | `SIGTERM` the worker, then a fresh one | `role-exits`, `jobs-terminal`, `jobs-once` |
|
|
1599
1599
|
| `web-sigterm` | `SIGTERM` the web role under load | `requests-ok`, `role-exits` |
|
|
1600
|
+
| `roll-before-migrate` | the roles started before `ROLE=migrate`, on a schema stamped by an older build | `roles-wait`, `serves-after-migrate`, `one-wait-line` |
|
|
1601
|
+
|
|
1602
|
+
`roll-before-migrate`, `As of 2026-11-15`, is the rollout order a deploy cannot always hold: no
|
|
1603
|
+
proxy and no load. The scratch database is migrated, its framework stamp (`x_jobs`' table comment)
|
|
1604
|
+
is rewound to name only an older build, then `web`, `worker` and `scheduler` start on it without
|
|
1605
|
+
waiting for readiness. Once each has logged its wait (or exited), they are held 3 s and
|
|
1606
|
+
`ROLE=migrate` runs again. Each must stay up (`roles-wait`: an exit is a crash-loop), log exactly
|
|
1607
|
+
one line naming `X_FRAMEWORK_SCHEMA_UNAPPLIED` (`one-wait-line`), and answer `/readyz` 200 once
|
|
1608
|
+
migrate has run (`serves-after-migrate`). `ULTIMATE_SCHEMA_WAIT_MS` is inherited: `0` — refuse at
|
|
1609
|
+
once — turns it red. Its evidence is `evidence.rollout.roles[]`, each
|
|
1610
|
+
`{ role, exit, ready, waitLines, logTail }`.
|
|
1600
1611
|
|
|
1601
1612
|
Thresholds come from the app: the request deadline (`@ultimat3/http`'s default, 30 s, because
|
|
1602
1613
|
`configureHttp` is runtime code the CLI does not run), `drain.deadlineMs` plus
|
package/wiki/Deployment.md
CHANGED
|
@@ -508,12 +508,13 @@ The framework depends on none of this; it is the operations manual for the app y
|
|
|
508
508
|
| [`docs/ops/04-datastores.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/04-datastores.md) | sizing Postgres, NATS and object storage for a given rung |
|
|
509
509
|
| [`docs/ops/05-disaster-recovery.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/05-disaster-recovery.md) | backups, PITR, restore drills, replication-slot recovery |
|
|
510
510
|
| [`docs/ops/06-runbooks.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/06-runbooks.md) | symptom → page → action, per role |
|
|
511
|
+
| [`docs/ops/07-deploy-contract.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/07-deploy-contract.md) | what a deploy guarantees: order, a role over a schema that is behind, drain, the skew window, rollback, each failure's alert |
|
|
511
512
|
|
|
512
513
|
Two design-only companions — **specification, not shipped behaviour**: [`docs/idea/16-app-targets.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/16-app-targets.md) (three targets, one backend, two view layers) and [`docs/idea/17-scale-ladder.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/idea/17-scale-ladder.md) (why the app code is identical at rung 0 and rung 4).
|
|
513
514
|
|
|
514
515
|
## Rollback
|
|
515
516
|
|
|
516
|
-
Redeploy the previous image tag. Inside an `assets.retain` window (below) a rollback 404s nobody mid-session; without one, a tab holding the other build's document reloads.
|
|
517
|
+
Redeploy the previous image tag: `x deploy --image <previous> --json`. `helm rollback` runs the older build's migrate first only onto a revision a 31.29+ chart rendered (a `pre-rollback` hook; Helm runs the target revision's hooks); onto an older one it skips the checks below → [Kubernetes migrations](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/01-kubernetes.md#migrations). Inside an `assets.retain` window (below) a rollback 404s nobody mid-session; without one, a tab holding the other build's document reloads.
|
|
517
518
|
|
|
518
519
|
The older image's migrate role decides whether the schema allows it (`As of 2026-11`). Over ledger rows the newer build applied it applies nothing and logs them (`ahead`). Over a row the newer build RECORDED as destructive (`x_migrations.destructive`, written at apply) it refuses before anything serves:
|
|
519
520
|
|
package/wiki/Known-Gaps.md
CHANGED
|
@@ -58,7 +58,7 @@ CHANGELOG.md` finds its bounds, and it changes on any commit.
|
|
|
58
58
|
| Retry-from-step on the jobs dashboard is a free-text field | `As of 2026-10`. `job.retry-from-step` takes `{ step: t.string.min(1) }` (`packages/admin/src/jobs/job-actions.ts`); the run's detail page shows its steps, but the form does not offer them as a choice. | copy the step name from the run's `steps` section on the same page |
|
|
59
59
|
| The admin MCP batch tool takes `ids` only | `As of 2026-10`. A `batch` action is one MCP tool, `admin.action.<name>`, and it takes the rows by id; "all matching" — the list's own filter — is a screen control only | list the rows with `admin.<entity>.list` and its `where`, then pass their ids |
|
|
60
60
|
| No counts on the jobs dashboard's state tabs | `As of 2026-10`. `stats()` counts per queue across every tenant, so a count on a tab would show an org-scoped operator other orgs' numbers; the tabs carry none and the overview's tiles carry the counts, for a platform operator only. A per-tenant count is a second query nothing issues yet | a platform operator reads the overview tiles; an org-scoped operator reads a tab's own page |
|
|
61
|
-
| `x drill` proves one node per role on one machine, and drills no object store and no CDN | `As of 2026-11-06`. The fleet is one `web`, one `worker` (and one `sync` for `nats-down`) on one host, every dependency a local container behind a Bun TCP proxy: a multi-node NATS cluster, a Postgres failover to a real standby, a real S3 bucket and a real CDN in front of the web role are never faulted. `nats-down`'s sync lane is proven on a stand-in node (`packages/testing/src/drill-sync.test.ts`), not on `examples/dummy`, whose transport is in-memory; its client subscribes to nothing by default, so a gap counts only what the node volunteers. CI runs
|
|
61
|
+
| `x drill` proves one node per role on one machine, and drills no object store and no CDN | `As of 2026-11-06`. The fleet is one `web`, one `worker` (and one `sync` for `nats-down`) on one host, every dependency a local container behind a Bun TCP proxy: a multi-node NATS cluster, a Postgres failover to a real standby, a real S3 bucket and a real CDN in front of the web role are never faulted. `nats-down`'s sync lane is proven on a stand-in node (`packages/testing/src/drill-sync.test.ts`), not on `examples/dummy`, whose transport is in-memory; its client subscribes to nothing by default, so a gap counts only what the node volunteers. CI runs four of the nine (`fault-drills`, `roll-before-migrate` among them) [pin](https://github.com/developerz-ai/ultimate/blob/main/packages/testing/src/drills.test.ts#the%20nine%20drills%2C%20once%20each) | the rest by hand: `x drill --list --json`, then `x drill <name> --json` with `docker/test-services.env` loaded. A multi-node or object-store fault is a staging drill of your own, against [`docs/ops/06-runbooks.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/ops/06-runbooks.md) |
|
|
62
62
|
|
|
63
63
|
## Open by decision
|
|
64
64
|
|
package/wiki/Upgrading.md
CHANGED
|
@@ -298,6 +298,7 @@ A setter still on a package's `.` barrel is `X_ADAPTER_PORT_INCOMPLETE` on the `
|
|
|
298
298
|
| a new shipped guard, `runtime-pin` (**31.28.0**), built in: it reports where the app's Bun pins disagree — `engines.bun`, `packageManager`, `.bun-version`, CI's `bun-version:`, the Dockerfile's `oven/bun` image and its digest | `x upgrade --json` (its `runtime-pin` codemod moves a scaffold-written pin onto today's; a pin you wrote is reported, never rewritten), then `x verify --only boundaries --json`; to opt out, `"runtime-pin": "off"` in `guards/shipped.json` |
|
|
299
299
|
| `x upgrade` applies **codemods** from **31.28.0**: every scaffold-owned change between your version and the target is carried as a codemod (`data.codemods`); a file you edited is listed with its diff and never overwritten. After a hop an older CLI drove, apply them with `x upgrade codemods --from <old version> --json` | nothing; read `data.codemods.skipped` after each hop |
|
|
300
300
|
| a stopped `x upgrade` (**31.28.0**) leaves `.x/upgrade.json`; rerunning it to the same `--to` finishes the hop — install, codemods, gate — and a second `x upgrade` in the same app is refused while one runs (`X_UPGRADE_LOCKED`). Ctrl-C or SIGTERM now stops the hop's own children too | stash a stopped hop's tree, never commit it: `git stash push --include-untracked`, then `x upgrade --to <same version> --json` |
|
|
301
|
+
| a serving role over a schema behind its build **waits** for the migrate step (**31.29.0**) instead of exiting — framework stamp and app migrations alike — and exits after `ULTIMATE_SCHEMA_WAIT_MS` (default 300000); the chart's migrate Job is an Argo CD `Sync` hook in wave −1, named by a hash of its image, its migrate settings and the chart version, deleted on success, and runs on `helm rollback` too | `x upgrade --json` (codemods `migrate-job-ordered`, `helm-alerts-deploy`); after a pre-31.29 chart, `kubectl delete job <release>-migrate` once; `ULTIMATE_SCHEMA_WAIT_MS=0` keeps the old refuse-at-once |
|
|
301
302
|
| `overrides` an app carries for `seroval`, `seroval-plugins` or `source-map-js` are no longer needed from **31.28.0**: `@ultimat3/ui`'s `solid-js` peer is `^1.9.18`, which requires the patched `seroval`; `source-map-js` and `immutable` arrive through `sass` and need a refreshed lockfile. `x doctor` warns below each floor (`X_ADVISORY_FLOOR_UNMET`) | drop those `overrides`, then `x upgrade --json` (its `solid-floor` codemod raises `solid-js`) and `bun update source-map-js immutable` |
|
|
302
303
|
|
|
303
304
|
## 29.x → 30.0.0, entry by entry
|