@voltro/plugin-flags 0.55.0 → 0.57.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 (2) hide show
  1. package/CHANGELOG.md +691 -0
  2. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -39,6 +39,697 @@ _Changes staged for the next release accumulate here (rolled up from
39
39
 
40
40
  ---
41
41
 
42
+ ## [0.57.0] — 2026-08-30
43
+
44
+ ### Added
45
+
46
+ - **@voltro/client, @voltro/web** — <!-- `apiSurface: compatible` rather than `additive`: the golden line for `useFormBinding` CHANGED rather than being added, because the second parameter WIDENED from `string` to `string | ((values) => string)`. A widened parameter cannot turn a call site that compiled into one that does not — every existing `useFormBinding('app', 'todos.create', …)` still satisfies the union. The `@voltro/web` aggregate re-exports it, which is why it is listed: its golden describes a surface defined in `@voltro/client`, and regenerating the source package's golden does not regenerate the aggregate's. -->
47
+
48
+ **`useFormBinding`'s mutation may now be a FUNCTION of the current values.**
49
+
50
+ ```tsx
51
+ useFormBinding('app', (v) => (v.repeats ? 'calendarRecurringEvent.create' : 'calendarEntries.create'), { defaults })
52
+ ```
53
+
54
+ Some forms only learn their target from what the user does: a calendar entry becomes a recurring series the moment "repeats" is ticked, and the series mutation takes eleven more fields. Neither way out worked. Deriving the tag outside the binding is not available — the values belong to the binding and do not exist before it — and re-mounting with a different tag resets the engine, throwing away everything the user typed.
55
+
56
+ The schema in force follows the tag, so `fields` and validation always match what will actually be submitted, and the values survive the switch because the engine is constructed once and never rebuilt.
57
+
58
+ Two details that are decisions, not accidents. On the first render there are no values yet, so the function is called with the raw `defaults` — not the SEEDED ones, because seeding reads the schema and the schema comes from the tag being resolved. And the accessibility ids are pinned to the first resolved tag: they are DOM ids, and letting them move on the keystroke that flips the branch would remount every field, taking the focus and the caret with it — the opposite of what "switch the tag without losing the values" is for.
59
+
60
+ **Also: every hand-made `errorBus` in the client's own tests now uses the real `RpcErrorBus`.** Seven of them were `{ emit: () => {} }`, and they all broke the moment the bus grew a second channel — which is the cheap version of the failure a paraphrasing fake produces. A fake standing in for a seam that has a shared implementation should import it.
61
+ - **@voltro/plugin-audit** — **`redact*: 'shape'` now buckets a string's length below a floor: `string(<16)` rather than `string(6)`.**
62
+
63
+ The mode exists so an audit row can end a diagnosis the payload itself cannot be shown for — the motivating case is a 113-character value where 44 were due, and the length IS the whole finding. A length is a small disclosure at that size and not a small one at six: a TOTP reported as `string(6)`, or a four-digit PIN as `string(4)`, tells a reader with log access exactly what shape to try.
64
+
65
+ The floor is where the two stop overlapping. Nothing this mode is FOR lives under it, so the default costs no diagnostic value. `auditPlugin({ redactionLengthFloor })` moves it — `0` for a deployment whose audited payloads are ids and tokens and every character of length is worth having, higher for one holding short human-entered secrets.
66
+
67
+ Two details that are decisions. **An empty string stays exact** (`string(0)`): "the field arrived empty" is a real diagnosis, an empty string is not a secret, and collapsing it would hide the one short length worth seeing. And the floor applies to described KEYS as well as values — a key that failed the declared-field test is a key carrying data, so its length is the same disclosure.
68
+ - **@voltro/cli** — **`voltro logs --url` and `voltro traces --url` can read a deployed app now — and when they cannot, they say so instead of blaming your filters.**
69
+
70
+ Two defects, and the second is the cheap one that costs the most time.
71
+
72
+ **The flag existed for the case it could not serve.** `--url` addresses a deployed app; a deployed app runs `voltro serve`, which mounted neither `/_voltro/inspect/logs` nor `/_voltro/inspect/traces`. Our own docs name both commands as the way to debug a running app. A reader with cluster access can route around it by reading pod stdout — a customer on a hosted Voltro cannot, because inspect *is* the access.
73
+
74
+ `inspect: { logs, traces }` in `app.config.ts` arms a bounded in-process ring (`VOLTRO_INSPECT_LOGS` / `VOLTRO_INSPECT_TRACES` override per deployment, taking a size or `on`/`off`). **Off by default**, because a ring is memory on every replica for data most deployments already collect from stdout — the argument against a second span sink was an argument for a default, not for an absence. The endpoint handlers are the ones `voltro dev` already calls, and the span FILTER that decides what reaches the ring is now shared rather than copied: `traceRingSink.ts`, because a copied filter is a second definition nothing keeps in step, and this one is what stops `_voltro_traces` from recording its own INSERTs.
75
+
76
+ **"Found nothing" and "looked nowhere" read the same.** An empty result printed `no records matched the given filters.` — a claim that your filters were too narrow — with the truth in a `#` comment line below it, which is the first thing a pipe or a `| grep` drops. The invited reaction is to widen `--tail`, drop `--level`, extend `--since`, and get the identical sentence every time. When every target failed, the headline now says `NOTHING WAS SEARCHED` and carries the reason the endpoint gave — which the CLI was collapsing to `HTTP 404` and throwing away.
77
+
78
+ The 404 for these two also stopped saying "this endpoint is served by `voltro dev`". That was true and is now false in the one direction that matters: it tells a reader to stop looking when one config field stands between them and the answer. It names the switch.
79
+ - **@voltro/cli** — **Two `voltro doctor` rules for defects that are completely decidable from the source — and were reported because nothing decided them.**
80
+
81
+ **`executor-builds-an-undeclared-field`.** Since 0.37 a descriptor's `output` IS the serializer, so a key the struct does not declare is stripped on the way out. Nothing errors and nothing warns: every reader downstream gets `undefined` and renders a blank. A deployment hit it twice in one session — a list executor built two fields, declared neither, and every picker showed empty options.
82
+
83
+ **`nullable-column-a-mutation-cannot-clear`.** A nullable column written through an input field that does not accept `null` can be set once and never emptied. The mutation succeeds, the column keeps its old value, and the user's second attempt looks like a UI bug. A deployment found five real cases only after a formatter happened to wrap one of their own line-based checks — which is the argument for doing it here: their rule was blind to exactly the inputs small enough to fit on one line, and stayed blind silently.
84
+
85
+ Both are ADVISORY, like everything in that scan, and both REFUSE rather than guess. The refusals are where the work went:
86
+
87
+ - A spread on either side of the output comparison means the key set is not knowable; reporting the visible half would name the field the author can already see and miss the ones they cannot. - An `output` that is a named schema rather than a literal struct is UNJUDGEABLE, not empty — the second reading makes every field a finding. - Declared names are flattened across nesting, because a literal inside `versions: Schema.Array(Schema.Struct({ version, op }))` builds names the contract declares one level in. - A literal that shares NO name with the declared output is not the output: a declarative query executor returns `{ descriptor: { table, order, take } }`, which the framework runs. - A table declaration the scan cannot find produces no finding, because "this table has no nullable columns" and "I could not look" lead to opposite conclusions.
88
+
89
+ The last two exist because the first version of the output rule was measured against four real apps and flagged two files, both wrong — one query descriptor and one nested row. Both are pinned as regression cases, each beside a falsification proving the fix did not turn into accepting anything. After them: 156 real files, zero findings; and injecting an undeclared field into a real fixture makes the rule name exactly that file.
90
+
91
+ ### Fixed
92
+
93
+ - **@voltro/runtime, @voltro/cli** — **A schedule run whose process died suppressed every later firing of that schedule for six hours, on every replica, and logged `overlap skip` while doing it.**
94
+
95
+ The cross-instance overlap guard asks whether an occurrence is already running anywhere in the cluster. Its only evidence was the run row's `firedAt` against a constant, because that is all a row carried — and a constant that must never cut off a live run has to be longer than the longest one. So a pod killed mid-run left a `running` row that read as a live occurrence until the window expired. Against a half-hourly cron that is twelve missed occurrences from one restart.
96
+
97
+ `_voltro_schedule_runs` now carries **`heartbeatAt`**, bumped while the handler is in flight, and liveness is measured rather than assumed: silent for three beats is dead. A row with no beat — one written by a process still on the previous version during a rolling deploy — is dated by `firedAt` and bounded by the schedule's own `maxRuntimeMs`, because the watchdog records anything past it as `failed`. Same field and the same three cases as `_voltro_replace_in_progress.heartbeatAt`; it is deliberately not a lease, and nothing takes ownership of the run.
98
+
99
+ **The log line now carries what it measured.** `schedule: overlap skip` with `scope: 'cluster'` described two states — a peer genuinely working, and a corpse holding the schedule shut — while the word "overlap" asserted the first, and telling them apart meant reading the scheduler's source. It reports `heldBy` and `lastSeenMs` now.
100
+
101
+ **Two more defects found in the same function.** The query took the 200 most recent `running` rows across EVERY schedule and matched the name in JavaScript, so past 200 concurrent rows a live run falls out of the page and the guard silently stops guarding; the name is in the predicate now. And a `finishRun` whose update matched nothing returned in silence — the row stays `running`, which is exactly the state that suppresses the schedule, so the one write whose absence stops a cron had no failure signal at all.
102
+
103
+ `scheduling.scheduleHeartbeatMs` (env `VOLTRO_SCHEDULE_HEARTBEAT_MS`, default 30 s) is the cadence. Both boot paths pass the resolved value; a run shorter than one interval writes no beat and costs nothing.
104
+ - **@voltro/cli** — **`voltro dev` crashed on boot for every API-only app.**
105
+
106
+ `tryRunWebDev` asks `loadConfig` for the app's WEB config and gets `null` whenever there isn't one — which is every `type:'api'` project, and any config that fails to import. That null is expected and handled: the function returns `{ ran: false }` and the caller boots the api alone.
107
+
108
+ The `health` block's resolution was inserted ABOVE that guard, so the first thing the function did was read a field off the null:
109
+
110
+ ```
111
+ TypeError: Cannot read properties of null (reading 'health')
112
+ ```
113
+
114
+ Two things about how it stayed invisible are worth more than the one-line fix.
115
+
116
+ **`tsc` had no chance.** The read is written `(config as { health?: … }).health`, and a cast on a maybe-null value erases exactly the nullability the compiler would have refused. The guard has no type-level protection, so it needed a behavioural one — `webDevNoWebConfig.test.ts` asserts the CONTRACT (`{ ran: false, exitCode: 0 }`, no throw) rather than the line order, and fails with the production error when the guard is moved back.
117
+
118
+ **And every symptom pointed somewhere else.** Eight integration files went red together, and all of them reported a TIMEOUT — `both replicas must boot`, at 300 s — because what a fixture observes is a process that never starts listening. A crash at boot and a slow machine are the same observation from outside, and the second is the expensive diagnosis to start with.
119
+ - **@voltro/plugin-billing** — **A production boot with no `STRIPE_SECRET_KEY` silently selected the MOCK billing provider. It says so now.**
120
+
121
+ `resolveProvider` picks `stripe` when the key is present and `mock` when it is not. The zero-config default is right — add the plugin, see checkout flows, no account needed. What was wrong is how it failed later.
122
+
123
+ `STRIPE_SECRET_KEY` is a deployment variable, and one that silently stops being set is a routine event: a rotated secret, a typo in a values file, a CI variable nobody ever created. When that happens, an app that has been charging customers keeps answering every charge, subscription and invoice call SUCCESSFULLY, reaches nobody, and leaves nothing in the log to find afterwards.
124
+
125
+ A mock chosen by ABSENCE, under `NODE_ENV=production`, now warns — naming the consequence rather than the selection, and both ways out (set the key, or declare `provider: 'mock'` so the reader knows it was a decision). An explicitly declared mock stays silent: warning about a choice somebody made trains the reader to ignore the line that matters.
126
+
127
+ `NODE_ENV` decides only whether it is worth SAYING, never what is selected. Both environments resolve the same provider — an env-conditional behaviour is the shape a staging box sails past, and it is pinned as its own case.
128
+ - **@voltro/cli, @voltro/protocol** — **A plugin's `declaredEnv: [{ required: true }]` now ABORTS THE BOOT when the value does not resolve. Nothing checked it before.**
129
+
130
+ The field has existed for a long time and ten-odd plugins fill it in. Three consumers read it — the env manifest, `voltro env`, and the secret MINT (which only handles `generate`, a secret that is OURS to invent). None validated `required`. Its own doc said "declaration only — metadata, not a read path", while `PluginEnvVar.generate`'s said "in production a missing secret refuses the boot": true for the minted kind, false for the one that matters — a third-party credential nobody can invent.
131
+
132
+ Declared, documented, read by three consumers, enforced by none. Every surface read as wired.
133
+
134
+ Every required entry now resolves before any plugin activates, on BOTH api boot paths, and a failure names the PLUGIN — the variable name alone appears in no file the reader owns, so without the attribution the next step is a grep through `node_modules`.
135
+
136
+ **A `secret: true` variable resolves through the configured secrets backend**, not just `process.env`, because that is where its value lives when one exists. A backend that cannot answer therefore fails the boot too — reported as `unreadable` rather than as an absent variable, because those are different facts and one of them sends the reader to the wrong file. A non-secret variable never touches the backend, so a misconfigured vault cannot fail variables that never used it.
137
+
138
+ Merging, when two plugins declare the same variable: `required` takes the stricter (a plugin that can live without the value must not weaken one that cannot), `secret` takes `true` (over-classifying hides something that did not need hiding; under-classifying prints somebody's credential into a dashboard — it is the only direction with a failure mode on one side). An app that declares the variable in `app.config.ts` overrides the plugin entirely.
139
+
140
+ **Upgrade note.** One first-party declaration is affected: `plugin-notifications`' `VOLTRO_VAPID_PRIVATE_KEY`, declared `required: true` and reachable only when web push is enabled. `voltro dev` mints it, as before; a production `voltro serve` with web push and no key now refuses to start, which is what that declaration has always said.
141
+ - **@voltro/client** — **A consecutive-failure ceiling was counting a tab's LIFETIME, and the screen it stranded had nothing left to move it.**
142
+
143
+ `wireAuthRefresh` rebuilds the transport when a call comes back `Unauthenticated`, and `maxConsecutive` bounds it: after that many refreshes *with no successful call in between*, it stops, because at that point the credential is not stale — it is refused. "With no successful call in between" was carried by `AuthRefreshHandle.noteSuccess()`, a method the HOST had to call, and the only host never called it.
144
+
145
+ The consequence is not the loop the ceiling guards against. It is the opposite: three token rotations over an afternoon exhaust the budget, and from then on the tab never refreshes again. Every later expiry rejects every subscription the page opens, a rejected entry is terminal for its transport by design, so the screen waits on a spinner with nothing left to wait for.
146
+
147
+ `RpcErrorBus` has a SUCCESS channel now (`onSuccess` / `emitSuccess`), emitted by the same pipeline that emits the errors — a snapshot in the subscription cache, a settled mutation, a settled action. `wireAuthRefresh` subscribes to it itself, so no host has to remember anything; `noteSuccess()` stays for a host with a better signal of its own and is no longer what the policy depends on.
148
+
149
+ **`useSubscriptionHealth(apiName)` is new**, and it exists because the state it reports cannot be derived from any single hook. A refused subscription never retries, so there is no second error to react to, and `SubscriptionFailed` presents `data: undefined` — the value every reading layer derives `loading` from. A wrapper hook passing `{ data, loading }` through therefore turns a refusal into a permanent skeleton, and passing those two through is the natural shape to write.
150
+
151
+ const { healthy, failed } = useSubscriptionHealth('app') if (!healthy) return <Banner tags={failed.map((f) => f.tag)} />
152
+
153
+ Keyed by TAG, not counted — two failures of one call are one broken thing — and scoped to the api's runtime, reset when that runtime is rebuilt: carrying a failure across a transport swap would report a call as broken that has not been tried since.
154
+ - **@voltro/plugin-notifications, @voltro/cli** — **About one generated VAPID key in 256 was 31 bytes, and a 31-byte key can never send a push.**
155
+
156
+ `createECDH('prime256v1').getPrivateKey()` returns the private scalar the way OpenSSL stores a BIGNUM — minimal length, leading zero bytes stripped. A P-256 scalar is a fixed-width field element, so a draw whose high byte is zero comes back 31 bytes (measured: 82 in 20 000), and two zero bytes gives 30 (1 in 20 000). Both generators had it: the plugin's `generateVapidPrivateKey`, and the `p256` branch of `voltro dev`'s secret mint.
157
+
158
+ The consumers were already right, which is what made this survivable and also what hid it. `vapidPublicKeyFor` REFUSES a non-32-byte scalar — a wrong VAPID key must fail loudly rather than at the first delivery. But the refusal happens inside `sendWebPush`'s `try`, so it came back as `{ kind: 'failed', status: 0 }`: the same outcome as the push service being unreachable. Nothing named the key. And the minted value is written to `.env.local` and stays, so an affected project's push sending is broken permanently and looks like a network problem forever.
159
+
160
+ Both generators left-pad now, and both packages assert the width on their OWN generator — deliberately not one reading the other's source, because a cross-package guard does not run when the suite is filtered to a single package.
161
+
162
+ **Worth recording is how nearly it was written off.** It surfaced as a single test failing in a full run and passing alone, roughly 1.6 % of the time — the exact signature of a saturated machine. Isolation "cleared" it twice. What settled it was not another isolated run but generating 20 000 keys and counting the widths: 0.41 % at 31 bytes is not noise, it is 1/256, and that number names its own cause.
163
+ - **@voltro/runtime, @voltro/cli, @voltro/client, @voltro/kv, @voltro/plugin-broadcast** — **Seven reported points, all from one round. Every one of them is information the process already had, not reaching the person who needed it.**
164
+
165
+ **A `SqlError` reaching the client as a Defect carried no detail.** The log line said `Failed to execute statement` — no table, no column, no operation — while the trace exporter had written `db.query.text` for the same statement. The handler-failure logger has walked the driver cause for a long time; the DEFECT frame did not, so a failure that reaches the client without passing through that logger left an operator with nothing. It leads with the driver's own message now and points at `_voltro_traces`.
166
+
167
+ **A defect that repeats IDENTICALLY ends the resumable stream.** The reconnect loop is built for a transport drop, and a transport drop does not repeat itself verbatim; a broken statement does. So one broken query spent the whole `maxReconnects` budget, and the user watched a spinner and then read "connection lost" — describing the opposite of what happened. TWICE, not once: the first failure is genuinely ambiguous, the second identical one is not. Also documented: `reconnects` is the RUN TOTAL and `maxReconnects` bounds CONSECUTIVE reconnects without progress, so "attempt {reconnects} of {maxReconnects}" renders `5/2`.
168
+
169
+ **`voltro build` reported a config that failed to LOAD as "no web app found".** It used the wrapper that discards the import error, so an `app.config.ts` that IS an api and simply threw came out as a claim about the app's TYPE. The message now distinguishes the two, prints the error, and names both types.
170
+
171
+ **The `subscriber-effect-without-once` rule found one of four.** The helper name matched by EQUALITY, so `notifyAbsenceRequested` fell through while `notify` reported — a prefix now. And it read only the handler body, so a write one call level down inside the same file was invisible; the file is already parsed. What it still cannot see (a write in another module) is SAID: the report prints how many subscribers declare no `once:` against how many the rule found an effect in, because "1 file(s)" read as an inventory.
172
+
173
+ **`voltro dev` had no probe surface on a web app**, and `/internal/*` did not 404 — it fell into the page router. An SPA shell answered 200 with HTML, a loader redirect answered 303, an auth guard answered 303 to `/login`; a kubelet reads all three as PASS. One of those pages had a loader calling the api, so the WEB pod's readiness hung on the API's reachability once per probe interval. All three boot paths now answer through one matcher, before routing — and `health: { path, liveness, readiness }` in `app.config.ts` makes the paths and the answers the app's, for both app types. "Ready" is a dependency ping for an api and its opposite for a screen that must keep showing its last frame.
174
+
175
+ **Every hot reload ended as a crash.** ioredis emits `error` on an EventEmitter, and node turns an unhandled `error` event into an uncaught exception — so a client with no listener made every close with commands in flight a process crash. Functionally harmless (the supervisor restarts) and every reload read as a crash loop in Kubernetes. Both `@voltro/kv` and `@voltro/plugin-broadcast` register one on every client. The watcher also ignores a tool's scratch file (`vitest.config.ts.timestamp-…mjs`), which was restarting the app twice per test run.
176
+
177
+ **A row filter's resolution is now reported.** Between "refuses everything" (which an older version did, loudly) and "applies nothing" there was nothing to see: every read would widen and no log, test or `doctor` would say so. The framework says so the FIRST time a filter resolves on a live read path — a fact from the running system rather than an echo of the declaration. And a new advisory `doctor` rule reports a handler that hand-writes a predicate on a table the registered filter already covers: never a leak (two identical predicates ANDed are as tight as one), but an authorization rule maintained in places the framework already knew about.
178
+ - **@voltro/client** — **A mutation, workflow start or upload fired from a mount effect hit the client boot window and failed with the stub's message. Only `useAction` waited it out.**
179
+
180
+ Between the first client commit — children render against the loading stub so `hydrateRoot` can adopt the SSR DOM — and the moment the supervisor resolves the real rpc client, `handle.client` is a proxy that throws on any access. Measured in real chromium at ~15–30 ms, and wider in an app that mints a token in `authHeaders` before connecting. `useEffect(() => { mutate(...) }, [])` is the ordinary shape that lands inside it.
181
+
182
+ `useAction.run` was fixed for exactly this, with a unit test and a browser measurement. `useMutation.mutate`, `useWorkflow`'s five callbacks and `useUpload.upload` had the identical defect for as long, and the failure was worse than a delay: the stub's `not-yet-resolved api` DISPLACED whatever the real outcome would have been, so the message a developer read described our plumbing rather than their call.
183
+
184
+ All four seams go through one `awaitResolvedApi` now, and each reads the handle from a ref at CALL time. A `useCallback` dep list cannot solve this however correct it is — the callback a mount effect fires was built on the first render, before the re-render that would rebuild it.
185
+
186
+ `useMutation` waits BEFORE staging optimistic patches, not just before the network call: the stub carries a different `cache` instance, so patches staged against it would land in a cache no live subscription reads and then be reverted against the wrong one.
187
+
188
+ **The rule is asserted over the SET** (`bootWindowSeams.test.ts`), because a per-hook test can only demonstrate one member. A fifth imperative hook inherits it by being written rather than by being remembered — which is precisely what did not happen the first time.
189
+ - **@voltro/cli** — **The boot's `reactivity:` line reported what the dialect COULD run, not what was running — so the deployment with no cross-replica fan-out was the one told it had none missing.**
190
+
191
+ `wireBroadcastBus` derived it as `postgres || mysql || mariadb`. A dialect is capable of a native transport; that is not the same as one being started. With `CDC=0` — which any deployment whose database grants no REPLICATION privilege has to set — the change reader never runs, and the boot still announced
192
+
193
+ reactivity: cross-instance via native binlog CDC (mariadb)
194
+
195
+ The crooked sentence is the smaller half. Without a broadcast plugin this line is the ONLY thing said about cross-replica reactivity, and the branch it displaced is the WARNING that there is none. It is also the line our own guidance names as the check for whether the native-CDC amplification applies to you, and there it answered yes where the truth was no.
196
+
197
+ It reads `store.changeScope` now — `'fleet'` exactly when change capture is running, and the same value `remoteChangesVisible` takes two calls later, so the honest signal was already in scope. Derived rather than enumerated: a sixth dialect with a native transport joins by itself, and an app that turned capture off because every table is `.nonReactive()` is covered without anyone remembering that path exists.
198
+
199
+ The enumeration was also wrong in the other direction — **mssql (Change Tracking) was absent**, so a deployment running a real cross-instance transport was being warned it had none.
200
+
201
+ And the warning that fires in the CDC-off case names the cause instead of the dialect. The old fallback told a mariadb operator to "use ... mariadb (binlog CDC)", which reads as boilerplate to the one person who needed to act on it.
202
+ - **@voltro/runtime** — **A row-filtered table reached through `.with(...)` is narrowed now, where it used to be refused — and before that, served unfiltered.**
203
+
204
+ An eager load resolves BELOW the seam that AND-merges the filter onto a read's base table: the stores expand the eager tree themselves, the memory store by recursing through its own raw read and the SQL stores by folding the relation into one join or JSON aggregate. Measured when it was found: a filter restricting a relation target to the caller returned exactly the caller's row on a direct read and BOTH rows through `.with()` on the same data.
205
+
206
+ That shipped as a refusal, on the reasoning that the real fix meant applying the filter inside eager compilation across four dialect stores. **It is not that change.** Every eager branch already accepts a `where`, and both resolvers already honour it — the walker ANDs it into the relation's lookup descriptor, the JSON compiler emits it into the correlated subquery on all five dialects. So the middleware writes the filter where a caller could have written it, and every resolver applies it without knowing a row filter exists. One rewrite, six execution paths, no dialect emitter touched.
207
+
208
+ A caller's own `where` is kept and the filter goes UNDER it: a branch you narrowed stays narrower, and nothing a caller writes can widen the filter. Nested `.with(...)` is narrowed at every level.
209
+
210
+ **One case still refuses: a row-filtered `manyToMany` JUNCTION.** A branch `where` is a predicate on the relation's TARGET, so a filter narrowing the junction has nowhere to be expressed. Narrow and honest beats a rewrite that looks complete.
211
+
212
+ Verified on the walker (unit, in-memory store) AND on the JSON-aggregation path against a real postgres, because those are two separate implementations and the suites that cover them each mock the other's half.
213
+ - **@voltro/client** — **Two dev-time messages said something the code had not measured.**
214
+
215
+ **The store's equals-footgun warning blamed the selector.** It read *"the selector returns a NEW object each call"* — and the site cannot observe that: an identical state returns from the cache before the selector runs, so everything reaching the warning arrives with a CHANGED state. Shallow-equal-but-not- identical there has two producers, and the message asserted one of them:
216
+
217
+ - the selector BUILDS (`s => ({ a: s.a })`), or - the STORE wrote an equivalent new value — `set({ crumbs: [] })` on leaving a page and again on entering the next is two different empty arrays.
218
+
219
+ Both waste the render and both are fixed by `{ equals: shallow }`, so the advice was right while the diagnosis pointed at the wrong half — and a deployment reading the second case went looking at a selector that had been returning the same reference all along. The warning now MEASURES which one it is: it re-runs the selector on the previous state (dev only, at most once per store, on a selector required to be pure anyway) and says either "the selector builds" or "the store is writing an equal value".
220
+
221
+ **And a validation template rendered its own placeholder.** `interpolate` left an unfilled `{param}` in place, so a template whose parameter was missing put a literal `Mindestens {min}` into the interface. It reports the hole now and the caller falls through to the issue's own rendered sentence, which is complete by construction. The reported route is closed twice over: counting rules supply BOTH `count` (the name an i18n layer pluralises on) and `min` (the built-in template's), so a framework-derived issue cannot reach it; a hand-written annotation still can, and a raw placeholder is never the right answer.
222
+ - **@voltro/cli, @voltro/ai** — **`@voltro/ai`'s resumable-stream tables were declared, bounded, documented — and never added to the migration set.**
223
+
224
+ `dataStoreResumableStreamStore` writes to `_voltro_stream_events` and `_voltro_stream_state`. `frameworkTableAssembly.ts` imports six `@voltro/ai` tables and did not import these two, so `voltro db plan` answered *schema is up to date* while both were absent, and the first user's turn died inside the store rather than at boot.
225
+
226
+ They are assembled now for any app that DEPENDS on `@voltro/ai`, so all four schema-declaring paths plan them.
227
+
228
+ **The gate is the dependency, not a file convention, and that is the half worth knowing.** Every other flag in `FeatureMix` reads a filename — `*.agent.tsx`, `*.connection.ts` — and `dataStoreResumableStreamStore(ctx.store)` has none: it is an ordinary call, reachable from an action, a query, a workflow step. Gating on `agents` is the obvious guess and it is wrong, because an app can stream without declaring a single agent file. The manifest is the superset that CAN reach the store, it comes from the source tree, and every process in one deployment computes it identically — the constraint the declared set is under.
229
+
230
+ `loadDiscovered` now REQUIRES a `root` for the same reason: the flag is read from a manifest, so it cannot be derived from the file list, and a mix that quietly answered `false` because nobody passed a root would declare a smaller schema than the same tree declares elsewhere. An optional root would read exactly like one that was supplied.
231
+
232
+ **And the documentation said to do something that does not work.** The JSDoc and the docs page both instructed *"add them to the database barrel (or they ride along with a `*.agent.tsx` app)"* — both halves wrong, since discovery is file-based (`*.entity.ts`) and the store is not agent-only. That sentence had reached the shipped agent guide, so it was teaching every downstream coding agent a remedy with no effect on the plan. Corrected in the JSDoc, in both languages of the docs site, and regenerated.
233
+
234
+ ---
235
+
236
+ ## [0.56.0] — 2026-08-29
237
+
238
+ ### ⚠ BREAKING
239
+
240
+ - **@voltro/plugin-broadcast, @voltro/cli** — **Three ways the cross-replica bus mishandled a broker that was not there.**
241
+
242
+ **Boot no longer dies when the broker is unreachable.** `attachBroadcastBus` awaited its subscribe, and a rejected subscribe threw out of it, out of `wireBroadcastBus`, and out of boot — so a broker that happened to be restarting turned every replica into a crash loop. That contradicted the package's own first paragraph, which promises that a broker outage "degrades cross-replica fan-out only": true for an outage after boot, false for one during it, and the false half is the worse one, because a broker restart is precisely when every pod is dialling at once. It now warns, keeps local reactivity working, retries in the background, and reports the time it spent unsubscribed as a gap — because that is what it is: the fleet went on writing while this replica was not listening, and pub/sub keeps no log to replay.
243
+
244
+ **A peer that restarts under a stable name no longer switches its own gap detection off.** Gap detection compares a peer's serial against a watermark, and the serial restarts at 1 with the process while the NAME survives it — a StatefulSet pod keeps `POD_NAME`, and `VOLTRO_REPLICA_ID` is stable by definition. A receiver holding a watermark of 500 read the new process's 1, 2, 3… as "not newer", never advanced, and reported nothing for the next five hundred changes. The envelope carries an `epoch` now: a different epoch under a known name means a new process, so the watermark follows the process. A restart is not reported as a gap — it is not evidence that anything was missed.
245
+
246
+ **A transport that re-dials on its own now says so.** ioredis re-subscribes its channels after a reconnect and nats reconnects underneath the subscription; neither mentions that everything published while they were away is gone. Serial accounting finds that only if a peer publishes again, and on a quiet table "nobody wrote" and "we are stale forever" look identical. Providers report their connection lifecycle through a new optional `BroadcastProvider.onTransportEvent`, and a reconnect is treated as the hole it is.
247
+
248
+ Two driver defaults changed with it: the nats connection is now `maxReconnectAttempts: -1` and `waitOnFirstConnect: true`. nats.js defaults to giving up after ten attempts, which for a broker down about twenty seconds meant the connection closed for good, every subscription iterator ended, and the replica was deaf until it restarted — silently. And neither provider memoises a rejected connection promise any more: a broker briefly unreachable at construction was unreachable forever, because every later attempt awaited the same settled rejection and never dialled again.
249
+
250
+ **Breaking:** `attachBroadcastBus`'s `onGap` now receives one `BroadcastGap` object instead of `(origin, missed)`. `origin` and `missed` are still exact when they exist, and optional because a hole with no peer to blame is now reachable. See the codemod note.
251
+ - **@voltro/runtime, @voltro/cli** — **`defineReaction`'s `dedupeKey` was enforced by a per-process set, so the same change acted once per replica.**
252
+
253
+ `dedupeKey` is the one guard `defineReaction` refuses to boot without, and its documented promise is that the same logical change acts exactly once. It was backed by an in-memory `Set` shared across reactions in one process, consulted as `has(key)` then written as `add(key)` after the act returned. Two independent defects in one mechanism:
254
+
255
+ - **Per-process.** N replicas each held their own set, so a reaction whose act starts a workflow started N workflows, and one with `costBudgetUsd` spent N times. Every test and every single-instance run confirmed the gate worked, which is why it survived — it was real in exactly the configuration that cannot observe it. - **Read-then-write.** Even in one process, two concurrent changes with the same key both passed `has` before either reached `add`, because the act between them is awaited.
256
+
257
+ The gate is now a single atomic claim against `_voltro_change_claims` (`insertIgnore` on a `UNIQUE`, the arbiter the cron scheduler uses), taken BEFORE the act. Both boot paths wire it; the per-process set remains only as the fallback for a harness that wires none, and says so loudly at attach time.
258
+
259
+ Taking the claim first is what makes it a gate rather than a report, and the cost is stated rather than hidden: **an act that throws has already consumed its key and is not re-run by a later duplicate.** Durability belongs to the workflow the act starts, not to the trigger.
260
+
261
+ **Breaking:** `ReactionRunDeps.dedupe` is `{ claim: (key) => boolean | Promise<boolean> }` instead of `{ has, add }`. Nothing to do unless you call `runReaction` yourself — `voltro dev` and `voltro serve` build the deps and pass the durable claimer. See the codemod note for why this is not a rename.
262
+ - **@voltro/plugin-billing, @voltro/protocol, @voltro/database, @voltro/plugin-cdc-out, @voltro/cli** — **A CDC meter accrued a usage unit on every replica, so a tenant on two pods was billed twice.**
263
+
264
+ `plugin-billing`'s `metering: { … from: 'cdc' }` accrues one unit per matched row change, through the plugin `onChangeEvent` tap. That tap is delivered to every replica — that is what makes a `changeScope: 'fleet'` store (postgres LISTEN/NOTIFY, mysql binlog) cross-instance in the first place. For a reader that is correct. This is not a reader: `reportUsage` increments a shared counter and the flush reports the delta to the billing provider. So the invoice was multiplied by the replica count, by the plugin whose entire job is counting, with nothing in any log.
265
+
266
+ The tap now claims each change before accruing, through the same INSERT-wins arbiter behind `defineSubscriber({ once })` and a reaction's `dedupeKey`. An ungated tap (single process, memory store) still accrues and says so once — loudly, because an ungated meter is a factor-of-N on an invoice and is indistinguishable from a correct one by looking at the number.
267
+
268
+ **Naming a change needed a shared answer, and one already existed in the wrong place.** A fleet change carries no LSN, no commit id and no `traceId` — that last one deliberately, so a local trace is never mis-attributed to a remote write — so two replicas have no field they can both name it by. `@voltro/plugin-cdc-out` manufactured the missing identity from content plus its position among content-identical repeats, and it was the only consumer until this defect turned up the second one. `changeDigest`, `composeChangeKey`, `parseChangeKey` and `OccurrenceCounter` now live in **`@voltro/database`**, beside `ChangeEvent` itself.
269
+
270
+ Keying on the row id instead would have been worse than the defect for an `op: 'update'` meter: two genuine edits to one row share an id, so the meter would count the first and drop every one after it — a bill that stops growing while the work continues.
271
+
272
+ **Breaking:** `PluginBindContext` gains a REQUIRED `claimChange(scope, key)`. Every plugin's `bindDataStore` receives it; a plugin that constructs a `PluginBindContext` itself (a unit-test harness) must supply one. Required rather than optional because an absent gate reads exactly like a gate that passed. `@voltro/plugin-cdc-out` no longer re-exports the change-identity helpers — import them from `@voltro/database`.
273
+
274
+ **`voltro update` carries you across this** — codemod `0.56.0/05_plugin_bind_context_claims_a_change`. If you pin versions by hand and never run it, print the notes without changing anything: `voltro update --codemods-only --from <your current version> --dry-run` (this one ships in 0.56.0).
275
+ - **@voltro/cli, @voltro/devtools-ui** — **Every `/_voltro/inspect/*` answer is now an `Observation` — it says what it is about, who answered, and how complete it is.**
276
+
277
+ ```json
278
+ {
279
+ "data": { "…": "what the route returned before" },
280
+ "scope": { "kind": "process" },
281
+ "origin": { "replicaId": "api-7d9f-x2k", "instanceId": "api-7d9f-x2k@1787…", "version": "0.56.0" },
282
+ "completeness": { "complete": false, "fleetSize": 3, "reason": "process-scoped: this is 1 of 3 replicas" },
283
+ "capturedAt": 1787892497073
284
+ }
285
+ ```
286
+
287
+ **Why the payload alone was not enough.** `/subscriptions` answers with the subscriptions of the ONE process that received the request. `/schedules` answers with the whole fleet's, read from the shared store. Both were plain JSON with nothing to tell them apart, so on a multi-replica deployment the first is an unlabelled sample and reads exactly like the second. On ONE replica the difference is invisible — which is every development environment, every e2e and every template, so the environment in which they are indistinguishable is the one the framework is built and tested in.
288
+
289
+ Four scopes, and the fourth is the one an outside report would not have asked for: `process`, `shared-store`, `fleet`, and `declaration` — `/routes`, `/manifest`, `/env` describe the SOURCE TREE, identical on every replica of one version and different across a rolling deploy.
290
+
291
+ **`fleetSize` is the cheap half, and it needs no aggregation at all.** A process-scoped answer states how many replicas exist, so a bare `curl` now says it is a fraction and of what. When membership cannot say, the field is ABSENT rather than `1`: "I am alone" and "I cannot know" must not render identically.
292
+
293
+ **Default-DENY, because a default is a decision nobody made.** A path with no entry in `ROUTE_SCOPES` is refused with the fix in the message, so a new endpoint cannot ship unlabelled — it fails on its first request, in its author's own dev loop. Mutating routes are enumerated as `write` rather than inferred from the HTTP method: `?scope=fleet` on `/agent/call` would run a user's handler once per replica.
294
+
295
+ **Three dispatchers, not one.** Wrapping `handleInspectRequest` looked complete from inside itself while `handleInspectAsyncRequest` and `handleSharedInspectRoute` went on answering bare — `/cluster`, `/schedules` and every workflow read. Nothing in the route table showed it; it was found by asking a running process for every route. `inspectDoors.test.ts` pins all three on every commit and `scripts/observation-e2e.mjs` re-asks a real bundled serve. The same sweep caught a wrapper defect no unit fixture could: a route that builds its response by hand rather than through `json()` was wrapped into an envelope with `data: undefined`, which serialises away — every field around the answer correct, and the answer gone.
296
+
297
+ **The dashboards say it on screen.** `ScopeNotice` renders inside the SHARED `devtools-ui` pages, not in each host dashboard, for the reason every omission in this codebase has been invisible: a label each consumer must remember is a label one consumer will not have, and the page that forgot is indistinguishable from a page with nothing to warn about. It renders nothing when the answer is complete — a banner over a complete answer trains people to ignore banners.
298
+
299
+ **Breaking:** a caller reading `/_voltro/inspect/*` JSON reads `.data` now. Both dashboards unwrap in their single fetch helper and keep the envelope on `_observation` for the notice. A response without the envelope passes through unchanged, so an app on an older framework version is not a broken app.
300
+
301
+ **`voltro update` carries you across this** — codemod `0.56.0/01_inspect_answers_are_observations`. If you pin versions by hand and never run it, print the notes without changing anything: `voltro update --codemods-only --from <your current version> --dry-run` (this one ships in 0.56.0).
302
+ - **@voltro/cli** — **`voltro serve` on a WEB app now refuses. It used to delete the deployment artefact.**
303
+
304
+ `voltro start` (production) and `voltro dev` (development) are unchanged, and an API app is unchanged. What is removed is the web branch of `serve`, which was advertised in the CLI's own help as *"Production server: web app (vite preview) OR API, auto-detected"*. Both halves of that were measured before it was removed:
305
+
306
+ **In production it never ran.** The launcher's serve fast path requires `.framework/dist-api/serveBundle/serveEntry.js` — an artefact a web build does not produce. A web app got:
307
+
308
+ ```
309
+ [voltro] FATAL: production `voltro serve` requires a precompiled serve bundle at
310
+ …/.framework/dist-api/serveBundle/serveEntry.js
311
+ Run `voltro build` before serving
312
+ ```
313
+
314
+ directly after a `voltro build` that had just succeeded.
315
+
316
+ **Below production it destroyed the build.** The web branch ran a SECOND vite build with `plugins: [react()]` only — no `@tailwindcss/vite`, no image pipeline, no per-page islands entries — and then `vite preview`, which Vite documents as not for production use. Measured on a fixture:
317
+
318
+ - with Tailwind, the build ABORTS: `[postcss] ENOENT: no such file or directory, open 'tailwindcss'`, surfaced as `unhandled cli error` with a raw stack; - without Tailwind it SUCCEEDS — and because both builds write `.framework/dist`, which Vite empties (it sits under its root), it deleted `dist/server`, `island-shells/` and every pre-rendered route directory. Immediately afterwards, `voltro start` refused to boot: *"requires precompiled artefacts: …/dist/server/ssrEntry.js"*.
319
+
320
+ So `voltro build` → `voltro serve` → `voltro start` left the deployment unable to start, and the middle command was the one the help recommended.
321
+
322
+ The codemod is `manual` with `reach: 'beyond-source'`: the command being replaced lives in Dockerfiles, compose files, CI jobs and runbooks, not in `.ts`. It searches every text file git tracks and says plainly that a step defined in a CI runner's own UI is beyond what any repository scan can see.
323
+
324
+ The shipped Dockerfiles were already updated in the same change set and now run the precompiled bundle directly — `node .framework/dist-web/startBundle/startEntry.js` for web, `node .framework/dist-api/serveBundle/serveEntry.js` for an api.
325
+ - **@voltro/runtime, @voltro/cli** — **Every outbox effect was delivered once per replica.** `drainOutbox`'s summary line has always said "claim due rows". It did not: it read every `pending` row and ran its handler, and every replica runs the drain. Not on a crash, not on a retry — on the happy path, every time. Measured with two stores over one postgres: one enqueued row, one drain pass each, handler called twice.
326
+
327
+ The docs told handler authors to be idempotent and justified it with the crash case ("a process that dies between the remote accepting it and us recording that"). That reads as rare. "Your webhook fires once per replica, always" is a different operational fact, and nobody was told it.
328
+
329
+ `OutboxStatus` has always carried a `'delivering'` member that nothing set. That is the gate now, taken atomically: reclaim claims that have outlived their lease, read the due window, CAS `pending → delivering` stamping the claiming PROCESS, then handle only what came back. A racing replica loses the row because the predicate names the state it is leaving. `plugin-cdc-out` has done exactly this since it shipped, with the same `updateMany` CAS and the same state — two outboxes in one repo, one of them right.
330
+
331
+ Delivery is still AT-LEAST-ONCE and handlers must still be idempotent: a process can die between the remote accepting and the row being marked, and no claim closes that. What is gone is the routine N-fold duplicate, which was never a guarantee gap — it was the word "claim" not having been implemented.
332
+
333
+ `_voltro_outbox` gains `claimedBy` / `claimedAt` (nullable), applied by the declarative differ on `voltro db apply` and on a `voltro dev` boot, every dialect.
334
+
335
+ **Breaking:** `DrainDeps.claimedBy` is REQUIRED. It was optional for one draft, which meant a caller who omitted it silently got the old every-replica behaviour — an exactly-once gate that switches off when you leave a field out is not a gate. `voltro dev` / `voltro serve` pass it for you; only a caller driving `drainOutbox` directly is affected. `claimLeaseMs` (default 5 min) is new and optional.
336
+
337
+ **`voltro update` carries you across this** — codemod `0.56.0/03_outbox_drain_needs_an_identity`. If you pin versions by hand and never run it, print the notes without changing anything: `voltro update --codemods-only --from <your current version> --dry-run` (this one ships in 0.56.0).
338
+
339
+ ### Added
340
+
341
+ - **@voltro/database, @voltro/runtime, @voltro/cli, @voltro/data-transfer** — **`/_voltro/inspect/subscriptions?scope=fleet` — the fleet answer, assembled by READING rather than by asking.**
342
+
343
+ Each replica publishes its counters into `_voltro_replica_observations` on a timer, so any replica can answer a fleet question from the shared store. That is the same mechanism `coordinationState.recentReplicaIds` already used by reading `_voltro_schedule_runs`; this generalises the one case.
344
+
345
+ **Why not a fan-out over the broadcast bus.** The bus can `publish` and `subscribe`. A read-time fan-out would have to build request/response on top: a correlation id, a reply channel, a deadline to guess, a partial-result protocol. And it puts the DIAGNOSTIC on the failure path, so it degrades — by timing out — exactly when it is needed. Writing inverts that: the transport is the database, the one thing that must be up for anything to work, and a dead replica goes STALE rather than silent. Staleness is a number, and a number can be reported; paired with the membership roster, "old" becomes "missing".
346
+
347
+ **Three things make the merge honest, and each is the case a naive `rows.map()` gets wrong:**
348
+
349
+ - A replica membership knows about that has written nothing is **`missing`**, not absent. Dropping it makes a partial answer look complete — the same unlabelled sample this whole feature exists to end, one level up and more expensive, because now the reader believes they asked everybody. - A **stale** row is reported WITH its age rather than filtered out. Removing it hides that the answer is partial; keeping it unmarked presents fiction as current. Neither is available. - **Mixed versions are named.** A rolling deploy spans two shapes, and averaging them silently is wrong in a way nothing downstream can detect.
350
+
351
+ Only the newest GENERATION per replica is counted. A dead process's counters added to its successor's look exactly like a busy replica.
352
+
353
+ **With no shared store the request is refused with `501` and a reason** — never answered with this replica's own numbers. Handing a sample to someone who asked for the fleet in writing would be this feature committing the defect it exists to prevent.
354
+
355
+ `_voltro_replica_observations` holds ONE upserted row per `(replicaId, kind)`, so it is bounded by fleet size × kinds rather than by time. There is no history and must not be: a history needs a retention policy, and this is a cache of the present. It is classified **environment-local** for data transfer — a foreign row would invent a replica that does not exist here, and then report it as present or, once it ages, as one that has stopped answering.
356
+
357
+ The publisher runs on BOTH boot paths, pinned by `bootPathParity.test.ts`: a replica that never publishes is a hole in every other replica's answer, and it reads as "has written nothing", which is indistinguishable from broken.
358
+
359
+ **Measured with two real replicas against one database** (`scripts/fleet-observation-e2e.mjs`): both publish, EITHER answers for BOTH (`responded: 2, expected: 2`), and a killed replica's row keeps being readable with a growing age rather than vanishing — which is the whole design in one assertion, since a dead process going silent is indistinguishable from "nothing happened" and a row that gets old is not.
360
+
361
+ That test found two defects the single-process one could not:
362
+
363
+ - **An unreadable table read as an empty fleet.** Against a database whose schema predated `_voltro_replica_observations`, the merge reported `responded: 0, missing: [every replica]` — a healthy fleet described as gone. The read now raises and the route answers `503` naming the cause and the fix, because "nobody has written yet" and "I could not read the table" produce the same empty list and mean opposite things. - **A check of ours that examined nothing.** The single-process e2e asserted `typeof responded === 'number'`, which `0` satisfies — so it passed for the entire time the write was failing. It asserts `> 0` now.
364
+ - **@voltro/web, @voltro/client, @voltro/cli** — **`web.api.connect: 'lazy'` — a page that reads no data no longer opens a WebSocket.**
365
+
366
+ The default is unchanged (`'eager'`: every declared api connects at mount), so nothing moves unless an app asks for this.
367
+
368
+ Why it exists, measured in a real browser against a `voltro start`:
369
+
370
+ | page | `interactive` | WebSocket attempts | |---|---|---:| | `/pricing` | `'none'` | 0 | | `/info` | `'islands'` | 0 | | `/docs/intro/getting-started` (subscribes to nothing) | default = `'full'` | **6** | | `/` (Todos, subscribes) | `'full'` | 5 |
371
+
372
+ So the two opt-in render modes were already free, and the DEFAULT one connected regardless of whether the page used data. The six are reconnect backoff, not six live sockets — a socket that opens and is held was verified separately (a raw `ws://…/ws` against a running `voltro serve` opens and stays open with no auth, no subscription and no traffic).
373
+
374
+ What a held socket costs is not just a connection: `isIdleNow` returns false while `connectedClients() > 0` (`idleDetector.ts:46` → `singleNodeOrchestrator.ts:147` → `wakeRouter.ts:44`), so **one browser tab on a pricing page prevents scale-to-zero indefinitely** — the feature the framework's own documentation describes two paragraphs above the condition that defeats it.
375
+
376
+ Under `'lazy'` the connection is deferred to the first hook that asks for that api. Demand is expressed in `useFrameworkApi`, the single accessor all 27 data hooks read through — a per-hook signal would be 27 chances to forget one, and a forgotten one is a hook that silently never connects. It is keyed by api NAME, so an app with an analytics api it touches on one page does not open it on every page.
377
+
378
+ Verified on the same page that showed 6: **0 sockets** with `'lazy'`, and the Todos page still 5.
379
+ - **@voltro/runtime, @voltro/cli, @voltro/database** — **`defineSubscriber({ once })` — run a handler once per change across the fleet, instead of once per replica.**
380
+
381
+ A subscriber binds to the change stream on every api instance, so one `INSERT` behind three replicas calls the handler three times. That is the right default and stays the default: a handler that refreshes a search index, warms a local index or drops a process-local cache entry *has* to run everywhere, and a fleet-wide gate would leave every other replica stale. It assumes the handler is idempotent.
382
+
383
+ It is the wrong default for an EFFECT — a notification, a mail, a webhook, a payment — because there is nothing to make idempotent: the effect IS a write, so each run produces another one. `SubscriberDefinition` had no way to say so, while the primitive rubric recommended a subscriber for exactly that job.
384
+
385
+ ```ts
386
+ export default defineSubscriber({
387
+ table: 'absence_requests',
388
+ on: ['insert'],
389
+ once: (event) => String((event.new as { id?: string } | null)?.id ?? ''),
390
+ handler: notifyApprovers,
391
+ })
392
+ ```
393
+
394
+ The key is claimed in the new `_voltro_change_claims` table — `insertIgnore` on a `UNIQUE(scope, key)`, the same INSERT-wins arbiter the cron scheduler uses for a (schedule, bucket) firing — and exactly one replica wins it. The scope is the subscriber's file id, so two subscribers watching one table never lock each other out.
395
+
396
+ Three things the type states rather than leaves to be discovered:
397
+
398
+ - **The key must tell two genuine changes apart.** A row id is enough for `insert` and `delete`. It is not enough for `update`: two edits to one row produce the same id, and the second is dropped as a duplicate. Use `` `${id}:${updatedAt}` ``. - **AT MOST once, not exactly once.** The claim is taken before the handler runs, so a replica that wins and dies takes the event with it. A claim that cannot be written at all is taken by nobody — fail-closed, because `once` promising "at most once" is what makes it worth having. Both are loud in the log; neither is retried. - **Which coordination each subscriber got is in the boot log**, because the two behaviours differ by a factor of the replica count and were otherwise indistinguishable:
399
+
400
+ ```
401
+ subscriber: registered table=absence_requests on=["insert"] once=fleet
402
+ subscriber: registered table=posts on=["insert","update"] once=per-replica
403
+ ```
404
+
405
+ `_voltro_change_claims` is created for every sql app and swept after an hour (`VOLTRO_CHANGE_CLAIMS_TTL_HOURS`). It rides the declarative differ, so `voltro db apply` and a `voltro dev` boot both create it, on every dialect.
406
+ - **@voltro/cli** — **`voltro doctor` now asks the question a subscriber's author is the only one who can answer: should this effect repeat on every replica?**
407
+
408
+ `store.onChange` is a broadcast. That is CORRECT for a reader — a cache drop, an index refresh, a live query must run everywhere — and a multiplier for an effect, because there is nothing to make idempotent: the effect IS the write, so each run produces another one. One `INSERT` behind two replicas writes two notification rows; with a broadcast bus in front, four.
409
+
410
+ `subscriber-effect-without-once` fires when a `*.subscribe.ts` handler writes (`ctx.store.insert` / `update` / `upsert` / …), publishes (`ctx.publish`), or calls a `notify` / `sendWebhook` / `sendMail`-shaped helper, and the subscriber declares no `once:`. Advisory like every rule in that scan — it prints, it never fails a build, because `once:` on a READER would silence it on every replica but one, and only the handler's author knows which of the two they wrote.
411
+
412
+ It reads the handler through the AST, for two reasons at once. `once:` and the handler sit in ONE object literal, so "this file mentions `once`" is not the question. And the effect has to be found inside the handler under whatever name it gave its context parameter — `(event, ctx)`, `(event, { store })`, or a `handler: notifyApprovers` naming a function in the same file, which is the form the primitive's own doc comment teaches. A handler IMPORTED from another module is not judged: its body is not in the file being read, and a finding about code the rule never opened would be a guess wearing a file path.
413
+
414
+ **And `mutation-tail-effect` no longer fires on the file that took its advice.** That rule matches a `notify(...)`-shaped call in any file with an `export default` — which a `*.subscribe.ts` has. So a subscriber calling `notify(...)` was told to move its effect into a subscriber: our own two rules disagreeing on one file, which is how a whole section of the report gets skipped. Detected by the CALL (`defineSubscriber` / `defineReaction`) rather than the filename, for the reason the adoption check already exists — a file can adopt the primitive under any name.
415
+ - **@voltro/protocol, @voltro/database, @voltro/runtime, @voltro/cli** — **`?replica=<id>` — ask ONE named replica, through the one you can reach.** The answer comes back with that replica's `origin`, process-scoped: the proxy does not launder whose answer it is.
416
+
417
+ **The address comes from the shared store, not from membership** — and that is a correction to the obvious design. Membership rides the broadcast bus, so peer addressing built on it works only for an app that configured one, and the operator who most needs to reach a specific pod is not reliably the one who did. The row already exists, every replica already writes it, and the database is already the thing that must be up. `_voltro_replica_observations` gained a `reachableAt` column.
418
+
419
+ **An endpoint that fetches a URL on request is an SSRF primitive unless it is built not to be.** Four rules, each closing a distinct way this could become one, and each with a test:
420
+
421
+ - **The caller names an ID, never a URL.** The address is resolved from a set we wrote; an unknown id is a `404` and no request leaves the process. "Unknown replica" and "published no reachable address" give the same message, because distinguishing them would tell a caller which ids exist. - **A proxied request carries a hop header and is always answered locally**, so `?replica=a` on A pointing at B pointing at A cannot cycle. The forwarded URL also has `replica` stripped and `scope=process` forced. - **The peer call forwards the caller's token and adds nothing.** A replica is not a more privileged caller than the human who asked. - **Only reads are addressable.** `?replica=` on `/invoke`, `/seeds/run`, `/migrations/rollback` or `/agent/call` is refused before any lookup.
422
+
423
+ A peer that does not answer inside a short deadline becomes a `504` naming it: a diagnostic that hangs is worse than one that says no.
424
+
425
+ **A declared address and a fallen-back one are different facts.** An unset `POD_IP` falls back to `127.0.0.1`, which is a shrug — recorded as NOT reachable, and no peer tries it. `VOLTRO_INSPECT_ADVERTISE_HOST` declares one, including `127.0.0.1` when the peers really are on this machine. This is the same posture the framework takes everywhere: we do not second-guess a declaration, and we do not treat a fallback as one.
426
+
427
+ Measured between two real replicas (`scripts/fleet-observation-e2e.mjs`): A answers for B, B's identity survives the hop, an unknown id is refused with no outbound request, and a mutating endpoint is refused with `400`.
428
+
429
+ **And the consumer that nearly shipped broken.** Both dashboards unwrap the envelope in their single fetch helper; the CLI's `inspectFetch` — which thirty-odd subcommands read through — was missed. `voltro cluster status`, `voltro logs`, `voltro schedules` would each have read `undefined` off an envelope and printed an empty table. Found by asking what ELSE reads these routes, not by a failing test, which is why the seam now has one: the payload comes out, the envelope is kept so a command can say "1 of 3", an answer that predates the envelope passes through unchanged, and a payload that merely HAS a `data` key is not mistaken for one.
430
+ - **@voltro/cli** — **`/_voltro/inspect/stream` events carry `origin`.**
431
+
432
+ A live SSE stream is the same defect as an unlabelled `/logs` response, except it keeps producing it: a viewer watching a tail on a three-replica fleet sees one third of it, continuously, and the connection landed on whichever replica the load balancer chose.
433
+
434
+ On **every event**, not on a handshake — because a consumer that connects late never receives a handshake. A reconnect, a second browser tab, a `curl` piped into `jq` all read the buffer, and a handshake they never saw would leave every buffered line unattributed. That is the assertion the test pins.
435
+
436
+ `ts` is that replica's clock. Two origins must not be ordered by it, which is the same rule `events.origin` already states as "serials are only comparable within it".
437
+ - **@voltro/devtools-ui** — **A Fleet panel, in both dashboards.** `FleetPage` renders what every replica published about itself — the self-hosted DevTools wire it over HTTP, the hosted customer console over the cloud RPC proxy, from one shared component.
438
+
439
+ **It renders THREE populations, and the two after the first are the point.** A page that shows only the replicas which ANSWERED is worse than no page: the reader now believes they asked everybody. So the silent replicas get their own section rather than being omitted ("not shown" and "not there" look identical and mean opposite things), and the stale ones are shown WITH their age (filtering them makes a partial answer look complete; leaving them unmarked presents old numbers as current). A mixed-version note appears when the responders disagree, because a rolling deploy means the numbers span two shapes.
440
+
441
+ The completeness banner is a RATIO — "3 of 5 replicas answered" — not a count. A count invites the reader to believe that is the fleet.
442
+
443
+ **Two guards, one per dashboard, because neither repo can see the other.** Each fails when a page the shared package exports has no nav entry in that dashboard, with a declared exemption list whose stale entries also fail. The asymmetry is the argument: the self-hosted dashboard is opened daily and the customer one is opened when something is wrong, so a panel missing from the second fails in the direction nobody notices.
444
+
445
+ **Measured in a real browser** (`voltro-devtools/scripts/fleet-panel-browser-check.mjs`): two replicas behind one dashboard, the panel renders BOTH, the nav link resolves (a page reachable only by typing a URL is not a panel), and the console is clean. That check immediately earned itself — it caught a `<div>` inside `CardDescription`'s `<p>`, invalid HTML that React reports only in a browser and that the page's own jsdom suite passed over.
446
+
447
+ The devtools-ui catalogue also gained an en/de parity test. English is the fallback, so a missing German string does not crash — it renders English in a German console, which looks like a working UI rather than a hole.
448
+ - **@voltro/cli, @voltro/runtime** — **Four serving changes: pre-compressed assets, a CDN prefix, a keep-alive that survives a proxy, and a preconnect for a cross-origin api.**
449
+
450
+ **Pre-compression (automatic).** `voltro build` writes `.br` (quality 11) and `.gz` beside every content-hashed asset over 1 KB; `voltro start` serves the variant when the client accepts it. Before, every hit compressed from scratch — measured on one 321 KB chunk, three requests each:
451
+
452
+ | | time | bytes | |---|---:|---:| | compressed per request | 5.6 / 5.0 / 4.6 ms | 100 665 | | pre-compressed | 1.6 / 1.7 ms | **86 083** |
453
+
454
+ Faster and smaller at once, because a build can afford q11 where a per-request path cannot (the runtime uses q4 precisely so it never stalls a response). Only hashed assets get variants: a stale `.br` beside a changed original is a corrupted response rather than a slow one. The `ETag` is computed over the UNCOMPRESSED file and passed through, so brotli, gzip and identity share one tag — the invariant `httpResponseWrite.ts` states, which hashing the variant would have broken.
455
+
456
+ **`web.assetPrefix`.** Becomes vite's `base`, so every emitted URL is written with the prefix at build time. Without it an app with a single `ssr` route serves every byte of its bundle from the container — `voltro static`, the documented cost-offload, only applies to an app that is entirely static. Verified on a fixture: all ten asset URLs in the shell AND in every pre-rendered page carry the prefix.
457
+
458
+ **`http.keepAliveTimeoutMs`, default 72000.** Node hangs up an idle keep-alive connection after **5 seconds** — confirmed on a running server (`Keep-Alive: timeout=5`) — while nginx holds one for 75s and ALB/Envoy for 60s. The proxy then sends onto a socket the server is closing and answers 502. Rare per request, certain over time, and invisible in testing. `headersTimeout` is derived above it and a declared value at or below `keepAliveTimeout` is RAISED rather than applied: node measures it from connection start, so honouring it would destroy healthy connections. Applied on both serving surfaces from one resolver. Verified: `Keep-Alive: timeout=72`.
459
+
460
+ **`preconnect` for a cross-origin api.** When an api's `wsUrl` is on another host the shell carries `<link rel="preconnect" … crossorigin>`, so the handshake overlaps the bundle download instead of following it. Same-origin apis emit nothing — the browser already has that connection, and a redundant hint costs a wasted socket. `crossorigin` is required: without it the warmed connection is anonymous and the credentialed one the socket needs is a second handshake.
461
+
462
+ **`web.sourcemaps: 'hidden'`.** Emits `.map` files with no `//# sourceMappingURL` comment. `plugin-sentry` reads `SENTRY_RELEASE` explicitly "for release health AND source maps" and there was no way to produce any, so every production stack trace was minified — from an integration advertising the opposite. Off by default, and named for what it does rather than being a boolean.
463
+
464
+ **And `voltro start` now refuses to serve a `.map` at all**, whether or not one is on disk. The docs say to upload the maps and delete them before the image is built, and "say" is not a mechanism: a hidden map is undiscoverable but perfectly REACHABLE — its URL is the chunk's own name plus `.map`. One forgotten deploy step would publish the app's source. 404, not 403, because a 403 confirms the file exists. Red-verified: with the refusal removed, the same request returns **200 and the map's contents**.
465
+ - **@voltro/i18n, @voltro/cli** — **`<LocaleSwitcher>` now ships unstyled from `@voltro/i18n`, and `voltro doctor` reports the failure that made it necessary.**
466
+
467
+ Counted across the shipped templates: 16 declared `@voltro/ui-shadcn`, and **13 of them never imported `@voltro/ui-shadcn/tokens.css`**. The only kit component they used was `LocaleSwitcher`, which is `h-9 rounded-md border border-input bg-transparent px-2 text-sm shadow-xs …` and nothing else. Tailwind v4 emits a utility only when a CSS entry declares it, and the kit deliberately does not import its own stylesheet (the app owns its CSS entry) — so every one of those class names referred to a rule that did not exist. The control rendered as a bare `<select>` with dead `class` attributes, in templates whose own docs say they do not use the kit.
468
+
469
+ Nothing could have caught it: `voltro build` succeeds (a missing utility is absent bytes, not an error), `tsc` succeeds (the import is real), and the page renders.
470
+
471
+ Two changes:
472
+
473
+ - **`@voltro/i18n` exports `LocaleSwitcher`** — the same behaviour (writes the `voltro:locale` cookie, reloads, `onChange` can suppress the reload) as a native `<select>` you style yourself. It belongs here for the same reason `LOCALE_COOKIE` already moved here: an app on the framework's i18n and not on the kit had no way to reach it. `@voltro/ui-shadcn`'s styled version is unchanged. - **`voltro doctor` reports a kit rendered with no stylesheet** — advisory, and it names the offending files. Quiet when the app imports `tokens.css`, quiet when the app declares Tailwind itself, and quiet on a `import type` (which emits nothing and therefore cannot produce a class attribute).
474
+
475
+ The 13 templates now import the unstyled control and no longer declare `@voltro/ui-shadcn` at all — which also drops that package's `shiki` dependency from every one of them.
476
+
477
+ ### Changed
478
+
479
+ - **@voltro/content, @voltro/ui-shadcn, @voltro/cli** — **The production bundles carried 308 syntax grammars and three cloud SDKs for apps that asked for none of them.**
480
+
481
+ Both shiki callers already restricted their languages correctly — `@voltro/content` to nineteen, `@voltro/ui-shadcn` to eighteen — at RUNTIME. A bundler cannot read a runtime list, and the `shiki` barrel maps all 700+ of its languages to their own dynamic import, so every one was emitted as a chunk. Measured, by intersecting the emitted filenames with `@shikijs/langs` + `@shikijs/themes`: **6.67 MB across 308 files, in BOTH the api serve bundle and the web start bundle**. In a browser bundle it is the same set: an app rendering one `<HighlightedCode>` made 308 chunks reachable.
482
+
483
+ Both now build from `shiki/core` with the grammars and themes imported by name. Every specifier stays dynamic and node-gated — `shiki` is an optional dependency and `@voltro/content` is isomorphic, so a static import would both break an app that never renders markdown and put the highlighter in the browser graph of anything importing `renderMarkdown`.
484
+
485
+ The same shape, one layer out: the api serve bundle also carried the Azure Blob SDK (604 KB) and `@react-email/render` + `react-dom/server` (972 KB) for a fixture that declares one plugin and neither storage nor mail — they arrive through `@voltro/cli`'s own dependencies on `plugin-storage` / `plugin-mail`. Each is already reached by a dynamic import inside its plugin and is an optional peer of it, so each joins the runtime-external list beside `ioredis` and `nodemailer`: an app that configured the provider resolves it from its own `node_modules` at boot, one that did not never ships it.
486
+
487
+ Measured end to end, on the reference fixtures:
488
+
489
+ | | before | after | |---|---:|---:| | api serve bundle | 26.9 MB / 535 files | **5.72 MB / 138** | | web start bundle | 13.59 MB / 427 files | **1.48 MB / 39** |
490
+
491
+ Both are pinned now (`bundle-budget.mjs --artifacts`), in bytes AND in file count — 427 is a number somebody notices, where "13.6 MB" reads as "it is a bundle".
492
+
493
+ Highlighting is unchanged and verified through a real build: the docs site's pre-rendered pages still carry `class="shiki shiki-themes github-light github-dark-dimmed"`.
494
+ - **@voltro/cli** — **The artefacts that exist to collapse a cold boot were shipped unminified — and nothing enabled node's code cache.**
495
+
496
+ `VOLTRO_BOOT_TIMING=1` says where a boot goes, and the answer is the phase the bundles were built for: `modules` (node init + loading the precompiled bundle) is **46 %** of a `voltro start` and **65 %** of a `voltro serve`. V8 parse time tracks bytes, and neither `webStartBundle.ts` nor `apiBuild.ts` set `minify`, while vite leaves an SSR build unminified by default.
497
+
498
+ Both are on now, plus `enableCompileCache()` in the launcher. Measured on the reference fixtures, five fresh processes each, median:
499
+
500
+ | | before | after | |---|---:|---:| | `voltro start` boot | 166 ms | **83 ms** | | `voltro serve` boot | 287 ms | **222 ms** | | start bundle | 13.59 MB | 11.75 MB | | serve bundle | 26.9 MB | 18.25 MB | | `dist/server/ssrEntry.js` | 1.91 MB | 0.85 MB |
501
+
502
+ `keepNames: true` is not optional and is the one thing to preserve if you touch this: Effect's tags, error `name`s and the boot-refusal marker (`bootRefusal.ts`) are compared as STRINGS across the bundle boundary, and a mangled class name turns a precise refusal into an anonymous one. It costs a few percent of the saving and buys back every diagnostic the bundle exists to keep.
503
+
504
+ The compile cache is only enabled when `NODE_COMPILE_CACHE` is unset, so an operator's directory always wins. In a scale-from-zero container the OS temp dir starts empty, which is why the shipped standalone Dockerfiles point the variable at a directory the image BAKES during its boot smoke — the run that was already happening.
505
+
506
+ ### Fixed
507
+
508
+ - **@voltro/database** — **Two replicas booting at once against a schema with work to do killed one of them.**
509
+
510
+ `applyPlan` takes the migration advisory lock, so two writers cannot execute at the same time. What it did not do was ask again once it held the lock. Both replicas plan against the same live state, then queue; the winner applies, and the loser wakes holding a plan for a database that no longer exists:
511
+
512
+ ```
513
+ ═══ applier: statement failed (op=add-check) ═══
514
+ statement: ALTER TABLE "actors" ADD CONSTRAINT "actors_kind_check" …
515
+ db.message: constraint "actors_kind_check" for relation "actors" already exists
516
+ dev server exited — supervisor stopping exitCode: 1
517
+ ```
518
+
519
+ A classic time-of-check/time-of-use: the lock serialised the apply and did not protect what the apply rests on. It self-heals — the pod restarts and finds the schema applied — so what it looked like in production was one crash per replica on every deploy against a schema that had work to do, on a plan that was correct when it was made. A cold fleet start is exactly when every replica has work to do.
520
+
521
+ The first thing under the lock is now `ctx.replan` — the same hook the convergence proof uses at the other end, required for the same reason (only the caller knows the planner inputs). Everything downstream reads the re-planned set: the operations, the resume ledger's comparison, and the recorded fingerprint. Using the stale one for any of those would record that a replica applied work it did not.
522
+
523
+ Where the plan is already current — the ordinary case, nobody raced — the re-plan returns what was passed in and costs one introspection. `applyPlan` is not called at all for an empty plan, so that cost lands only where there was real work.
524
+
525
+ A plan that becomes blocked under the lock is refused as loudly as one that started blocked; the pre-lock check judged a different set.
526
+ - **@voltro/cli** — **A proven change-stream gap now drops the cache, not only the live queries.**
527
+
528
+ Re-running every live subscription repairs what a subscriber sees, and that is the half you look at. Cache invalidation rides `store.onChange` — so while the stream was down, nothing was invalidated — and the dispatcher's recompute re-seeds only the entries a LIVE subscription owns. Everything else keeps serving pre-gap rows until its TTL: a `ctx.cache` read, an ISR page, a cached query nobody is currently subscribed to. On a replica that has just announced, in its own log, that it knows it was behind.
529
+
530
+ The recovery now evicts every registered table before refreshing. Blunt for the same reason `refreshAll` is blunt — we do not know which tables the lost changes touched, and guessing narrower is how the silent staleness comes back. Cache first, then the queries: the recompute reads the store directly and writes its result back, so dropping afterwards would throw the fresh rows away again.
531
+
532
+ Both boot paths, through the shared builder, with the parity asserted.
533
+ - **@voltro/cli** — **`voltro start` sets `Cache-Control`. It sent none at all.**
534
+
535
+ Measured against a running production server, on a chunk whose FILENAME carries its content hash:
536
+
537
+ ```
538
+ $ curl -D - http://localhost:5399/assets/index-7N08IhkU.js
539
+ HTTP/1.1 200 OK
540
+ content-type: application/javascript
541
+ vary: Accept-Encoding
542
+ content-encoding: br
543
+ etag: W/"4bff20f74ba2a65fde4443acd7ed80b6"
544
+ ```
545
+
546
+ No `cache-control` and no `last-modified`. RFC 9111 derives heuristic freshness from `Last-Modified`, so with neither header a browser has nothing to reason about and revalidates. The reference fixture's first load is an entry plus nine `modulepreload`s — ten conditional round-trips before the page is interactive, on every visit, for files that by construction can never change. A CDN or reverse proxy in front of the container could cache nothing at all, for the same reason.
547
+
548
+ The framework already knew the rule: `plugin-storage` serves its public objects with `public, max-age=31536000, immutable` and `plugin-atlassian` its avatars. Only the arm serving our OWN chunks had no policy.
549
+
550
+ Now, from one place (`staticCachePolicy.ts`, so the arms cannot disagree): content-hashed assets get a year and `immutable`; anything else out of `public/` gets an hour; a pre-rendered page gets `max-age=0, must-revalidate`, which the existing ETag answers with a `304`.
551
+
552
+ Nothing gets an `s-maxage` by default — a shared cache holding HTML past a deploy serves the previous build's asset URLs, and there is no purge hook to fix that. An app that owns its CDN opts in through the new `http.cache` block (`htmlSMaxAgeSeconds`, `isrShared`, and both lifetimes; `immutableMaxAgeSeconds: 0` turns the immutable header off entirely).
553
+
554
+ The hash detector is the part with an edge: it requires `/assets/` AND a `-<6..12 chars>` suffix, so a hand-named `page-2.js` is never frozen for a year — a mistake that cannot be undone without renaming the file.
555
+ - **@voltro/plugin-row-history** — **`timing: 'post-commit'` recorded one history version per replica, with different version numbers.**
556
+
557
+ The in-transaction timing is safe by construction: the writing replica records the entry inside its own transaction and the tap returns early. Post-commit has no such writer — on a `changeScope: 'fleet'` store the injected event reaches EVERY replica and each one calls `recordChange`.
558
+
559
+ It did not surface as a conflict. `recordChange` numbers a version as `MAX(version) + 1` and derives the row id from it, so two replicas both computed version 1, one won the primary key, and the loser's RETRY re-read MAX, got 2, and appended a SECOND entry for the same change. That retry exists for a genuine concurrent write to the same row and cannot tell that case from this one.
560
+
561
+ Measured with the gate removed: three replicas, one change, versions `1, 2, 3`; two replicas, three changes, `1, 2, 3, 4, 5, 6`. Not merely doubled — mis-ordered, and `selectAsOf` / `sortHistory` / `diffVersionRows` all read `version`. A duplicate can be deduped; a wrong order cannot even be detected from the data.
562
+
563
+ The tap now claims each change fleet-wide before recording, through the same arbiter behind `defineSubscriber({ once })`. The key names the CHANGE, not the row: a row id would collapse two genuine edits to one row, and for a history trail a silently missing version is the worse direction.
564
+
565
+ Nothing to configure. `timing: 'in-transaction'` is unaffected — it never had this.
566
+ - **@voltro/sql-postgres, @voltro/database, @voltro/cli** — **A postgres replica no longer goes permanently deaf when its LISTEN connection drops.** Under `changeStrategy: 'cdc'` — the multi-replica default on postgres — the CDC consumer holds one dedicated connection. `@effect/sql-pg` registers a no-op `client.on('error')` on it, so when that connection dies the socket error is swallowed, the stream neither fails nor ends, and the fiber draining it stays alive forever. Nothing throws. Nothing is logged. No fiber dies.
567
+
568
+ Measured against a live server: kill the backend holding the LISTEN, write from another connection, wait twenty seconds — nothing arrives. Every subsequent change from every other replica is lost too, until the process restarts. A failover, a proxy recycling an idle socket, an admin `pg_terminate_backend`, or the database pod restarting all produce it, and none of them touch the app process, which is exactly why the app process did not notice.
569
+
570
+ The consumer now carries a watchdog. It cannot wait for an error — there is none — so it probes: after silence on the channel it sends a `pg_notify` through the pool and requires the echo back on the LISTEN stream. Any traffic counts as the answer, including another replica's probe, so a busy channel never pays for one and a fleet pays roughly one probe per idle window however many replicas it has. An unanswered probe means the connection is dead; the consumer re-opens it, retrying with backoff, and does not declare success until it has heard its own heartbeat come back.
571
+
572
+ **And the reconnect declares a gap**, which is the half that makes it a recovery rather than merely a pulse: postgres queues nothing for a listener that is not there, so every change written during the outage is gone. Stores expose that through a new optional `DataStore.onChangeStreamGap`, and both `voltro dev` and `voltro serve` wire it to the same refresh the broadcast bus's gap already used — re-run every live query, which is safe and complete because a query is idempotent.
573
+
574
+ `VOLTRO_CDC_HEARTBEAT_MS` (default 20000) and `VOLTRO_CDC_HEARTBEAT_TIMEOUT_MS` (default 10000) tune it.
575
+
576
+ `apiSurface: compatible`: `PostgresDataStore`'s constructor gains a TRAILING OPTIONAL parameter (`cdcLiveness`), which the golden renders as a changed line. Every existing call still compiles — the store is built through `makePostgresDataStore` in any case.
577
+
578
+ The mysql binlog reader has had an error-driven reconnect and a watchdog for a silently-dead stream for some time. This is the postgres half of the same idea, on the dialect the documentation steers people to.
579
+ - **@voltro/plugin-broadcast, @voltro/cli** — **A change delivered by the database was re-published onto the broadcast bus, and the amplification was quadratic.**
580
+
581
+ On a dialect with a native change transport — postgres LISTEN/NOTIFY, mysql binlog — the store injects every change on EVERY replica; that is what makes the transport cross-instance in the first place. `@voltro/plugin-broadcast`'s outgoing listener then published those injected events again, under its own replica's origin, which is not own-origin for any peer. So every peer injected the change a second time.
582
+
583
+ Per change, with N replicas: N deliveries from the transport, N publishes onto the broker, and N(N-1) more injections from the peers — **N² local deliveries**. Every consumer of the change stream paid it: every `*.subscribe.ts` handler, every live-query wake, every plugin tap, every cache invalidation. At two replicas a subscriber's handler ran four times for one `INSERT`, twice per instance — and the per-instance half needs no cluster to reproduce, which is why it does not read as a clustering problem.
584
+
585
+ The suppression required the bus to be mid-inject (`injecting && …`), which only ever covered the bus's own echo. It is provenance alone now: an event stamped `origin: 'injected'` reached this process through some transport, and forwarding a transport delivery to a second transport is the amplification. A local publish that states `origin: 'inline'` — `publishReactivity` does — is still published, so reactivity channels keep crossing replicas.
586
+
587
+ The boot banner said the same thing the code did. It used to read `both paths active (own-origin skip dedups)`; it now names what each path carries:
588
+
589
+ ```
590
+ reactivity: native LISTEN/NOTIFY (postgres) carries table changes;
591
+ @voltro/plugin-broadcast (redis) carries reactivity channels
592
+ ```
593
+
594
+ Nothing to change in an app. If you run postgres or mysql with a broadcast plugin, the duplicate deliveries stop on upgrade.
595
+ - **@voltro/cli** — **`voltro db plan --json` and `voltro db drift --json` were silently truncated when piped.** `fs.writeSync` is not "write this"; it is "write as much as the fd accepts right now, and return how much that was". On a file that is everything — which is why `> plan.json` worked and every manual check passed. On a pipe the kernel takes one pipe buffer, 64 KiB, and the rest is simply not written.
596
+
597
+ A plan crossing 64 KiB therefore reached `| jq`, or a CI step capturing the command, as exactly 65 536 bytes: valid JSON up to the cut and a parse error after it. It reads like a malformed plan and it is a malformed read — and the documented production route is to review that JSON and apply it.
598
+
599
+ The line it replaced carried a comment saying `writeSync` "always flushes", written as the fix for the previous version of this same bug (`console.log` to a non-TTY is block-buffered, and `process.exit` dropped the buffer, so `--json` emitted *nothing*). That fix was right about `console.log` and wrong about its replacement, turning "nothing on a pipe" into "the first 64 KiB on a pipe" — the more dangerous of the two, because an empty output is noticed at once and a truncated one is noticed by whoever parses it later.
600
+
601
+ `writeAllSync` loops over partial writes. Its test spawns a child with a real pipe, because on a file the defect does not exist.
602
+ - **@voltro/plugin-search** — **The search panel could over-count a fleet's sync stats, because the plugin derived its replica id instead of using the one it was handed.**
603
+
604
+ `_voltro_search_stats` keeps one row per replica and aggregates on READ: SUM under `changeScope: 'local'` (each replica counted a different slice) and MAX under `'fleet'` (every replica received the full stream, so each row is already a fleet-wide count — summing three of those is the 3× inflation the design exists to avoid).
605
+
606
+ That only works if the rows are actually per replica. `dataStoreStatsStore` takes the id as a parameter and the plugin never passed one, so it fell back to the process global — which is correct in production and made the identity undiscoverable to the plugin's own configuration. The id now comes from `PluginBindContext.instanceId`, the same value the event bus stamps and the membership registry announces under, and the reason the context carries it.
607
+
608
+ Found as a red test rather than by reading: the fleet-stats case simulates three replicas in one process, which it used to do by setting `VOLTRO_REPLICA_ID` around construction. Once process identity became memoised — one process, one identity — all three "replicas" shared an id, wrote to one row, and the panel reported 3 where the case asserts 1. The property was right and the simulation had become impossible to express; taking the id from the context makes it expressible again, through the same seam production uses.
609
+ - **@voltro/cli** — **`voltro build` could not produce a serve bundle for any app declaring `@voltro/plugin-sentry`** — 35 errors, all `No loader is configured for ".node" files`, and a `fatal: serve bundle build FAILED — refusing to ship a bundle-less image`.
610
+
611
+ `@sentry/profiling-node` reaches `@sentry/node-cpu-profiler`, which `require()`s a per-platform `.node` binary. It is the strongest possible case for the native-leaf list — BOTH of that list's reasons at once, a compiled binding that cannot be inlined AND a `await import(…)` behind a `profiling: true` flag that already degrades to a warn when absent — and it was simply never added.
612
+
613
+ **The second half is why adding the leaf alone would not have fixed it.** The runtime shim resolves a leaf from a chain of roots: the declared SQL drivers, then `@voltro/cli`, then the app root. An optional peer lives under the plugin that dynamic-imports it, and pnpm strict does not hoist it — so `@voltro/cli` covers the peers of the plugins the CLI itself depends on (mail, storage) and nothing else. `@sentry/profiling-node` is an optionalDependency of `@voltro/plugin-sentry`, which the CLI does not depend on, so no root in the chain could have found it at runtime.
614
+
615
+ The chain now includes **every `@voltro/plugin-*` the app declares**, derived from its `package.json` rather than listed. A hard-coded plugin list is the shape that produced the gap: correct until the next plugin ships an optional peer, and silent when it does.
616
+
617
+ Found by the first `--build` run of the template harness. `voltro test` transpiles and `tsc --noEmit` typechecks; neither runs a build, so an unbuildable template stays green in both.
618
+ - **@voltro/protocol, @voltro/cli, @voltro/plugin-ratelimit** — **Two defaults that are correct for one process and silently wrong for several now say so.** Neither default changes — a process-local store is right on one process, and demanding Redis to run a single instance would be worse. What was missing is the deployment noticing.
619
+
620
+ - **The rate limiter.** `rateLimitPlugin` defaults to a process-local counter, so `100/min` on five pods is 500/min. That is not a performance detail: a limiter is usually what stands between an endpoint and abuse, which makes this the one default whose silent multiplication has a security consequence. - **Read-your-writes.** The RYW position store defaults to a process-local Map. With `DB_REPLICA_URLS` set, read-your-writes then holds only when the next request happens to land on the same pod — a user saves, the load balancer sends them elsewhere, and that pod routes the read to a lagging replica and serves the row as it was before the write. The boot line said `ryw policy 'fallback'` as though the policy were in force.
621
+
622
+ Both warn on the same signal the reactivity audit already used (`replicaEvidence`: `POD_NAME`, `FLY_ALLOC_ID`, `K_REVISION`, … and an explicit `REPLICA_COUNT` as a declaration in both directions), and each names the way out.
623
+
624
+ `replicaEvidence` moves to `@voltro/protocol/identity` — it began in the CLI, a plugin cannot import the CLI, and copying twenty env names is how one question acquires three answers. It is still exported from its old place.
625
+ - **@voltro/cli** — **The outbox runner's shutdown could settle the wrong pass.** `close()` awaits the in-flight drain rather than truncating a delivery mid-flight — that is the half of the shutdown gap a `clearTimeout` cannot cover, and it was already tested. What it awaited was `inFlight`, which `kick()` overwrote on every call including one that immediately returned because a pass was already running. So `close()` could await a promise for a pass that never ran while the real one was still inside its handler, and the next step of the real shutdown sequence is `store.close()`.
626
+
627
+ The window only opened when a second kick landed inside the first pass, which is why it survived: it took adding one round trip to the drain to widen it enough for the existing settle test to catch. An early-returning pass now hands back the pass it deferred to, so `inFlight` always names real work.
628
+
629
+ Found by a test that was already asserting the right thing and had been passing for the wrong reason.
630
+ - **@voltro/protocol, @voltro/runtime, @voltro/cli, @voltro/voltro** — **A peer that restarted stopped being heard by reconnecting clients.** `EventEnvelope.origin` says what it is — *"Publishing instance. Serials are only comparable WITHIN one origin"* — and both boot paths handed it the replica NAME. A name survives a restart; a serial does not. A StatefulSet pod keeps its `POD_NAME` and `VOLTRO_REPLICA_ID` is stable by definition, so a restarted peer publishes serials 1, 2, 3… under an origin whose watermark still reads 500.
631
+
632
+ Two silent losses follow from that one stale number. The watermark never advances, so a reconnecting client is told it missed nothing; and the resume replay filters by `n > lastSeen`, so the new process's events are dropped from the replay entirely. The peer is publishing normally the whole time.
633
+
634
+ The event bus now keys on `instanceId()` — `<replicaId>@<startedAt>.<nonce>`, newly exported from `@voltro/protocol/identity`. It carries the replica name as its prefix, so correlating the subsystems across pods still works.
635
+
636
+ `apiSurface: compatible`, and it covers a second thing: regenerating the goldens caught up drift the fleet-observation work left in the `@voltro/voltro` AGGREGATES, which are re-exports and so do not regenerate when their source package does. The one changed line there is `checkFrameworkCompat`, whose `runningVersion` parameter WIDENED to `string | undefined` and whose success result gained an optional `unverified`. A widened parameter accepts every call that compiled before; an added optional field breaks no reader.
637
+
638
+ The membership registry deliberately keeps the NAME: it detects a restart by comparing `startedAt` under a stable id, and a per-process id would turn every restart into a join plus a silent leave.
639
+ - **@voltro/cli, @voltro/database** — **`_voltro_idempotency` grew without bound, and its own documentation said it did not.**
640
+
641
+ The table's doc comment claimed "a periodic sweep / lazy-TTL drops rows past their window". The lazy TTL is real and fires only when the SAME key is claimed again — and an idempotency key is used once by definition, so the row it leaves behind is never read and never deleted. There was no periodic sweep at all: the table was the one member of its family with no entry in the retention registry.
642
+
643
+ It has one now, and the TTL is a FLOOR rather than a setting that can be turned down. A record dropped while still inside the app's own dedup window would let the duplicate request it exists to stop execute a second time, so `VOLTRO_IDEMPOTENCY_TTL_HOURS` may lengthen the window and may not shorten it below the app's `idempotency.ttlMs` plus a clock-skew margin. When it asks for less, the floor wins and the boot says so — a silently-ignored setting is worse than a refused one.
644
+
645
+ The reaction rate-limiter's slot rows used to live in this table too and now use `_voltro_change_claims`, whose window is an hour rather than the idempotency window. Two row families with different lifetimes cannot share one retention policy: the registry is keyed by table, so one table carries exactly one TTL.
646
+
647
+ Also corrected: the table is created for EVERY sql app (`when: 'always'`), not "only when `idempotency` is set in `app.config.ts`" — that is what the config gates, not what the table registry does.
648
+ - **@voltro/plugin-presence** — **`usePresence` re-announced its membership on every render, which is a write loop.** Measured on a real page against a real api, ONE page load, a fresh browser context: **~9 300 uncaught `RateLimited: presence.heartbeat` pageerrors in 3.5 seconds** — about 2 700 per second, and the same rate of mutations arriving at the server. The 60/min rate limiter was the only thing standing between this and an unbounded write loop.
649
+
650
+ `meta` sat in the join effect's dependency array, and the documented way to call the hook is an inline object:
651
+
652
+ ```tsx
653
+ usePresence('room', { key: me.key, meta: { name: me.name } })
654
+ ```
655
+
656
+ which is a new identity every render. So: leave → join → roster push → re-render → leave → join → … The hook already refd its two mutations for exactly this reason and left the one caller-supplied value in.
657
+
658
+ `meta` is refd now, so the interval always sends the CURRENT value, and the join effect is keyed on the membership identity only — a metadata change publishes immediately through a separate effect instead of tearing the membership down and re-announcing it. A serialisation failure degrades to "publish at the next beat" rather than throwing: a roster is not worth a render crash.
659
+
660
+ **Nothing in this package could have seen it.** Closing the loop needs a REAL subscription pushing a real roster back; a mocked transport re-renders once and stops. So the regression test asserts the property that BREAKS the loop — an equal-but-new meta object does not re-announce — and was falsified first: with `meta` back in the deps, two re-renders produce three heartbeats instead of one.
661
+ - **@voltro/protocol, @voltro/runtime, @voltro/cli, @voltro/plugin-billing, @voltro/plugin-search** — **One process, one identity.** `replicaId()` / `processIdentity()` from `@voltro/protocol/identity` is now the only place the framework decides which replica it is running as. It was an expression, sixteen times, in three packages, in FOUR spellings — and the spellings disagreed.
662
+
663
+ Two ignored `POD_NAME` entirely and read `HOSTNAME` alone; one read `HOSTNAME` *before* `POD_NAME`; only one honoured the explicit `VOLTRO_REPLICA_ID` override. The variants landed in different subsystems: the `HOSTNAME`-only one stamps `_voltro_schedule_runs.replicaId` and `claimedBy`, while the `POD_NAME`-first one answers `/_voltro/inspect/cluster`.
664
+
665
+ **So a single inspect response could name the same pod twice, differently.** `instance.replicaId` came from one spelling; `coordinationState.recentReplicaIds` — read back out of the schedule-run rows — came from the other. A dashboard asking "which of these is me" found itself in neither list. The doc comment on that field asserted the two were the same id; it is now true rather than aspirational.
666
+
667
+ This matters beyond tidiness: every aggregation across replicas groups by this id, and grouping by an id that depends on which subsystem wrote it is worse than not aggregating at all.
668
+
669
+ The identity says four things, because two of them were missing:
670
+
671
+ - `replicaId` is the PLACE in the fleet and survives a restart; `instanceId` carries the GENERATION and does not. Conflating them made "one pod restarted forty times" and "there are forty pods" the same number. The generation carries a nonce below the clock's resolution — two generations starting in the same millisecond would otherwise collide, and an aggregation keyed on it would merge two processes into one. - `version` is what this process runs, for the window in which a rolling deploy makes the fleet genuinely mixed. `undefined` when it cannot be determined — never a plausible-looking `0.0.0`, which two of the old resolvers returned and which compares equal to another unknown. - `reachableAt` / `reachable` record where a peer could reach this process, with loopback recorded as NOT reachable — the same distinction `resolveRunnerIdentity` already draws as `localhostRisk`.
672
+
673
+ **The framework VERSION had the same disease, with sharper teeth.** Three resolvers: two hunted for `package.json` relative to their own module, and one read `npm_package_version` — the APP's version when started through an npm script, reported as the framework's. The manifest hunt cannot work inside a bundle, where the framework is inlined and `../package.json` belongs to whatever sits there, so a bundled `voltro serve` fell into its `catch` and reported `'0.0.0'`: right under `voltro dev`, wrong in production, which is the one place nobody can go and read it out of the source tree.
674
+
675
+ And `'0.0.0'` PARSES. It reached `checkFrameworkCompat`, where every plugin declaring a `framework:` range was judged incompatible against a version nobody was running — a warning on every production boot, and a refused boot under `VOLTRO_STRICT_PLUGIN_COMPAT`. That check now treats an unreadable version as **unverified rather than incompatible**, and says so: absence of evidence is not evidence of a mismatch. `voltro build` writes the version into every server bundle's banner (one definition, three bundles — it was a repeated string literal, which is how the injection would have reached one and missed the others).
676
+
677
+ **`mode` gained `'serve'`.** An api under `voltro serve` reported `'start'`, and `voltro start` is web-only — it refuses an api with "no web app found". The readout named a command the process could not have been started by, while `/members` reported `meta: { mode: 'serve' }` for the same process: one fact, two endpoints, two answers. It is now a projection of the resolved boot path, stamped on the function the production container command actually enters (`node serveEntry.js` calls `runServe` directly and never passes through the dispatcher — stamped one level up, a bundled serve reported `'cli'`).
678
+
679
+ Measured against a real bundled production serve, not inferred: `{"voltroVersion":"0.55.0","mode":"serve"}` where it previously read `{"voltroVersion":"0.0.0","mode":"start"}`.
680
+
681
+ `scripts/check-process-identity.mjs` (CI + `pnpm gate`) fails on any second derivation, and ships a `--selftest` that classifies eight shapes — the four that were really in the tree, plus four benign reads that must not trip it.
682
+ - **@voltro/cli, @voltro/devtools-ui** — A sweep of all 31 dashboard pages in a real browser, against a running api, found four defects nothing else was looking for. None threw where a test could see it; three of them blanked a whole page.
683
+
684
+ **A "structured empty" that was not the structure.** `/_voltro/inspect/database` answered `{ migrations: [], seeds: [] }` when the app had no snapshot to give, while `DatabaseStatus` declares `dialect` and `replication` as present. The page read `status.replication.replicaCount`, threw during render, and the Database page went blank with a console trace. A structured empty exists so a reader can render it WITHOUT branching; one that omits half the structure is a differently-shaped payload wearing the word. It answers the full shape now, and the panel tolerates the short one because a customer app on an older version still sends it — a dashboard that crashes on an old app cannot be used to diagnose one.
685
+
686
+ **One endpoint, two shapes, depending on the app.** `/_voltro/inspect/metrics` answers with the runtime registry snapshot (`MetricSample[]`) for a web app and the rpc collector's aggregate (`{ windowMs, capturedAt, totalSamples, buckets }`) for an api — two unrelated types that happen to share the name `MetricSample`. The client declared the first for both, so `samples.filter` threw on every api app, during render, taking the overview down with it.
687
+
688
+ Which shape the endpoint should settle on is a wire decision and is NOT made here. `deriveMetricRows` returning nothing rather than throwing is not a decision: a derivation that cannot read its input must not take the page down.
689
+
690
+ **A 500 for "this app has no workflows".** A framework table exists only when the app declares the feature that owns it, so a workflow read on an app with no workflows fails at the driver — and three handlers turned that into `500 … query failed`. "The server is broken" for a fact that is simply "there is nothing here". They answer the endpoint's own empty shape plus an `unavailable` reason now. The classifier matches the driver message per dialect, which is not something to build a control path on and is not one: it chooses between two ways of REPORTING, and an unrecognised message falls through to the 500 that was there before — the failure direction is always the old behaviour.
691
+
692
+ **And the reason the server sends is no longer discarded.** The inspect surface answers a dev-only path with a 404 whose body says "this endpoint exists and your deployment does not mount it… this is not a missing token" — a sentence written because a deployment reported the bare 404 as unreadable. The dashboard threw it away and rendered `[inspectClient] <url>: HTTP 404`, on six panels against every production app. The CLI's own inspect client had already fixed this exact blind spot and recorded that the fix belongs in the shared helper; this is the same helper on the browser side.
693
+ - **@voltro/cli** — Two defects that produced a console error on every app page of the DevTools dashboard, found by a browser check and by nothing else — neither threw, neither changed a status code any test was watching.
694
+
695
+ **The live inspect stream did not exist under `voltro serve`.** `/_voltro/inspect/stream` was supplied by `dev.ts` and by nothing else, so the URL 404'd in production: the dashboard's log tail, its app-overview feed and the data viewer's CDC refresh all worked while you developed and were dead where it counted. The boot-path parity test had this on its EXCEPTION list, with the reason "there is no overlay" — true about the in-page dev overlay, and wrong about the surface, because the DevTools dashboard opens the same stream against whatever app is registered including a deployed one. An exception list is only as good as the reason on each line, and that line reasoned about one consumer of a surface with two. It is deleted, and the correction is written where it stood.
696
+
697
+ The stream is now mounted by ONE builder both boot paths call (`buildInspectStreamWiring`) — the authorize/replay/subscribe quartet is a security surface carrying the DNS-rebinding host guard and the token resolver, and copying that into a second path is how one copy loses a guard. Serve feeds it the channel it genuinely owns (the subscription registry, via the same snapshot builder its HTTP path uses) and tears both down on shutdown: a stream that connects and never emits is worse than the 404 it replaced, because a silent feed reads as "nothing is happening".
698
+
699
+ **The SSE proxy could only ever present its OWN token.** `EventSource` accepts no headers, so the browser cannot attach a per-app bearer the way every other inspect call does — the proxy fell through to the dashboard process's `VOLTRO_INSPECT_TOKEN`, which is the right token for an app that process minted and the wrong one for an app registered by URL. `voltro dev` mints a token per project, so that was every app, and the stream answered 401.
700
+
701
+ The token now travels as a same-origin cookie scoped to the proxy's own path, `SameSite=Strict`, cleared as soon as the stream opens — not a query parameter, because a bearer in a URL lands in every access log that touches it. It is moved into an Authorization header by the proxy and never reaches the target as a cookie. The precedence (caller's header → stream cookie → this process's own, loopback only) is resolved in ONE function both boot paths call; it had been written out in both, which is how a rule of this kind starts to differ.
702
+
703
+ **And a poll that ran before it knew what it was polling.** The app overview guarded its ISR-cache poll with `status === 'ok' && kind !== 'web'`, so while the status was still `pending` — i.e. before the app's kind was known — every api app fetched the web-only cache endpoint and took a 404. Twice, because the effect re-runs when the status settles.
704
+ - **@voltro/cli** — **`voltro update` said the same thing about two opposite outcomes.** An update that changed nothing printed `codemods: nothing to apply for this jump` whether the jump ships no codemods at all, or ships several and every one of them gated ITSELF out through its own `appliesTo`. A reader takes the first meaning, because that is what the sentence says.
705
+
706
+ The second is the state worth naming. A codemod's `appliesTo` is a predicate, and a predicate can be wrong in the direction that stays quiet: a gate reading the wrong files answers "does not apply" for a project that is fully affected. That has happened here — a `manual` codemod's gate searched the ts-morph project for a subject that only ever appears in a shell script or a CI job, which is why `codemodTextScan` exists. That fix made the GATE see more files; it did not make the SUMMARY admit a gate had run and said no.
707
+
708
+ So the summary now separates them: `none ship for this jump` when the range is empty, and otherwise the count plus every skipped id by name, with a line saying that a subject you recognise in that list is a bug in the check rather than a fact about your code. A partial run reports its skipped ones on one line for the same reason — two applied and one silently gated out reads as "all three considered and handled".
709
+
710
+ **A claim this entry made in its first draft was wrong, and it is corrected here rather than quietly dropped.** It said the dialect half of the framework-table rule "was not covered below the planner at all", and announced a new MariaDB test as the fix. Both halves were false: `sql-postgres/__tests__/frameworkTableEvolution.integration.test.ts` and its `sql-mysql` twin have covered exactly this since the rule landed — on BOTH mysql engines, asserting a column RESHAPE (harder than the ADD the new test made), with a premise assertion, the outcome KIND, and convergence. The new test was deleted; it measured less than what was already there, in the wrong package.
711
+
712
+ ### Internal (no consumer-facing effect)
713
+
714
+ - **@voltro/voltro** — **`packages/voltro` declares `lib: ["ES2024","DOM","DOM.Iterable"]` now, because it compiles `@voltro/i18n`'s source under its own options.**
715
+
716
+ The aggregate re-exports that package's ROOT entry — its browser half — so `tsc` follows the path mapping into `../i18n/src/**` and compiles those files with the AGGREGATE's compiler options, not the ones `@voltro/i18n` declares for itself. The moment i18n exported a component touching `document`, `@voltro/voltro#typecheck` failed with TS2584 while `@voltro/i18n#typecheck` stayed green: legal there, illegal here, one file. The aggregate already carried `jsx: react-jsx`, so this completes a decision that was half made.
717
+
718
+ `apiSurface: compatible`, and this is the part worth stating rather than asserting. DOM declares `Notification`, `Option` and `Cache` as globals, so once they are in scope api-extractor must disambiguate the aggregate's own symbols from them — `interface Notification_2` + `export { Notification_2 as Notification }`, `import { Option as Option_2 }`, `class Cache_2` + `export { Cache_2 as Cache }`. Three goldens therefore show REMOVED lines, which is what the narrowing detector reports and it is right to.
719
+
720
+ Nothing left the surface. Public names extracted from BOTH the `export const|type|interface X` and the `export { X_2 as X }` forms, on both sides of each golden, are identical sets: 965/965 for `voltro-server`, 293/293 for `voltro-ai`, 26/26 for `voltro-cache`. A consumer importing `Cache`, `Notification` or `Option` from `@voltro/voltro` sees no change; only the report spells them differently.
721
+ - **@voltro/runtime** — The event-bus perf budgets are RATIOS now, not absolute microseconds.
722
+
723
+ `expect(full).toBeLessThan(60)` read 87.6 µs on a release runner and took the run down. Nothing had regressed: the runner was ~19x slower than the machine the constant was written on, and 60 µs against a 4.6 µs local reading left only 13x of headroom. Two more assertions in the file had the same shape and had simply not fired yet — the publish budget sat at 86% of its constant on that runner.
724
+
725
+ Each is now a ratio between two measurements taken in the same test on the same machine, so machine speed divides out:
726
+
727
+ - `full < raw * 12` — the assertion the test is NAMED for ("the wrapper is not where the cost is") and never made. Both numbers were already measured three lines apart, and the file even printed `full - raw` before discarding it. - `warm < cold * 5` — the resume test claimed "attaching after 5k publishes must cost about what attaching after 5 does" and then measured only the 5k end. It measures both now, which is the first time it tests its own stated property. - `micros < machineMicros() * 150` — the one claim with no same-code comparand, denominated in a keyed-Map/string reference in a publish's own cost class.
728
+
729
+ The ratio form is also STRICTER than what it replaces: these fire at ~3-6x regressions where the constants needed 13-331x. Each was falsified by tightening its bound and watching it go red — a budget that can no longer fail is the failure mode this file exists to avoid.
730
+
731
+ ---
732
+
42
733
  ## [0.55.0] — 2026-08-27
43
734
 
44
735
  ### ⚠ BREAKING
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/plugin-flags",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "description": "Feature flags — per-subject / per-tenant targeting, deterministic % rollouts, kill-switch. Gate mutations/queries/actions declaratively or guard in-handler; evaluate flags client-side for UI gating. Config-as-code (memory) or runtime-toggleable (postgres).",
5
5
  "keywords": [
6
6
  "voltro",
@@ -48,10 +48,10 @@
48
48
  "node": ">=24.0.0"
49
49
  },
50
50
  "dependencies": {
51
- "@voltro/client": "0.55.0",
52
- "@voltro/database": "0.55.0",
53
- "@voltro/logger": "0.55.0",
54
- "@voltro/protocol": "0.55.0"
51
+ "@voltro/client": "0.57.0",
52
+ "@voltro/database": "0.57.0",
53
+ "@voltro/logger": "0.57.0",
54
+ "@voltro/protocol": "0.57.0"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "effect": "^3.22.0"