@ultimat3/cli 31.48.0 → 31.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/CLAUDE.md +30 -23
  2. package/README.md +96 -4
  3. package/package.json +30 -30
  4. package/src/api-registration.ts +45 -14
  5. package/src/api-routes.ts +1 -0
  6. package/src/app-load.ts +7 -3
  7. package/src/app-openapi.ts +7 -1
  8. package/src/app-root.ts +7 -1
  9. package/src/budgets.ts +2 -1
  10. package/src/clean-services.ts +142 -0
  11. package/src/cmd-auth.ts +3 -0
  12. package/src/cmd-clean-spec.ts +10 -3
  13. package/src/cmd-clean.ts +23 -9
  14. package/src/cmd-db-backfill.ts +6 -0
  15. package/src/cmd-db-branch.ts +10 -4
  16. package/src/cmd-db-recount.ts +5 -12
  17. package/src/cmd-db-rollback.ts +77 -0
  18. package/src/cmd-db-spec.ts +18 -2
  19. package/src/cmd-db-status.ts +5 -10
  20. package/src/cmd-db.ts +105 -33
  21. package/src/cmd-deploy-verify.ts +14 -6
  22. package/src/cmd-docs-topic.ts +94 -0
  23. package/src/cmd-docs.ts +15 -1
  24. package/src/cmd-doctor.ts +109 -41
  25. package/src/cmd-drill.ts +80 -18
  26. package/src/cmd-env.ts +30 -8
  27. package/src/cmd-errors-app.ts +63 -0
  28. package/src/cmd-errors.ts +50 -14
  29. package/src/cmd-generate.ts +17 -4
  30. package/src/cmd-heavy-spec.ts +9 -1
  31. package/src/cmd-heavy.ts +111 -27
  32. package/src/cmd-i18n.ts +33 -1
  33. package/src/cmd-jobs.ts +27 -1
  34. package/src/cmd-merge-driver-spec.ts +12 -0
  35. package/src/cmd-merge-driver.ts +95 -0
  36. package/src/cmd-new.ts +23 -3
  37. package/src/cmd-policy-spec.ts +9 -1
  38. package/src/cmd-policy.ts +72 -17
  39. package/src/cmd-stop.ts +18 -4
  40. package/src/cmd-tasks-run.ts +87 -0
  41. package/src/cmd-tasks-spec.ts +10 -3
  42. package/src/cmd-tasks.ts +8 -5
  43. package/src/cmd-test.ts +2 -1
  44. package/src/cmd-upgrade-spec.ts +8 -1
  45. package/src/cmd-upgrade.ts +15 -1
  46. package/src/cmd-verify.ts +9 -41
  47. package/src/codemods/agents-doc-row.ts +73 -0
  48. package/src/codemods/define-error-leaf.ts +37 -12
  49. package/src/codemods/docs-many-agents.ts +11 -15
  50. package/src/codemods/docs-worker-commands.ts +26 -0
  51. package/src/codemods/engine-fs.ts +9 -2
  52. package/src/codemods/index.ts +4 -0
  53. package/src/codemods/merge-drivers.ts +147 -0
  54. package/src/command.ts +3 -0
  55. package/src/db-applied-edits.ts +117 -0
  56. package/src/db-dev-wire.ts +18 -0
  57. package/src/db-diagnostics.ts +5 -10
  58. package/src/db-generate.ts +82 -7
  59. package/src/db-migrate-pass.ts +51 -0
  60. package/src/db-migrate-through-dev.ts +209 -0
  61. package/src/db-rollback-consent.ts +128 -0
  62. package/src/db-rollback-pass.ts +76 -0
  63. package/src/db-seed-generate.ts +5 -1
  64. package/src/db-seed.ts +7 -1
  65. package/src/deploy-verify-findings.ts +3 -0
  66. package/src/deploy-verify-grade.ts +3 -0
  67. package/src/deploy-verify-processes.ts +32 -0
  68. package/src/dev-boot.ts +3 -0
  69. package/src/dev-db-migrate.ts +155 -0
  70. package/src/dev-db-rollback.ts +33 -0
  71. package/src/dev-db-settled.ts +22 -0
  72. package/src/dev-lock-errors.ts +78 -0
  73. package/src/dev-lock-holder-dir.ts +64 -0
  74. package/src/dev-lock-live.ts +44 -0
  75. package/src/dev-lock.ts +59 -84
  76. package/src/dev-policy.ts +11 -8
  77. package/src/dev-rebuild-schema.ts +116 -13
  78. package/src/dev-rebuild.ts +13 -4
  79. package/src/dev-route-table.ts +7 -0
  80. package/src/dispatch.ts +21 -1
  81. package/src/doctor-api-listing.ts +114 -0
  82. package/src/doctor-guarded.ts +41 -0
  83. package/src/doctor-port.ts +90 -17
  84. package/src/doctor-probe.ts +36 -5
  85. package/src/doctor-processes-probe.ts +127 -0
  86. package/src/doctor-processes.ts +136 -0
  87. package/src/doctor-warnings.ts +17 -0
  88. package/src/error-codes-agents.ts +35 -0
  89. package/src/error-codes-processes.ts +30 -0
  90. package/src/error-codes-tooling.ts +2 -0
  91. package/src/error-codes.ts +12 -13
  92. package/src/errors-suite.ts +27 -0
  93. package/src/errors.ts +18 -22
  94. package/src/exercise-registration.ts +4 -3
  95. package/src/exercise-services.ts +13 -3
  96. package/src/framework-env.ts +7 -3
  97. package/src/framework-schema.ts +15 -5
  98. package/src/generate-files.ts +1 -0
  99. package/src/generate-grant-findings.ts +7 -5
  100. package/src/generate-grants.ts +9 -8
  101. package/src/generate-kinds.ts +30 -6
  102. package/src/generate-roles-file.ts +30 -0
  103. package/src/generate-slice-policy.ts +3 -3
  104. package/src/guard-sources.ts +1 -2
  105. package/src/guards.ts +2 -2
  106. package/src/heavy-env.ts +2 -0
  107. package/src/heavy-errors.ts +18 -0
  108. package/src/heavy-holders.ts +78 -0
  109. package/src/heavy-ledger.ts +56 -14
  110. package/src/heavy-pressure.ts +104 -0
  111. package/src/heavy.ts +31 -13
  112. package/src/i18n-registration.ts +22 -2
  113. package/src/island-harness.ts +2 -2
  114. package/src/job-budget.ts +4 -2
  115. package/src/job-registration.ts +64 -8
  116. package/src/jobs-queue-known.ts +43 -0
  117. package/src/mcp-errors-agents.ts +20 -0
  118. package/src/mcp-errors-doctor.ts +27 -0
  119. package/src/mcp-errors-processes.ts +23 -0
  120. package/src/mcp-errors.ts +15 -29
  121. package/src/mcp-host.ts +2 -2
  122. package/src/merge-driver-catalog.ts +58 -0
  123. package/src/merge-driver-config.ts +43 -0
  124. package/src/merge-driver-lines.ts +140 -0
  125. package/src/merge-state.ts +105 -0
  126. package/src/messages-db.ts +22 -1
  127. package/src/messages-processes.ts +13 -0
  128. package/src/messages-upgrade.ts +10 -0
  129. package/src/messages.ts +54 -4
  130. package/src/output-findings.ts +48 -21
  131. package/src/page-navigation.ts +5 -2
  132. package/src/parse.ts +37 -6
  133. package/src/policy-facts.ts +38 -21
  134. package/src/policy-row.ts +99 -0
  135. package/src/port-pair-free.ts +28 -0
  136. package/src/pwa-artifacts.ts +1 -1
  137. package/src/registry-lines.ts +110 -0
  138. package/src/registry.ts +2 -0
  139. package/src/retain-sweep.ts +1 -1
  140. package/src/retained-assets-boot.ts +1 -1
  141. package/src/role-replicator.ts +4 -1
  142. package/src/role-select.ts +86 -0
  143. package/src/role-start.ts +13 -55
  144. package/src/role-sync.ts +10 -5
  145. package/src/runtime-assets-site.ts +2 -2
  146. package/src/runtime-assets.ts +1 -1
  147. package/src/runtime-cache-frame.ts +46 -0
  148. package/src/runtime-cache-ttl.ts +23 -0
  149. package/src/runtime-cache.ts +33 -16
  150. package/src/runtime-database-ssl.ts +84 -0
  151. package/src/runtime-idempotency-scope.ts +16 -2
  152. package/src/runtime-jobs-share.ts +52 -0
  153. package/src/runtime-jobs.ts +43 -12
  154. package/src/runtime-queue.ts +18 -3
  155. package/src/runtime-render-document.ts +1 -2
  156. package/src/runtime-services.ts +8 -1
  157. package/src/schema-drift.ts +19 -2
  158. package/src/schema-dump-drift.ts +4 -1
  159. package/src/serve-boot-probe.ts +30 -2
  160. package/src/serve-boot.ts +11 -1
  161. package/src/serve-env.ts +39 -3
  162. package/src/serve.ts +61 -10
  163. package/src/site-asset-routes.ts +2 -2
  164. package/src/site-assets.ts +5 -158
  165. package/src/stop-run-start.ts +12 -0
  166. package/src/supervise-boot.ts +61 -0
  167. package/src/supervise-cgroup.ts +84 -0
  168. package/src/supervise-child.ts +206 -0
  169. package/src/supervise-count.ts +244 -0
  170. package/src/supervise-errors.ts +83 -0
  171. package/src/supervise-facts.ts +40 -0
  172. package/src/supervise-messages.ts +84 -0
  173. package/src/supervise-policy.ts +46 -0
  174. package/src/supervise-pool.ts +10 -0
  175. package/src/supervise-probe.ts +158 -0
  176. package/src/supervise-run.ts +54 -0
  177. package/src/supervise.ts +383 -0
  178. package/src/sw-precache-plan.ts +1 -1
  179. package/src/templates/generate-purge.ts +6 -6
  180. package/src/templates/guard-animated-layout-property.ts +2 -2
  181. package/src/templates/guard-bare-error.ts +1 -1
  182. package/src/templates/guard-error-declared.ts +2 -2
  183. package/src/templates/guard-focus-visible.ts +1 -1
  184. package/src/templates/guard-image-dimensions.ts +2 -2
  185. package/src/templates/guard-island-mount-clears.ts +1 -1
  186. package/src/templates/guard-native-confirm.ts +1 -1
  187. package/src/templates/guard-raw-breakpoint.ts +2 -2
  188. package/src/templates/guard-raw-colour.ts +2 -2
  189. package/src/templates/guard-raw-fetch.ts +1 -1
  190. package/src/templates/guard-raw-interval.ts +1 -1
  191. package/src/templates/guard-raw-length.ts +3 -3
  192. package/src/templates/guard-raw-motion.ts +97 -1
  193. package/src/templates/guard-raw-shadow.ts +1 -1
  194. package/src/templates/guard-raw-z-index.ts +1 -1
  195. package/src/templates/guard-released-forms.ts +58 -9
  196. package/src/templates/guard-repo-await-in-loop.ts +1 -1
  197. package/src/templates/guard-repo-raw-sql.ts +4 -4
  198. package/src/templates/guard-repo-unbounded.ts +1 -1
  199. package/src/templates/guard-runtime-pin.ts +1 -1
  200. package/src/templates/guard-semantic-interactive.ts +2 -2
  201. package/src/templates/guard-unbounded-fanout.ts +1 -1
  202. package/src/templates/guard-undeclared-custom-property.ts +3 -3
  203. package/src/templates/guard-undefined-style-class.ts +3 -3
  204. package/src/templates/guard-unzoned-date.ts +3 -3
  205. package/src/templates/query-slice.ts +82 -0
  206. package/src/templates/query.ts +76 -30
  207. package/src/templates/resource-page.ts +3 -2
  208. package/src/templates/scaffold-bin.ts +2 -0
  209. package/src/templates/scaffold-claude-commands.ts +6 -0
  210. package/src/templates/scaffold-claude.ts +4 -4
  211. package/src/templates/scaffold-container-compose.ts +47 -7
  212. package/src/templates/scaffold-docs.ts +7 -3
  213. package/src/templates/scaffold-gitattributes.ts +18 -1
  214. package/src/templates/scaffold-helm-templates.ts +9 -0
  215. package/src/templates/scaffold-repo.ts +5 -2
  216. package/src/templates/scaffold-test-services.ts +33 -11
  217. package/src/templates/shapes/offline.ts +0 -7
  218. package/src/templates/shapes/realtime.ts +2 -6
  219. package/src/templates/sign-in-action-tests.ts +6 -4
  220. package/src/templates/sign-in-challenge.ts +62 -0
  221. package/src/templates/sign-in-oidc-mfa.ts +31 -0
  222. package/src/templates/sign-in-oidc.ts +11 -3
  223. package/src/templates/sign-in-password.ts +18 -56
  224. package/src/test-only-shipped.ts +29 -2
  225. package/src/test-shards.ts +134 -42
  226. package/src/test-verdict.ts +79 -0
  227. package/src/test-workers.ts +15 -0
  228. package/src/upgrade-coverage-ratchet.ts +95 -0
  229. package/src/upgrade-gate-codemods.ts +5 -3
  230. package/src/upgrade-gate.ts +42 -4
  231. package/src/upgrade-merge-drivers.ts +25 -0
  232. package/src/upgrade-report.ts +32 -4
  233. package/src/upgrade-scope.ts +62 -0
  234. package/src/verify-checks.ts +2 -8
  235. package/src/verify-coverage-run.ts +4 -1
  236. package/src/verify-e2e.ts +21 -3
  237. package/src/verify-live.ts +38 -14
  238. package/src/verify-only.ts +67 -0
  239. package/src/verify-progress.ts +7 -3
  240. package/src/verify-run.ts +20 -2
  241. package/src/verify-services-stack.ts +165 -0
  242. package/src/verify-services.ts +84 -2
  243. package/src/verify-test-run.ts +6 -7
  244. package/src/verify-tests.ts +8 -2
  245. package/src/verify-typecheck.ts +25 -2
  246. package/src/workspace-checks.ts +4 -1
  247. package/wiki/Actions.md +66 -3
  248. package/wiki/Admin-Dashboard.md +2 -2
  249. package/wiki/Agents.md +5 -5
  250. package/wiki/Auth.md +20 -6
  251. package/wiki/Bare-VM.md +1 -1
  252. package/wiki/CI-Parallel-Gate.md +2 -1
  253. package/wiki/CLI-Reference.md +115 -42
  254. package/wiki/Caching-And-Invalidation.md +1 -1
  255. package/wiki/Client-Navigation.md +35 -5
  256. package/wiki/Configuration.md +12 -10
  257. package/wiki/Deployment.md +44 -4
  258. package/wiki/Entities-And-Migrations.md +17 -3
  259. package/wiki/FAQ.md +1 -1
  260. package/wiki/Getting-Started.md +2 -2
  261. package/wiki/Home.md +3 -3
  262. package/wiki/I18n.md +6 -4
  263. package/wiki/Installation.md +12 -11
  264. package/wiki/Interface-Rules.md +3 -1
  265. package/wiki/Jobs-And-Workflows.md +24 -4
  266. package/wiki/Known-Gaps.md +2 -2
  267. package/wiki/MCP-And-AI.md +48 -13
  268. package/wiki/Many-Agents.md +69 -2
  269. package/wiki/Migrations-And-Backfills.md +18 -0
  270. package/wiki/Notify.md +5 -3
  271. package/wiki/Observability.md +13 -0
  272. package/wiki/Outbound-HTTP.md +53 -2
  273. package/wiki/Policies-And-Authz.md +1 -1
  274. package/wiki/Queries-And-Live-Queries.md +2 -2
  275. package/wiki/Realtime.md +24 -7
  276. package/wiki/Routes-And-Render-Modes.md +2 -2
  277. package/wiki/Scheduled-Tasks.md +4 -1
  278. package/wiki/Static-Assets.md +5 -3
  279. package/wiki/Testing.md +64 -7
  280. package/wiki/Theming.md +6 -3
  281. package/wiki/Timezones-And-Dates.md +5 -1
  282. package/wiki/Troubleshooting.md +1 -0
  283. package/wiki/Tutorial-01-First-App.md +3 -3
  284. package/wiki/Tutorial-02-First-Feature.md +1 -1
  285. package/wiki/Tutorial-03-Auth-And-Admin.md +7 -6
  286. package/wiki/UI-Components.md +1 -0
  287. package/wiki/Upgrading.md +38 -0
