@ultimat3/cli 31.30.0 → 31.32.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.
@@ -61,7 +61,7 @@ export function assertSurfaceSupported(kind: Generator, surface: Surface, name:
61
61
  reason: 'a resource slice is app-surface — site/ ships 0kb JS and may not import app/',
62
62
  // The caller's own name, not `<name>`: a `fix:` is copied and run verbatim, and `x g resource
63
63
  // <name>` is a shell redirect (`bash: name: No such file or directory`), not a command.
64
- fix: `x g resource ${name} && x g route ${name} --surface site`,
64
+ fix: `x g resource ${quoteArg(name)} && x g route ${quoteArg(name)} --surface site`,
65
65
  });
66
66
  }
67
67
 
@@ -134,7 +134,7 @@ export function readSurface(raw: string | undefined, kind: Generator, name: stri
134
134
  flag: 'surface',
135
135
  command: 'g',
136
136
  reason: `"${raw}" is not a surface (site, app)`,
137
- fix: `x g ${kind} ${name} --surface app`,
137
+ fix: `x g ${quoteArg(kind)} ${quoteArg(name)} --surface app`,
138
138
  });
139
139
  }
140
140
 
package/src/gh-target.ts CHANGED
@@ -7,6 +7,7 @@ import { t } from '@ultimat3/schema';
7
7
  import { BadFlagError } from './errors';
8
8
  import type { GhHost } from './gh';
9
9
  import { GhFailedError, ghJson } from './gh';
10
+ import { quoteArg } from './shell-quote';
10
11
 
11
12
  /** `owner/name`, split once so a caller never re-splits it and never re-joins it wrong. */
12
13
  export interface GhRepo {
@@ -53,14 +54,14 @@ export async function resolveRepo(
53
54
  flag: 'repo',
54
55
  command,
55
56
  reason: `"${flag}" is not an owner/name repository reference`,
56
- fix: `x ${command} --repo developerz-ai/ultimate --json`,
57
+ fix: `x ${quoteArg(command.split(' '))} --repo developerz-ai/ultimate --json`,
57
58
  });
58
59
  }
59
60
  return repoOf(flag);
60
61
  }
61
62
  const viewed = await ghJson(host, ['repo', 'view', '--json', 'nameWithOwner'], REPO_VIEW, {
62
63
  label: 'gh repo view',
63
- fix: `x ${command} --repo developerz-ai/ultimate --json`,
64
+ fix: `x ${quoteArg(command.split(' '))} --repo developerz-ai/ultimate --json`,
64
65
  });
65
66
  return repoOf(viewed.nameWithOwner);
66
67
  }
package/src/guards.ts CHANGED
@@ -25,6 +25,7 @@ export { GUARD_DIR, guardPaths } from './guards-paths';
25
25
 
26
26
  import { vendoredCopy, vendoredFinding } from './guards-vendored';
27
27
  import type { Finding } from './output';
28
+ import { quoteArg } from './shell-quote';
28
29
  import { readVerifyFloor } from './verify-floor';
29
30
  import type { GuardBaseline } from './verify-guard-baseline';
30
31
  import { guardNameOf, judgeGuardBaseline, orphanedBaselineFindings } from './verify-guard-baseline';
