@ultimat3/cli 31.47.0 → 31.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/cli",
3
- "version": "31.47.0",
3
+ "version": "31.47.1",
4
4
  "description": "The `x` binary: new, dev, build, verify, generate, db, mcp, doctor, deploy",
5
5
  "keywords": [
6
6
  "ultimate",
@@ -53,34 +53,34 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@babel/core": "^8.0.10",
56
- "@ultimat3/action": "31.47.0",
57
- "@ultimat3/admin": "31.47.0",
58
- "@ultimat3/ai": "31.47.0",
59
- "@ultimat3/auth": "31.47.0",
60
- "@ultimat3/cache": "31.47.0",
61
- "@ultimat3/core": "31.47.0",
62
- "@ultimat3/db": "31.47.0",
63
- "@ultimat3/entity": "31.47.0",
64
- "@ultimat3/flags": "31.47.0",
65
- "@ultimat3/http": "31.47.0",
66
- "@ultimat3/i18n": "31.47.0",
67
- "@ultimat3/jobs": "31.47.0",
68
- "@ultimat3/mail": "31.47.0",
69
- "@ultimat3/manifest": "31.47.0",
70
- "@ultimat3/mcp": "31.47.0",
71
- "@ultimat3/money": "31.47.0",
72
- "@ultimat3/notify": "31.47.0",
73
- "@ultimat3/policy": "31.47.0",
74
- "@ultimat3/pwa": "31.47.0",
75
- "@ultimat3/query": "31.47.0",
76
- "@ultimat3/realtime": "31.47.0",
77
- "@ultimat3/render": "31.47.0",
78
- "@ultimat3/schema": "31.47.0",
79
- "@ultimat3/scraping": "31.47.0",
80
- "@ultimat3/seo": "31.47.0",
81
- "@ultimat3/storage": "31.47.0",
82
- "@ultimat3/testing": "31.47.0",
83
- "@ultimat3/time": "31.47.0",
56
+ "@ultimat3/action": "31.47.1",
57
+ "@ultimat3/admin": "31.47.1",
58
+ "@ultimat3/ai": "31.47.1",
59
+ "@ultimat3/auth": "31.47.1",
60
+ "@ultimat3/cache": "31.47.1",
61
+ "@ultimat3/core": "31.47.1",
62
+ "@ultimat3/db": "31.47.1",
63
+ "@ultimat3/entity": "31.47.1",
64
+ "@ultimat3/flags": "31.47.1",
65
+ "@ultimat3/http": "31.47.1",
66
+ "@ultimat3/i18n": "31.47.1",
67
+ "@ultimat3/jobs": "31.47.1",
68
+ "@ultimat3/mail": "31.47.1",
69
+ "@ultimat3/manifest": "31.47.1",
70
+ "@ultimat3/mcp": "31.47.1",
71
+ "@ultimat3/money": "31.47.1",
72
+ "@ultimat3/notify": "31.47.1",
73
+ "@ultimat3/policy": "31.47.1",
74
+ "@ultimat3/pwa": "31.47.1",
75
+ "@ultimat3/query": "31.47.1",
76
+ "@ultimat3/realtime": "31.47.1",
77
+ "@ultimat3/render": "31.47.1",
78
+ "@ultimat3/schema": "31.47.1",
79
+ "@ultimat3/scraping": "31.47.1",
80
+ "@ultimat3/seo": "31.47.1",
81
+ "@ultimat3/storage": "31.47.1",
82
+ "@ultimat3/testing": "31.47.1",
83
+ "@ultimat3/time": "31.47.1",
84
84
  "babel-preset-solid": "^1.9.16"
85
85
  }
86
86
  }
@@ -11,6 +11,7 @@ import { runUpgradeCodemods } from './cmd-upgrade-codemods';
11
11
  import { upgradeSpec } from './cmd-upgrade-spec';
12
12
  import type { CliCommand, CommandContext } from './command';
13
13
  import { failed, ok } from './command';
14
+ import { supersededFindings } from './doctor-superseded';
14
15
  import { BadFlagError, BunVersionError } from './errors';
15
16
  import type { Runner } from './exec';
16
17
  import { execOutput } from './exec';
@@ -24,7 +25,7 @@ import type { BunEdit, BunManual } from './upgrade-bun-floor';
24
25
  import { editBunSites, floorOf, isBunSite } from './upgrade-bun-floor';
25
26
  import { requireCleanTree } from './upgrade-clean-tree';
26
27
  import { repoScripts, runHopGate, runRepoScripts } from './upgrade-gate';
27
- import { atTargetCodemods, EVERY_RELEASE, previewCodemods } from './upgrade-gate-codemods';
28
+ import { EVERY_RELEASE, previewCodemods } from './upgrade-gate-codemods';
28
29
  import { acquireUpgradeLock } from './upgrade-lock';
29
30
  import { readManifests, readPins, rewritePins } from './upgrade-pins';
30
31
  import type { UpgradeHop } from './upgrade-plan';
@@ -32,7 +33,6 @@ import { planHop, releaseOf } from './upgrade-plan';
32
33
  import { publishedVersions, releaseBunRange } from './upgrade-registry';
33
34
  import type { PlannedWrites } from './upgrade-report';
34
35
  import { humanLines, NO_WRITES, report, thenLine } from './upgrade-report';
35
- import { codemodLines } from './upgrade-report-codemods';
36
36
  import { findUpgradeRoot } from './upgrade-root';
37
37
  import { stopChildrenOnSignal, tagRunner, upgradeTag } from './upgrade-signals';
38
38
  import type { UnfinishedHop } from './upgrade-unfinished';
@@ -177,9 +177,8 @@ export const createUpgradeCommand = (
177
177
  // A record for some other target is a hop since undone (`git stash`): nothing left to finish.
178
178
  if (unfinished !== undefined && !dryRun) await clearUnfinished(root);
179
179
  const then = thenLine({ hop, dryRun, app, gate: undefined, scripts: [] });
180
- const carried = app
181
- ? await atTargetCodemods({ runner: ctx.runner, root, to: hop.to, dryRun })
182
- : undefined;
180
+ // No version moved, so no codemod is owed: a hand run is `x upgrade codemods --from <version>`.
181
+ const superseded = app ? await supersededFindings(root) : [];
183
182
  const summary =
184
183
  hop.next === null
185
184
  ? msg('cli.upgrade.atLatest', { version: hop.to })
@@ -198,11 +197,10 @@ export const createUpgradeCommand = (
198
197
  scripts: [],
199
198
  then,
200
199
  typescript,
201
- ...carried,
200
+ superseded,
202
201
  }),