@@ -162,7 +162,7 @@ export function animatedLayoutProperties(files: readonly StyleFile[]): readonly
162
162
  findings.push({
163
163
  code: CODE,
164
164
  cause: \`\${at} transitions every property of this element — \${animated === undefined ? \`\\\`\${property}: \${value}\\\` names none, and an omitted property is \\\`all\\\`\` : 'written out as \`all\`'} — so it animates properties nobody chose, the ones that cost a layout pass included, and no part of it can be composited\`,
165
- fix: \`name the properties in \${at} — \\\`transition: transform tokens.duration('fast') tokens.easing('out')\\\` — then: x verify\`,
165
+ fix: \`name the properties in \${at} — \\\`transition: transform tokens.duration('fast') tokens.easing('out')\\\` — then: x verify --only boundaries\`,
166
166
  at: file.path,
167
167
  });
168
168
  continue;
@@ -180,7 +180,7 @@ function layoutFinding(path: string, at: string, property: string, where: string
180
180
  return {
181
181
  code: CODE,
182
182
  cause: \`\${at} animates \${property} in \${where} — only transform and opacity are compositor-only, so every frame of this costs a full layout or paint pass on the same main thread the app runs on, and a moving box feeds the layout-shift metric while it does it\`,
183
- fix: \`animate \${instead} instead of \${property} at \${at}, then: x verify\`,
183
+ fix: \`animate \${instead} instead of \${property} at \${at}, then: x verify --only boundaries\`,
184
184
  at: path,
185
185
  };
186
186
  }
@@ -59,7 +59,7 @@ export function bareThrows(files: readonly SourceFile[]): readonly Finding[] {
59
59
  findings.push({
60
60
  code: CODE,
61
61
  cause: \`\${file.path}:\${line} throws a bare \${thrown} — it reaches its reader as a stack trace with no code, no cause and nothing to run\`,
62
- fix: \`declare the failure in \${file.path} with defineError({ code, title, status, cause, fix }) from @ultimat3/core/page — an X_SCREAMING_SNAKE code and a fix naming a command — and throw its class, then: x verify\`,
62
+ fix: \`declare the failure in \${file.path} with defineError({ code, title, status, cause, fix }) from @ultimat3/core/page — an X_SCREAMING_SNAKE code and a fix naming a command — and throw its class, then: x verify --only boundaries\`,
63
63
  at: file.path,
64
64
  });
65
65
  }
@@ -146,7 +146,7 @@ const finding = (file: SourceFile, line: number, what: string, declared: Declare
146
146
  return {
147
147
  code: CODE,
148
148
  cause: \`\${file.path}:\${line} \${what} — the title, the HTTP status and the class are then declared apart, and a code with no status answers 500 and hides its cause\`,
149
- fix: \`rewrite it in \${file.path} as one call per class, from @ultimat3/core/page: export const \${name} = defineError({ code: \${code}, title, status, cause, fix, problemMeta: ['<meta key>'] }) — it replaces the class and its registerErrorStatus / registerProblemMeta rows (offSocket: true instead of status for a code no response carries; publicCause: true for a 5xx whose cause a caller may read; drop problemMeta when its meta stays operator-only), then: x verify\`,
149
+ fix: \`rewrite it in \${file.path} as one call per class, from @ultimat3/core/page: export const \${name} = defineError({ code: \${code}, title, status, cause, fix, problemMeta: ['<meta key>'] }) — it replaces the class and its registerErrorStatus / registerProblemMeta rows (offSocket: true instead of status for a code no response carries; publicCause: true for a 5xx whose cause a caller may read; drop problemMeta when its meta stays operator-only), then: x verify --only boundaries\`,
150
150
  at: file.path,
151
151
  };
152
152
  };
@@ -154,7 +154,7 @@ const finding = (file: SourceFile, line: number, what: string, declared: Declare
154
154
  const barrelFinding = (file: SourceFile, line: number): Finding => ({
155
155
  code: CODE,
156
156
  cause: \`\${file.path}:\${line} takes defineError from the @ultimat3/core barrel — every island that throws the code then carries the framework's titles table, ~5.5 kB it never reads\`,
157
- fix: \`import { defineError } from '@ultimat3/core/page' in \${file.path} — the same function, without the table — then: x verify\`,
157
+ fix: \`import { defineError } from '@ultimat3/core/page' in \${file.path} — the same function, without the table — then: x verify --only boundaries\`,
158
158
  at: file.path,
159
159
  });
160
160
 
@@ -153,7 +153,7 @@ export function unreplacedFocusRings(files: readonly StyleFile[]): readonly Find
153
153
  findings.push({
154
154
  code: CODE,
155
155
  cause: \`\${file.path}:\${lineOf(scss, match.index)} removes the focus ring with \${property}: \${value} and nothing in the rule or beside it paints one back — a keyboard user loses every trace of where they are, and WCAG 2.2 asks for an indicator at least 2px around the control at 3:1 against what is behind it\`,
156
- fix: \`add \\\`@include tokens.focus-ring;\\\` to the rule at \${file.path}:\${lineOf(scss, match.index)}, or a sibling \\\`:focus-visible\\\` rule with a box-shadow — which follows the border radius where an outline does not — then: x verify\`,
156
+ fix: \`add \\\`@include tokens.focus-ring;\\\` to the rule at \${file.path}:\${lineOf(scss, match.index)}, or a sibling \\\`:focus-visible\\\` rule with a box-shadow — which follows the border radius where an outline does not — then: x verify --only boundaries\`,
157
157
  at: file.path,
158
158
  });
159
159
  }
@@ -124,7 +124,7 @@ export function unsizedImages(files: readonly SourceFile[]): readonly Finding[]
124
124
  findings.push({
125
125
  code: CODE,
126
126
  cause: \`\${at} renders <\${tag.name}> with no width and height pair and no aspect-ratio — the browser reserves no box for it, so every element under it jumps the moment the bytes land\`,
127
- fix: \`add width and height to the <\${tag.name}> at \${at} — the intrinsic pixel size, since CSS still decides what it is drawn at — or an aspect-ratio, then: x verify\`,
127
+ fix: \`add width and height to the <\${tag.name}> at \${at} — the intrinsic pixel size, since CSS still decides what it is drawn at — or an aspect-ratio, then: x verify --only boundaries\`,
128
128
  at: file.path,
129
129
  });
130
130
  }
@@ -134,7 +134,7 @@ export function unsizedImages(files: readonly SourceFile[]): readonly Finding[]
134
134
  findings.push({
135
135
  code: CODE,
136
136
  cause: \`\${at} marks <\${tag.name}> as the priority image AND loading="lazy" — a lazy image is fetched after layout, and this is the one the page's largest paint is measured on, so the attribute delays the metric it is the subject of\`,
137
- fix: \`delete loading="lazy" from the <\${tag.name}> at \${at}, then: x verify\`,
137
+ fix: \`delete loading="lazy" from the <\${tag.name}> at \${at}, then: x verify --only boundaries\`,
138
138
  at: file.path,
139
139
  });
140
140
  }
@@ -75,7 +75,7 @@ export function islandMountClears(files: readonly SourceFile[]): readonly Findin
75
75
  findings.push({
76
76
  code: CODE,
77
77
  cause: \`\${at} empties the island's server markup outside mountOver, so a render that throws leaves a blank box where the server's HTML was, and the visitor sees nothing to retry\`,
78
- fix: \`edit \${at} — delete the clear and end mount() with return mountOver(el, (root) => render(() => <Island {...props} />, root)), adding mountOver to the island's imports from '@ultimat3/render/client' — then: x verify\`,
78
+ fix: \`edit \${at} — delete the clear and end mount() with return mountOver(el, (root) => render(() => <Island {...props} />, root)), adding mountOver to the island's imports from '@ultimat3/render/client' — then: x verify --only boundaries\`,
79
79
  at,
80
80
  });
81
81
  }
@@ -64,7 +64,7 @@ export function nativeConfirms(files: readonly SourceFile[]): readonly Finding[]
64
64
  findings.push({
65
65
  code: CODE,
66
66
  cause: \`\${at} asks with confirm(), whose OK holds focus — a stray Enter confirms — and which cannot be translated or refused\`,
67
- fix: \`replace the confirm() at \${at} with <ConfirmDialog> from '@ultimat3/ui' (action= for a native post, onConfirm= in an island) — or add a // why: comment on that line naming why it is not a destructive question — then: x verify\`,
67
+ fix: \`replace the confirm() at \${at} with <ConfirmDialog> from '@ultimat3/ui' (action= for a native post, onConfirm= in an island) — or add a // why: comment on that line naming why it is not a destructive question — then: x verify --only boundaries\`,
68
68
  at,
69
69
  });
70
70
  }
@@ -97,7 +97,7 @@ export function rawBreakpoints(files: readonly StyleFile[]): readonly Finding[]
97
97
  findings.push({
98
98
  code: CODE,
99
99
  cause: \`\${file.path}:\${line} defines its own \${match[1]} — @ultimat3/ui/tokens ships one, and a local definition silently shadows it, so the app has two breakpoint ladders\`,
100
- fix: \`delete @mixin \${match[1]} from \${file.path}:\${line} and write @include \${ns}.\${match[1]}(…), then: x verify\`,
100
+ fix: \`delete @mixin \${match[1]} from \${file.path}:\${line} and write @include \${ns}.\${match[1]}(…), then: x verify --only boundaries\`,
101
101
  at: \`\${file.path}:\${line}\`,
102
102
  });
103
103
  }
@@ -111,7 +111,7 @@ export function rawBreakpoints(files: readonly StyleFile[]): readonly Finding[]
111
111
  findings.push({
112
112
  code: CODE,
113
113
  cause: \`\${file.path}:\${line} writes \\\`@media\${prelude.trimEnd()}\\\` — a viewport width of its own, off the breakpoint ladder every other sheet shares\`,
114
- fix: \`\${include} — at \${file.path}:\${line}, then: x verify\`,
114
+ fix: \`\${include} — at \${file.path}:\${line}, then: x verify --only boundaries\`,
115
115
  at: \`\${file.path}:\${line}\`,
116
116
  });
117
117
  }
@@ -156,7 +156,7 @@ export function rawColours(files: readonly StyleFile[]): readonly Finding[] {
156
156
  findings.push({
157
157
  code: CODE,
158
158
  cause: \`\${file.path}:\${lineOf(scss, index)} sets \${property} to the raw colour \${literal} — a value no theme can restate, so dark theme renders it unchanged\`,
159
- fix: \`replace \${literal} in \${file.path} with tokens.role('fg'), tokens.role('bg') or the role this element means, then: x verify\`,
159
+ fix: \`replace \${literal} in \${file.path} with tokens.role('fg'), tokens.role('bg') or the role this element means, then: x verify --only boundaries\`,
160
160
  at: file.path,
161
161
  });
162
162
  }
@@ -197,7 +197,7 @@ export function inlineColours(
197
197
  findings.push({
198
198
  code: CODE,
199
199
  cause: \`\${file.path}:\${lineOf(text, attribute.index)} sets \${property} to the raw colour \${literal} in an inline style — a value no theme can restate, so dark theme renders it unchanged\`,
200
- fix: \`replace \${literal} in \${file.path} with rgb(var(--color-fg)), rgb(var(--color-bg)) or the role this element means — or a class whose stylesheet sets tokens.role('fg') — then: x verify\`,
200
+ fix: \`replace \${literal} in \${file.path} with rgb(var(--color-fg)), rgb(var(--color-bg)) or the role this element means — or a class whose stylesheet sets tokens.role('fg') — then: x verify --only boundaries\`,
201
201
  at: file.path,
202
202
  });
203
203
  }
@@ -92,7 +92,7 @@ export function rawFetches(files: readonly SourceFile[]): readonly Finding[] {
92
92
  findings.push({
93
93
  code: CODE,
94
94
  cause: \`\${at} calls fetch with no signal in its own options, so the call outlives the request that made it: a stalled vendor holds the handler, the drain and a socket\`,
95
- fix: \`call outbound({ url, vendor, dial: 'public', deadlineMs: 10_000 }) from @ultimat3/core/outbound in place of the fetch at \${at}, or pass { signal: ctx.signal } in its options — then: x verify\`,
95
+ fix: \`call outbound({ url, vendor, dial: 'public', deadlineMs: 10_000 }) from @ultimat3/core/outbound in place of the fetch at \${at}, or pass { signal: ctx.signal } in its options — then: x verify --only boundaries\`,
96
96
  at,
97
97
  });
98
98
  }
@@ -65,7 +65,7 @@ export function rawIntervals(files: readonly SourceFile[]): readonly Finding[] {
65
65
  findings.push({
66
66
  code: CODE,
67
67
  cause: \`\${at} polls with setInterval, which keeps asking from a hidden tab and asks for a 401 forever once the session is gone\`,
68
- fix: \`re-read a query with useQuery(ref, input, { poll: pollEvery(ms) }) (pollEvery is exported by @ultimat3/realtime) at \${at}; any other read: import { visibleInterval } from '@ultimat3/core/page' and call visibleInterval(run, ms) there, disposing it on cleanup — or add a // why: comment on that line naming why this interval is not a read — then: x verify\`,
68
+ fix: \`re-read a query with useQuery(ref, input, { poll: pollEvery(ms) }) (pollEvery is exported by @ultimat3/realtime) at \${at}; any other read: import { visibleInterval } from '@ultimat3/core/page' and call visibleInterval(run, ms) there, disposing it on cleanup — or add a // why: comment on that line naming why this interval is not a read — then: x verify --only boundaries\`,
69
69
  at,
70
70
  });
71
71
  }
@@ -164,7 +164,7 @@ export function rawLengths(files: readonly StyleFile[]): readonly Finding[] {
164
164
  findings.push({
165
165
  code: CODE,
166
166
  cause: \`\${file.path}:\${line} defines its own \${match[1]}() — @ultimat3/ui/tokens ships one, and a local definition silently shadows it, so two sheets can disagree about what a px is\`,
167
- fix: \`delete @function \${match[1]} from \${file.path}:\${line} and call \${ns}.\${match[1]}(), then: x verify\`,
167
+ fix: \`delete @function \${match[1]} from \${file.path}:\${line} and call \${ns}.\${match[1]}(), then: x verify --only boundaries\`,
168
168
  at: \`\${file.path}:\${line}\`,
169
169
  });
170
170
  }
@@ -196,7 +196,7 @@ export function rawLengths(files: readonly StyleFile[]): readonly Finding[] {
196
196
  findings.push({
197
197
  code: CODE,
198
198
  cause: \`\${file.path}:\${line} writes \\\`\${statement}\\\` — a px length off the scale: it does not grow with the reader's text size, and no token names it\`,
199
- fix: \`\${rewritten} — at \${file.path}:\${line}, then: x verify\`,
199
+ fix: \`\${rewritten} — at \${file.path}:\${line}, then: x verify --only boundaries\`,
200
200
  at: \`\${file.path}:\${line}\`,
201
201
  });
202
202
  }
@@ -223,7 +223,7 @@ export function rawInlineLengths(files: readonly MarkupFile[]): readonly Finding
223
223
  findings.push({
224
224
  code: CODE,
225
225
  cause: \`\${file.path}:\${line} sets \${px}px in an inline style — a length off the scale, in the one stylesheet nothing else reads\`,
226
- fix: \`\${written} in place of \${px}px — at \${file.path}:\${line}; better, move the declaration into the element's .module.scss, then: x verify\`,
226
+ fix: \`\${written} in place of \${px}px — at \${file.path}:\${line}; better, move the declaration into the element's .module.scss, then: x verify --only boundaries\`,
227
227
  at: \`\${file.path}:\${line}\`,
228
228
  });
229
229
  }
@@ -66,6 +66,47 @@ const MOTION_PROPERTY = /^(?:transition|animation)(?:-|$)|^--/;
66
66
  const TOKEN_CALL = /(?<![\\w-])(?:var|(?:[\\w-]+\\.)[\\w-]+|duration|easing)\\([^()]*\\)/g;
67
67
  const TIME = /(?<![\\w.#-])(\\d*\\.?\\d+)(ms|s)\\b/g;
68
68
  const CURVE = /cubic-bezier\\(([^)]*)\\)/g;
69
+ /** A property the scale itself declares: \`--duration-base\`, \`--easing-in-out\`. */
70
+ const SCALE_PROPERTY = /^--(duration|easing)-([\\w-]+)$/;
71
+
72
+ /**
73
+ * The scale rung a custom property re-declares, or \`undefined\`. Rewriting its value to a token
74
+ * would make the property read itself; the app's tempo is the theme's \`motion\` slot instead.
75
+ */
76
+ const scaleRung = (property: string): { scale: string; name: string } | undefined => {
77
+ const [, scale = '', name = ''] = SCALE_PROPERTY.exec(property) ?? [];
78
+ const names = scale === 'duration' ? DURATIONS.map(([rung]) => rung) : Object.values(EASINGS);
79
+ return names.includes(name) ? { scale, name } : undefined;
80
+ };
81
+
82
+ /** \`defineTheme\`'s own grammar for a duration; it refuses any other spelling at boot. */
83
+ const THEME_TIME = /^(0|\\d+(\\.\\d+)?(ms|s))$/;
84
+ const CSS_NUMBER = /^-?\\d*\\.?\\d+$/;
85
+ /** \`.5\` and \`+0.5\` are valid CSS; the theme spells both \`0.5\`. */
86
+ const themeNumber = (text: string): string =>
87
+ text.replace(/^\\+/, '').replace(/^(-?)\\./, (_match, sign: string) => \`\${sign}0.\`);
88
+
89
+ /** The value as \`defineTheme\` takes it, or \`undefined\` when no spelling of it is one. */
90
+ const themeValue = (scale: string, value: string): string | undefined => {
91
+ if (scale === 'duration') {
92
+ const time = themeNumber(value);
93
+ return THEME_TIME.test(time) ? time : undefined;
94
+ }
95
+ const points = /^cubic-bezier\\(([^()]*)\\)$/
96
+ .exec(value)?.[1]
97
+ ?.split(',')
98
+ .map((n) => themeNumber(n.trim()));
99
+ if (points?.length !== 4 || !points.every((n) => CSS_NUMBER.test(n))) return undefined;
100
+ // x1 and x2 are points in time: the theme refuses a curve with either outside [0, 1].
101
+ const inTime = [points[0], points[2]].every((x) => Number(x) >= 0 && Number(x) <= 1);
102
+ return inTime ? \`cubic-bezier(\${points.join(', ')})\` : undefined;
103
+ };
104
+
105
+ /** The value the scale ships for a rung — a call that always boots. */
106
+ const shippedValue = (scale: string, name: string): string =>
107
+ scale === 'duration'
108
+ ? \`\${DURATIONS.find(([rung]) => rung === name)?.[1] ?? 0}ms\`
109
+ : \`cubic-bezier(\${(Object.entries(EASINGS).find(([, rung]) => rung === name)?.[0] ?? '').split(',').join(', ')})\`;
69
110
 
70
111
  /** The step a duration means: exact where it is one, the nearest where it is not. */
71
112
  const durationFor = (ms: number): string => {
@@ -124,10 +165,42 @@ export function rawMotion(files: readonly StyleFile[]): readonly Finding[] {
124
165
  if (literals.length === 0) continue;
125
166
  written += value.slice(cursor);
126
167
  const line = lineOf(scss, match.index);
168
+ const rung = scaleRung(property);
169
+ if (rung !== undefined) {
170
+ const key = /^\\w+$/.test(rung.name) ? rung.name : \`'\${rung.name}'\`;
171
+ // \`!important\` is the declaration's priority, not its value: the theme takes the time.
172
+ const important = /\\s*!important$/i.exec(value);
173
+ const accepted = themeValue(rung.scale, value.slice(0, important?.index));
174
+ const priority = important
175
+ ? ' (the theme sets it without !important, so a later declaration of the property wins)'
176
+ : '';
177
+ const call = (themed: string): string =>
178
+ \`defineTheme({ motion: { \${rung.scale}: { \${key}: '\${themed}' } } }) in apps/web/shared/theme.ts\`;
179
+ if (accepted === undefined) {
180
+ const grammar =
181
+ rung.scale === 'duration'
182
+ ? "a time such as '180ms' or '0.3s'"
183
+ : "cubic-bezier() of four numbers, x1 and x2 between 0 and 1, such as 'cubic-bezier(0.2, 0, 0, 1)'";
184
+ findings.push({
185
+ code: CODE,
186
+ cause: \`\${file.path}:\${line} re-declares \\\`\${property}: \${value}\\\`, which a theme cannot hold — a \${rung.scale} rung takes \${grammar}\`,
187
+ fix: \`\${call(shippedValue(rung.scale, rung.name))} — the shipped value; change it to \${grammar}, delete the line at \${file.path}:\${line}, then: x verify --only boundaries\`,
188
+ at: \`\${file.path}:\${line}\`,
189
+ });
190
+ continue;
191
+ }
192
+ findings.push({
193
+ code: CODE,
194
+ cause: \`\${file.path}:\${line} re-declares \\\`\${property}: \${value}\\\` — the motion scale's own property, set from a stylesheet\`,
195
+ fix: \`\${call(accepted)} — every \${ns}.\${rung.scale}(\${rung.name}) then moves at it\${priority}; delete the line at \${file.path}:\${line}, then: x verify --only boundaries\`,
196
+ at: \`\${file.path}:\${line}\`,
197
+ });
198
+ continue;
199
+ }
127
200
  findings.push({
128
201
  code: CODE,
129
202
  cause: \`\${file.path}:\${line} writes \\\`\${property}: \${value}\\\` — \${literals.join(' and ')} off the motion scale, a tempo of this file's own\`,
130
- fix: \`\${property}: \${written} — at \${file.path}:\${line} (durations: \${DURATIONS.map(([name]) => name).join(' ')}; a longer one is calc(#{\${ns}.duration(slower)} * 2)), then: x verify\`,
203
+ fix: \`\${property}: \${written} — at \${file.path}:\${line} (durations: \${DURATIONS.map(([name]) => name).join(' ')}; a longer one is calc(#{\${ns}.duration(slower)} * 2)), then: x verify --only boundaries\`,
131
204
  at: \`\${file.path}:\${line}\`,
132
205
  });
133
206
  }
@@ -200,6 +273,29 @@ unitTest('a custom property holding a raw curve or time is refused, the fix inte
200
273
  expect(fixes(':root { --wait: 0.4s; --gap: 12px; --ok: var(--duration-fast); }')).toHaveLength(1);
201
274
  });
202
275
 
276
+ unitTest('re-declaring a property of the scale itself is sent to the theme slot', () => {
277
+ expect(fixes(':root { --duration-base: 180ms; }')[0]).toStartWith(
278
+ "defineTheme({ motion: { duration: { base: '180ms' } } }) in apps/web/shared/theme.ts",
279
+ );
280
+ expect(fixes(':root { --easing-in-out: cubic-bezier(0.4, 0, 0.2, 1); }')[0]).toStartWith(
281
+ "defineTheme({ motion: { easing: { 'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)' } } })",
282
+ );
283
+ });
284
+
285
+ unitTest('a rung the theme spells differently is normalized; one it cannot hold says so', () => {
286
+ expect(fixes(':root { --duration-base: .5s; }')[0]).toStartWith(
287
+ "defineTheme({ motion: { duration: { base: '0.5s' } } })",
288
+ );
289
+ expect(fixes(':root { --easing-out: cubic-bezier(0,0,1,1); }')[0]).toStartWith(
290
+ "defineTheme({ motion: { easing: { out: 'cubic-bezier(0, 0, 1, 1)' } } })",
291
+ );
292
+ const refused = rawMotion(sheet(':root { --easing-out: cubic-bezier(1.5, 0, 0, 1); }'));
293
+ expect(refused[0]?.cause).toContain('which a theme cannot hold');
294
+ expect(refused[0]?.fix).toStartWith(
295
+ "defineTheme({ motion: { easing: { out: 'cubic-bezier(0.16, 1, 0.3, 1)' } } })",
296
+ );
297
+ });
298
+
203
299
  unitTest('the fix speaks the namespace the sheet uses the tokens under', () => {
204
300
  const scss = "@use '../shared/tokens' as t;\\n.a { transition-duration: 120ms; }";
205
301
  expect(fixes(scss)[0]).toStartWith('transition-duration: t.duration(fast) — ');
@@ -111,7 +111,7 @@ export function rawShadows(files: readonly StyleFile[]): readonly Finding[] {
111
111
  findings.push({
112
112
  code: CODE,
113
113
  cause: \`\${file.path}:\${line} writes \\\`\${property}: \${value}\\\` — a shadow with the hand-written length \${literal}, which no theme restates: dark mode keeps the light theme's elevation\`,
114
- fix: \`\${written} — at \${file.path}:\${line}, then: x verify\`,
114
+ fix: \`\${written} — at \${file.path}:\${line}, then: x verify --only boundaries\`,
115
115
  at: \`\${file.path}:\${line}\`,
116
116
  });
117
117
  }
@@ -89,7 +89,7 @@ export function rawZIndexes(files: readonly StyleFile[]): readonly Finding[] {
89
89
  findings.push({
90
90
  code: CODE,
91
91
  cause: \`\${file.path}:\${line} writes \\\`z-index: \${value}\\\` — a number only this file knows, on no ladder another layer can be placed against\`,
92
- fix: \`z-index: \${written} — at \${file.path}:\${line} (layers: \${LAYERS.map(([name]) => name).join(' ')}), then: x verify\`,
92
+ fix: \`z-index: \${written} — at \${file.path}:\${line} (layers: \${LAYERS.map(([name]) => name).join(' ')}), then: x verify --only boundaries\`,
93
93
  at: \`\${file.path}:\${line}\`,
94
94
  });
95
95
  }
@@ -6,6 +6,7 @@ export const RELEASED_GUARD_FORMS: Readonly<
6
6
  Record<string, readonly (readonly [string, 'error' | 'warning'])[]>
7
7
  > = {
8
8
  'animated-layout-property': [
9
+ ['21sfece05i0e3', 'error'],
9
10
  ['2hqr04589t23q', 'error'],
10
11
  ['2z9j3sd8e7lgl', 'error'],
11
12
  ],
@@ -15,22 +16,29 @@ export const RELEASED_GUARD_FORMS: Readonly<
15
16
  ['1ot9kwydyzd0j', 'error'],
16
17
  ['2aaavkemg4qee', 'error'],
17
18
  ['2s43pcjqyhmfi', 'error'],
19
+ ['n9w3ww2famyi', 'error'],
18
20
  ],
19
21
  'error-declared': [
20
22
  ['1rlzex7nalpiw', 'error'],
21
23
  ['2tfw2hq80msju', 'error'],
24
+ ['3drdb0cke61iw', 'error'],
22
25
  ['3kqd7d8pzpcnn', 'error'],
23
26
  ],
24
27
  'focus-visible': [
25
28
  ['3i4t0gznxyytf', 'error'],
26
29
  ['4c2nf0mpzn0z', 'error'],
30
+ ['wndpmcuvl3o6', 'error'],
27
31
  ],
28
32
  'image-dimensions': [
29
33
  ['1cfzth883qzt5', 'error'],
30
34
  ['1upoweaclyd8', 'error'],
35
+ ['1yk40qifcror', 'error'],
31
36
  ['33uv2ua4a9zcf', 'error'],
32
37
  ],
33
- 'island-mount-clears': [['1v09h5ptzqvs2', 'error']],
38
+ 'island-mount-clears': [
39
+ ['1v09h5ptzqvs2', 'error'],
40
+ ['2buinh3zw0lqs', 'error'],
41
+ ],
34
42
  'island-without-states': [
35
43
  ['2os1f5fb6aass', 'error'],
36
44
  ['31gjhz3nyf0gz', 'error'],
@@ -39,63 +47,103 @@ export const RELEASED_GUARD_FORMS: Readonly<
39
47
  ['1f7eh34hj085a', 'error'],
40
48
  ['2b134wpkoaqso', 'error'],
41
49
  ['2eb7ld3hg0tpb', 'error'],
50
+ ['3sabhehzp5i6g', 'error'],
51
+ ],
52
+ 'raw-breakpoint': [
53
+ ['21j2j5t89cmax', 'error'],
54
+ ['wdo3lsqmvsya', 'error'],
42
55
  ],
43
- 'raw-breakpoint': [['wdo3lsqmvsya', 'error']],
44
56
  'raw-colour': [
45
57
  ['17jw6r17ah3dq', 'error'],
46
58
  ['1e2pkqnmrjt44', 'error'],
59
+ ['2ml4gr1ou95vp', 'error'],
47
60
  ['3onnbx54g9zmd', 'error'],
48
61
  ['mdo7f20dnyof', 'error'],
49
62
  ],
50
63
  'raw-fetch': [
51
64
  ['17xdeprvzx5v2', 'error'],
52
65
  ['1hgdwthi7j353', 'error'],
66
+ ['21v2jbczhqz8k', 'error'],
53
67
  ['mazudnz7t6iy', 'error'],
54
68
  ],
55
69
  'raw-interval': [
56
70
  ['1o6p0fmjhzdhw', 'error'],
57
71
  ['2xrqszz066coc', 'error'],
58
72
  ['3qipy7ijjnz7r', 'error'],
73
+ ['3qu74px1wei5s', 'error'],
59
74
  ['ll7h7zpr075u', 'error'],
60
75
  ],
61
- 'raw-length': [['2vfl0ssvkqvua', 'error']],
76
+ 'raw-length': [
77
+ ['19by09okc9bse', 'error'],
78
+ ['2vfl0ssvkqvua', 'error'],
79
+ ],
62
80
  'raw-motion': [
63
81
  ['14c1bs20ysc1u', 'error'],
82
+ ['23t5nj717gkf0', 'error'],
83
+ ['3azasze78buvt', 'error'],
84
+ ['3tk0sdgns06ck', 'error'],
85
+ ['u6julhh0et2k', 'error'],
64
86
  ['w8aw0q20tfsz', 'error'],
65
87
  ],
66
- 'raw-shadow': [['1vhy6xulc5cs5', 'error']],
67
- 'raw-z-index': [['2nnuj62o3qvvr', 'error']],
68
- 'repo-await-in-loop': [['3a3v6vvmbf8q2', 'warning']],
88
+ 'raw-shadow': [
89
+ ['13t0n8kesciv6', 'error'],
90
+ ['1vhy6xulc5cs5', 'error'],
91
+ ],
92
+ 'raw-z-index': [
93
+ ['2fae6nsqzvylo', 'error'],
94
+ ['2nnuj62o3qvvr', 'error'],
95
+ ],
96
+ 'repo-await-in-loop': [
97
+ ['2453q2b7xpeu3', 'warning'],
98
+ ['3a3v6vvmbf8q2', 'warning'],
99
+ ],
69
100
  'repo-raw-sql': [
70
101
  ['12qj02j416sib', 'error'],
71
102
  ['2kr7gbv7j2m0v', 'error'],
72
103
  ['2m5sh5923zcdx', 'error'],
104
+ ['2od9gruczoiim', 'error'],
73
105
  ['3nmlelym16o78', 'error'],
74
106
  ],
75
107
  'repo-unbounded': [
108
+ ['1p97kt8y158hu', 'error'],
76
109
  ['2yjuyaj4n8dqq', 'error'],
110
+ ['3btoad27s4eai', 'warning'],
77
111
  ['ae4czielms3c', 'warning'],
78
112
  ],
79
- 'runtime-pin': [['28ffbpwy4q2ji', 'error']],
113
+ 'runtime-pin': [
114
+ ['28ffbpwy4q2ji', 'error'],
115
+ ['2xr2x2hjhyo1n', 'error'],
116
+ ],
80
117
  'semantic-interactive': [
118
+ ['24ry4tuzqa82q', 'error'],
81
119
  ['29pfa4ea628cv', 'error'],
82
120
  ['2m280ivq01zs2', 'error'],
83
121
  ['d4ncwu39wtrk', 'error'],
84
122
  ],
85
- 'unbounded-fanout': [['xk4dv9vsq8gg', 'error']],
123
+ 'unbounded-fanout': [
124
+ ['27m870avd47et', 'error'],
125
+ ['xk4dv9vsq8gg', 'error'],
126
+ ],
86
127
  'undeclared-custom-property': [
87
128
  ['2xnl4zuy9xv6f', 'error'],
88
129
  ['3b0u9i8hze00x', 'error'],
130
+ ['5q7i306j0imi', 'error'],
89
131
  ],
90
132
  'undeclared-env': [
91
133
  ['16pof11n1trhg', 'error'],
92
134
  ['1f8kizielequo', 'error'],
135
+ ['1fc7m95vm6k3g', 'error'],
136
+ ['20rw6oj7g0bz3', 'error'],
93
137
  ['2jb32jms80mge', 'error'],
94
138
  ['2t3qtexnpfnyq', 'error'],
139
+ ['2x7h5rxf4hv0g', 'error'],
95
140
  ['3gsoj050vbe69', 'error'],
141
+ ['3mtci6brks9i6', 'error'],
142
+ ['3rmwdbc6jgv5q', 'error'],
96
143
  ],
97
144
  'undefined-style-class': [
98
145
  ['3food9t4vrzv8', 'error'],
146
+ ['ps08370p9qlg', 'error'],
99
147
  ['w7as1ib1ido8', 'error'],
100
148
  ],
101
149
  'untranslated-string': [
@@ -108,6 +156,7 @@ export const RELEASED_GUARD_FORMS: Readonly<
108
156
  ],
109
157
  'unzoned-date': [
110
158
  ['14sc1shft1opi', 'error'],
159
+ ['1ljvva96m9b9z', 'error'],
111
160
  ['38jqi2md5adsi', 'error'],
112
161
  ['3caz4m0vn66dz', 'error'],
113
162
  ['8apjndc5ybvm', 'error'],
@@ -130,7 +179,7 @@ export const RELEASED_GUARD_TEST_FORMS: Readonly<Record<string, readonly string[
130
179
  'raw-fetch': ['2lips924uo00f'],
131
180
  'raw-interval': ['1z55givy4sst0'],
132
181
  'raw-length': ['1hpgz9jowk5qu'],
133
- 'raw-motion': ['6420344uhv97', 'g6cs0de9jmr7'],
182
+ 'raw-motion': ['2kg7ezhf8u7a9', '6420344uhv97', 'g6cs0de9jmr7', 'xes72msaf3a3'],
134
183
  'raw-shadow': ['3kg8ft6y3ia0y'],
135
184
  'raw-z-index': ['3fb40f6bwp8kq'],
136
185
  'repo-await-in-loop': ['2axgbb82wldt4'],
@@ -186,7 +186,7 @@ export function awaitsInLoops(files: readonly RepoFile[]): readonly Finding[] {
186
186
  findings.push({
187
187
  code: CODE,
188
188
  cause: \`\${where} awaits inside the \${inner.kind} at \${loopLine} — one round trip per element, so the statements a call sends grow with the rows it is handed\`,
189
- fix: \`db.<table>.andWhere('id', 'in', ids).limit(ids.length).all() (or insertAll / updateWhere / deleteWhere) — one statement for the set in place of the \${inner.kind} at \${loopLine}, or expectedQueryLoop('<why one per element is optimal>', fn) from @ultimat3/db around it — then: x verify\`,
189
+ fix: \`db.<table>.andWhere('id', 'in', ids).limit(ids.length).all() (or insertAll / updateWhere / deleteWhere) — one statement for the set in place of the \${inner.kind} at \${loopLine}, or expectedQueryLoop('<why one per element is optimal>', fn) from @ultimat3/db around it — then: x verify --only boundaries\`,
190
190
  at: where,
191
191
  });
192
192
  }
@@ -294,7 +294,7 @@ const KEYSET_CALL =
294
294
  const truncatedFinding = (at: string): Finding => ({
295
295
  code: CODE,
296
296
  cause: \`\${at} orders by date_trunc('milliseconds', …), the workaround for a Date losing microseconds — and the index cannot serve that expression: measured on 300,000 rows, an Index Only Scan (0.2 ms) became a Parallel Seq Scan and a sort (100 ms)\`,
297
- fix: \`\${KEYSET_CALL} — from @ultimat3/db, its select, where, orderBy and limit spliced in place of the date_trunc order at \${at}, then: x verify\`,
297
+ fix: \`\${KEYSET_CALL} — from @ultimat3/db, its select, where, orderBy and limit spliced in place of the date_trunc order at \${at}, then: x verify --only boundaries\`,
298
298
  at,
299
299
  });
300
300
 
@@ -328,7 +328,7 @@ const ANY_STATEMENT: readonly {
328
328
  finding: (at) => ({
329
329
  code: CODE,
330
330
  cause: \`\${at} pages with a hand row comparison, (a, b) < (?, ?) — the seek keyset() writes with its tie-break, its direction and its cursor codec, each one a detail a hand copy gets wrong when a key column changes\`,
331
- fix: \`\${KEYSET_CALL} — from @ultimat3/db, its keys the columns of the row comparison at \${at}, then: x verify\`,
331
+ fix: \`\${KEYSET_CALL} — from @ultimat3/db, its keys the columns of the row comparison at \${at}, then: x verify --only boundaries\`,
332
332
  at,
333
333
  }),
334
334
  },
@@ -337,7 +337,7 @@ const ANY_STATEMENT: readonly {
337
337
  finding: (at) => ({
338
338
  code: CODE,
339
339
  cause: \`\${at} takes pg_advisory_xact_lock by hand — a key hashed where nothing else can see it, and two keys taken in whatever order two callers reach them, which is a deadlock\`,
340
- fix: \`db.<table>.lockKeys([key], async (tx) => …) — the typed handle of the table the lock guards, sorted keys in one transaction, in place of the sql literal at \${at}, then: x verify\`,
340
+ fix: \`db.<table>.lockKeys([key], async (tx) => …) — the typed handle of the table the lock guards, sorted keys in one transaction, in place of the sql literal at \${at}, then: x verify --only boundaries\`,
341
341
  at,
342
342
  }),
343
343
  },
@@ -359,7 +359,7 @@ export function rawRepoSql(files: readonly RepoFile[]): readonly Finding[] {
359
359
  findings.push({
360
360
  code: CODE,
361
361
  cause: \`\${at} sends a statement the typed handle expresses as hand-written SQL — no tenant guard on it, no codec for money or a sealed column, and no compile error when a column is renamed\`,
362
- fix: \`\${call} — in place of the sql literal at \${at}, with db imported from this app's db package, then: x verify\`,
362
+ fix: \`\${call} — in place of the sql literal at \${at}, with db imported from this app's db package, then: x verify --only boundaries\`,
363
363
  at,
364
364
  });
365
365
  }
@@ -177,7 +177,7 @@ export function unboundedReads(files: readonly RepoFile[]): readonly Finding[] {
177
177
  findings.push({
178
178
  code: CODE,
179
179
  cause: \`\${where} reads \${read} with .all() and no .limit(n) — .all() answers its first page, 50 rows, and drops the cursor to the rest, so the caller holds neither every row nor a page it chose\`,
180
- fix: \`\${read}….limit(<the most rows this caller needs>).all() at \${where} — or .inBatches(size) to walk every row, .page() to hand a cursor on, or a // why: comment on that line naming the bound — then: x verify\`,
180
+ fix: \`\${read}….limit(<the most rows this caller needs>).all() at \${where} — or .inBatches(size) to walk every row, .page() to hand a cursor on, or a // why: comment on that line naming the bound — then: x verify --only boundaries\`,
181
181
  at: where,
182
182
  });
183
183
  }
@@ -69,7 +69,7 @@ const imageFor = (version: string, variant: string, rest: string): string =>
69
69
  const finding = (at: string, cause: string, write: string): Finding => ({
70
70
  code: CODE,
71
71
  cause,
72
- fix: \`edit \${at} — \${write} — then: x verify\`,
72
+ fix: \`edit \${at} — \${write} — then: x verify --only boundaries\`,
73
73
  at,
74
74
  });
75
75
 
@@ -153,7 +153,7 @@ export function semanticInteractive(files: readonly SourceFile[]): readonly Find
153
153
  findings.push({
154
154
  code: CODE,
155
155
  cause: \`\${at} puts role="\${role}" on <\${tag.name}> — a role is a promise, and this one obliges the element to answer Space, Enter, focus and disabled, which the native element already does\`,
156
- fix: \`replace <\${tag.name} role="\${role}"> in \${file.path} with \${native.write}, then: x verify\`,
156
+ fix: \`replace <\${tag.name} role="\${role}"> in \${file.path} with \${native.write}, then: x verify --only boundaries\`,
157
157
  at: file.path,
158
158
  });
159
159
  continue;
@@ -163,7 +163,7 @@ export function semanticInteractive(files: readonly SourceFile[]): readonly Find
163
163
  findings.push({
164
164
  code: CODE,
165
165
  cause: \`\${at} hangs \${handler} on <\${tag.name}>, which takes no focus and answers no key — a keyboard, a screen reader and a switch reach a mouse handler on an inert element in exactly one way, which is not at all\`,
166
- fix: \`write <button type="button"> — or the native control this element means — in place of <\${tag.name}> at \${at}, then: x verify\`,
166
+ fix: \`write <button type="button"> — or the native control this element means — in place of <\${tag.name}> at \${at}, then: x verify --only boundaries\`,
167
167
  at: file.path,
168
168
  });
169
169
  }
@@ -80,7 +80,7 @@ export function unboundedFanouts(files: readonly SourceFile[]): readonly Finding
80
80
  findings.push({
81
81
  code: CODE,
82
82
  cause: \`\${at} starts a database call for every element of \${list} at once — as many statements in flight as the list is long, queued on a pool a fraction of that size\`,
83
- fix: \`mapBounded(\${list}, <the same async callback>, { width: 8 }) — from @ultimat3/core, in place of the Promise.all at \${at}, the width what the pool can take — or a // why: comment on that line naming the list's bound — then: x verify\`,
83
+ fix: \`mapBounded(\${list}, <the same async callback>, { width: 8 }) — from @ultimat3/core, in place of the Promise.all at \${at}, the width what the pool can take — or a // why: comment on that line naming the list's bound — then: x verify --only boundaries\`,
84
84
  at,
85
85
  });
86
86
  }
@@ -95,7 +95,7 @@ export function undeclaredCustomProperties(
95
95
  return broken.map((sheet) => ({
96
96
  code: CODE,
97
97
  cause: \`\${sheet.path} does not compile\${sheet.error === undefined ? '' : \`: \${sheet.error}\`} — so the custom properties it declares are unknown and no var() read in this app was checked\`,
98
- fix: \`repair the Sass in \${sheet.path}\${sheet.error === undefined ? " — x build --target static prints the compiler's error for a sheet a page uses —" : ' at the error the cause quotes,'} then: x verify\`,
98
+ fix: \`repair the Sass in \${sheet.path}\${sheet.error === undefined ? " — x build --target static prints the compiler's error for a sheet a page uses —" : ' at the error the cause quotes,'} then: x verify --only boundaries\`,
99
99
  at: sheet.path,
100
100
  }));
101
101
  }
@@ -121,8 +121,8 @@ export function undeclaredCustomProperties(
121
121
  cause: \`\${sheet.path}:\${line} reads var(\${name}), and nothing in this app declares \${name} — the declaration it sits in computes to nothing, silently\`,
122
122
  fix:
123
123
  offered.length > 0
124
- ? \`\${offered.join(' | ')} — the steps \${stem}* has; write one in place of \\\`\${name.slice(stem.length)}\\\` at \${sheet.path}:\${line}, then: x verify\`
125
- : \`declare \${name} where it is set — on the element, in the app's global.scss, or for a colour, radius or font through defineTheme() — or correct the name at \${sheet.path}:\${line}, then: x verify\`,
124
+ ? \`\${offered.join(' | ')} — the steps \${stem}* has; write one in place of \\\`\${name.slice(stem.length)}\\\` at \${sheet.path}:\${line}, then: x verify --only boundaries\`
125
+ : \`declare \${name} where it is set — on the element, in the app's global.scss, or for a colour, radius or font through defineTheme() — or correct the name at \${sheet.path}:\${line}, then: x verify --only boundaries\`,
126
126
  at: \`\${sheet.path}:\${line}\`,
127
127
  });
128
128
  }