@@ -151,7 +152,7 @@ const notAGuard = (path: string, exported: unknown): Finding => {
151
152
  const notADirectory: Finding = {
152
153
  code: 'X_GUARD_INVALID',
153
154
  cause: `${GUARD_DIR} is not a directory, so none of this app's own guards can run beside the shipped ones`,
154
- fix: `mv ${GUARD_DIR} ${GUARD_DIR}.txt && mkdir ${GUARD_DIR} && x verify --only boundaries --json # ${GUARD_DIR}/ is the directory the gate discovers; a rule of yours goes in it as ${GUARD_DIR}/<name>.ts`,
155
+ fix: `mv ${quoteArg(GUARD_DIR)} ${quoteArg(GUARD_DIR)}.txt && mkdir ${quoteArg(GUARD_DIR)} && x verify --only boundaries --json # ${GUARD_DIR}/ is the directory the gate discovers; a rule of yours goes in it as ${GUARD_DIR}/<name>.ts`,
155
156
  docs: ERROR_DOCS_URL,
156
157
  at: GUARD_DIR,
157
158
  };
@@ -30,6 +30,7 @@ import { localeParityFindings } from './i18n-locale-parity';
30
30
  import { mailPreviewFindings } from './mail-preview-findings';
31
31
  import type { Finding } from './output';
32
32
  import { findingFrom } from './output';
33
+ import { quoteArg } from './shell-quote';
33
34
  import { CATALOG_ROOT, catalogPath } from './templates/locales';
34
35
 
35
36
  /** The one package this check probes for a duplicate: its registry is the one it reads. */
@@ -212,7 +213,7 @@ export function unregisteredFix(
212
213
  // report a registered locale as unregistered, which is the direction that costs trust.
213
214
  if (index.includes(`${CATALOG_ROOT.split('/').pop() ?? 'catalogs'}/${locale}.json`)) return {};
214
215
  return {
215
- fix: `x i18n sync ${locale} # re-derives ${APP_CATALOGS_PATH} from the catalogs on disk`,
216
+ fix: `x i18n sync ${quoteArg(locale)} # re-derives ${APP_CATALOGS_PATH} from the catalogs on disk`,
216
217
  };
217
218
  }
218
219
 
@@ -14,6 +14,7 @@ import { readinessProbe } from './island-harness-script';
14
14
  import { IslandRequestUnstubbedError, IslandUnphotographableError } from './island-shot-errors';
15
15
  import type { IslandReadiness, IslandStateShot } from './island-verdict';
16
16
  import { parseReadiness } from './island-verdict';
17
+ import { quoteArg } from './shell-quote';
17
18
  import { type ShotCookiePair, shotCookies } from './shot-cookie';
18
19
  import type { ShotServer } from './shot-server';
19
20
  import { allowHostsFrom } from './shot-server';
@@ -71,11 +72,11 @@ export function photographFault(
71
72
  target: IslandShotTarget,
72
73
  seen: IslandReadiness | null,
73
74
  ): Refusal | undefined {
74
- const settle = `x shot --island ${target.name} --settle 8000 --json`;
75
+ const settle = `x shot --island ${quoteArg(target.name)} --settle 8000 --json`;
75
76
  if (seen === null) {
76
77
  return {
77
78
  reason: 'answered no readiness probe at all, so nothing about the page can be asserted',
78
- fix: `x shot --island ${target.name} --state ${target.state} --timeout 60000 --json`,
79
+ fix: `x shot --island ${quoteArg(target.name)} --state ${quoteArg(target.state)} --timeout 60000 --json`,
79
80
  };
80
81
  }
81
82
  if (!seen.harness) {
@@ -91,7 +92,7 @@ export function photographFault(
91
92
  if (seen.failed !== null) {
92
93
  return {
93
94
  reason: `mounted and its mount() REJECTED: ${seen.failed}`,
94
- fix: `x shot --island ${target.name} --state ${target.state} --json # the verdict carries the throw and its frame`,
95
+ fix: `x shot --island ${quoteArg(target.name)} --state ${quoteArg(target.state)} --json # the verdict carries the throw and its frame`,
95
96
  };
96
97
  }
97
98
  if (!seen.mounted) {
@@ -265,7 +266,7 @@ export async function captureIslandState(
265
266
  state: target.state,
266
267
  theme: target.theme,
267
268
  reason: `produced ${bytes.byteLength} bytes, under the ${floor}-byte floor — that is not an image`,
268
- fix: `x shot --island ${target.name} --browser /usr/bin/chromium --json # macOS: --browser "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"; Windows: --browser "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"`,
269
+ fix: `x shot --island ${quoteArg(target.name)} --browser /usr/bin/chromium --json # macOS: --browser "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"; Windows: --browser "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"`,
269
270
  });
270
271
  }
271
272
  await Bun.write(join(options.outDir, target.file), bytes);
@@ -3,6 +3,7 @@
3
3
  // call stay in `error-codes.ts`: one owner, one registration, one place a duplicate can surface.
4
4
 
5
5
  import { renderCauseValue, renderFixLiteral, UltimateError } from '@ultimat3/core';
6
+ import { quoteArg } from './shell-quote';
6
7
 
7
8
  // No `docs:` on the subclasses below. `UltimateError` fills it from `describeErrorCode(code).docs`.
8
9
 
@@ -87,7 +88,7 @@ export class IslandShotsMissingError extends UltimateError {
87
88
  super({
88
89
  code: 'X_SHOT_ISLAND_MISSING',
89
90
  cause: `${input.missing.length} of ${input.expected} declared picture(s) are not on disk under ${renderCauseValue(input.dir)}: ${input.missing.join(', ')}`,
90
- fix: `x shot --island ${input.island} --json # the run above names why each one was refused`,
91
+ fix: `x shot --island ${quoteArg(input.island)} --json # the run above names why each one was refused`,
91
92
  meta: { island: input.island, missing: [...input.missing] },
92
93
  });
93
94
  }
package/src/mcp-errors.ts CHANGED
@@ -475,7 +475,9 @@ export function explainErrorCode(code: string): ErrorExplanation | undefined {
475
475
  return {
476
476
  code,
477
477
  cause: described.title,
478
- fix: cli ? CLI_FIXES[code] : projectedFix(code),
478
+ // `Object.hasOwn`, not `isCliCode` alone: the code is an MCP caller's, and the guard above is a
479
+ // list the table could drift from — `constructor` must never answer `Object`'s function here.
480
+ fix: cli && Object.hasOwn(CLI_FIXES, code) ? CLI_FIXES[code] : projectedFix(code),
479
481
  docs: described.docs,
480
482
  };
481
483
  }
package/src/parse.ts CHANGED
@@ -176,7 +176,7 @@ export function parseArgs(argv: readonly string[], specs: readonly CommandSpec[]
176
176
  flag: '',
177
177
  command: spec.name,
178
178
  reason: `hands nothing to another tool, so ${passthrough.join(' ')} would be dropped in silence`,
179
- fix: `x ${spec.name} --help`,
179
+ fix: `x ${quoteArg(spec.name)} --help`,
180
180
  });
181
181
  }
182
182
  const flags = defaults(spec);
@@ -288,12 +288,12 @@ function assertFlagsApply(
288
288
  const only = flag.subcommands;
289
289
  if (only === undefined || only.includes(subcommand) || !given.has(flag.name)) continue;
290
290
  const value = flags.get(flag.name);
291
- const argument = typeof value === 'string' ? ` ${quoteArg(value)}` : '';
291
+ const invocation = `x ${quoteArg(spec.name)} ${quoteArg(only[0] ?? subcommand)} --${quoteArg(flag.name)}`;
292
292
  throw new BadFlagError({
293
293
  flag: flag.name,
294
294
  command: `${spec.name} ${subcommand}`,
295
295
  reason: `read by ${only.map((word) => `x ${spec.name} ${word}`).join(' / ')} only — "${subcommand}" would ignore it`,
296
- fix: `x ${spec.name} ${only[0]} --${flag.name}${argument}`,
296
+ fix: typeof value === 'string' ? `${invocation} ${quoteArg(value)}` : invocation,
297
297
  });
298
298
  }
299
299
  }