203
202
  lines: [
204
203
  ...typescript.map((lag) => msg('cli.upgrade.typescript', { ...lag })),
205
- ...codemodLines(carried?.codemods ?? null),
206
204
  msg('cli.upgrade.then', { then }),
207
205
  ],
208
206
  });
@@ -0,0 +1,42 @@
1
+ // 31.47.1: 31.28.0's floor required `e2e` of any app with a page, while only `apps/web/site/page.tsx`
2
+ // got a suite, so an app without that page answered `X_VERIFY_SUITE_VANISHED`. A floor in that state
3
+ // gains the suite, or, with no page a suite could visit, excuses the step and says why.
4
+
5
+ import { isJsonObject } from '@ultimat3/core';
6
+ import { VERIFY_FLOOR_FILE } from '../verify-floor';
7
+ import type { Codemod, CodemodResult } from './codemod';
8
+ import { e2eSuitePlan, writeE2eSuite } from './e2e-suite';
9
+ import { e2eExcuse, renderFloor, withSkip } from './verify-floor-skips';
10
+
11
+ const NOTHING: CodemodResult = { changed: [], skipped: [] };
12
+
13
+ function parsed(source: string): Record<string, unknown> | undefined {
14
+ try {
15
+ const floor: unknown = JSON.parse(source);
16
+ return isJsonObject(floor) ? floor : undefined;
17
+ } catch {
18
+ // `verify-floor-skips` reports a floor it cannot read.
19
+ return undefined;
20
+ }
21
+ }
22
+
23
+ export const codemod: Codemod = {
24
+ id: 'e2e-suite-floor',
25
+ since: '31.47.1',
26
+ summary: `an ${VERIFY_FLOOR_FILE} requiring e2e gains a suite for a page the app serves, or excuses the step where no page can be visited`,
27
+ async run(app) {
28
+ const source = await app.read(VERIFY_FLOOR_FILE);
29
+ const floor = source === undefined ? undefined : parsed(source);
30
+ const steps = floor?.['steps'];
31
+ if (floor === undefined || !Array.isArray(steps) || !steps.includes('e2e')) return NOTHING;
32
+ if (isJsonObject(floor['skip']) && 'e2e' in floor['skip']) return NOTHING;
33
+ const plan = await e2eSuitePlan(app);
34
+ if (plan.kind !== 'none') return writeE2eSuite(app, plan);
35
+ const next = withSkip(
36
+ { ...floor, steps: steps.filter((step) => step !== 'e2e') },
37
+ { e2e: e2eExcuse(plan) },
38
+ );
39
+ await app.write(VERIFY_FLOOR_FILE, renderFloor(next));
40
+ return { changed: [VERIFY_FLOOR_FILE], skipped: [] };
41
+ },
42
+ };
@@ -0,0 +1,71 @@
1
+ // Whether this app's `e2e` step has a suite to run, and if not which one a codemod can write: the
2
+ // one answer the suite codemods and the floor codemods share, so the floor never requires a suite
3
+ // nothing created (`X_VERIFY_SUITE_VANISHED`). Only `apps/web` is here: the page the step boots.
4
+
5
+ import { isJsonObject } from '@ultimat3/core';
6
+ import { routePathFromFile } from '@ultimat3/render';
7
+ import { E2E_SUITE_PATH, e2eSuiteFiles, pageE2eSuite } from '../templates/scaffold-suites';
8
+ import { VERIFY_FLOOR_FILE } from '../verify-floor';
9
+ import { ownerOf } from '../verify-test-command';
10
+ import type { CodemodApp, CodemodResult } from './codemod';
11
+ import { writeIfAbsent } from './engine-edits';
12
+
13
+ export type E2eSuitePlan =
14
+ /** The app already holds an e2e test: the step has something to run. */
15
+ | { readonly kind: 'held' }
16
+ | { readonly kind: 'write'; readonly path: string; readonly contents: string }
17
+ /** Nothing to run and nothing to write; `pages` says whether the app serves any page at all. */
18
+ | { readonly kind: 'none'; readonly pages: boolean };
19
+
20
+ const LANDING_PAGE = 'apps/web/site/page.tsx';
21
+
22
+ /** Why `e2e` is excused for an app whose every page needs a value in its URL. */
23
+ export const NO_STATIC_PAGE_WHY =
24
+ 'every page here needs a URL parameter, so no suite could be written for one: add a *.e2e.test.ts that visits a real URL, and then e2e moves from "skip" to "steps"';
25
+
26
+ /** A URL that names itself and is safe inside the suite's quotes: no `:param`, no `*rest`. */
27
+ const STATIC_URL = /^\/[\w./~-]*$/;
28
+
29
+ const holdsE2eTest = async (app: CodemodApp): Promise<boolean> =>
30
+ (await app.glob('{apps,packages,e2e}/**/*.test.{ts,tsx}')).some(
31
+ (path) => !path.includes('/node_modules/') && ownerOf(path) === 'e2e',
32
+ );
33
+
34
+ /** Whether the floor already excuses `e2e`: the app's decision, which no suite overrides. */
35
+ async function floorExcusesE2e(app: CodemodApp): Promise<boolean> {
36
+ try {
37
+ const floor: unknown = JSON.parse((await app.read(VERIFY_FLOOR_FILE)) ?? 'null');
38
+ return isJsonObject(floor) && isJsonObject(floor['skip']) && 'e2e' in floor['skip'];
39
+ } catch {
40
+ // Unreadable is `verify-floor-skips`' to report, and it excuses nothing.
41
+ return false;
42
+ }
43
+ }
44
+
45
+ /** The landing page's suite, else one for the shortest URL `apps/web` serves with no parameter. */
46
+ export async function e2eSuitePlan(app: CodemodApp): Promise<E2eSuitePlan> {
47
+ if (await app.exists(LANDING_PAGE)) {
48
+ const contents = e2eSuiteFiles()[0]?.contents;
49
+ if (typeof contents === 'string') return { kind: 'write', path: E2E_SUITE_PATH, contents };
50
+ }
51
+ if (await holdsE2eTest(app)) return { kind: 'held' };
52
+ const pages = await app.glob('apps/web/{site,app}/**/page.tsx');
53
+ const served = (await app.glob('apps/*/{site,app}/**/page.tsx')).length > 0;
54
+ if (await floorExcusesE2e(app)) return { kind: 'none', pages: served };
55
+ const [first] = pages
56
+ .map((file) => ({ file, url: routePathFromFile(file).path }))
57
+ .filter(({ url }) => STATIC_URL.test(url))
58
+ .sort((a, b) => a.url.length - b.url.length || (a.file < b.file ? -1 : 1));
59
+ if (first === undefined) return { kind: 'none', pages: served };
60
+ return {
61
+ kind: 'write',
62
+ path: first.file.replace(/page\.tsx$/, 'page.e2e.test.ts'),
63
+ contents: pageE2eSuite(first.url),
64
+ };
65
+ }
66
+
67
+ /** The plan's file, unless the app already holds that path. */
68
+ export const writeE2eSuite = async (app: CodemodApp, plan: E2eSuitePlan): Promise<CodemodResult> =>
69
+ plan.kind === 'write'
70
+ ? writeIfAbsent(app, plan.path, plan.contents)
71
+ : { changed: [], skipped: [] };
@@ -20,6 +20,7 @@ import { codemod as docsGateProse } from './docs-gate-prose';
20
20
  import { codemod as docsIslandRows } from './docs-island-rows';
