@voltro/cli 0.43.0 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/package.json +17 -17
- package/templates/AGENTS.md +1 -1
- package/templates/agent-docs/_index.md +1 -1
- package/templates/agent-docs/whats-new.md +37 -59
- package/templates/apps/api-ai/package.json +7 -7
- package/templates/apps/api-auth/package.json +8 -8
- package/templates/apps/api-backend/package.json +7 -7
- package/templates/apps/api-backend-deactivation/package.json +7 -7
- package/templates/apps/api-backend-mail/package.json +8 -8
- package/templates/apps/api-backend-mariadb/package.json +9 -9
- package/templates/apps/api-backend-sqlite/package.json +8 -8
- package/templates/apps/api-backend-storage/package.json +8 -8
- package/templates/apps/api-cms/package.json +10 -10
- package/templates/apps/api-collab/package.json +8 -8
- package/templates/apps/api-data-advanced/package.json +8 -8
- package/templates/apps/api-durable/package.json +8 -8
- package/templates/apps/api-feature-flags/package.json +9 -9
- package/templates/apps/api-governance/package.json +8 -8
- package/templates/apps/api-kv/package.json +8 -8
- package/templates/apps/api-moderation/package.json +8 -8
- package/templates/apps/api-observability/package.json +8 -8
- package/templates/apps/api-ratelimit/package.json +8 -8
- package/templates/apps/api-rbac/package.json +8 -8
- package/templates/apps/api-rest/package.json +7 -7
- package/templates/apps/api-saas/package.json +11 -11
- package/templates/apps/api-saas-starter/package.json +10 -10
- package/templates/apps/api-search/package.json +8 -8
- package/templates/apps/api-status/package.json +8 -8
- package/templates/apps/api-versioning/package.json +8 -8
- package/templates/apps/api-webhooks/package.json +9 -9
- package/templates/apps/changelog/package.json +6 -6
- package/templates/apps/edge-functions/package.json +2 -2
- package/templates/apps/frontend-admin/package.json +8 -8
- package/templates/apps/frontend-app/package.json +9 -9
- package/templates/apps/frontend-auth/package.json +8 -8
- package/templates/apps/frontend-blank/package.json +7 -7
- package/templates/apps/frontend-cms/package.json +9 -9
- package/templates/apps/frontend-collab/package.json +10 -10
- package/templates/apps/frontend-contact/package.json +7 -7
- package/templates/apps/frontend-dashboard/package.json +7 -7
- package/templates/apps/frontend-docs/package.json +7 -7
- package/templates/apps/frontend-i18n/package.json +6 -6
- package/templates/apps/frontend-landing/package.json +7 -7
- package/templates/apps/frontend-portal/package.json +8 -8
- package/templates/apps/frontend-saas/package.json +8 -8
- package/templates/apps/frontend-spa/package.json +7 -7
- package/templates/apps/frontend-ssr/package.json +7 -7
- package/templates/apps/frontend-ssr-api/package.json +8 -8
- package/templates/apps/frontend-static-blog/package.json +6 -6
- package/templates/apps/frontend-status/package.json +8 -8
- package/templates/apps/mobile-app/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -39,6 +39,75 @@ _Changes staged for the next release accumulate here (rolled up from
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
+
## [0.43.1] — 2026-08-18
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- **@voltro/database** — A write recorder that fails inside someone's transaction now says which recorder, on which write, and what the database actually said.
|
|
47
|
+
|
|
48
|
+
`@effect/sql` renders every driver failure as `SqlError: Failed to execute statement` — one sentence that fits a missing column, a dangling foreign key, an over-long value and a duplicate key equally. The driver's own words hang off a SYMBOL on a `FiberFailure`, so a caller who reaches for `.cause` gets `undefined` and concludes there is nothing there.
|
|
49
|
+
|
|
50
|
+
That is expensive precisely where recorders run: the caller's write was ordinary, and what failed was framework machinery one table over. The message now reads
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
write recorder '_voltro_row_history' failed while recording an update on 'users':
|
|
54
|
+
Duplicate entry 'rowver_…' for key 'PRIMARY' [code=ER_DUP_ENTRY errno=1062 …]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
and the original error is kept as `cause` for anyone who does walk the chain. The failure still takes the transaction down — that is the guarantee and it is unchanged.
|
|
58
|
+
|
|
59
|
+
`describeDriverError` (`@voltro/database`) is the shared summariser, built on the existing cause extractor rather than a second walker. It returns nothing when the chain carries nothing driver-shaped, so an ordinary programming error from a recorder arrives as itself instead of wrapped in prose about a database.
|
|
60
|
+
- **@voltro/database** — On MariaDB, a `varchar` column could introspect as `json` because a DIFFERENT table had a json column with the same column name.
|
|
61
|
+
|
|
62
|
+
MariaDB names a column-level CHECK after the COLUMN, and those names are unique per table, not per schema. `information_schema.check_constraints` on MySQL has no `TABLE_NAME`, so the introspector recovered it by joining `table_constraints` on `(schema, constraint_name)` — which on MariaDB cross-products every same-named check across every table. Measured on 11.8:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
a.payload LONGTEXT CHECK (json_valid(`payload`))
|
|
66
|
+
b.payload VARCHAR(255) CHECK (`payload` in ('x','y'))
|
|
67
|
+
|
|
68
|
+
join result: a → json_valid, a → in(…), b → json_valid, b → in(…)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
So `b.payload` reads as `json`, and `a.payload` picks up an enum it does not have. Downstream that is not a cosmetic label: the planner emits a blocked `alter-column-type` with `from: 'json'` that no `.narrowedFrom()` can honestly acknowledge, because the premise is false — and since the data-transfer manifest records introspected types, the same misreading travels into the bundle and reappears as schema drift on import.
|
|
72
|
+
|
|
73
|
+
MariaDB's own `check_constraints` HAS `TABLE_NAME`. The introspector asks for it directly now and keeps the join as the MySQL path, where check-constraint names are schema-unique and the join is sound. That asymmetry is why a single-engine test could not see this: the wrong query passes on MySQL.
|
|
74
|
+
- **@voltro/database** — `voltro db apply` could not drop a CHECK constraint on the mysql family at all, and each of the three reasons hid the next.
|
|
75
|
+
|
|
76
|
+
**1. `DROP CHECK` is MySQL-8 syntax.** MariaDB has never had it — measured on 11.8, `ALTER TABLE t DROP CHECK c` is `ERROR 1064`, while `DROP CONSTRAINT c` works on both engines. A plan containing a `drop-check` therefore died on the first one, on a family whose migrations are NOT atomic: the run stopped with the earlier statements committed and no rollback.
|
|
77
|
+
|
|
78
|
+
**2. The name was assumed, not read.** The applier dropped `<table>_<column>_check` — which is only what its own `add-check` would have named it. A CHECK created at table bring-up is INLINE and UNNAMED, so the server names it (`CONSTRAINT_1` / `<table>_chk_1` / the column name). Dropping a name that does not exist reports "does not exist", which is indistinguishable from the "already gone" a resume legitimately produces — so the statement succeeded, the constraint stayed, and the plan re-proposed the identical `drop-check` forever. The name comes from the catalog now.
|
|
79
|
+
|
|
80
|
+
**3. A column-level CHECK cannot be dropped by name on MariaDB at all.** Measured: the catalog lists it under the column's name, `DROP CONSTRAINT` on that name answers 1091, and only redefining the column removes it. The applier now drops by catalog name, ASKS whether the constraint survived, and redefines the column when it did — so a rebuild happens only in the case that needs one.
|
|
81
|
+
|
|
82
|
+
**And the same investigation closed the MySQL `.oneOf()` round-trip gap.** `parseEnumCheck` was documented as handling MySQL's rendering and did not: MySQL backslash-escapes the string DELIMITERS (`_utf8mb4\'draft\'`), and the parser rewrote those to the SQL doubling `''` — which is how a quote INSIDE a value is written. Every delimiter became escaped content, every value came back empty, and the filter dropped them. `.oneOf()` now round-trips on MySQL, and the suite that asserted the gap as a known one asserts the round-trip instead.
|
|
83
|
+
|
|
84
|
+
Plus, on a failed apply: the error now states how many operations were already applied and whether this dialect rolls back. The ledger held that number; it never reached the operator, who had to re-plan and diff the counts to learn how far the run got.
|
|
85
|
+
- **@voltro/plugin-versioning** — `versioningPlugin({ timing: 'in-transaction' })` built its history row's primary key from `(rowId, version)` while the version counter three lines above was scoped to `(tableName, rowId)`. Two versioned tables carrying the same row id therefore collided — permanently.
|
|
86
|
+
|
|
87
|
+
The shape is not exotic: `actors.id === users.id` is what the framework's own audit trail asks for, an `actors` row whose id is the user's so an audited write satisfies `createdBy → actors`. In an app that follows it, every user row has a twin.
|
|
88
|
+
|
|
89
|
+
The collision does not heal, and that is what turns a duplicate into an outage. The second table's insert fails, so its history row is never written, so `maxOf` for that table stays `null`, so the next attempt computes the same version and the same id. Every write to that row is dead from then on — surfacing as `ER_DUP_ENTRY` on an ordinary `store.update`, naming a row id in a table the caller never wrote to.
|
|
90
|
+
|
|
91
|
+
The key is `(table, rowId, version)` now — the same shape the post-commit path always built. It stays deterministic (no clock, no process-local counter), which is what lets it survive a replica restart; it just carries every part of the key it claims to be unique over.
|
|
92
|
+
|
|
93
|
+
**No cleanup is needed for rows already written.** They keep their old ids and belong to whichever table wrote them; the new keys cannot collide with them, and `byRow` is not unique. An app blocked by this is unblocked by the upgrade alone.
|
|
94
|
+
|
|
95
|
+
Covered twice: the recorder against a port that refuses duplicates (the mechanism, including that a repeat does not settle), and two versioned tables sharing an id against live postgres (the real primary key, inside the caller's transaction). The suite that existed exercised ONE table, which cannot produce a collision at all — and read exactly like a suite that covered this.
|
|
96
|
+
|
|
97
|
+
### Internal (no consumer-facing effect)
|
|
98
|
+
|
|
99
|
+
- **@voltro/sql-mysql** — Two test-only defects in `sql-mysql`, both found by a release gate, both of the same family: a check that could not fail, and a failure reported in the wrong place. No product code changed.
|
|
100
|
+
|
|
101
|
+
**An assertion that could not fail.** `dropCheckSyntax.integration.test.ts` fell back to a HAND-BUILT plan when the planner produced no operations — and the fabricated operation was a `drop-check`, which is exactly what the next line asserts the plan contains. So an engine whose planner stopped emitting it would have been handed one and reported green. The fallback is deleted; both engines produce the operation now, which is what this release fixed, and the assertion is load-bearing again (4/4 on mysql AND mariadb without it).
|
|
102
|
+
|
|
103
|
+
It surfaced as a TYPE error rather than a false pass, because the fallback's object widened `plan` into a union `applyPlan` does not accept. Worth noting which check caught it: `vitest` transpiles without type-checking, so the suite was green and only `tsc` objected — the gate's `typecheck` and `lint` steps are what went red.
|
|
104
|
+
|
|
105
|
+
**A wait that gave up in silence.** `waitFor` in both binlog CDC suites looped to a deadline and then RETURNED, so a "prove the reader is live" wait that expired let the test carry on, kill the binlog dump thread, and fail twenty lines later on `expect(ids).toContain('todo_wd_before')` — an assertion about a different claim, in a different place. It throws now, naming the wait and the window, and all twelve call sites carry a label.
|
|
106
|
+
|
|
107
|
+
The window is named too: `FIRST_ATTACH_MS = 30_000`, up from 12 s. The reasoning is the 40 s window already in the same file, whose comment says a re-attach plus binlog catch-up takes longer under a loaded full-suite run — a FIRST attach does both and only skips the backoff, so 12 s beside 40 s was an asymmetry the file's own reasoning did not support. That is an argument from the neighbouring comment, not a measurement; if it expires again, `waitFor` now says which wait and for how long, and that number is the one to argue with rather than raising this one twice.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
42
111
|
## [0.43.0] — 2026-08-18
|
|
43
112
|
|
|
44
113
|
### ⚠ BREAKING
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/cli",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.1",
|
|
4
4
|
"description": "The `voltro` CLI — dev server, codegen, migrations, project scaffolding, agent-docs seeding, and production serve.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -721,22 +721,22 @@
|
|
|
721
721
|
"@effect/platform-node": "^0.108.0",
|
|
722
722
|
"@effect/sql": "^0.52.0",
|
|
723
723
|
"@effect/workflow": "^0.19.0",
|
|
724
|
-
"@voltro/ai": "0.43.
|
|
725
|
-
"@voltro/cache": "0.43.
|
|
726
|
-
"@voltro/data-transfer": "0.43.
|
|
727
|
-
"@voltro/database": "0.43.
|
|
728
|
-
"@voltro/env": "0.43.
|
|
729
|
-
"@voltro/kv": "0.43.
|
|
730
|
-
"@voltro/logger": "0.43.
|
|
731
|
-
"@voltro/plugin-auth": "0.43.
|
|
732
|
-
"@voltro/plugin-broadcast": "0.43.
|
|
733
|
-
"@voltro/plugin-mail": "0.43.
|
|
734
|
-
"@voltro/plugin-storage": "0.43.
|
|
735
|
-
"@voltro/plugin-webhooks": "0.43.
|
|
736
|
-
"@voltro/protocol": "0.43.
|
|
737
|
-
"@voltro/runtime": "0.43.
|
|
738
|
-
"@voltro/serverless": "0.43.
|
|
739
|
-
"@voltro/workflow": "0.43.
|
|
724
|
+
"@voltro/ai": "0.43.1",
|
|
725
|
+
"@voltro/cache": "0.43.1",
|
|
726
|
+
"@voltro/data-transfer": "0.43.1",
|
|
727
|
+
"@voltro/database": "0.43.1",
|
|
728
|
+
"@voltro/env": "0.43.1",
|
|
729
|
+
"@voltro/kv": "0.43.1",
|
|
730
|
+
"@voltro/logger": "0.43.1",
|
|
731
|
+
"@voltro/plugin-auth": "0.43.1",
|
|
732
|
+
"@voltro/plugin-broadcast": "0.43.1",
|
|
733
|
+
"@voltro/plugin-mail": "0.43.1",
|
|
734
|
+
"@voltro/plugin-storage": "0.43.1",
|
|
735
|
+
"@voltro/plugin-webhooks": "0.43.1",
|
|
736
|
+
"@voltro/protocol": "0.43.1",
|
|
737
|
+
"@voltro/runtime": "0.43.1",
|
|
738
|
+
"@voltro/serverless": "0.43.1",
|
|
739
|
+
"@voltro/workflow": "0.43.1",
|
|
740
740
|
"chokidar": "^5.0.0",
|
|
741
741
|
"ioredis": "^5.11.1",
|
|
742
742
|
"tinyglobby": "^0.2.17",
|
package/templates/AGENTS.md
CHANGED
|
@@ -707,7 +707,7 @@ each plugin's own README.
|
|
|
707
707
|
|
|
708
708
|
| Topic | Open | Summary |
|
|
709
709
|
|---|---|---|
|
|
710
|
-
| **What's new in 0.43.
|
|
710
|
+
| **What's new in 0.43.1** | `node_modules/@voltro/cli/templates/agent-docs/whats-new.md` | Everything that changed in this version. Read it before hand-rolling something the framework may now ship. |
|
|
711
711
|
| AI | `node_modules/@voltro/cli/templates/agent-docs/ai.md` | How Voltro treats AI — agents, tools, streaming, RAG — all primitives over the same WebSocket as the rest of the framework. |
|
|
712
712
|
| Authentication | `node_modules/@voltro/cli/templates/agent-docs/authentication.md` | How @voltro/plugin-auth wires password + session-cookie auth across api + web, plus the pluggable identity-strategy protocol. |
|
|
713
713
|
| Caching | `node_modules/@voltro/cli/templates/agent-docs/caching.md` | Voltro's caching layer (@voltro/cache) — an always-on memory default, swappable Redis-compatible backends, a low-level wrap primitive, and automatic query-result invalidation. |
|
|
@@ -9,7 +9,7 @@ each plugin's own README.
|
|
|
9
9
|
|
|
10
10
|
| Topic | Open | Summary |
|
|
11
11
|
|---|---|---|
|
|
12
|
-
| **What's new in 0.43.
|
|
12
|
+
| **What's new in 0.43.1** | `node_modules/@voltro/cli/templates/agent-docs/whats-new.md` | Everything that changed in this version. Read it before hand-rolling something the framework may now ship. |
|
|
13
13
|
| AI | `node_modules/@voltro/cli/templates/agent-docs/ai.md` | How Voltro treats AI — agents, tools, streaming, RAG — all primitives over the same WebSocket as the rest of the framework. |
|
|
14
14
|
| Authentication | `node_modules/@voltro/cli/templates/agent-docs/authentication.md` | How @voltro/plugin-auth wires password + session-cookie auth across api + web, plus the pluggable identity-strategy protocol. |
|
|
15
15
|
| Caching | `node_modules/@voltro/cli/templates/agent-docs/caching.md` | Voltro's caching layer (@voltro/cache) — an always-on memory default, swappable Redis-compatible backends, a low-level wrap primitive, and automatic query-result invalidation. |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# What's new in 0.43.
|
|
1
|
+
# What's new in 0.43.1
|
|
2
2
|
|
|
3
3
|
Read this FIRST when a task touches an area you have not worked in recently.
|
|
4
4
|
It is the cheapest way to notice that the framework grew the thing you were
|
|
@@ -7,89 +7,67 @@ workaround for something that shipped two versions ago.
|
|
|
7
7
|
|
|
8
8
|
BREAKING entries name a codemod; run `voltro update` to apply it.
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### Fixed
|
|
11
11
|
|
|
12
|
-
- **@voltro/
|
|
12
|
+
- **@voltro/database** — A write recorder that fails inside someone's transaction now says which recorder, on which write, and what the database actually said.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`@effect/sql` renders every driver failure as `SqlError: Failed to execute statement` — one sentence that fits a missing column, a dangling foreign key, an over-long value and a duplicate key equally. The driver's own words hang off a SYMBOL on a `FiberFailure`, so a caller who reaches for `.cause` gets `undefined` and concludes there is nothing there.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
That is expensive precisely where recorders run: the caller's write was ordinary, and what failed was framework machinery one table over. The message now reads
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
teams t1 foreign key teams_ibfk_1: the referenced row does not exist [1452]
|
|
22
|
-
… and 299 row(s) behind them. Fix the 1 above and re-run; they resolve with
|
|
23
|
-
their parents.
|
|
19
|
+
write recorder '_voltro_row_history' failed while recording an update on 'users':
|
|
20
|
+
Duplicate entry 'rowver_…' for key 'PRIMARY' [code=ER_DUP_ENTRY errno=1062 …]
|
|
24
21
|
```
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
The codemod rewrites the import and every use of the symbol. It does NOT rewrite a tag STRING (`Effect.catchTag('DanglingReferenceError', …)`, `err._tag === '…'`) — change those to `'RowsRefusedError'` — and the payload gained `primaryCount` plus a `derived` flag per row.
|
|
29
|
-
|
|
30
|
-
### Fixed
|
|
31
|
-
|
|
32
|
-
- **@voltro/cli** — `voltro doctor`'s `subject-write-no-guard` rule reads the DESCRIPTOR before it reports. It looked only at the executor, and the access decision is not declared there.
|
|
33
|
-
|
|
34
|
-
Every form of access decision the framework has — `internal: true`, `guards: [...]`, `openAccess:` — is declared on the DESCRIPTOR. So an app that declares them properly got a finding for each one, and on a codebase whose procedures are mostly `internal: true` the rule fires on essentially all of them and is wrong essentially every time.
|
|
35
|
-
|
|
36
|
-
That is worse than a rule that finds nothing: it is the longest line in the report and it reads like a security finding, so it teaches the reader to skim the place a real finding would have appeared.
|
|
37
|
-
|
|
38
|
-
The premise was structurally impossible for most of them, and the framework says so itself: `security.defaultDeny` refuses at boot any wire-exposed procedure declaring neither `guards:` nor `openAccess:`. So "an anonymous caller reaches the write" can only be true of an `openAccess` procedure. That is what the rule looks for now — plus the handler check it always honoured, plus an ownership comparison against `subject.id`, which is the refusal the rule says is missing. Where no descriptor can be read, it says nothing: the claim is about a declaration, and a finding whose evidence was never opened is the failure mode this fixes.
|
|
23
|
+
and the original error is kept as `cause` for anyone who does walk the chain. The failure still takes the transaction down — that is the guarantee and it is unchanged.
|
|
39
24
|
|
|
40
|
-
|
|
41
|
-
- **@voltro/database
|
|
25
|
+
`describeDriverError` (`@voltro/database`) is the shared summariser, built on the existing cause extractor rather than a second walker. It returns nothing when the chain carries nothing driver-shaped, so an ordinary programming error from a recorder arrives as itself instead of wrapped in prose about a database.
|
|
26
|
+
- **@voltro/database** — On MariaDB, a `varchar` column could introspect as `json` because a DIFFERENT table had a json column with the same column name.
|
|
42
27
|
|
|
43
|
-
|
|
28
|
+
MariaDB names a column-level CHECK after the COLUMN, and those names are unique per table, not per schema. `information_schema.check_constraints` on MySQL has no `TABLE_NAME`, so the introspector recovered it by joining `table_constraints` on `(schema, constraint_name)` — which on MariaDB cross-products every same-named check across every table. Measured on 11.8:
|
|
44
29
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
**`voltro serve`'s admin export/import needed a second fix, and without it this one reached only the direct transport.** The running instance hands those handlers `declaredSnapshot(tables)` — no dialect — and `.uniqueActive()` lowers to a generated column only when the snapshot knows the engine. So over `--target api` the snapshot described a schema with no generated columns while the database had several, and the export wrote their values back into the bundle exactly as before. It passes the dialect now (the variable was already on the next line).
|
|
52
|
-
|
|
53
|
-
`generatedAs` is also kept OUT of the schema fingerprint. Introspection can read the fact back but not a comparable value — the engine returns its own normalisation of the expression, never the declared spelling — so hashing it would make declared and live disagree permanently: a schema nobody touched reporting a changed declaration on every boot, and a transfer target that matches its bundle exactly refused as drifted.
|
|
30
|
+
```
|
|
31
|
+
a.payload LONGTEXT CHECK (json_valid(`payload`))
|
|
32
|
+
b.payload VARCHAR(255) CHECK (`payload` in ('x','y'))
|
|
33
|
+
|
|
34
|
+
join result: a → json_valid, a → in(…), b → json_valid, b → in(…)
|
|
35
|
+
```
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
- **@voltro/sql-mysql** — On mysql/mariadb, a write REJECTED by the database through `insertIgnore` was reported as a conflict when the caller was not inside a transaction — and never reached the caller as a typed `ConstraintViolation` at all.
|
|
37
|
+
So `b.payload` reads as `json`, and `a.payload` picks up an enum it does not have. Downstream that is not a cosmetic label: the planner emits a blocked `alter-column-type` with `from: 'json'` that no `.narrowedFrom()` can honestly acknowledge, because the premise is false — and since the data-transfer manifest records introspected types, the same misreading travels into the bundle and reappears as schema drift on import.
|
|
57
38
|
|
|
58
|
-
|
|
39
|
+
MariaDB's own `check_constraints` HAS `TABLE_NAME`. The introspector asks for it directly now and keeps the join as the MySQL path, where check-constraint names are schema-unique and the join is sound. That asymmetry is why a single-engine test could not see this: the wrong query passes on MySQL.
|
|
40
|
+
- **@voltro/database** — `voltro db apply` could not drop a CHECK constraint on the mysql family at all, and each of the three reasons hid the next.
|
|
59
41
|
|
|
60
|
-
**
|
|
42
|
+
**1. `DROP CHECK` is MySQL-8 syntax.** MariaDB has never had it — measured on 11.8, `ALTER TABLE t DROP CHECK c` is `ERROR 1064`, while `DROP CONSTRAINT c` works on both engines. A plan containing a `drop-check` therefore died on the first one, on a family whose migrations are NOT atomic: the run stopped with the earlier statements committed and no rollback.
|
|
61
43
|
|
|
62
|
-
**The
|
|
44
|
+
**2. The name was assumed, not read.** The applier dropped `<table>_<column>_check` — which is only what its own `add-check` would have named it. A CHECK created at table bring-up is INLINE and UNNAMED, so the server names it (`CONSTRAINT_1` / `<table>_chk_1` / the column name). Dropping a name that does not exist reports "does not exist", which is indistinguishable from the "already gone" a resume legitimately produces — so the statement succeeded, the constraint stayed, and the plan re-proposed the identical `drop-check` forever. The name comes from the catalog now.
|
|
63
45
|
|
|
64
|
-
|
|
46
|
+
**3. A column-level CHECK cannot be dropped by name on MariaDB at all.** Measured: the catalog lists it under the column's name, `DROP CONSTRAINT` on that name answers 1091, and only redefining the column removes it. The applier now drops by catalog name, ASKS whether the constraint survived, and redefines the column when it did — so a rebuild happens only in the case that needs one.
|
|
65
47
|
|
|
66
|
-
|
|
67
|
-
- **@voltro/protocol, @voltro/runtime** — The framework's store errors — `ConstraintViolation`, `TenantScopeViolation`, `TenantRowNotFound`, `ServerOnlyColumnWrite`, `TableValidationFailed`, `StoreOperationFailed` — are exported from `@voltro/protocol` and can therefore be declared in a descriptor's `error:` union. They could not be.
|
|
48
|
+
**And the same investigation closed the MySQL `.oneOf()` round-trip gap.** `parseEnumCheck` was documented as handling MySQL's rendering and did not: MySQL backslash-escapes the string DELIMITERS (`_utf8mb4\'draft\'`), and the parser rewrote those to the SQL doubling `''` — which is how a quote INSIDE a value is written. Every delimiter became escaped content, every value came back empty, and the filter dropped them. `.oneOf()` now round-trips on MySQL, and the suite that asserted the gap as a known one asserts the round-trip instead.
|
|
68
49
|
|
|
69
|
-
|
|
50
|
+
Plus, on a failed apply: the error now states how many operations were already applied and whether this dialect rolls back. The ledger held that number; it never reached the operator, who had to re-plan and diff the counts to learn how far the run got.
|
|
51
|
+
- **@voltro/plugin-versioning** — `versioningPlugin({ timing: 'in-transaction' })` built its history row's primary key from `(rowId, version)` while the version counter three lines above was scoped to `(tableName, rowId)`. Two versioned tables carrying the same row id therefore collided — permanently.
|
|
70
52
|
|
|
71
|
-
|
|
53
|
+
The shape is not exotic: `actors.id === users.id` is what the framework's own audit trail asks for, an `actors` row whose id is the user's so an audited write satisfies `createdBy → actors`. In an app that follows it, every user row has a twin.
|
|
72
54
|
|
|
73
|
-
|
|
74
|
-
- **@voltro/database, @voltro/sql-mysql** — A blocked `alter-column-type` told every dialect to write a postgres cast.
|
|
55
|
+
The collision does not heal, and that is what turns a duplicate into an outage. The second table's insert fails, so its history row is never written, so `maxOf` for that table stays `null`, so the next attempt computes the same version and the same id. Every write to that row is dead from then on — surfacing as `ER_DUP_ENTRY` on an ordinary `store.update`, naming a row id in a table the caller never wrote to.
|
|
75
56
|
|
|
76
|
-
The
|
|
57
|
+
The key is `(table, rowId, version)` now — the same shape the post-commit path always built. It stays deterministic (no clock, no process-local counter), which is what lets it survive a replica restart; it just carries every part of the key it claims to be unique over.
|
|
77
58
|
|
|
78
|
-
|
|
79
|
-
acknowledge it on the column: `.narrowedFrom('json', { using: 'meta::text' })`
|
|
80
|
-
```
|
|
59
|
+
**No cleanup is needed for rows already written.** They keep their old ids and belong to whichever table wrote them; the new keys cannot collide with them, and `byRow` is not unique. An app blocked by this is unblocked by the upgrade alone.
|
|
81
60
|
|
|
82
|
-
|
|
61
|
+
Covered twice: the recorder against a port that refuses duplicates (the mechanism, including that a repeat does not settle), and two versioned tables sharing an id against live postgres (the real primary key, inside the caller's transaction). The suite that existed exercised ONE table, which cannot produce a collision at all — and read exactly like a suite that covered this.
|
|
83
62
|
|
|
84
|
-
|
|
63
|
+
### Internal (no consumer-facing effect)
|
|
85
64
|
|
|
86
|
-
|
|
65
|
+
- **@voltro/sql-mysql** — Two test-only defects in `sql-mysql`, both found by a release gate, both of the same family: a check that could not fail, and a failure reported in the wrong place. No product code changed.
|
|
87
66
|
|
|
88
|
-
|
|
89
|
-
- **@voltro/sql-mysql** — On MariaDB, `upsert` could write a DIFFERENT row than the one it was given and report success.
|
|
67
|
+
**An assertion that could not fail.** `dropCheckSyntax.integration.test.ts` fell back to a HAND-BUILT plan when the planner produced no operations — and the fabricated operation was a `drop-check`, which is exactly what the next line asserts the plan contains. So an engine whose planner stopped emitting it would have been handed one and reported green. The fallback is deleted; both engines produce the operation now, which is what this release fixed, and the assertion is load-bearing again (4/4 on mysql AND mariadb without it).
|
|
90
68
|
|
|
91
|
-
|
|
69
|
+
It surfaced as a TYPE error rather than a false pass, because the fallback's object widened `plan` into a union `applyPlan` does not accept. Worth noting which check caught it: `vitest` transpiles without type-checking, so the suite was green and only `tsc` objected — the gate's `typecheck` and `lint` steps are what went red.
|
|
92
70
|
|
|
93
|
-
|
|
71
|
+
**A wait that gave up in silence.** `waitFor` in both binlog CDC suites looped to a deadline and then RETURNED, so a "prove the reader is live" wait that expired let the test carry on, kill the binlog dump thread, and fail twenty lines later on `expect(ids).toContain('todo_wd_before')` — an assertion about a different claim, in a different place. It throws now, naming the wait and the window, and all twelve call sites carry a label.
|
|
94
72
|
|
|
95
|
-
|
|
73
|
+
The window is named too: `FIRST_ATTACH_MS = 30_000`, up from 12 s. The reasoning is the 40 s window already in the same file, whose comment says a re-attach plus binlog catch-up takes longer under a loaded full-suite run — a FIRST attach does both and only skips the backoff, so 12 s beside 40 s was an asymmetry the file's own reasoning did not support. That is an argument from the neighbouring comment, not a measurement; if it expires again, `waitFor` now says which wait and for how long, and that number is the one to argue with rather than raising this one twice.
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@effect/platform": "^0.97.0",
|
|
14
14
|
"@effect/rpc": "^0.76.0",
|
|
15
|
-
"@voltro/ai": "0.43.
|
|
16
|
-
"@voltro/cli": "0.43.
|
|
17
|
-
"@voltro/database": "0.43.
|
|
18
|
-
"@voltro/env": "0.43.
|
|
19
|
-
"@voltro/protocol": "0.43.
|
|
20
|
-
"@voltro/runtime": "0.43.
|
|
15
|
+
"@voltro/ai": "0.43.1",
|
|
16
|
+
"@voltro/cli": "0.43.1",
|
|
17
|
+
"@voltro/database": "0.43.1",
|
|
18
|
+
"@voltro/env": "0.43.1",
|
|
19
|
+
"@voltro/protocol": "0.43.1",
|
|
20
|
+
"@voltro/runtime": "0.43.1",
|
|
21
21
|
"effect": "^3.22.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@voltro/testing": "0.43.
|
|
24
|
+
"@voltro/testing": "0.43.1",
|
|
25
25
|
"typescript": "^6.0.3",
|
|
26
26
|
"@vitest/coverage-v8": "^4.1.10",
|
|
27
27
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.43.
|
|
17
|
-
"@voltro/database": "0.43.
|
|
18
|
-
"@voltro/env": "0.43.
|
|
19
|
-
"@voltro/plugin-auth": "0.43.
|
|
20
|
-
"@voltro/protocol": "0.43.
|
|
21
|
-
"@voltro/runtime": "0.43.
|
|
22
|
-
"@voltro/sql-postgres": "0.43.
|
|
16
|
+
"@voltro/cli": "0.43.1",
|
|
17
|
+
"@voltro/database": "0.43.1",
|
|
18
|
+
"@voltro/env": "0.43.1",
|
|
19
|
+
"@voltro/plugin-auth": "0.43.1",
|
|
20
|
+
"@voltro/protocol": "0.43.1",
|
|
21
|
+
"@voltro/runtime": "0.43.1",
|
|
22
|
+
"@voltro/sql-postgres": "0.43.1",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.43.
|
|
26
|
+
"@voltro/testing": "0.43.1",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@effect/platform": "^0.97.0",
|
|
18
18
|
"@effect/rpc": "^0.76.0",
|
|
19
|
-
"@voltro/cli": "0.43.
|
|
20
|
-
"@voltro/database": "0.43.
|
|
21
|
-
"@voltro/env": "0.43.
|
|
22
|
-
"@voltro/plugin-multitenancy": "0.43.
|
|
23
|
-
"@voltro/protocol": "0.43.
|
|
24
|
-
"@voltro/runtime": "0.43.
|
|
19
|
+
"@voltro/cli": "0.43.1",
|
|
20
|
+
"@voltro/database": "0.43.1",
|
|
21
|
+
"@voltro/env": "0.43.1",
|
|
22
|
+
"@voltro/plugin-multitenancy": "0.43.1",
|
|
23
|
+
"@voltro/protocol": "0.43.1",
|
|
24
|
+
"@voltro/runtime": "0.43.1",
|
|
25
25
|
"effect": "^3.22.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@voltro/testing": "0.43.
|
|
28
|
+
"@voltro/testing": "0.43.1",
|
|
29
29
|
"typescript": "^6.0.3",
|
|
30
30
|
"@vitest/coverage-v8": "^4.1.10",
|
|
31
31
|
"vitest": "^4.1.10"
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.43.
|
|
17
|
-
"@voltro/database": "0.43.
|
|
18
|
-
"@voltro/env": "0.43.
|
|
19
|
-
"@voltro/plugin-deactivation": "0.43.
|
|
20
|
-
"@voltro/protocol": "0.43.
|
|
21
|
-
"@voltro/runtime": "0.43.
|
|
16
|
+
"@voltro/cli": "0.43.1",
|
|
17
|
+
"@voltro/database": "0.43.1",
|
|
18
|
+
"@voltro/env": "0.43.1",
|
|
19
|
+
"@voltro/plugin-deactivation": "0.43.1",
|
|
20
|
+
"@voltro/protocol": "0.43.1",
|
|
21
|
+
"@voltro/runtime": "0.43.1",
|
|
22
22
|
"effect": "^3.22.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@voltro/testing": "0.43.
|
|
25
|
+
"@voltro/testing": "0.43.1",
|
|
26
26
|
"typescript": "^6.0.3",
|
|
27
27
|
"@vitest/coverage-v8": "^4.1.10",
|
|
28
28
|
"vitest": "^4.1.10"
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@react-email/components": "^1.0.12",
|
|
15
15
|
"@react-email/render": "^1.4.0",
|
|
16
|
-
"@voltro/cli": "0.43.
|
|
17
|
-
"@voltro/database": "0.43.
|
|
18
|
-
"@voltro/env": "0.43.
|
|
19
|
-
"@voltro/plugin-mail": "0.43.
|
|
20
|
-
"@voltro/plugin-multitenancy": "0.43.
|
|
21
|
-
"@voltro/protocol": "0.43.
|
|
22
|
-
"@voltro/runtime": "0.43.
|
|
16
|
+
"@voltro/cli": "0.43.1",
|
|
17
|
+
"@voltro/database": "0.43.1",
|
|
18
|
+
"@voltro/env": "0.43.1",
|
|
19
|
+
"@voltro/plugin-mail": "0.43.1",
|
|
20
|
+
"@voltro/plugin-multitenancy": "0.43.1",
|
|
21
|
+
"@voltro/protocol": "0.43.1",
|
|
22
|
+
"@voltro/runtime": "0.43.1",
|
|
23
23
|
"effect": "^3.22.0",
|
|
24
24
|
"react": "^19.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@voltro/testing": "0.43.
|
|
27
|
+
"@voltro/testing": "0.43.1",
|
|
28
28
|
"typescript": "^6.0.3",
|
|
29
29
|
"@vitest/coverage-v8": "^4.1.10",
|
|
30
30
|
"vitest": "^4.1.10"
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.43.
|
|
17
|
-
"@voltro/database": "0.43.
|
|
18
|
-
"@voltro/env": "0.43.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.43.
|
|
20
|
-
"@voltro/plugin-storage": "0.43.
|
|
21
|
-
"@voltro/protocol": "0.43.
|
|
22
|
-
"@voltro/runtime": "0.43.
|
|
23
|
-
"@voltro/sql-mysql": "0.43.
|
|
16
|
+
"@voltro/cli": "0.43.1",
|
|
17
|
+
"@voltro/database": "0.43.1",
|
|
18
|
+
"@voltro/env": "0.43.1",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.43.1",
|
|
20
|
+
"@voltro/plugin-storage": "0.43.1",
|
|
21
|
+
"@voltro/protocol": "0.43.1",
|
|
22
|
+
"@voltro/runtime": "0.43.1",
|
|
23
|
+
"@voltro/sql-mysql": "0.43.1",
|
|
24
24
|
"effect": "^3.22.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@voltro/testing": "0.43.
|
|
27
|
+
"@voltro/testing": "0.43.1",
|
|
28
28
|
"typescript": "^6.0.3",
|
|
29
29
|
"@vitest/coverage-v8": "^4.1.10",
|
|
30
30
|
"vitest": "^4.1.10"
|
|
@@ -13,17 +13,17 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.43.
|
|
17
|
-
"@voltro/database": "0.43.
|
|
18
|
-
"@voltro/env": "0.43.
|
|
19
|
-
"@voltro/plugin-multitenancy": "0.43.
|
|
20
|
-
"@voltro/protocol": "0.43.
|
|
21
|
-
"@voltro/runtime": "0.43.
|
|
22
|
-
"@voltro/sql-sqlite": "0.43.
|
|
16
|
+
"@voltro/cli": "0.43.1",
|
|
17
|
+
"@voltro/database": "0.43.1",
|
|
18
|
+
"@voltro/env": "0.43.1",
|
|
19
|
+
"@voltro/plugin-multitenancy": "0.43.1",
|
|
20
|
+
"@voltro/protocol": "0.43.1",
|
|
21
|
+
"@voltro/runtime": "0.43.1",
|
|
22
|
+
"@voltro/sql-sqlite": "0.43.1",
|
|
23
23
|
"effect": "^3.22.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@voltro/testing": "0.43.
|
|
26
|
+
"@voltro/testing": "0.43.1",
|
|
27
27
|
"typescript": "^6.0.3",
|
|
28
28
|
"@vitest/coverage-v8": "^4.1.10",
|
|
29
29
|
"vitest": "^4.1.10"
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"test": "voltro test"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@voltro/cli": "0.43.
|
|
15
|
-
"@voltro/database": "0.43.
|
|
16
|
-
"@voltro/env": "0.43.
|
|
17
|
-
"@voltro/plugin-multitenancy": "0.43.
|
|
18
|
-
"@voltro/plugin-storage": "0.43.
|
|
19
|
-
"@voltro/protocol": "0.43.
|
|
20
|
-
"@voltro/runtime": "0.43.
|
|
14
|
+
"@voltro/cli": "0.43.1",
|
|
15
|
+
"@voltro/database": "0.43.1",
|
|
16
|
+
"@voltro/env": "0.43.1",
|
|
17
|
+
"@voltro/plugin-multitenancy": "0.43.1",
|
|
18
|
+
"@voltro/plugin-storage": "0.43.1",
|
|
19
|
+
"@voltro/protocol": "0.43.1",
|
|
20
|
+
"@voltro/runtime": "0.43.1",
|
|
21
21
|
"effect": "^3.22.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@voltro/testing": "0.43.
|
|
24
|
+
"@voltro/testing": "0.43.1",
|
|
25
25
|
"typescript": "^6.0.3",
|
|
26
26
|
"@vitest/coverage-v8": "^4.1.10",
|
|
27
27
|
"vitest": "^4.1.10"
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@effect/platform": "^0.97.0",
|
|
15
15
|
"@effect/rpc": "^0.76.0",
|
|
16
|
-
"@voltro/cli": "0.43.
|
|
17
|
-
"@voltro/cms": "0.43.
|
|
18
|
-
"@voltro/database": "0.43.
|
|
19
|
-
"@voltro/env": "0.43.
|
|
20
|
-
"@voltro/plugin-auth": "0.43.
|
|
21
|
-
"@voltro/plugin-multitenancy": "0.43.
|
|
22
|
-
"@voltro/protocol": "0.43.
|
|
23
|
-
"@voltro/runtime": "0.43.
|
|
24
|
-
"@voltro/sql-postgres": "0.43.
|
|
16
|
+
"@voltro/cli": "0.43.1",
|
|
17
|
+
"@voltro/cms": "0.43.1",
|
|
18
|
+
"@voltro/database": "0.43.1",
|
|
19
|
+
"@voltro/env": "0.43.1",
|
|
20
|
+
"@voltro/plugin-auth": "0.43.1",
|
|
21
|
+
"@voltro/plugin-multitenancy": "0.43.1",
|
|
22
|
+
"@voltro/protocol": "0.43.1",
|
|
23
|
+
"@voltro/runtime": "0.43.1",
|
|
24
|
+
"@voltro/sql-postgres": "0.43.1",
|
|
25
25
|
"effect": "^3.22.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@voltro/testing": "0.43.
|
|
28
|
+
"@voltro/testing": "0.43.1",
|
|
29
29
|
"typescript": "^6.0.3",
|
|
30
30
|
"@vitest/coverage-v8": "^4.1.10",
|
|
31
31
|
"vitest": "^4.1.10"
|