package/src/pr-threads.ts CHANGED
@@ -9,6 +9,7 @@ import { GhResponseInvalidError, ghGraphql } from './gh';
9
9
  import type { GhRepo } from './gh-target';
10
10
  import type { PrActivity } from './pr-activity';
11
11
  import { ACTIVITY_FIELDS, ACTIVITY_SCHEMA, activityOf } from './pr-activity';
12
+ import { quoteArg } from './shell-quote';
12
13
 
13
14
  /**
14
15
  * How many threads one page holds. The query is built from it, so the report and the request can
@@ -184,7 +185,7 @@ export async function fetchReviewReport(
184
185
  REVIEW_RESPONSE,
185
186
  {
186
187
  label: `gh api graphql (review threads on ${repo.slug}#${number})`,
187
- fix: `gh pr view ${number} --repo ${repo.slug} --json number # confirm the pull request is visible to this token`,
188
+ fix: `gh pr view ${quoteArg(String(number))} --repo ${quoteArg(repo.slug)} --json number # confirm the pull request is visible to this token`,
188
189
  },
189
190
  );
190
191
  const pull = response.data.repository?.pullRequest;
package/src/role-start.ts CHANGED
@@ -54,6 +54,7 @@ import { startLiveFeed } from './runtime-live-feed';
54
54
  import { type RunningServices, releaseOrThrow } from './runtime-services';
55
55
  import { inlineScriptSources } from './script-csp';
56
56
  import { bootWarningConcernsAny } from './serve-boot-warnings';
57
+ import { quoteArg } from './shell-quote';
57
58
  import { inlineStyleSources } from './style-csp';
58
59
  import { syncConnectSources } from './sync-url';
59
60
  import { trustedHopsFromEnv } from './trusted-hops';
@@ -93,7 +94,7 @@ export function selectRoles(flag: string | undefined): readonly Role[] {
93
94
  flag: 'role',
94
95
  command: 'dev',
95
96
  reason: `"${name}" is not a role (known: ${ROLES.join(', ')})`,
96
- fix: `x dev --role ${DEV_ROLES.join(',')}`,
97
+ fix: `x dev --role ${quoteArg(DEV_ROLES.join(','))}`,
97
98
  });
98
99
  }
99
100
  if (!SELECTABLE_ROLES.includes(name)) {
@@ -101,7 +102,7 @@ export function selectRoles(flag: string | undefined): readonly Role[] {
101
102
  flag: 'role',
102
103
  command: 'dev',
103
104
  reason: `"${name}" does not run under x dev (it runs once, as \`x db migrate\`)`,
104
- fix: `x dev --role ${DEV_ROLES.join(',')}`,
105
+ fix: `x dev --role ${quoteArg(DEV_ROLES.join(','))}`,
105
106
  });
106
107
  }
107
108
  if (!selected.includes(name)) selected.push(name);
package/src/role-sync.ts CHANGED
@@ -28,6 +28,7 @@ import { portFree } from './port-probe';
28
28
  import type { StartRolesOptions } from './role-start';
29
29
  import { startOrWaitForBus } from './role-sync-bus-wait';
30
30
  import type { Env } from './runtime-bindings';
31
+ import { quoteArg } from './shell-quote';
31
32
  import { syncAuthenticator } from './sync-authenticator';
32
33
  import { syncOriginsFrom } from './sync-url';
33
34
  // A value edge back into `role-start.ts`, read only inside a call: the one parser of
@@ -55,7 +56,7 @@ class SyncPortInUseError extends UltimateError {
55
56
  // web port IS the sync port this refusal is about — the fix said `x dev --port 4000` for a
56
57
  // run that had just died on 4000, and a test named "its fix is a command that ends the
57
58
  // failure" pinned it.
58
- fix: `x dev --port ${portPairAfter(input.webPort)} # or free port ${input.port}: lsof -nP -iTCP:${input.port} -sTCP:LISTEN`,
59
+ fix: `x dev --port ${quoteArg(String(portPairAfter(input.webPort)))} # or free port ${input.port}: lsof -nP -iTCP:${input.port} -sTCP:LISTEN`,
59
60
  meta: { port: input.port, webPort: input.webPort },
60
61
  });
61
62
  }
@@ -15,13 +15,7 @@ import { existsSync } from 'node:fs';
15
15
  import { join } from 'node:path';
16
16
  import { ERROR_DOCS_URL } from '@ultimat3/core';
17
17
  import type { EntityDescriptionLike, UnrenderedDeclaration } from '@ultimat3/db';
18
- import {
19
- declaredSchema,
20
- recordRetired,
21
- shellInertIdentifier,
22
- snapshotOf,
23
- unrenderedOf,
24
- } from '@ultimat3/db';
18
+ import { declaredSchema, recordRetired, snapshotOf, unrenderedOf } from '@ultimat3/db';
25
19
  import { registeredEntities } from '@ultimat3/entity';
26
20
  import { loadApp } from './app-load';
27
21
  import { checkSourceDrift, DB_PACKAGE } from './drift';
@@ -35,6 +29,7 @@ import type { Finding } from './output';
35
29
  import { settledDescriptions } from './redundant-indexes';
36
30
  import { appRowSecurity, type RowSecurityWanted, rowSecurityFindings } from './row-security-wanted';
37
31
  import { diffDeclaredSchema, type SchemaDifference } from './schema-diff';
32
+ import { quoteArg } from './shell-quote';
38
33
 
39
34
  /**
40
35
  * What the app declares, or `undefined` when the app would not load. Injected so this module's
@@ -104,14 +99,16 @@ function repairFix(
104
99
  // the DROP, and the other branch — the declaration may have been LOST rather than removed, which
105
100
  // is the whole reason this direction is its own finding — rides in the cause: a `fix:` is one
106
101
  // command, and a `# or …` after it was a shell comment nobody's paste would run.
107
- if (difference.direction === 'unmigrated') return { fix: `x db gen "record ${difference.name}"` };
108
- // The name was read off a sidecar on disk and lands inside double quotes, where `$(…)` and a
109
- // backtick still run: one the shell would act on is named in the cause only, never the command.
110
- const inert = shellInertIdentifier(difference.name) !== null;
102
+ // The name can be read off a sidecar on disk, so the description is SINGLE-quoted: inside
103
+ // double quotes `$(…)` and a backtick still run, inside single quotes nothing does, and the line
104
+ // stays the one runnable command naming the real object.
105
+ if (difference.direction === 'unmigrated') {
106
+ const recorded = quoteArg(`record ${difference.name}`);
107
+ return { fix: `x db gen ${recorded}` };
108
+ }
109
+ const dropped = quoteArg(`drop ${difference.name}`);
111
110
  return {
112
- fix: inert
113
- ? `x db gen "drop ${difference.name}"`
114
- : 'x db gen "drop what the entities no longer declare"',
111
+ fix: `x db gen ${dropped}`,
115
112
  why: `if ${difference.name} was lost rather than removed, re-declare it on the entity instead — this command drops it`,
116
113
  };
117
114
  }
@@ -11,5 +11,12 @@ const SHELL_SAFE = /^[\w@%+=:,./-]+$/;
11
11
  * `'\''` is the only escape a single-quoted string has. A shell-safe value is left alone, so the
12
12
  * common case stays readable.
13
13
  */
