Summary
prisma-next db init enforces an additive-only operation policy, but the cipherstash contract space's install-eql-v3-bundle op is classed data. Every fresh-database init of an app using @cipherstash/stack-prisma therefore fails:
PN-RUN-3020: Operation cipherstash.install-eql-v3-bundle has class "data"
which is not allowed by policy. Policy only allows: additive.
This blocks Prisma Compute's GitHub preview deploys, which run db init against a fresh branch database on every push. Found in a live dogfooding run (rc.4 consumer app + Compute push-to-deploy).
Reproduce
- Consumer app using
@cipherstash/stack-prisma with a vendored migrations/cipherstash/ space
- Point it at a fresh (empty) Postgres database
prisma-next db init
- Fails with PN-RUN-3020 above.
prisma-next migrate succeeds on the same database — its policy allows all operation classes.
Root cause
The data class was chosen to satisfy the aggregate integrity checker's no-op self-edge rule (sameSourceAndTarget, PN-MIG-CHECK-007). Verified against migration-tools 0.16.0: that rule only fires when from === to. The install edge is the genesis edge — it runs from: null → the empty-storage hash, so it is not a self-edge and additive passes the checker.
additive is also the truthful class on the policy axis: the bundle only CREATEs its own schemas, domains, and functions, so it cannot damage user data.
Confirmed empirically both ways — flipping a true A → A upgrade self-edge to additive trips PN-MIG-CHECK-007; flipping the install edge does not.
Constraint
The EQL upgrade edges are true self-edges and must keep data. So the re-emitted install edge has to carry every upgrade invariant itself (no-SQL additive carrier ops) — legitimate because the baked bundle already IS the pinned release, a superset of every earlier v3 surface. That lets computeExtensionSpaceApplyPath satisfy the head ref from the single all-additive genesis edge, so fresh databases never need to walk a data-classed edge.
Notes
Fixing this requires a one-time re-emit of a published migration artefact, changing both the install package's migrationHash and its baked installSqlSha256. That is only acceptable pre-GA, and RC consumers with a vendored migrations/cipherstash/ must delete the space directory and re-run prisma-next migration plan.
Fixed by #820, which also pins the baked bundle to eql-3.0.4.
Summary
prisma-next db initenforces an additive-only operation policy, but the cipherstash contract space'sinstall-eql-v3-bundleop is classeddata. Every fresh-database init of an app using@cipherstash/stack-prismatherefore fails:This blocks Prisma Compute's GitHub preview deploys, which run
db initagainst a fresh branch database on every push. Found in a live dogfooding run (rc.4 consumer app + Compute push-to-deploy).Reproduce
@cipherstash/stack-prismawith a vendoredmigrations/cipherstash/spaceprisma-next db initprisma-next migratesucceeds on the same database — its policy allows all operation classes.Root cause
The
dataclass was chosen to satisfy the aggregate integrity checker's no-op self-edge rule (sameSourceAndTarget, PN-MIG-CHECK-007). Verified againstmigration-tools0.16.0: that rule only fires whenfrom === to. The install edge is the genesis edge — it runsfrom: null→ the empty-storage hash, so it is not a self-edge andadditivepasses the checker.additiveis also the truthful class on the policy axis: the bundle only CREATEs its own schemas, domains, and functions, so it cannot damage user data.Confirmed empirically both ways — flipping a true
A → Aupgrade self-edge toadditivetrips PN-MIG-CHECK-007; flipping the install edge does not.Constraint
The EQL upgrade edges are true self-edges and must keep
data. So the re-emitted install edge has to carry every upgrade invariant itself (no-SQL additive carrier ops) — legitimate because the baked bundle already IS the pinned release, a superset of every earlier v3 surface. That letscomputeExtensionSpaceApplyPathsatisfy the head ref from the single all-additive genesis edge, so fresh databases never need to walk adata-classed edge.Notes
Fixing this requires a one-time re-emit of a published migration artefact, changing both the install package's
migrationHashand its bakedinstallSqlSha256. That is only acceptable pre-GA, and RC consumers with a vendoredmigrations/cipherstash/must delete the space directory and re-runprisma-next migration plan.Fixed by #820, which also pins the baked bundle to eql-3.0.4.