21
21
  import { codemod as docsShippedGuards } from './docs-shipped-guards';
22
22
  import { codemod as docsTestServices } from './docs-test-services';
23
+ import { codemod as e2eSuiteFloor } from './e2e-suite-floor';
23
24
  import { codemod as formatEditedHook } from './format-edited-hook';
24
25
  import { codemod as helmAlertsDeploy } from './helm-alerts-deploy';
25
26
  import { codemod as helmAlertsObjective } from './helm-alerts-objective';
@@ -69,4 +70,5 @@ export const CODEMODS: readonly Codemod[] = [
69
70
  ciPinnedActions,
70
71
  ciArtifactRetention,
71
72
  ciWeeklySchedule,
73
+ e2eSuiteFloor,
72
74
  ];
@@ -1,6 +1,6 @@
1
1
  // The codemods an app still owes, for `x doctor`: an `x upgrade` driven by a CLI older than the
2
2
  // engine applied none, and the installed CLI's gate cannot write. A dry run of every codemod up to
3
- // this CLI's release names them; `x upgrade --json` at the target then applies them (idempotent).
3
+ // this CLI's release names them; `x upgrade codemods --from 0.0.0` applies them (idempotent).
4
4
 
5
5
  import type { Finding } from '../output';
6
6
  import type { Codemod } from './codemod';
@@ -29,7 +29,7 @@ export async function pendingCodemodFindings(
29
29
  {
30
30
  code: CODEMODS_PENDING,
31
31
  cause: `${String(files.length)} file(s) still as an older scaffold wrote them, owed by ${owed.map((one) => `${one.id} (${one.since})`).join(', ')}: the x upgrade that installed ${to} ran under a CLI with no codemods — ${files.slice(0, 8).join(', ')}`,
32
- fix: 'x upgrade --json # on a clean tree; at the release it is on, it applies every codemod still owed',
32
+ fix: 'x upgrade codemods --from 0.0.0 --json # applies every codemod still owed, up to this release',
33
33
  at: files[0] ?? '.',
34
34
  },
35
35
  ];
@@ -1,6 +1,7 @@
1
1
  // 31.27.0: the test stack's host ports are the app's own (its name picks an offset into each band),
2
- // so two apps on one machine stop dialling each other's Postgres. Only a compose file and env file
3
- // still byte-for-byte the old scaffold's move; an edited one is reported with the diff.
2
+ // so two apps on one machine stop dialling each other's Postgres. The compose file publishes what
3
+ // the env file names, so they move together, only while both are the old scaffold's byte for byte;
4
+ // otherwise neither moves and each is reported with its diff.
4
5
 
5
6
  import type { NameSet } from '../templates/naming';
6
7
  import { names } from '../templates/naming';
@@ -11,9 +12,10 @@ import {
11
12
  testPorts,
12
13
  testServicesFiles,
13
14
  } from '../templates/scaffold-test-services';
14
- import type { Codemod, CodemodApp, CodemodResult } from './codemod';
15
+ import type { Codemod, CodemodResult } from './codemod';
15
16
  import { unifiedDiff } from './engine-diff';
16
- import { mergeResults, readText } from './engine-edits';
17
+ import type { FileText } from './engine-edits';
18
+ import { readText } from './engine-edits';
17
19
 
18
20
  const NOTHING: CodemodResult = { changed: [], skipped: [] };
19
21
 
@@ -42,30 +44,27 @@ function before(today: string, app: NameSet): string {
42
44
  return text;
43
45
  }
44
46
 