14
- export const quoteArg = (value: string): string =>
14
+ const quoteOne = (value: string): string =>
15
15
  SHELL_SAFE.test(value) ? value : `'${value.split("'").join("'\\''")}'`;
16
+
17
+ /**
18
+ * A word list is an INVOCATION (`['g', 'route', name]`): each word quoted on its own and joined,
19
+ * because quoting it whole made `x 'g route posts'`, one word no command answers to.
20
+ */
21
+ export const quoteArg = (value: string | readonly string[]): string =>
22
+ typeof value === 'string' ? quoteOne(value) : value.map(quoteOne).join(' ');
@@ -5,6 +5,7 @@
5
5
 
6
6
  import type { AppLocaleSet } from '@ultimat3/i18n/app-catalogs';
7
7
  import { BadFlagError } from './errors';
8
+ import { quoteArg } from './shell-quote';
8
9
 
9
10
  /**
10
11
  * `@ultimat3/i18n/app-catalogs`'s `appLocaleSet(root)` — the one reader, and its one answer for an
@@ -20,7 +21,7 @@ export function readLocaleFlag(value: string | undefined, app: ShotLocales): str
20
21
  flag: 'locale',
21
22
  command: 'shot',
22
23
  reason: `"${value}" is not one of the app's locales (${app.locales.join(', ')})`,
23
- fix: `x shot / --locale ${app.defaultLocale} --json`,
24
+ fix: `x shot / --locale ${quoteArg(app.defaultLocale)} --json`,
24
25
  });
25
26
  }
26
27
 
package/src/shot-route.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  // `allowHosts` exists to refuse is refused here, at the argument, where the reader can see why.
4
4
 
5
5
  import { BadFlagError, MissingPositionalError } from './errors';
6
+ import { quoteArg } from './shell-quote';
6
7
 
7
8
  /** A directory name a route can never escape: everything that is not a letter or digit is a dash. */
8
9
  export function shotSlug(route: string): string {
@@ -75,7 +76,7 @@ export function readRoute(raw: string | undefined): string {
75
76
  reason: `"${route}" is an absolute URL; x shot photographs a route of the app under test`,
76
77
  // The path out of the URL when it parses — the refusal's own fix line has to be runnable,
77
78
  // and `new URL('http://')` throws, so the fallback is the route every app has.
78
- fix: `x shot ${pathOf(route)} --json`,
79
+ fix: `x shot ${quoteArg(pathOf(route))} --json`,
79
80
  });
80
81
  }
81
82
  const path = route.startsWith('/') ? route : `/${route}`;
