@ultimat3/cli 31.23.0 → 31.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +3 -2
- package/package.json +29 -29
- package/src/cmd-db-recount.ts +81 -24
- package/src/cmd-db-spec.ts +9 -1
- package/src/cmd-db.ts +1 -0
- package/src/cmd-doctor.ts +7 -1
- package/src/db-generate.ts +14 -3
- package/src/doctor-guards.ts +5 -3
- package/src/doctor-redundant-indexes.ts +76 -0
- package/src/fix-sequence.ts +0 -1
- package/src/messages.ts +3 -0
- package/src/redundant-indexes.ts +101 -0
- package/src/retained-assets-boot.ts +28 -15
- package/src/role-start.ts +13 -0
- package/src/runtime-boot-warnings.ts +65 -0
- package/src/runtime-cache.ts +14 -8
- package/src/schema-drift.ts +5 -2
- package/src/serve-boot-warnings.ts +9 -8
- package/src/serve.ts +4 -1
- package/src/templates/guard-error-declared.ts +48 -11
- package/src/templates/guard-repo-unbounded.ts +29 -13
- package/src/templates/scaffold-guards.ts +26 -3
- package/wiki/CLI-Reference.md +4 -1
- package/wiki/Entities-And-Migrations.md +6 -2
- package/wiki/Migrations-And-Backfills.md +1 -1
- package/wiki/Observability.md +2 -1
- package/wiki/Outbound-HTTP.md +40 -0
- package/wiki/Policies-And-Authz.md +52 -20
- package/wiki/Realtime.md +1 -0
- package/wiki/Testing.md +1 -0
- package/wiki/Upgrading.md +2 -0
package/wiki/Observability.md
CHANGED
|
@@ -209,7 +209,7 @@ Declared in `runtime-metrics.ts`, so the role table, the Helm chart and the scra
|
|
|
209
209
|
|
|
210
210
|
Recorders: `recordRequest({ method, route, status, durationMs })`, `recordConnection(delta)`, `recordQueueDepth(queue, depth)`, `recordJob(queue, outcome)`, `recordLeaseLost(queue)`.
|
|
211
211
|
|
|
212
|
-
Beside them, `@ultimat3/jobs` declares its own: `jobs_retried_total{job,code}` (counter, `{attempt}`) — one per attempt that failed and went back to the queue, `code` the thrown `X_*` or `uncoded`. A retry is counted there and **not** sent to the `ErrorReporter`; a dead letter is, once, as `error`. A job opts its retries into the reporter, as `warning`, with `retry: { report: 'every-attempt' }` ([Jobs](Jobs-And-Workflows#concurrency-rate-limits-queues-retry)). A polling loop that fails every tick logs one line when the streak opens and one with the count when it closes: `jobs.{scheduler,worker,outbox}.tick-failed` / `.tick-recovered`,
|
|
212
|
+
Beside them, `@ultimat3/jobs` declares its own: `jobs_retried_total{job,code}` (counter, `{attempt}`) — one per attempt that failed and went back to the queue, `code` the thrown `X_*` or `uncoded`. A retry is counted there and **not** sent to the `ErrorReporter`; a dead letter is, once, as `error`. A job opts its retries into the reporter, as `warning`, with `retry: { report: 'every-attempt' }` ([Jobs](Jobs-And-Workflows#concurrency-rate-limits-queues-retry)). A polling loop that fails every tick logs one line when the streak opens and one with the count when it closes: `jobs.{scheduler,worker,outbox}.tick-failed` / `.tick-recovered`, `db.listen.redial_failed` / `db.listen.redialed`, `jobs.wake.{listen,probe}-failed` / `-recovered`, and `cache.broadcast.deferred-failed` / `-recovered` — core's `failureStreak` (`@ultimat3/core`), one line per cause, for a loop of your own.
|
|
213
213
|
|
|
214
214
|
All five recorders are wired `As of 2026-08`, each in the package that owns the event:
|
|
215
215
|
|
|
@@ -278,6 +278,7 @@ CPU autoscaling is wrong for `sync` and `worker`: a node holding 80k idle socket
|
|
|
278
278
|
| Error grouping | `errorFingerprint(report)`: 16 hex over `code`, `source`, `scope.operation`, plus the top application frame (function and root-relative path, no line) for `X_INTERNAL`. Never the cause or an id, so two throws differing in a row id are one group, and a deploy is not a new one. The Sentry envelope sends it as `fingerprint` |
|
|
279
279
|
| Log level | `LOG_LEVEL`, default `info`. The framework's own policy (`As of 2026-11`): a routine per-unit event (one per request, job, fire or message) is `debug`; `info` is lifecycle and rare outcomes; `warn` asks an operator to act. `scripts/log-levels.ts` refuses an unstated per-unit `info` line in the framework (`X_LOG_LEVEL_UNSTATED`) |
|
|
280
280
|
| Secret redaction | a `Secret` is redacted by value before every other branch, at any depth → [Configuration](Configuration) |
|
|
281
|
+
| Value redaction | `redactValues([{ pattern: /acct_[0-9]{10}/g, replace: '[account]' }])`, once at boot (`As of 2026-11`): every match is rewritten in the log line's message and field strings, an `Error`'s message, and the monitor envelope's exception value, `fix`, `stack`, extras and `meta`, a span's exception event and status message, and a failure bundle's captured values. Key redaction (`redactKeys`) cannot see a value inside a message; this can. The `g` flag is required; a sticky pattern, one matching the empty string, or a repeated group holding a repeating quantifier (`(a+)+`, `(a+){2,40}`; only `?`/`{0,1}` do not repeat) is refused with `X_REDACT_PATTERN_UNSAFE`, and the whole list with it. Appends, like `redactKeys`; the framework registers no pattern |
|
|
281
282
|
| Request context | the ALS context carries the request id every log line and span inherits |
|
|
282
283
|
| Live queries | the realtime client puts a `traceparent` on the `subscribe` frame (`LiveClient({ traceparent })`); the snapshot that subscribe causes is the span `live.snapshot <query>`, a CHILD of it, and a re-read a change forces is `live.rerun <query>`, which LINKS to it and parents on the change. A value that is not a valid W3C header is ignored, never refused: telemetry never fails a subscribe. The page boot sends none (`As of 2026-11`): a browser holds no trace |
|
|
283
284
|
| Request span name | `GET /r/:token` — the route PATTERN, never the concrete URL (a token in a path would reach every collector); `http.route` carries the same pattern, and an unmatched request is named by its method alone with `http.route: unmatched` (`As of 22.6.0`) |
|
package/wiki/Outbound-HTTP.md
CHANGED
|
@@ -45,6 +45,45 @@ Required, a decision per call.
|
|
|
45
45
|
| `'named'` | a host the app names in code or config: a vendor API, a sidecar | dialled as written |
|
|
46
46
|
| `'public'` | a URL a tenant or a user supplied | https only outside a local environment, no URL credentials, every address the name answers must be public, the connection pinned to the approved address with `tls.serverName`. Refusal: `X_OUTBOUND_HOST_BLOCKED` |
|
|
47
47
|
|
|
48
|
+
**Writing your own public-dial guard is the bug this option exists to prevent.** A URL a tenant
|
|
49
|
+
supplied (a webhook, an avatar, a feed) is `dial: 'public'`: resolve, classify every address, pin,
|
|
50
|
+
re-screen each redirect. All of it is in this one option.
|
|
51
|
+
|
|
52
|
+
## `proxy`: send the call through an HTTP proxy
|
|
53
|
+
|
|
54
|
+
| Form | What happens |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `proxy: 'http://user:pass@proxy:3128'` (or a `URL`) | every hop goes through it: `CONNECT` for `https:`, an absolute-form request for `http:` |
|
|
57
|
+
| `proxy: { url, headers }` | the same, `headers` sent on the `CONNECT` (`proxy-authorization: Bearer …`) |
|
|
58
|
+
| `proxy: (target) => … \| undefined` | asked once per hop with that hop's NAMED url (never the pinned address); `undefined` dials the hop direct. May be async, and is bounded by `deadlineMs` |
|
|
59
|
+
|
|
60
|
+
- **Beside `dial: 'public'`, the screen still runs FIRST.** A refused host never reaches the proxy or
|
|
61
|
+
your resolver; an approved one is tunnelled to the screened ADDRESS (`CONNECT 93.184.216.34:443`),
|
|
62
|
+
so the proxy resolves nothing itself. `tls.serverName` survives the tunnel: the certificate is
|
|
63
|
+
still proven against the name (measured on Bun 1.4.4, `outbound-proxy-tunnel.test.ts`).
|
|
64
|
+
- **The proxy is the app's own choice**, like a `'named'` host: it is not screened.
|
|
65
|
+
- `http:` and `https:` proxies only. Anything else, or a resolver that throws, is
|
|
66
|
+
`X_OUTBOUND_PROXY_INVALID` before a byte, never retried.
|
|
67
|
+
- **The proxy's credential is in no cause, log line, span or event**: URL userinfo is cut from a
|
|
68
|
+
transport's message (`//…@`), and the proxy is never recorded.
|
|
69
|
+
- With no `proxy`, Bun's own `HTTPS_PROXY` / `HTTP_PROXY` / `NO_PROXY` still apply, as for any `fetch`.
|
|
70
|
+
- **Which proxy, and rotating them, is app code** (axiom 8): a resolver over your own inventory.
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import { outbound } from '@ultimat3/core/outbound';
|
|
74
|
+
|
|
75
|
+
declare const url: string;
|
|
76
|
+
const proxies = ['http://u:p@egress-a:3128', 'http://u:p@egress-b:3128'];
|
|
77
|
+
let next = 0;
|
|
78
|
+
await outbound({
|
|
79
|
+
url,
|
|
80
|
+
vendor: 'feed',
|
|
81
|
+
dial: 'public',
|
|
82
|
+
deadlineMs: 10_000,
|
|
83
|
+
proxy: () => proxies[next++ % proxies.length],
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
48
87
|
`screenDial(url, { resolve, allowPrivate })` is the screen alone, for a transport that keeps its own
|
|
49
88
|
codes: `@ultimat3/jobs`' webhook target and `@ultimat3/scraping`'s wildcard leg call it.
|
|
50
89
|
|
|
@@ -62,6 +101,7 @@ codes: `@ultimat3/jobs`' webhook target and `@ultimat3/scraping`'s wildcard leg
|
|
|
62
101
|
| `X_OUTBOUND_REDIRECTED` | terminal | a 3xx under `redirect: 'error'`, or more than 5 hops (`meta.location`, no query) |
|
|
63
102
|
| `X_OUTBOUND_RETRY_UNSAFE` | terminal | `retry` on POST or PATCH without `idempotent: true` |
|
|
64
103
|
| `X_OUTBOUND_BODY_INVALID` | terminal | `answer.json(schema)` refused the body (`meta.issues`) |
|
|
104
|
+
| `X_OUTBOUND_PROXY_INVALID` | terminal | `proxy` is not an `http:`/`https:` URL, or its resolver threw (`meta.reason`, never the URL) |
|
|
65
105
|
|
|
66
106
|
**A 401 is `X_OUTBOUND_REFUSED` with `meta.status: 401`.** There is no refresh hook: the app's own
|
|
67
107
|
wrapper refreshes its token and calls again. Token storage and single-flight stay the app's.
|
|
@@ -119,17 +119,17 @@ The matrix runs **outside a request**: no input, no row. A rule that reads eithe
|
|
|
119
119
|
## Scope — a policy's database filter
|
|
120
120
|
|
|
121
121
|
`scoped(policy, scope)` attaches `scope(actor) → where` to a policy, `As of 2026-11`: the
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
before; the JS rule stays the authority.
|
|
122
|
+
predicate a read hands the database, so the visible rows arrive as ONE statement's page rather than
|
|
123
|
+
a JS filter over an over-fetch that leaves a viewer a short page. The policy decides exactly as
|
|
124
|
+
before; the JS rule stays the authority and still runs on every row returned.
|
|
125
125
|
|
|
126
126
|
```ts
|
|
127
127
|
import type { Actor, Policy } from '@ultimat3/policy';
|
|
128
128
|
import { policyScope, scoped } from '@ultimat3/policy';
|
|
129
129
|
|
|
130
130
|
interface Post {
|
|
131
|
-
readonly
|
|
132
|
-
readonly audience: 'public' | '
|
|
131
|
+
readonly authorId: string;
|
|
132
|
+
readonly audience: 'public' | 'friends';
|
|
133
133
|
}
|
|
134
134
|
declare const postRule: Policy<unknown, Post>;
|
|
135
135
|
declare const actor: Actor | null;
|
|
@@ -137,34 +137,64 @@ declare const actor: Actor | null;
|
|
|
137
137
|
export const seePost = scoped(postRule, (who) =>
|
|
138
138
|
who === null
|
|
139
139
|
? [{ column: 'audience', op: 'eq', value: 'public' }]
|
|
140
|
-
: [
|
|
140
|
+
: [
|
|
141
|
+
{
|
|
142
|
+
or: [
|
|
143
|
+
{ column: 'authorId', op: 'eq', value: who.id },
|
|
144
|
+
{ column: 'audience', op: 'eq', value: 'public' },
|
|
145
|
+
{
|
|
146
|
+
and: [
|
|
147
|
+
{ column: 'audience', op: 'eq', value: 'friends' },
|
|
148
|
+
{
|
|
149
|
+
via: { column: 'authorId', entity: 'friendships', target: 'friendId' },
|
|
150
|
+
where: [{ column: 'userId', op: 'eq', value: who.id }],
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
],
|
|
141
157
|
);
|
|
142
|
-
policyScope(seePost, actor); // the frozen
|
|
158
|
+
policyScope(seePost, actor); // the tree, frozen at every depth, or undefined for an unscoped policy
|
|
143
159
|
```
|
|
144
160
|
|
|
161
|
+
| Node | Means |
|
|
162
|
+
|---|---|
|
|
163
|
+
| `{ column, op, value? }` | a condition. `column` is typed by the policy's row; `op` is one of `eq` `neq` `in` `gt` `gte` `lt` `lte` `is-null` `is-not-null`; `value` is always bound |
|
|
164
|
+
| `{ or: [...] }` | any member holds; `[]` holds for no row |
|
|
165
|
+
| `{ and: [...] }` | every member holds — the arm of an `or` that needs two conditions |
|
|
166
|
+
| `{ via: { column, entity, target }, where: [...] }` | `column in (select target from entity where …)`; `entity` is a registered entity NAME |
|
|
167
|
+
|
|
145
168
|
| `policyScope(policy, actor)` answers | Means |
|
|
146
169
|
|---|---|
|
|
147
170
|
| `undefined` | no scope declared: nothing is handed down |
|
|
148
171
|
| `[]` | every row (an admin): the empty conjunction |
|
|
149
|
-
| `[
|
|
150
|
-
|
|
172
|
+
| `[node, …]` | every top-level node must hold; at most four levels deep (`X_ENTITY_PREDICATE_NODE_INVALID`) |
|
|
173
|
+
|
|
174
|
+
- **One statement.** `@ultimat3/entity`'s `.andWhereNode(node)` takes the tree on a repository
|
|
175
|
+
chain — `db.posts.where({ deletedAt: null }).andWhereNode(node)` — and compiles it into the one
|
|
176
|
+
select, a `via` as a subselect.
|
|
177
|
+
- **A `via` cannot cross tenants.** Its subselect is planned through the TARGET's tenant guard, the
|
|
178
|
+
acting actor's tenant and the target's soft delete applied inside; outside a request its `where`
|
|
179
|
+
must name the tenant, as a read of that table must. An untenanted target behind a tenanted source
|
|
180
|
+
must declare `shared:` or `global:`, else `X_TENANCY_UNSCOPED`.
|
|
181
|
+
- **A query read composes it**, `As of 31.11.0`: a `query({ policy: seePost, sql })` whose `sql`
|
|
182
|
+
returns `from()` gets each condition as a filter and each `or`/`and`/`via` node on
|
|
183
|
+
`RowWindow.nodes`, which a repository provider hands to `.andWhereNode(node)` —
|
|
184
|
+
[Queries: a scoped policy narrows the read](Queries-And-Live-Queries#a-scoped-policy-narrows-the-read).
|
|
185
|
+
Refused (`X_QUERY_SCOPE_UNCOMPOSABLE`), never served unscoped: another `SqlSource`, a tree on a live
|
|
186
|
+
read (the matcher patches a flat shape), and a `via` over `from()` given a list of rows.
|
|
187
|
+
- **A custom store** (`defineDriver`) takes a tree only when it declares `predicate:or` /
|
|
188
|
+
`predicate:via`; otherwise `X_DRIVER_UNSUPPORTED`, before the store is called.
|
|
151
189
|
- **The scope belongs to the clause it is declared on.** `and`/`or`/`not` over a scoped policy
|
|
152
190
|
carry none: the conjunction of children's scopes is not the scope of `or`. Scope the outermost
|
|
153
191
|
policy.
|
|
154
192
|
- **Tenant scoping is not scope.** Tenancy stays the entity layer's (the tenant predicate every
|
|
155
193
|
repository applies, [below](#tenancy)); a scope narrows what one actor sees inside a tenant and
|
|
156
194
|
never replaces it.
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
Another `SqlSource` is `X_QUERY_SCOPE_UNCOMPOSABLE`. An action, or a repository read outside a
|
|
161
|
-
query, composes nothing: there `policyScope` is the read an app composes itself, e.g.
|
|
162
|
-
`db.posts.where({ orgId })` plus each condition as `andWhere`.
|
|
163
|
-
- **AND-only, by decision** (2026-11, `packages/policy/src/scope.ts`). A scope lands as query
|
|
164
|
-
filters, so it reaches the live matcher's shape, every provider's `RowWindow.filters` and the
|
|
165
|
-
entity chain, each a conjunction; an `or` group would widen all of them at once. A rule whose
|
|
166
|
-
visibility is a disjunction (a friend OR the author OR public, minus a block set) stays unscoped
|
|
167
|
-
and keeps the JS rule over what it reads.
|
|
195
|
+
- **`or` and `via` by decision** (2026-11, reversing the AND-only decision of earlier that month,
|
|
196
|
+
`packages/policy/src/scope.ts`): apps whose visibility is a disjunction over a graph over-fetched a
|
|
197
|
+
feed and ORed in JS — the short page `scope` exists to end.
|
|
168
198
|
- **Planned, not shipped:** a finding for a scope that admits other rows than its rule on the
|
|
169
199
|
exercise seed (`X_POLICY_SCOPE_MISMATCH`, not registered yet). Until then, a scope wider than its
|
|
170
200
|
rule costs rows the rule then drops — a short page again — and a narrower one hides rows the rule
|
|
@@ -203,6 +233,7 @@ X_ENTITY_TENANT_UNDECLARED: a child of a tenant-owned table has no tenant
|
|
|
203
233
|
|---|---|
|
|
204
234
|
| `orgId: uuid().tenant()`, then `x db gen '<table> tenant'` | the rows belong to an org. A table that already holds rows backfills the column: `x g backfill <name> --feature <slice>` |
|
|
205
235
|
| `entity('<name>', { shared: '<why>' })` | the rows belong to no org — a price list, a catalog. A blank reason is refused at `entity()`; a `shared` entity is not walked through ([Entities](Entities-And-Migrations#shape)) |
|
|
236
|
+
| `entity('<name>', { global: '<why>' })` | the rows belong to no org and reference none — a plan catalog, a stream cursor. Not a fix for this finding: a table that hangs off a tenant's row is `shared` or tenant-owned, so a `global` one with such a reference is still reported. It turns a read over it from `unproven` into `global` ([below](#the-dynamic-tenant-proof)) |
|
|
206
237
|
|
|
207
238
|
Reported in the `exercise` step, not `policy`: the policy step asks whether a permission exists. Source: `packages/cli/src/exercise-static.ts`.
|
|
208
239
|
|
|
@@ -231,6 +262,7 @@ X_TENANT_LEAK: another tenant's row reached a call's output or effect
|
|
|
231
262
|
| `public` | the policy admits an anonymous caller: what it returns, anyone may read. The read half is skipped; a crossed **write** is still red |
|
|
232
263
|
| `public`, as a declared sweep | a job that reads every org on purpose says so with `crossTenant(reason, fn)`, and its input names no org's rows. The proof sees the scope and quotes the reason; the read half is skipped, a crossed **write** is still red. The same scope in an action or a query, or in a job handed A's id, is still `X_TENANT_LEAK` |
|
|
233
264
|
| `public`, as a tenantless job | a job declaring `tenant: 'none'` whose input names none of A's rows — a nightly cleanup across every org, input `{ occurrenceMs }`. No org and no id of B's choosing reaches its run, so B's run is A's run: what it writes it writes for every enqueuer. The **write** half is skipped, the read half kept. Handed one of A's ids it is crossed as ever; an action or a query handed no id still crosses, since B's org runs it |
|
|
265
|
+
| `global` | a query whose every statement read an `entity('<name>', { global: '<why>' })` table — a plan catalog the same for every org. No row of A's exists to come back, so the reasons are quoted; a crossed **write** is still red. One other entity, or one hand-written statement, and it stays `unproven` |
|
|
234
266
|
| `unproven` | A's own call was not reached (that record is already red as `X_CONTRACT_EXERCISE_UNREACHED`), or a query answered A none of A's rows — B's empty answer then proves nothing |
|
|
235
267
|
|
|
236
268
|
B holds the role A held, minus `tenancy:cross`. **Not checked**: a `route` `load` and a `task`
|
package/wiki/Realtime.md
CHANGED
|
@@ -459,6 +459,7 @@ One outage is one fact. Each condition below is written on its 1st, 2nd, 4th, 8t
|
|
|
459
459
|
| `cache.invalidate.partial` `{ …report, failures }` | `warn` | a publisher | refusals 1, 2, 4, 8, … **per failing tier** (`broadcast`, `redis`, …). Every bust's report still carries its `errors`, and `/_x` still records every bust |
|
|
460
460
|
| `cache.invalidate.partial recovered` `{ tier, after }` | `info` | a publisher | once, when that tier clears again |
|
|
461
461
|
| `cache.broadcast.subscribe-failed` `{ attempt, error }` · `… recovered` `{ after }` | `warn` · `info` | every role | silent for the first 10 s of the boot subscribe (`FIRST_DIAL_GRACE_MS`: the bus's first dial is still in progress, and the subscribe lands within it on a healthy pod); past that the first refusal and then attempts 2, 4, 8, … warn, and the landing is said once at info — only after a warning. `As of 2026-10-17` |
|
|
462
|
+
| `cache.broadcast.deferred-failed` `{ error, code? }` · `cache.broadcast.deferred-recovered` `{ failures }` | `warn` · `info` | a publisher | publishing the busts a bus outage deferred, on each reconnect: once per cause (a new one carries `previous`), then once when a settle lands, with the count. `As of 2026-11-14` |
|
|
462
463
|
| `live.bus_reconnected` `{ desynced, channelGaps }` | `warn` | `sync` | once per recovery: how many windows and topics were told to re-read |
|
|
463
464
|
|
|
464
465
|
Until 2026-10-10 a three-minute outage wrote `presence.sweep failed` at `error` every 10 s on every `sync` node (19 lines on one), sent the monitor one event per refused beat per socket, and wrote `cache.invalidate.partial` once per bust on every publisher. A failure that is **not** the bus being away — a policy that threw inside a presence leave — is still written every time, as `<operation> failed`.
|
package/wiki/Testing.md
CHANGED
|
@@ -1090,6 +1090,7 @@ only what came back and what changed.
|
|
|
1090
1090
|
| `public` | the policy admits an anonymous caller with an empty input: read half skipped, write half kept | no |
|
|
1091
1091
|
| `public` | a **job** whose B leg opened `crossTenant(reason, fn)` and whose input carried none of A's marks — a declared sweep, `sendDigest` fanning out one delivery per org. The reason is quoted in the verdict; read half skipped, write half kept | no |
|
|
1092
1092
|
| `public` | a **job** declaring `tenant: 'none'` whose input carried none of A's marks — a nightly cleanup across every org, input `{ occurrenceMs }`. No org and no id B chose reaches its run, so B's run is A's run: write half skipped (no snapshots taken), read half kept. Handed one of A's ids, crossed as ever. Both this and a declared sweep: both reasons, `; `-joined | no |
|
|
1093
|
+
| `global` | a **query** every statement of whose A call was a repository read of an `entity({ global: '<why>' })` table, `As of 2026-11-14` — a plan catalog. There is no row of A's to hand back, so the reasons are quoted in the verdict; the legs are still searched and the write half kept. One other entity (a policy's membership read included) or one hand-written statement, and it is the `unproven` below | no |
|
|
1093
1094
|
| `unproven` | a query whose A answer held none of A's marks: B's empty answer proves nothing | no |
|
|
1094
1095
|
| `proven` | otherwise | no |
|
|
1095
1096
|
|
package/wiki/Upgrading.md
CHANGED
|
@@ -289,6 +289,8 @@ A setter still on a package's `.` barrel is `X_ADAPTER_PORT_INCOMPLETE` on the `
|
|
|
289
289
|
| `x verify` without `--json` prints its per-step stderr lines for a person (**31.22.0**): `✓ lint 22.0s`, and for a red step its narrowest re-run — no longer `{"step":…}` JSON | a script that parses those lines passes `--json`, which keeps them JSON |
|
|
290
290
|
| `x verify`'s `lint` step reports every format and import-order miss as one `X_LINT_FAILED` (**31.22.0**), its fix a single `bunx biome check --write <file…>`; a reader counting one finding per file sees fewer | nothing; run the one command |
|
|
291
291
|
| `x verify --changed` gives a route's `page.tsx` its own rule, `page` (**31.22.0**): typecheck, lint, boundaries, filesize, i18n and that route's tests, where it ran every step but `drift` | nothing; `x verify` with no flag is still the verdict |
|
|
292
|
+
| `x doctor` lists `error-declared` as differing from the shipped template after the **31.24.0** hop: its `fix:` is now one pasteable call per class — `export const PostNotFound = defineError({ code: 'X_POST_NOT_FOUND', title, status, cause, fix, problemMeta: [...] })`, the binding and the code read off the finding — because `defineError` now takes `problemMeta` and `publicCause: true`, which replace a hand-written class's `registerErrorStatus` / `registerProblemMeta` rows. The rule is the same; nothing new is reported | optional: `x g guard error-declared --force` — it rewrites `guards/error-declared.ts` **and** its `.test.ts`, so review the diff and keep any rule you edited on purpose. Then `x verify` |
|
|
293
|
+
| `repo-unbounded` fails the gate in a **new** app from **31.24.0** (`x new` and `x g guard` write it with no `severity` line); an existing app's report-only copy still reads as current in `x doctor`. A bare `.all()` also logs `X_ENTITY_ALL_TRUNCATED` with its call site in dev and test | optional: `x g guard repo-unbounded --force` to make your copy fail the gate on a bare `.all()` — add `.limit(n)` or page with `.page()` at every site it then lists. Then `x verify` |
|
|
292
294
|
|
|
293
295
|
## 29.x → 30.0.0, entry by entry
|
|
294
296
|
|