45
- async function move(
46
- app: CodemodApp,
47
- path: string,
48
- today: string,
49
- name: NameSet,
50
- ): Promise<CodemodResult> {
51
- const file = await readText(app, path);
52
- if (file === undefined || file.text === today) return NOTHING;
53
- const old = before(today, name);
54
- if (file.text === old) {
55
- await app.write(path, file.restore(today));
56
- return { changed: [path], skipped: [] };
57
- }
58
- return {
59
- changed: [],
60
- skipped: [
61
- {
62
- path,
63
- reason:
64
- "it is no longer the old scaffold's file byte for byte, so its ports stay: the diff is the scaffold's change, to make by hand if two apps share this machine",
65
- diff: unifiedDiff(path, old, today),
66
- },
67
- ],
68
- };
47
+ interface PortFile {
48
+ readonly path: string;
49
+ readonly today: string;
50
+ readonly old: string;
51
+ readonly file: FileText | undefined;
52
+ }
53
+
54
+ const isMovable = ({ file, today, old }: PortFile): boolean =>
55
+ file !== undefined && (file.text === today || file.text === old);
56
+
57
+ /** Every file still short of today's, each with why it stays and the change to make by hand. */
58
+ function heldBack(files: readonly PortFile[]): CodemodResult {
59
+ const blockers = files.filter((one) => !isMovable(one)).map((one) => one.path);
60
+ const skipped = files.flatMap(({ path, today, old, file }) => {
61
+ if (file === undefined || file.text === today) return [];
62
+ const reason = blockers.includes(path)
63
+ ? "it is no longer the old scaffold's file byte for byte, so the test ports stay in both files: the diff is the scaffold's change, to make by hand in both if two apps share this machine"
64
+ : `${blockers.join(' and ')} cannot move with it, and the two must name the same ports, so this file stays too: the diff is the scaffold's change, to make by hand in both if two apps share this machine`;
65
+ return [{ path, reason, diff: unifiedDiff(path, old, today) }];
66
+ });
67
+ return { changed: [], skipped };
69
68
  }
70
69
 
71
70
  export const codemod: Codemod = {
@@ -76,11 +75,19 @@ export const codemod: Codemod = {
76
75
  const kebab = appName((await readText(app, TEST_ENV_PATH))?.text ?? '');
77
76
  if (kebab === undefined) return NOTHING;
78
77
  const name = names(kebab);
79
- const results: CodemodResult[] = [];
80
- for (const file of testServicesFiles(name)) {
81
- if (typeof file.contents === 'string')
82
- results.push(await move(app, file.path, file.contents, name));
78
+ const files: PortFile[] = [];
79
+ for (const { path, contents } of testServicesFiles(name)) {
80
+ if (typeof contents !== 'string') continue;
81
+ const old = before(contents, name);
82
+ files.push({ path, today: contents, old, file: await readText(app, path) });
83
+ }
84
+ if (!files.every(isMovable)) return heldBack(files);
85
+ const changed: string[] = [];
86
+ for (const { path, today, file } of files) {
87
+ if (file === undefined || file.text === today) continue;
88
+ await app.write(path, file.restore(today));
89
+ changed.push(path);
83
90
  }
84
- return mergeResults(results);
91
+ return { changed, skipped: [] };
85
92
  },
86
93
  };
@@ -1,37 +1,26 @@
1
1
  // 31.27.0: every scaffold ships a `live` suite (the production driver against a real Postgres) and,
2
- // where it serves a page, an `e2e` suite (the landing page in a real browser). An app that predates
3
- // them gains each, as `x new` writes it today; one it already holds is its own.
2
+ // where it serves a page, an `e2e` suite (the landing page in a real browser; `e2e-suite.ts` picks
3
+ // the page for an app with none). An app that predates them gains each; one it holds is its own.
4
4
 
5
- import {
6
- E2E_SUITE_PATH,
7
- e2eSuiteFiles,
8
- LIVE_SUITE_PATH,
9
- liveSuiteFiles,
10
- } from '../templates/scaffold-suites';
5
+ import { LIVE_SUITE_PATH, liveSuiteFiles } from '../templates/scaffold-suites';
11
6
  import type { Codemod, CodemodApp, CodemodResult } from './codemod';
7
+ import { e2eSuitePlan, writeE2eSuite } from './e2e-suite';
12
8
  import { mergeResults, writeIfAbsent } from './engine-edits';
13
9
 
14
10
  const NOTHING: CodemodResult = { changed: [], skipped: [] };
15
11
 
16
- /** Each suite lands beside what it drives: no db package, no live suite; no landing page, no e2e. */
17
- const HOSTS: readonly (readonly [string, string])[] = [
18
- [LIVE_SUITE_PATH, 'packages/db/src/index.ts'],
19
- [E2E_SUITE_PATH, 'apps/web/site/page.tsx'],
20
- ];
21
-
22
- async function suite(app: CodemodApp, path: string, host: string): Promise<CodemodResult> {
23
- if (!(await app.exists(host))) return NOTHING;
24
- const file = [...liveSuiteFiles(), ...e2eSuiteFiles()].find((one) => one.path === path);
25
- return typeof file?.contents === 'string' ? writeIfAbsent(app, path, file.contents) : NOTHING;
12
+ /** No db package, no live suite: it lands beside the handle it vouches for. */
13
+ async function liveSuite(app: CodemodApp): Promise<CodemodResult> {
14
+ if (!(await app.exists('packages/db/src/index.ts'))) return NOTHING;
15
+ const contents = liveSuiteFiles()[0]?.contents;
16
+ return typeof contents === 'string' ? writeIfAbsent(app, LIVE_SUITE_PATH, contents) : NOTHING;
26
17
  }
27
18
 
28
19
  export const codemod: Codemod = {
29
20
  id: 'test-suites',
30
21
  since: '31.27.0',
31
- summary: `the live and e2e suites every scaffold ships: ${LIVE_SUITE_PATH} and ${E2E_SUITE_PATH}`,
22
+ summary: `the live and e2e suites every scaffold ships: ${LIVE_SUITE_PATH} and a page's *.e2e.test.ts`,
32
23
  async run(app) {
33
- const results: CodemodResult[] = [];
34
- for (const [path, host] of HOSTS) results.push(await suite(app, path, host));
35
- return mergeResults(results);
24
+ return mergeResults([await liveSuite(app), await writeE2eSuite(app, await e2eSuitePlan(app))]);
36
25
  },
37
26
  };
@@ -1,34 +1,46 @@
1
1
  // 31.27.0: a scaffold's x.verify.json names every gate step — required in `steps`, or excused in
2
2
  // `skip` with its why — and sets `strict`. An older app gains the `skip` rows that hold for it
3
- // (roadmap; job with no job suite; e2e with no page). `strict` is 31.28.0's (`verify-floor-steps`).
3
+ // (roadmap; job with no job suite; e2e with no suite to run). `strict` is 31.28.0's
4
+ // (`verify-floor-steps`).
4
5
 
5
6
  import { isJsonObject } from '@ultimat3/core';
6
7
  import { floorSteps } from '../templates/scaffold-verify-floor';
7
8
  import { VERIFY_FLOOR_FILE } from '../verify-floor';
8
9
  import type { Codemod, CodemodApp } from './codemod';
10
+ import type { E2eSuitePlan } from './e2e-suite';
11
+ import { e2eSuitePlan, NO_STATIC_PAGE_WHY } from './e2e-suite';
9
12
 
10
13
  export type Floor = Record<string, unknown>;
11
14
 
12
15
  const any = async (app: CodemodApp, pattern: string): Promise<boolean> =>
13
16
  (await app.glob(pattern)).length > 0;
14
17
 
15
- /** What the app ships suites for, as `floorSteps` asks it: a job suite, a page to load. */
18
+ /**
19
+ * What the app ships suites for, as `floorSteps` asks it: a job suite, and an e2e suite it holds or
20
+ * `test-suites` writes. Never "has a page": that required a suite no codemod had created.
21
+ */
16
22
  export async function floorSuites(
17
23
  app: CodemodApp,
18
24
  ): Promise<{ readonly jobs: boolean; readonly pages: boolean }> {
19
25
  return {
20
26
  jobs: await any(app, '{apps,packages}/**/*.job.test.ts'),
21
- pages: await any(app, 'apps/*/{site,app}/**/page.tsx'),
27
+ pages: (await e2eSuitePlan(app)).kind !== 'none',
22
28
  };
23
29
  }
24
30
 
25
- /** The steps that cannot run in this app, each with the scaffold's own why. */
31
+ /** Why `e2e` cannot run: no page at all is the scaffold's own row, pages with no URL are not. */
32
+ export const e2eExcuse = (plan: E2eSuitePlan): string =>
33
+ plan.kind === 'none' && plan.pages
34
+ ? NO_STATIC_PAGE_WHY
35
+ : String(floorSteps({ jobs: false, pages: false }).skip.e2e);
36
+
37
+ /** The steps that cannot run in this app, each with its why. */
26
38
  async function excused(app: CodemodApp): Promise<Readonly<Record<string, string>>> {
27
39
  const { jobs, pages } = await floorSuites(app);
28
40
  const why = floorSteps({ jobs: false, pages: false }).skip;
29
41
  const out: Record<string, string> = {};
30
42
  if (!jobs && why.job !== undefined) out['job'] = why.job;
31
- if (!pages && why.e2e !== undefined) out['e2e'] = why.e2e;
43
+ if (!pages) out['e2e'] = e2eExcuse(await e2eSuitePlan(app));
32
44
  if (!(await app.exists('docs/idea/14-roadmap.md')) && why.roadmap !== undefined) {
33
45
  out['roadmap'] = why.roadmap;
34
46
  }
@@ -36,7 +48,7 @@ async function excused(app: CodemodApp): Promise<Readonly<Record<string, string>
36
48
  }
37
49
 
38
50
  /** `floor` with `skip` merged in, placed right after `steps` as the scaffold writes it. */
39
- function withSkip(floor: Floor, skip: Readonly<Record<string, string>>): Floor {
51
+ export function withSkip(floor: Floor, skip: Readonly<Record<string, string>>): Floor {
40
52
  const merged = { ...(isJsonObject(floor['skip']) ? floor['skip'] : {}), ...skip };
41
53
  const out: Floor = {};
42
54
  for (const [key, value] of Object.entries(floor)) {
package/src/mcp-errors.ts CHANGED
@@ -401,7 +401,7 @@ const CLI_FIXES: Readonly<Record<CliErrorCode, string>> = {
401
401
  X_REPRO_BUNDLE_INVALID:
402
402
  '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
403
  X_ADVISORY_FLOOR_UNMET: 'bun update source-map-js immutable',
404
- X_UPGRADE_CODEMODS_PENDING: 'x upgrade --json',
404
+ X_UPGRADE_CODEMODS_PENDING: 'x upgrade codemods --from 0.0.0 --json',
405
405
  X_UPGRADE_LOCKED: 'cat .x/upgrade.lock',
406
406
  X_APP_MIGRATIONS_UNAPPLIED: 'x db migrate --json',
407
407
  };
@@ -5,23 +5,36 @@
5
5
  export const RELEASED_GUARD_FORMS: Readonly<
6
6
  Record<string, readonly (readonly [string, 'error' | 'warning'])[]>
7
7
  > = {
8
- 'animated-layout-property': [['2hqr04589t23q', 'error']],
8
+ 'animated-layout-property': [
9
+ ['2hqr04589t23q', 'error'],
10
+ ['2z9j3sd8e7lgl', 'error'],
11
+ ],
9
12
  'bare-error': [
10
13
  ['1m3eimglwzrdq', 'error'],
11
14
  ['1njzso3r6drnd', 'error'],
15
+ ['1ot9kwydyzd0j', 'error'],
16
+ ['2aaavkemg4qee', 'error'],
17
+ ['2s43pcjqyhmfi', 'error'],
12
18
  ],
13
19
  'error-declared': [
14
20
  ['1rlzex7nalpiw', 'error'],
15
21
  ['2tfw2hq80msju', 'error'],
16
22
  ['3kqd7d8pzpcnn', 'error'],
17
23
  ],
18
- 'focus-visible': [['4c2nf0mpzn0z', 'error']],
24
+ 'focus-visible': [
25
+ ['3i4t0gznxyytf', 'error'],
26
+ ['4c2nf0mpzn0z', 'error'],
27
+ ],
19
28
  'image-dimensions': [
20
29
  ['1cfzth883qzt5', 'error'],
30
+ ['1upoweaclyd8', 'error'],
21
31
  ['33uv2ua4a9zcf', 'error'],
22
32
  ],
23
33
  'island-mount-clears': [['1v09h5ptzqvs2', 'error']],
24
- 'island-without-states': [['2os1f5fb6aass', 'error']],
34
+ 'island-without-states': [
35
+ ['2os1f5fb6aass', 'error'],
36
+ ['31gjhz3nyf0gz', 'error'],
37
+ ],
25
38
  'native-confirm': [
26
39
  ['1f7eh34hj085a', 'error'],
27
40
  ['2b134wpkoaqso', 'error'],
@@ -29,8 +42,10 @@ export const RELEASED_GUARD_FORMS: Readonly<
29
42
  ],
30
43
  'raw-breakpoint': [['wdo3lsqmvsya', 'error']],
31
44
  'raw-colour': [
45
+ ['17jw6r17ah3dq', 'error'],
32
46
  ['1e2pkqnmrjt44', 'error'],
33
47
  ['3onnbx54g9zmd', 'error'],
48
+ ['mdo7f20dnyof', 'error'],
34
49
  ],
35
50
  'raw-fetch': [
36
51
  ['17xdeprvzx5v2', 'error'],
@@ -54,6 +69,7 @@ export const RELEASED_GUARD_FORMS: Readonly<
54
69
  'repo-raw-sql': [
55
70
  ['12qj02j416sib', 'error'],
56
71
  ['2kr7gbv7j2m0v', 'error'],
72
+ ['2m5sh5923zcdx', 'error'],
57
73
  ['3nmlelym16o78', 'error'],
58
74
  ],
59
75
  'repo-unbounded': [
@@ -63,6 +79,7 @@ export const RELEASED_GUARD_FORMS: Readonly<
63
79
  'runtime-pin': [['28ffbpwy4q2ji', 'error']],
64
80
  'semantic-interactive': [
65
81
  ['29pfa4ea628cv', 'error'],
82
+ ['2m280ivq01zs2', 'error'],
66
83
  ['d4ncwu39wtrk', 'error'],
67
84
  ],
68
85
  'unbounded-fanout': [['xk4dv9vsq8gg', 'error']],
@@ -82,12 +99,17 @@ export const RELEASED_GUARD_FORMS: Readonly<
82
99
  ['w7as1ib1ido8', 'error'],
83
100
  ],
84
101
  'untranslated-string': [
102
+ ['211cleyx8cmgn', 'error'],
103
+ ['2tmea7cmz7rvr', 'error'],
85
104
  ['2x85ib5eqdxzi', 'error'],
86
105
  ['3j5e8t1k120u3', 'error'],
87
106
  ['d6gyn0l6szj8', 'error'],
88
107
  ['h57qtdwn7inz', 'error'],
89
108
  ],
90
109
  'unzoned-date': [
110
+ ['14sc1shft1opi', 'error'],
111
+ ['38jqi2md5adsi', 'error'],
112
+ ['3caz4m0vn66dz', 'error'],
91
113
  ['8apjndc5ybvm', 'error'],
92
114
  ['haaxmgzsgjns', 'error'],
93
115
  ],
@@ -96,7 +118,7 @@ export const RELEASED_GUARD_FORMS: Readonly<
96
118
  /** Every hash each shipped guard's TEST file was released as: an unedited test goes without a note. */
97
119
  export const RELEASED_GUARD_TEST_FORMS: Readonly<Record<string, readonly string[]>> = {
98
120
  'animated-layout-property': ['191zjn08f13h4'],
99
- 'bare-error': ['1w7vwbtypxdwe'],
121
+ 'bare-error': ['17uv4zrzcuwbk', '1epwa72g9sk4u', '1w7vwbtypxdwe'],
100
122
  'error-declared': ['2hj2bs2czhxnw', 'qe8afpq7pzf1'],
101
123
  'focus-visible': ['12c0rk3ljkx6q'],
102
124
  'image-dimensions': ['3p4hkambgpb4j'],
@@ -104,7 +126,7 @@ export const RELEASED_GUARD_TEST_FORMS: Readonly<Record<string, readonly string[
104
126
  'island-without-states': ['vls0ujdd16gw'],
105
127
  'native-confirm': ['1c7vps5wn37uv', 'qwyn1mzn9ace'],
106
128
  'raw-breakpoint': ['w356i8dreh7j'],
107
- 'raw-colour': ['1tc7cambk8byr', '319l3wictp9lf'],
129
+ 'raw-colour': ['1nhoblzxa9kp1', '1tc7cambk8byr', '319l3wictp9lf'],
108
130
  'raw-fetch': ['2lips924uo00f'],
109
131
  'raw-interval': ['1z55givy4sst0'],
110
132
  'raw-length': ['1hpgz9jowk5qu'],
@@ -112,7 +134,7 @@ export const RELEASED_GUARD_TEST_FORMS: Readonly<Record<string, readonly string[
112
134
  'raw-shadow': ['3kg8ft6y3ia0y'],
113
135
  'raw-z-index': ['3fb40f6bwp8kq'],
114
136
  'repo-await-in-loop': ['2axgbb82wldt4'],
115
- 'repo-raw-sql': ['c5pfl8w3qj94', 'f19j7irkta44'],
137
+ 'repo-raw-sql': ['1wxenxatjt885', 'c5pfl8w3qj94', 'f19j7irkta44'],
116
138
  'repo-unbounded': ['98ncw525gpmo'],
117
139
  'runtime-pin': ['dy20fh65qziz'],
118
140
  'semantic-interactive': ['2uh0p6xoh996t', '393msxyy1bz36'],
@@ -120,6 +142,6 @@ export const RELEASED_GUARD_TEST_FORMS: Readonly<Record<string, readonly string[
120
142
  'undeclared-custom-property': ['30bi2v92swukf', 'svuf8sm14fm8'],
121
143
  'undeclared-env': ['38run3rew6y0c', '8xdp7gp7hol7'],
122
144
  'undefined-style-class': ['1uy88gpk5k8p8', '2sy8me3i3bmzw'],
123
- 'untranslated-string': ['30q3u45cey2eq', 'cgvfv231gnvg'],
124
- 'unzoned-date': ['1siep3fqscks4', '20x6l238r09jk'],
145
+ 'untranslated-string': ['30q3u45cey2eq', 'cgvfv231gnvg', 'kdo3fxwgix3j'],
146
+ 'unzoned-date': ['1m46q3h8t4v7v', '1siep3fqscks4', '20x6l238r09jk', '3jzdaqcytkgil'],
125
147
  };
@@ -61,6 +61,28 @@ e2eTest('/ loads in a browser and names itself', async ({ page }) => {
61
61
  });
62
62
  `;
63
63
 
64
+ /**
65
+ * The suite `x upgrade` gives an app with no landing page, beside the page it visits. The status and
66
+ * never the title: an anonymous browser may be refused a page behind sign-in, which is the page
67
+ * working; a 5xx, or an app that does not boot, is what no app should ship.
68
+ */
69
+ export const pageE2eSuite = (
70
+ url: string,
71
+ ): string => `// ${url} in a real browser, against the running app. A page behind sign-in may refuse this anonymous
72
+ // visit, and that passes: what fails is a server error, or an app that does not boot. Sign in here
73
+ // to assert more. Its own file because the gate types a test by its FILENAME.
74
+ import { e2eTest, expect } from '@ultimat3/testing';
75
+
76
+ e2eTest('${url} answers a browser without a server error', async ({ page }) => {
77
+ await page.goto('${url}');
78
+ const status = await page.evaluate(() => {
79
+ const [navigation] = performance.getEntriesByType('navigation');
80
+ return (navigation as PerformanceNavigationTiming).responseStatus;
81
+ });
82
+ expect(status).toBeLessThan(500);
83
+ });
84
+ `;
85
+
64
86
  /** The live suite, in the db package every scaffold writes. */
65
87
  export const liveSuiteFiles = (): readonly GeneratedFile[] => [
66
88
  { path: LIVE_SUITE_PATH, contents: liveSuite() },
@@ -130,22 +130,5 @@ export async function previewCodemods(
130
130
  return { codemods: { ...own, source: 'driver' }, superseded: await supersededFindings(root) };
131
131
  }
132
132
 
133
- /** Below every release: an app already at its target reruns every codemod, which are idempotent. */
133
+ /** Below every release: a resumed hop reruns every codemod, which are idempotent. */
134
134
  export const EVERY_RELEASE = '0.0.0';
135
-
136
- /**
137
- * No version moves, and still no copy of an old template stays: every codemod up to the release
138
- * the app is on, through the installed CLI as a hop would (a dry run previews this CLI's list).
139
- * Each is idempotent, so one already applied is a run that changes nothing.
140
- */
141
- export async function atTargetCodemods(input: {
142
- readonly runner: Runner;
143
- readonly root: string;
144
- readonly to: string;
145
- readonly dryRun: boolean;
146
- }): Promise<{ readonly codemods: HopCodemods; readonly superseded: readonly Finding[] }> {
147
- const { runner, root, to } = input;
148
- if (input.dryRun) return previewCodemods(root, EVERY_RELEASE, to);
149
- const codemods = await applyHopCodemods({ runner, root, from: EVERY_RELEASE, to });
150
- return { codemods, superseded: await supersededFindings(root) };
151
- }
@@ -1786,7 +1786,7 @@ A dry run refuses exactly what the real run would, then stops before step 4 —
1786
1786
  | `manifest` | `{ ok, findings[] }`. A failure does not stop the gate |
1787
1787
  | `exercise` | `{ reported, ok, findings[] }` from the hop's own `x exercise --json`, listed (and printed) before the gate's findings; each `fix` pastes as written. `reported: false`: the hop's CLI answered no exercise document — unknown, never a finding |
1788
1788
  | `verify` | `{ ok, summary, failed[], findings[] }`, each finding `{ step?, code, cause, fix, at? }` |
1789
- | `codemods` | `As of 2026-11-15`: `{ from, to, dryRun, source, applied[] }`, each `applied[]` a codemod that ran: `{ id, since, summary, changed[], skipped[] }`; a `skipped[]` entry is `{ path, reason, diff? }`, a file the codemod would not overwrite (the app edited it), with the template's change as a unified diff to make by hand. `source: installed` — the hop's own CLI applied its list; `driver` — that CLI predates codemods, so this one applied its own. `reinstalled: true` — a `package.json` differs after the codemods (read byte for byte, never off a codemod's report), so the hop ran `bun install` again before any gate stage; `x upgrade codemods` does the same by hand. `failure: { code, cause, fix }` — the installed CLI's codemods run failed for a reason other than lacking the subcommand: nothing applied, this CLI does not stand in, and the hop is not done. An app already at its target reruns every codemod up to the release it is on (`from: 0.0.0`): each is idempotent, so a done one changes nothing and an app still holding an old template's copy is carried across. `null`: no app |
1789
+ | `codemods` | `As of 2026-11-15`: `{ from, to, dryRun, source, applied[] }`, each `applied[]` a codemod that ran: `{ id, since, summary, changed[], skipped[] }`; a `skipped[]` entry is `{ path, reason, diff? }`, a file the codemod would not overwrite (the app edited it), with the template's change as a unified diff to make by hand. `source: installed` — the hop's own CLI applied its list; `driver` — that CLI predates codemods, so this one applied its own. `reinstalled: true` — a `package.json` differs after the codemods (read byte for byte, never off a codemod's report), so the hop ran `bun install` again before any gate stage; `x upgrade codemods` does the same by hand. `failure: { code, cause, fix }` — the installed CLI's codemods run failed for a reason other than lacking the subcommand: nothing applied, this CLI does not stand in, and the hop is not done. `null`: no app, or already at the target, where no codemod runs (`As of 2026-11-18`; `x upgrade codemods --from 0.0.0 --json` carries an app still holding an old template's copy) |
1790
1790
  | `superseded[]` | `As of 2026-11-15`: a workaround the hop's framework made unnecessary, read after the codemods — `{ code: X_SUPERSEDED_WORKAROUND, cause, fix, at }`. A warning, never the verdict |
1791
1791
  | `then` | the next thing to do, in a sentence naming the commands |
1792
1792
 
package/wiki/Compared.md CHANGED
@@ -28,23 +28,25 @@ Who uses it:
28
28
 
29
29
  ## Measured, and how to reproduce it
30
30
 
31
- One local run on an 8-core laptop, `As of 2026-11-06`, not yet a CI figure; the method, the box and
32
- the caveats are [`scripts/bench/results/README.md`](https://github.com/developerz-ai/ultimate/blob/main/scripts/bench/results/README.md),
31
+ Medians of five runs on a 4-core GitHub `ubuntu-latest` runner, `As of 2026-11-18`; the method, the
32
+ box and the caveats are [`scripts/bench/results/README.md`](https://github.com/developerz-ai/ultimate/blob/main/scripts/bench/results/README.md),
33
33
  and every number below is held to the committed JSON by `bun run scripts/bench-claims.ts`
34
34
  (`X_BENCH_CLAIM_STALE`).
35
35
 
36
36
  | Figure | Measured |
37
37
  |---|---|
38
- | scaffold, published `create-ultimate` (29.4.0) | 4.7 s |
39
- | `bun run setup`, cold Bun cache | 43.3 s |
40
- | `node_modules` after setup | 165 MB |
41
- | first `bun run verify` | **red on 29.4.0**: `budgets` was `X_BUDGET_UNMEASURED` until something built; the step builds first on `main` |
42
- | `/` under `x dev`, one client, concurrency 16 | median 267 req/s, p99 181.85 ms |
43
- | a typed read, `/_x/query/post-list` | median 183 req/s, p99 258.26 ms |
44
- | cold start to the first 2xx (`x dev`) | 4.8 s |
38
+ | scaffold, published `create-ultimate` (31.46.0) | 1.5 s |
39
+ | `bun run setup`, cold Bun cache | 8.0 s |
40
+ | `node_modules` after setup | 197 MB |
41
+ | first `bun run verify` | green in all five runs, median 23.1 s |
42
+ | `/` under `x dev`, one client, concurrency 16 | median 1,147 req/s, p99 26.86 ms |
43
+ | a typed read, `/_x/query/post-list` | median 875 req/s, p99 35.3 ms |
44
+ | cold start to the first 2xx (`x dev`) | 1.1 s |
45
45
 
46
46
  `x dev` is the development server — every role and an embedded Postgres in one process — so these
47
- are a laptop's first-hour numbers, not a production capacity claim.
47
+ are a CI runner's first-hour numbers, not a production capacity claim. The previous figures came from
48
+ a laptop on 29.4.0, so the difference in times is not a measured speed-up; `node_modules` did grow,
49
+ from 165 MB.
48
50
 
49
51
  Reproduce on any machine with Bun and a clone of this repository:
50
52
 
@@ -56,7 +58,7 @@ bun run scripts/bench/http-hello.ts --url http://localhost:3000/ --seconds 30 --
56
58
  `http-hello.ts --url` loads any URL, so point it at your own app on any stack and compare like with
57
59
  like. It refuses a run under 10 s (`X_BENCH_RUN_TOO_SHORT`), and a non-2xx answer or a server that
58
60
  dies mid-run is `X_BENCH_RUN_FAILED`, never a figure. `.github/workflows/bench.yml` re-measures weekly
59
- and on every release, on a free `ubuntu-latest` runner, and opens a pull request with the JSON.
61
+ and on dispatch, on a free `ubuntu-latest` runner, and opens a pull request with the JSON.
60
62
 
61
63
  ## Rails
62
64
 
package/wiki/Stability.md CHANGED
@@ -26,7 +26,7 @@ A breaking change to any of these needs a major, and a major waits for its windo
26
26
  | `.x/` — the build cache, generated manifests, snapshots | regenerated by the CLI; never hand-edited, never read by an app |
27
27
  | the exact wording of a `cause:` or `fix:` line | the code is the contract; the text improves in any release |
28
28
  | a gate verdict getting stricter | a new `x verify` rule that reds an app waits on `next` like any break |
29
- | performance figures and budgets | measurements, each dated in its committed JSON under `scripts/bench/results/`, never promises. `bench.yml` re-measures the first-hour and HTTP figures weekly (and on dispatch), as a pull request; a release does not trigger it (`GITHUB_TOKEN` events start no workflow). `As of 2026-11-14` the committed figures predate its first green run. Budgets: [Routes and render modes](Routes-And-Render-Modes#budgets) |
29
+ | performance figures and budgets | measurements, each dated in its committed JSON under `scripts/bench/results/`, never promises. `bench.yml` re-measures the first-hour and HTTP figures weekly (and on dispatch), as a pull request; a release does not trigger it (`GITHUB_TOKEN` events start no workflow). `As of 2026-11-18` the committed first-hour and HTTP figures are its own. Budgets: [Routes and render modes](Routes-And-Render-Modes#budgets) |
30
30
 
31
31
  Never "stable forever": a covered surface can change, in a scheduled major, with its entry in [Upgrading](Upgrading).
32
32
 
package/wiki/Upgrading.md CHANGED
@@ -313,11 +313,12 @@ A setter still on a package's `.` barrel is `X_ADAPTER_PORT_INCOMPLETE` on the `
313
313
  | a required column with no default is added nullable and contracted to NOT NULL in the migration's non-transactional step (**31.44.0**), so a fresh or reset database migrates clean | a committed migration that still holds the old `-- backfill "c", then: … set not null;` comment: declare the column `.nullable()`, `x db gen "relax c"`, declare it required again, `x db gen "contract c"`, then `x db migrate`. A populated production table: ship `.nullable()` plus its `backfill()` first, then required |
314
314
  | two shipped guards change (**31.44.0**), built in: `undeclared-env` (`X_UNDECLARED_ENV`) also refuses a `defineEnv(` record anywhere in app source whose keys `envSchema` in `app.config.ts` does not declare; `untranslated-string` (`X_UNTRANSLATED_STRING`) ends its fix with `x verify --only boundaries`. A copy still in `guards/` keeps the old rule until `x upgrade` migrates it to the release after 31.43.0 | each `undeclared-env` finding names the keys to move into `envSchema`; then `x env example` |
315
315
  | `x new`'s `ci.yml` uploads each `verify-part-*` document with `retention-days: 1` (**31.45.0**): the verdict job reads it in the same run, and GitHub's 90-day default let one adopter's parts fill the org's artifact storage quota until CI could not run | nothing: `x upgrade` applies codemod `ci-artifact-retention`; an upload that already sets `retention-days` is left as it is. Artifacts already stored keep their 90 days: delete them from the repository's Actions storage settings if the quota is already full |
316
- | codemod `ci-pinned-actions` pins any tagged major of `actions/checkout`, `cache`, `upload-artifact` and `download-artifact` (**31.45.0**), and adds `persist-credentials: false` to each checkout it pins, inside the step's own `with:` when it has one; 31.43–31.44 skipped a workflow on another major (`actions/checkout@v5`) | nothing: `x doctor` names it as `X_UPGRADE_CODEMODS_PENDING`, and `x upgrade --json` applies it. A SHA-pinned line and an action with no pin are never touched |
316
+ | codemod `ci-pinned-actions` pins any tagged major of `actions/checkout`, `cache`, `upload-artifact` and `download-artifact` (**31.45.0**), and adds `persist-credentials: false` to each checkout it pins, inside the step's own `with:` when it has one; 31.43–31.44 skipped a workflow on another major (`actions/checkout@v5`) | nothing: `x doctor` names it as `X_UPGRADE_CODEMODS_PENDING`, and `x upgrade codemods --from 0.0.0 --json` applies it. A SHA-pinned line and an action with no pin are never touched |
317
317
  | the shipped `undeclared-env` guard's fix changes (**31.45.0**), built in; its findings do not: `X_UNDECLARED_ENV` still opens with the `envSchema` line to paste, and adds a second branch for a build-time constant injected by `bun build --define process.env.X=…` (declare a global, `--define NAME=…`), which no deploy sets. A copy still in `guards/` keeps the old text until `x upgrade` migrates it to the release after 31.44.0 | nothing; for a `--define` constant, follow the second branch rather than declaring an env var |
318
318
  | `x g sign-in --password` and `x g invite` declare `native: { success: (output) => output.next }` on their six actions and drop the `landAt()` helper (**31.46.0**); an app scaffolded before keeps its `landAt`, whose `setRedirect` still answers its forms with a 303 | nothing. Optional, to have one redirect path: on each action, add `native: { success: (output) => output.next }`, replace `landAt(x)` with `x`, delete `landAt` from `sign-in-flow.ts` / `invite.ts`, and move the test that asserted `request.redirect` to a form post through `httpServer({ routes: [toRoute(target)] }).fetch(…)` with `accept: text/html`, asserting `303` and the `Location` — a fresh `x g sign-in --password` writes that test. Then `x verify --only unit,manifest` |
319
319
  | an offline replay sends `x-ultimate-replay-scope`, and the action route answers a session other than the queue's owner `409 X_REPLAY_PRINCIPAL_MISMATCH`, the entry kept `pending` (**31.47.0**, [Realtime](Realtime#tier-3-shipped-in-2100)); `DEFAULT_CORS.allowHeaders` lists the header | an app setting `cors.allowHeaders` replaces that list (`packages/http/src/config.ts`): add `x-ultimate-replay-scope` to it. A cross-origin caller sending the header needs this; the page outbox replays to a same-origin path, which has no preflight. An app on several processes sets `SESSION_SECRET` (32+ characters), or a replay reaching another process is refused |
320
320
  | `x exercise` with no `--seed`, and so `x verify`'s `exercise` step, runs one constant seed (**31.47.0**) where each run drew a random one, and `seed` in `.x/exercise.json` is always the number used, never `null`. One tree now gets one verdict, but an `exercise.unprovenMax` measured under random seeds can sit just below the constant seed's figure, so the first gate after the hop can be `X_EXERCISE_UNPROVEN_ABOVE_FLOOR`. `x upgrade` writes a figure only where the app states none, and never raises one | `x exercise --json`, then fix the helper or override each `unproven` record names: pick rows by what they are, never by id order, and assume no order between sized calls ([Testing](Testing)). If the figure that remains is the honest one, raising `unprovenMax` to it is your own reviewed edit of `x.verify.json`. `x exercise --seed random` looks for seed-dependent helpers |
321
+ | `x upgrade` stops requiring an `e2e` suite no codemod wrote (**31.47.1**): an app with pages but no `apps/web/site/page.tsx` was left on `X_VERIFY_SUITE_VANISHED`. Rerunning `x upgrade` at the target no longer replays every codemod | nothing: `x upgrade` applies codemod `e2e-suite-floor`, which writes a `page.e2e.test.ts` beside the shortest parameter-free page, or moves `e2e` to `skip` with its why when no page can be visited. To apply codemods an older CLI left behind: `x upgrade codemods --from 0.0.0 --json` |
321
322
 
322
323
  ## 29.x → 30.0.0, entry by entry
323
324