@@ -145,21 +145,24 @@ export function skipReasonFor(route: RouteFacts): SkipReason | null {
145
145
  * English rather than `t()`, for the reason every `cause:`/`fix:` in this repo is English: this is
146
146
  * a diagnostic an agent pastes into a report, and `wiki/Error-Codes.md` is the same surface.
147
147
  */
148
- const WHY = Object.freeze<Record<SkipReason, (route: RouteFacts) => string>>({
149
- 'surface-forbids-static': (route) =>
150
- `${route.surface}/ surface — server-rendered, not prerendered; ` +
151
- `${route.surface}/ allows ${SURFACE_SPECS[route.surface].allowedModes.join(' | ') || 'no render mode'}, ` +
152
- 'so no route on it can ever reach the artifact',
153
- 'mode-revalidates': (route) =>
154
- `render: '${route.render}' regenerates on a tag or ttl and a published file cannot, ` +
155
- "so it is served by the app — change it to render: 'static' to emit it",
156
- 'mode-per-request': (route) =>
157
- `render: '${route.render}' is rendered per request, so it is served by the app — ` +
158
- "change it to render: 'static' to emit it",
159
- 'no-prerender-paths': (route) =>
160
- `render: '${route.render}' with dynamic params and no prerender() paths, so the build ` +
161
- 'enumerated nothing to write — add prerender() to the route',
162
- });
148
+ // Null-prototype: a reason that is not one of these reads `undefined`, never an `Object` member.
149
+ const WHY: Readonly<Record<SkipReason, (route: RouteFacts) => string>> = Object.freeze(
150
+ Object.assign(Object.create(null) as object, {
151
+ 'surface-forbids-static': (route) =>
152
+ `${route.surface}/ surface — server-rendered, not prerendered; ` +
153
+ `${route.surface}/ allows ${SURFACE_SPECS[route.surface].allowedModes.join(' | ') || 'no render mode'}, ` +
154
+ 'so no route on it can ever reach the artifact',
155
+ 'mode-revalidates': (route) =>
156
+ `render: '${route.render}' regenerates on a tag or ttl and a published file cannot, ` +
157
+ "so it is served by the app — change it to render: 'static' to emit it",
158
+ 'mode-per-request': (route) =>
159
+ `render: '${route.render}' is rendered per request, so it is served by the app — ` +
160
+ "change it to render: 'static' to emit it",
161
+ 'no-prerender-paths': (route) =>
162
+ `render: '${route.render}' with dynamic params and no prerender() paths, so the build ` +
163
+ 'enumerated nothing to write — add prerender() to the route',
164
+ } satisfies Record<SkipReason, (route: RouteFacts) => string>),
165
+ );
163
166
 
164
167
  /** The reason as a row: the code a machine keys off, and the sentence a human reads. */
165
168
  export function skippedRoute(
@@ -108,7 +108,7 @@ export function readType(raw: string | undefined): TestType | undefined {
108
108
  flag: 'type',
109
109
  command: 'test',
110
110
  reason: `"${raw}" is not a test type (known: ${TEST_TYPES.join(', ')})`,
111
- fix: suggestion === undefined ? `x test ${TEST_TYPES[0]}` : `x test ${suggestion}`,
111
+ fix: `x test ${renderFixShellArg(suggestion ?? TEST_TYPES[0], '<type>')}`,
112
112
  });
113
113
  }
114
114
 
@@ -14,6 +14,7 @@ import { COVERAGE_FIELD, readCoverageFloor } from './coverage-floor';
14
14
  import type { ExerciseFloor } from './exercise-floor';
15
15
  import { EXERCISE_FIELD, readExerciseFloor } from './exercise-floor';
16
16
  import type { Finding } from './output';
17
+ import { quoteArg } from './shell-quote';
17
18
  import type { StepTimeouts } from './verify-deadline';
18
19
  import { readStepTimeouts, STEP_TIMEOUT_FIELD } from './verify-deadline';
19
20
  import type { GuardBaseline } from './verify-guard-baseline';
@@ -320,7 +321,7 @@ export const vanishedSuiteFinding = (step: string, command: string = GATE_COMMAN
320
321
  export const skippedSuiteFinding = (step: string, skipped: number): Finding => ({
321
322
  code: 'X_VERIFY_SUITE_VANISHED',
322
323
  cause: `${VERIFY_FLOOR_FILE} requires the ${step} step and all ${skipped} test(s) it found skipped themselves, so nothing ran`,
323
- fix: `x test ${step} --json # then set what the suite skips without, or drop "${step}" from ${VERIFY_FLOOR_FILE} in the commit that says why`,
324
+ fix: `x test ${quoteArg(step)} --json # then set what the suite skips without, or drop "${step}" from ${VERIFY_FLOOR_FILE} in the commit that says why`,
324
325
  docs: ERROR_DOCS_URL,
325
326
  at: VERIFY_FLOOR_FILE,
326
327
  });
@@ -10,6 +10,7 @@ import { renderThrowable } from '@ultimat3/core';
10
10
  import type { Runner } from './exec';
11
11
  import { execOutput } from './exec';
12
12
  import type { Finding } from './output';
13
+ import { quoteArg } from './shell-quote';
13
14
  import { TEST_COMPOSE_PATH, TEST_ENV_PATH } from './templates/scaffold-test-services';
14
15
  import { parseDotenvValues } from './test-dotenv';
15
16
 
@@ -140,7 +141,7 @@ const hostOf = (url: string): string => {
140
141
  const foreignFinding = (url: string): Finding => ({
141
142
  code: 'X_TEST_SERVICES_UNAVAILABLE',
142
143
  cause: `a Postgres answers at ${hostOf(url)} (${TEST_ENV_PATH}'s ${TEST_DATABASE_KEY}) and refuses this app's credentials — another app's test stack holds the port, so the live suites are not run against it`,
143
- fix: `docker ps --filter publish=${portOf(url)} # stop that stack (docker compose -p <project> down), or give this app another port in ${TEST_COMPOSE_PATH} and ${TEST_ENV_PATH}`,
144
+ fix: `docker ps --filter publish=${quoteArg(portOf(url))} # stop that stack (docker compose -p <project> down), or give this app another port in ${TEST_COMPOSE_PATH} and ${TEST_ENV_PATH}`,
144
145
  at: TEST_ENV_PATH,
145
146
  });
146
147
 
@@ -24,6 +24,7 @@ import {
24
24
  mayReachFixture,
25
25
  } from './publish-closure';
26
26
  import { isReExportManifest } from './reexport-manifest';
27
+ import { quoteArg } from './shell-quote';
27
28
  import { eachSourceFile, isGenerated } from './source-files';
28
29
  import type { ShippedPackage } from './test-only-shipped';
29
30
  import { checkTestOnlyShipped, entryPatternsOf } from './test-only-shipped';
@@ -98,7 +99,7 @@ export const missingFileFinding = (dir: string, file: string, scaffolder: boolea
98
99
  code: 'X_PACKAGE_SHAPE',
99
100
  cause: `packages/${dir} has no ${file}`,
100
101
  fix: scaffolder
101
- ? `bun run scripts/new-package.ts ${dir} --only ${file}`
102
+ ? `bun run scripts/new-package.ts ${quoteArg(dir)} --only ${quoteArg(file)}`
102
103
  : `add packages/${dir}/${file}, shaped like the one in a sibling package`,
103
104
  docs: ERROR_DOCS_URL,
104
105
  at: `packages/${dir}/${file}`,
@@ -153,7 +154,7 @@ export const PUBLISHED_DEP_FIELDS = [
153
154
  export const versionSkewFinding = (dir: string, found: string, expected: string): Finding => ({
154
155
  code: 'X_RELEASE_VERSION_SKEW',
155
156
  cause: `packages/${dir} is at ${found}, not the lockstep version ${expected}`,
156
- fix: `bun run scripts/release.ts --version ${expected}`,
157
+ fix: `bun run scripts/release.ts --version ${quoteArg(expected)}`,
157
158
  docs: ERROR_DOCS_URL,
158
159
  at: `packages/${dir}/package.json`,
159
160
  });
@@ -166,7 +167,7 @@ export const pinSkewFinding = (
166
167
  ): Finding => ({
167
168
  code: 'X_RELEASE_VERSION_SKEW',
168
169
  cause: `packages/${dir} pins ${dep} at ${range}, not the lockstep version ${expected}`,
169
- fix: `bun run scripts/release.ts --version ${expected}`,
170
+ fix: `bun run scripts/release.ts --version ${quoteArg(expected)}`,
170
171
  docs: ERROR_DOCS_URL,
171
172
  at: `packages/${dir}/package.json`,
172
173
  });
@@ -97,11 +97,13 @@ export const undeclaredExternalDepFinding = (
97
97
  // package across the app, rather than whatever the registry calls latest today.
98
98
  const pinned = range === undefined ? dependency : `${dependency}@${range}`;
99
99
  const spec = renderFixShellArg(pinned, '') === '' ? dependency : pinned;
100
- const dev = at.endsWith(FIXTURE_SUFFIX) ? ' --dev' : '';
100
+ const dev = at.endsWith(FIXTURE_SUFFIX);
101
+ const added = renderFixShellArg(spec, '<the package>');
102
+ const cwd = renderFixShellArg(owner.dir, '<the workspace directory>');
101
103
  return {
102
104
  code: 'X_WORKSPACE_EXTERNAL_DEP_UNDECLARED',
103
105
  cause: `${at} imports ${dependency}, which neither ${owner.dir}/package.json nor the root package.json declares — it resolves only while another workspace's copy is hoisted`,
104
- fix: `bun add ${renderFixShellArg(spec, '<the package>')}${dev} --cwd ${renderFixShellArg(owner.dir, '<the workspace directory>')}`,
106
+ fix: dev ? `bun add ${added} --dev --cwd ${cwd}` : `bun add ${added} --cwd ${cwd}`,
105
107
  docs: ERROR_DOCS_URL,
106
108
  at: `${owner.dir}/package.json`,
107
109
  };
@@ -116,6 +116,36 @@ downstream app on Ultimate and of systems built without it; no row is a defect i
116
116
  The test-kit row of that plan's table shipped in 23.0.0 work (`renderView`, `runJobs({ actor })`,
117
117
  `mountIslandState`) and is not repeated here.
118
118
 
119
+ ## Carried from the 2026-11 plans
120
+
121
+ `As of 2026-11-15`. The open rows of the
122
+ [2026/11/02](https://github.com/developerz-ai/ultimate/blob/main/docs/plans/2026/11/02/101-absorb-reinvented-patterns/status.yml)
123
+ and [2026/11/11](https://github.com/developerz-ai/ultimate/blob/main/docs/plans/2026/11/11/101-full-stack-efficiency-sweeps/status.yml)
124
+ plans that no slice of the
125
+ [live plan](https://github.com/developerz-ai/ultimate/blob/main/docs/plans/2026/11/14/101-finished-and-self-maintained/overview.md)
126
+ owns. Both trackers read `superseded`; each of their slice rows names where its open work went.
127
+ **Build** is owed work, **deferred** waits on the reason given, **rejected** will not be built. A
128
+ plan tracker left `in_progress` with no commit in its directory for 30 days fails the `roadmap`
129
+ step (`X_ROADMAP_TRACKER_STALE`), so this list, not a stale tracker, is where open work waits.
130
+
131
+ | Gap | Decision | Why, and the record |
132
+ |---|---|---|
133
+ | CI's critical path: `cli`'s own slow tests (the `x upgrade` hop, the scaffold typecheck) | deferred | speed, not correctness: every job is inside its timeout. Re-measure from the run history (`x ci runs --json`) before acting on a figure. 2026/11/02 slice 33 |
134
+ | The framework's own gate at `"isolate": false` | rejected | its suites exercise process-global registries on purpose; the slice's own fallback (keep the flag, record why) holds, [Testing](Testing) states it. Apps run without isolation by default. 2026/11/02 slice 31, step 4 |
135
+ | `x branch` previews, expand/contract renames, CRDT collaboration, mobile, more chart kinds, N-pane docking | deferred | each needs a plan of its own; none is rejected. [`90-deferred.md`](https://github.com/developerz-ai/ultimate/blob/main/docs/plans/2026/11/02/101-absorb-reinvented-patterns/90-deferred.md), "Too large for this plan" |
136
+ | A per-route request ceiling (`X_ISLAND_REQUESTS_OVER_BUDGET`) | deferred | requests per route are measured into `.x/build-stats.json` already; a ceiling waits for the first app that declares one. 2026/11/11 slice 11, I2 |
137
+ | One stylesheet per route instead of per surface | rejected | measured 23.8 kB gzip, immutable and cached across navigations; a per-route split costs requests for bytes the cache already holds. 2026/11/11 slice 11, I7 |
138
+ | Re-running the 2026-11-11 scaffold-and-break session (timing and error-grade tables) | deferred | evidence, not code: `scaffold-smoke` gates two scaffold shapes on every push; the session re-runs against the next change that claims a DX gain. 2026/11/11 slice 19, step 5 |
139
+ | Chart resource requests for the `sync` and `replicator` roles | deferred | unmeasured, so they keep their previous values; measure idle as `web`, `worker` and `scheduler` were before changing them. 2026/11/11 slice 20, O6 |
140
+ | Guards run on changed files only (`--changed`) | deferred | never measured; the slice's own rule drops it if the local saving is under 5 s. 2026/11/11 slice 16, step 5 |
141
+ | A faster `unit` step from the determinism work | rejected | measured at 2–5 %, inside run-to-run noise; determinism is the goal, not speed. 2026/11/11 slice 17 |
142
+ | Rolling the replicator only when its own image or config changed | deferred | the image updater repins every container naming the image and every build is a new digest, so a digest test rolls it every time; needs a per-role change signal. 2026/11/11 slice 30, I13 |
143
+ | Sign-in e2e against an out-of-process stub identity provider, in the reference app | deferred | the e2e suites sign in with the development viewer, which answers only a cookie-less request under `x dev`; a stub provider is a second process the e2e harness does not start. 2026/11/11 slice 18, A7 |
144
+ | A sync-node subscribe fixture for the deployed demo app (`dummy/social-media-clone`) | deferred | needs the app's API importable without its demo seeding side effect (`apps/web/api/index.ts`). 2026/11/11 slice 18, A8 |
145
+ | The reference app's three hourly task + job pairs, as `cronJob()` | build | the reference app shows every primitive once and idiomatically, and a hand-written pair beside the factory teaches the second way. 2026/11/11 slice 18, A13 |
146
+ | One shared `OnTheWire<T>` type | deferred | named once by the tracked-app pass with no second caller measured. 2026/11/11 slice 18 |
147
+ | The reference app's identity model (`members.userId` against `x_users.id == members.id`) | deferred | a schema change in the reference app with no defect behind it. 2026/11/11 slice 18 |
148
+
119
149
  ## Closed
120
150
 
121
151
  **Historical:** every row is a defect that shipped; the third column is for readers still pinned below
package/wiki/Stability.md CHANGED
@@ -50,6 +50,24 @@ Never "stable forever": a covered surface can change, in a scheduled major, with
50
50
 
51
51
  Ruling 2026-11-09: the clock moved from v30 to v31. v30 shipped 2026-11-07 while only our own apps ran Ultimate in production, so the window protected no one yet; v31 carries the breaks of plan 101-final-hardening-before-v31, and the window protects adopters from there.
52
52
 
53
+ ## Supported runtimes
54
+
55
+ **A runtime is supported when something runs the gate on it.** The gate runs one Bun, one Postgres and one Solid — the pins below — on every push and pull request; `compat.yml` runs the gate's `unit` and `live` steps weekly on each other version listed (`gh workflow run compat.yml` runs it now). A red cell files or updates one `compat` issue, closed by that cell's next green run: `gh issue list --label compat --state open`. Generated from the workflow's matrix and the pins; a hand edit fails the gate's `unit` step.
56
+
57
+ <!-- generated: compat-table — bun run scripts/compat-table.ts --write -->
58
+ | Runtime | Version | Run by | Status |
59
+ |---|---|---|---|
60
+ | Bun | `1.4.4`, the pin (`.bun-version`) | the gate, every push and pull request (`ci.yml`) | supported |
61
+ | Bun | newest stable | `compat.yml` cell `bun-latest`, weekly | supported |
62
+ | Bun | canary | `compat.yml` cell `bun-canary`, weekly | watched: tested, never promised |
63
+ | Postgres | `17`, the pin (`docker/docker-compose.test.yml`) | the gate, every push and pull request (`ci.yml`) | supported |
64
+ | Postgres | newest `16.x` image | `compat.yml` cell `postgres-16`, weekly | supported |
65
+ | Postgres | newest `17.x` image | `compat.yml` cell `postgres-17`, weekly | supported |
66
+ | Postgres | newest `18.x` image | `compat.yml` cell `postgres-18`, weekly | supported |
67
+ | Solid | `1.9.18`, the pin (root `package.json`) | the gate, every push and pull request (`ci.yml`) | supported |
68
+ | Solid | newest `1.x` | `compat.yml` cell `solid-1`, weekly | supported |
69
+ <!-- end generated -->
70
+
53
71
  ## The support window
54
72
 
55
73
  | Major | Status | Security fixes until |
@@ -58,7 +76,7 @@ Ruling 2026-11-09: the clock moved from v30 to v31. v30 shipped 2026-11-07 while
58
76
  | the previous major | security fixes, as patches on `release/<major>.x` | 6 months after the current major's `## X.0.0` date |
59
77
  | anything older | none | [Upgrading](Upgrading), one major per `x upgrade` run |
60
78
 
61
- **Convention, not enforced:** `release/<major>.x` is cut by hand at each major and kept at that major's newest minor; no script cuts it. Its name is enforced: `ci.yml` and `release-tag.yml` match exactly `release/[0-9]+.x`, and `scripts/release.ts --bump` refuses any other `release/*` branch (`X_RELEASE_BRANCH_NAME`). A bump PR's own branch is `chore/release-X.Y.Z`, never `release/X.Y.Z` (#1054). Once it exists, a patch is `latest` while its major is current and `maint-<major>` once its successor ships. `scripts/dist-tag.ts` decides the tag from the registry's `latest`, and `npm publish` never runs without it.
79
+ `release/<major>.x` is cut by `bun run scripts/release-maint.ts --major <N>` (idempotent, `--dry-run` first) at the major's last tag, with `maint-<N>` on every package; on it `scripts/release.ts` ships patches only (`X_RELEASE_LANE_PATCH_ONLY`). Its name is enforced: `ci.yml` and `release-tag.yml` match exactly `release/[0-9]+.x`, and `scripts/release.ts --bump` refuses any other `release/*` branch (`X_RELEASE_BRANCH_NAME`). A bump PR's own branch is `chore/release-X.Y.Z`, never `release/X.Y.Z` (#1054). Once it exists, a patch is `latest` while its major is current and `maint-<major>` once its successor ships. `scripts/dist-tag.ts` decides the tag from the registry's `latest`, and `npm publish` never runs without it.
62
80
 
63
81
  ## Deprecation
64
82
 
@@ -69,7 +87,7 @@ A removal or a rename ships its alias, marked `@deprecated`, on `main` for at le
69
87
  | Branch | Holds |
70
88
  |---|---|
71
89
  | `main` | minors and patches only while the window is closed; a `BREAKING —` changelog entry there is refused |
72
- | `next` | every breaking change waiting for the window. **Convention, not enforced:** it merges `main` weekly, by hand, so it never falls behind a fix; `ci.yml` gates every push to it |
90
+ | `next` | every breaking change waiting for the window. `next-sync.yml` merges `main` into it weekly (a conflict, or a workflow-file change the job token may not push, opens one issue with the exact command, closed by the next clean merge), so it never falls behind a fix; `ci.yml` gates every push to it. `scripts/release-due.ts` proposes it as the `chore: release X.0.0` PR once the window opens; a person merges |
73
91
  | `release/<major>.x` | the previous major's security patches |
74
92
 
75
93
  A change with both kinds of edit splits into two pull requests: the non-breaking half to `main`, the break to `next`.
@@ -97,4 +115,5 @@ The maintainer bot judges whether a release is due and which kind (`.dz/briefs/r
97
115
  | a removal was deprecated first | `bun run scripts/deprecation-window.ts` and the gate | `X_RELEASE_UNDEPRECATED_REMOVAL` |
98
116
  | every release from 30.0.0 opens with Highlights, the Release body | `bun run changelog-check` and the gate, over `docs/changelog/` | `X_CHANGELOG_HIGHLIGHTS_MISSING` |
99
117
  | a bump branch is `chore/release-X.Y.Z`; `release/*` is only `release/<major>.x` | `scripts/release.ts --bump`; `ci.yml` and `release-tag.yml` filter on `release/[0-9]+.x` (`scripts/release-tag-workflow-shape.test.ts`) | `X_RELEASE_BRANCH_NAME` |
118
+ | the supported runtimes are the ones `compat.yml` and the gate run | `scripts/compat-table.test.ts`, in the gate's `unit` step | `X_COMPAT_TABLE_DRIFT` |
100
119
  | a maintenance publish never moves `latest` | `scripts/dist-tag.ts` in `release.yml`; `scripts/registry-audit.ts` audits `latest` and each `maint-*` tag | `X_REGISTRY_LATEST_DRIFT` |