Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

TML-2512: drop inlined fromContract/toContract from migration.json - #502

Merged
wmadden merged 12 commits into
mainfrom
tml-2512-gotcha-migrationjson-inlines-full-fromto-contracts-already
May 16, 2026
Merged

wmadden merged 12 commits into
mainfrom
tml-2512-gotcha-migrationjson-inlines-full-fromto-contracts-already

Conversation

@wmadden

@wmadden wmadden commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

closes TML-2512

At a glance

A migration.json after this change is the manifest, nothing more:

{
  "from": "sha256:f76977c7745bd6fbf38728c544b372927969f19955489d7ff5c9c1eddcdc0b36",
  "to": "sha256:8a15f8e37a3a8731578a87102f9507da65b5f84556f84320ea0ead82645e394d",
  "hints": { "used": [], "applied": [], "plannerVersion": "2.0.0" },
  "labels": [],
  "createdAt": "2026-05-13T05:07:50.592Z",
  "providedInvariants": [],
  "migrationHash": "sha256:7405331b31014ccebdf507ec55a0907f13c15b95cc6ef11c53bc415e8309ba62"
}

The same migration on main carries a full fromContract and a full toContract object embedded inline — typically thousands of lines for a non-trivial schema. The contract content already lives next door in the sibling start-contract.json / end-contract.json files; the manifest copy was redundant.

Decision

Two related changes ship together:

  1. MigrationMetadata drops fromContract and toContract. The arktype schema in io.ts rejects manifests that still carry them (clean break, no tolerant loader). Hash framing is unaffected — those fields were never part of migrationHash (ADR 199).
  2. The migration runner is independent of contract sidecars. migration apply consumes migration.json + ops.json per package, plus the project-root / per-space contract.json for head state. The sibling start-contract.json / end-contract.json files remain for author-time convenience (typed access from migration.ts, predecessor lookup during migration plan), but a user who deletes every *-contract.json can still apply migrations. This is now pinned by a test rather than an aspiration (Migration System subsystem doc).

How it fits together

  1. Type and schema. MigrationMetadata (control-migration-types.ts) loses the two fields. MigrationMetadataSchema (io.ts) keeps '+': 'reject' so legacy manifests fail loud with a clear arktype error. computeMigrationHash (hash.ts) loses its strip destructure — there is nothing left to strip.

  2. Producers. migration-plan.ts and migration-new.ts stop assembling the two fields into baseMetadata. migration-base.ts:buildAttestedMetadata does the same; assertBookendsMatchMeta and the MIGRATION.STALE_CONTRACT_BOOKENDS error code are deleted alongside it.

  3. Predecessor lookup moves to disk. migration plan previously read predecessor.metadata.toContract to feed the planner's fromContract parameter. It now reads the predecessor's sibling end-contract.json (migration-plan.ts). The MigrationPlanner.plan({ fromContract: Contract \| null, ... }) interface is unchanged; the planner stays file-I/O-free.

  4. materialiseMigrationPackage stops writing dead bytes. It used to emit a per-package contract.json that no reader consumed. The aggregate loader has always sourced per-space contract heads from <migrationsDir>/<spaceId>/contract.json, never from individual migration directories.

  5. Diagnostics for missing predecessor. If the predecessor's end-contract.json is gone, migration plan and migration new now raise errorFileNotFound (PN-CLI-4004) naming the file and pointing the operator at re-emitting the predecessor. Previously this bubbled a raw ENOENT stack through Commander.

  6. All committed manifests regenerated. 123 migration.json files across examples/, both extension seeds (pgvector, postgis), and every test fixture lose the inlined bodies. A separate small commit heals three retail-store manifests whose stored hashes had drifted from computeMigrationHash due to an earlier directory rename — that drift was pre-existing and only became visible once the framing was tightened.

Behavior changes & evidence

  • migration.json no longer carries fromContract / toContract. Manifests that still do are rejected with an arktype "unknown key" error at load time.

  • migration apply runs from {migration.json, ops.json} per package only.

    • Impl: io.ts (loader unchanged; this is a property)
    • Evidence: io.test.ts — loads a package whose directory holds only migration.json + ops.json and the multi-package equivalent, both asserting readdir returns exactly those two filenames
  • migration plan reads the predecessor contract from disk.

  • migration plan / migration new raise a structured PN-CLI-4004 when the predecessor's end-contract.json is missing.

  • materialiseMigrationPackage stops emitting per-package contract.json.

    • Impl: io.ts (materialiseMigrationPackage)
    • Evidence: io.test.ts — existing materialisation tests pin the new on-disk set
  • migrationHash for every existing migration is byte-identical. Verified by wip/strip-manifest-bookends.ts --check after regeneration: no drift across the 123 manifests touched.

Compatibility / migration / risk

  • Clean break, no shim. Old manifests carrying fromContract / toContract will fail to load with an arktype "unknown key" error. The only known external consumer is the Cipherstash extension; we are sending a heads-up directly with regeneration instructions.
  • No hash change. migrationHash was already storage-only (ADR 199); the contracts were stripped before hashing all along. Anyone who pinned a migrationHash value continues to see the same value.
  • ADR 169 is partially superseded. Its sections covering migration identity and embedded contracts are now obsolete; the ADR has been annotated to point at ADR 199 and this PR.
  • No SPI / API change to MigrationPlanner. The planner still takes { fromContract: Contract | null, ... } as a value, file I/O stays in the CLI.
  • Test suites: test:packages, test:integration, and test:e2e all pass on this branch.

Follow-ups

  • TML-2515 — define a general backwards-compatibility policy. Tracked separately; the clean-break stance taken here is a one-off motivated by zero shipping consumers other than the Cipherstash extension.

Alternatives considered

  • Tolerant loader that accepts and discards the legacy fields. Rejected because keeping '+': 'reject' on the schema is the simplest possible invariant, and the only external consumer is a single extension we can reach directly. A shim would have outlived its usefulness in days while permanently weakening the schema.
  • Move the predecessor contract into a content-addressed contracts/ directory. Genuinely tidier than the sibling-file convention, but out of scope for a redundancy-removal PR. The sibling-file approach is already proven and migration plan reads exactly one file per invocation.
  • Add a new ADR. ADR 199 (storage-only identity) and ADR 197 (snapshot files alongside packages) already cover the design space. The existing ADRs were annotated rather than duplicated.

Summary by CodeRabbit

  • Documentation

    • Updated Migration System documentation to clarify that migration identity is computed from manifest and operations only, excluding full contract details.
    • Documented that full contract snapshots are now stored in sibling files rather than inline in migration metadata.
    • Clarified that applying migrations requires only minimal dependencies, improving runner independence.
  • Chores

    • Standardized migration JSON file structure across all examples to reduce file size and improve maintainability.

Review Change Stack

@wmadden
wmadden requested a review from a team as a code owner May 14, 2026 13:28
@coderabbitai

coderabbitai Bot commented May 14, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: e0ee492e-dd4d-4e49-8d91-75f576e38236

📥 Commits

Reviewing files that changed from the base of the PR and between 69a386e and 08fafe6.

📒 Files selected for processing (103)
  • docs/architecture docs/adrs/ADR 169 - On-disk migration persistence.md
  • docs/architecture docs/subsystems/7. Migration System.md
  • examples/cipherstash-integration/migrations/app/20260512T1716_migration/migration.json
  • examples/cipherstash-integration/migrations/cipherstash/20260601T0000_install_eql_bundle/migration.json
  • examples/mongo-demo/migrations/app/20260409T1030_migration/migration.json
  • examples/mongo-demo/migrations/app/20260415_add-posts-author-index/migration.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260302T1200_staging_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260305T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260303T1000_merge_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260303T1100_merge_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260303T1200_merge_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260302T1200_bob_experiment/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260303T1200_bob_experiment_2/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260302T1100_widen_email/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260303T1000_email_default/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260304T1000_change_default/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260305T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260306T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260307T1000_kitchen_sink/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260308T1000_rollback/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260326T1428_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/linear/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/linear/app/20260302T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260304T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260305T1000_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260306T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260307T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260307T1100_late_branch/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260308T1000_add_everything/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260326T1430_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260326T1431_foobar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260326T1431_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260326T1432_foobar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260302T1100_staging/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260305T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260306T1000_rollback_to_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260304T1000_rollback_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260305T1000_rollback_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260306T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260304T1000_rollback_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260305T1000_rollback_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260303T1000_merge_1a/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260303T1100_merge_1b/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260304T1100_add_posts_branch/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260305T1000_merge_2a/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260305T1100_merge_2b/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/app/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260304T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260305T1000_rollback_to_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260306T1000_rollback_to_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/app/20260301T1000_init/migration.json
💤 Files with no reviewable changes (98)
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260303T1000_email_default/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260305T1000_rollback_to_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260304T1000_rollback_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260326T1432_foobar/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260303T1100_merge_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260304T1000_rollback_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260301T1000_init/migration.json
  • examples/mongo-demo/migrations/app/20260409T1030_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260307T1100_late_branch/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260305T1000_merge_2a/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260302T1100_staging/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260306T1000_rollback_to_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260302T1200_staging_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260303T1000_merge_1a/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260304T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260302T1100_widen_email/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/linear/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260303T1100_merge_1b/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260304T1000_change_default/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260302T1200_bob_experiment/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260308T1000_rollback/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260303T1200_merge_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260303T1000_merge_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260307T1000_kitchen_sink/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260306T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260303T1200_bob_experiment_2/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260304T1100_add_posts_branch/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260326T1431_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260307T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260305T1000_rollback_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260306T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/app/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260306T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260326T1430_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/app/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/app/20260303T1000_merge_alice/migration.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.json
  • examples/prisma-next-demo/migration-fixtures/linear/app/20260302T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260326T1431_foobar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260304T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/app/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/app/20260305T1000_rollback_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260308T1000_add_everything/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/app/20260305T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260306T1000_rollback_to_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260305T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/app/20260326T1428_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/app/20260305T1000_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/app/20260305T1100_merge_2b/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/app/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/app/20260305T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/app/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/app/20260302T1000_add_phone/migration.json
✅ Files skipped from review due to trivial changes (3)
  • examples/cipherstash-integration/migrations/cipherstash/20260601T0000_install_eql_bundle/migration.json
  • docs/architecture docs/adrs/ADR 169 - On-disk migration persistence.md
  • docs/architecture docs/subsystems/7. Migration System.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • examples/cipherstash-integration/migrations/app/20260512T1716_migration/migration.json
  • examples/mongo-demo/migrations/app/20260415_add-posts-author-index/migration.json

📝 Walkthrough

Walkthrough

Documentation and example migration.json files updated to simplify the on-disk migration manifest format. Migration identity is now defined as migrationHash computed from stripped manifest plus ops, excluding embedded contract IRs. Hundreds of example fixture files remove embedded fromContract/toContract snapshots, leaving only top-level from/to hashes and metadata fields.

Changes

Migration manifest format revision

Layer / File(s) Summary
Documentation: migration identity and verification model
docs/architecture/adrs/ADR 169 - On-disk migration persistence.md, docs/architecture/subsystems/7. Migration System.md
ADR 169 marked partially superseded; documented two divergences: (1) migration identity is migrationHash from (strippedManifest, ops) excluding contract IRs; (2) migration.json no longer embeds full fromContract/toContract, moving them to sibling start-contract.*/end-contract.* files. Migration System docs updated throughout: directory layout example, emit/apply steps, edges model, contract snapshot scaffolding, file layout diagram, edge attestation identity definition, state lifecycle (placeholder blocking and migrationHash advancement), planner flow after placeholder completion, and guardrails (ops edits require re-attestation; non-storage contract edits do not).
Example migration.json files: compact format
examples/*/migrations/**/migration.json, examples/prisma-next-demo/migration-fixtures/**/migration.json
Across 100+ migration.json fixture and example files (cipherstash, mongo-demo, multi-extension, prisma-next, prisma-next-postgis, and complex/converging-branches/diamond/kitchen-sink/linear/long-spine/multi-branch/multi-rollback-branch/rollback-continue/rollback/sequential-diamonds/single-branch/skip-rollback/sub-branches fixture suites): removed embedded fromContract/toContract contract payloads, leaving only top-level from/to hash values followed by hints, labels, providedInvariants, createdAt, and migrationHash. Some files reformatted arrays (e.g., providedInvariants from single-line to multi-line) or adjusted metadata field ordering.

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly Related PRs

  • prisma/prisma-next#384: Implements loader-time migrationHash verification and (metadata, ops) hashing rules, directly aligned with this PR's documentation of the new identity computation model.

Poem

📜 A rabbit's ode to compact files

Our manifests grew lean and spare,
No contracts nested deep within—
Just hashes pure, with metadata fair,
Let external snapshots now begin! 🐰✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tml-2512-gotcha-migrationjson-inlines-full-fromto-contracts-already

@pkg-pr-new

pkg-pr-new Bot commented May 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@prisma-next/extension-upgrade-skill

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-upgrade-skill@502

@prisma-next/skills

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/skills@502

@prisma-next/upgrade-skill

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/upgrade-skill@502

@prisma-next/mongo-runtime

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-runtime@502

@prisma-next/family-mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/family-mongo@502

@prisma-next/sql-runtime

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-runtime@502

@prisma-next/family-sql

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/family-sql@502

@prisma-next/extension-arktype-json

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-arktype-json@502

@prisma-next/extension-cipherstash

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-cipherstash@502

@prisma-next/middleware-cache

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/middleware-cache@502

@prisma-next/mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo@502

@prisma-next/extension-paradedb

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-paradedb@502

@prisma-next/extension-pgvector

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-pgvector@502

@prisma-next/extension-postgis

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/extension-postgis@502

@prisma-next/postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/postgres@502

@prisma-next/sql-orm-client

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-orm-client@502

@prisma-next/sqlite

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sqlite@502

@prisma-next/target-mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/target-mongo@502

@prisma-next/adapter-mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/adapter-mongo@502

@prisma-next/driver-mongo

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/driver-mongo@502

@prisma-next/contract

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/contract@502

@prisma-next/utils

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/utils@502

@prisma-next/config

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/config@502

@prisma-next/errors

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/errors@502

@prisma-next/framework-components

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/framework-components@502

@prisma-next/operations

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/operations@502

@prisma-next/ts-render

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/ts-render@502

@prisma-next/contract-authoring

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/contract-authoring@502

@prisma-next/ids

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/ids@502

@prisma-next/psl-parser

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/psl-parser@502

@prisma-next/psl-printer

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/psl-printer@502

@prisma-next/cli

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/cli@502

@prisma-next/emitter

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/emitter@502

@prisma-next/migration-tools

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/migration-tools@502

prisma-next

npm i https://pkg.pr.new/prisma/prisma-next@502

@prisma-next/vite-plugin-contract-emit

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/vite-plugin-contract-emit@502

@prisma-next/mongo-codec

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-codec@502

@prisma-next/mongo-contract

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-contract@502

@prisma-next/mongo-value

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-value@502

@prisma-next/mongo-contract-psl

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-contract-psl@502

@prisma-next/mongo-contract-ts

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-contract-ts@502

@prisma-next/mongo-emitter

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-emitter@502

@prisma-next/mongo-schema-ir

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-schema-ir@502

@prisma-next/mongo-query-ast

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-query-ast@502

@prisma-next/mongo-orm

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-orm@502

@prisma-next/mongo-query-builder

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-query-builder@502

@prisma-next/mongo-lowering

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-lowering@502

@prisma-next/mongo-wire

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/mongo-wire@502

@prisma-next/sql-contract

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract@502

@prisma-next/sql-errors

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-errors@502

@prisma-next/sql-operations

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-operations@502

@prisma-next/sql-schema-ir

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-schema-ir@502

@prisma-next/sql-contract-psl

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-psl@502

@prisma-next/sql-contract-ts

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-ts@502

@prisma-next/sql-contract-emitter

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-contract-emitter@502

@prisma-next/sql-lane-query-builder

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-lane-query-builder@502

@prisma-next/sql-relational-core

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-relational-core@502

@prisma-next/sql-builder

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/sql-builder@502

@prisma-next/target-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/target-postgres@502

@prisma-next/target-sqlite

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/target-sqlite@502

@prisma-next/adapter-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/adapter-postgres@502

@prisma-next/adapter-sqlite

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/adapter-sqlite@502

@prisma-next/driver-postgres

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/driver-postgres@502

@prisma-next/driver-sqlite

npm i https://pkg.pr.new/prisma/prisma-next/@prisma-next/driver-sqlite@502

commit: 08fafe6

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture` docs/subsystems/7. Migration System.md:
- Line 230: The manifest description uses two different keys for the same field;
replace occurrences of migrationId with migrationHash in the updated sections so
the on-disk manifest (migration.json) consistently documents the key as
migrationHash (you may still mention migrationId as a conceptual alias if
needed); ensure both the line showing "migration.json          # from/to hashes,
migrationId — no inlined contracts" and the other referenced spot use
migrationHash and update any explanatory text that refers to the storage key to
match migrationHash.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 988dac06-2942-4871-b240-abc039b18c8c

📥 Commits

Reviewing files that changed from the base of the PR and between 655d794 and f594338.

⛔ Files ignored due to path filters (2)
  • projects/migration-manifest-drop-inline-contracts/plan.md is excluded by !projects/**
  • projects/migration-manifest-drop-inline-contracts/spec.md is excluded by !projects/**
📒 Files selected for processing (163)
  • docs/architecture docs/adrs/ADR 169 - On-disk migration persistence.md
  • docs/architecture docs/subsystems/7. Migration System.md
  • examples/cipherstash-integration/migrations/app/20260512T1716_migration/migration.json
  • examples/cipherstash-integration/migrations/cipherstash/20260601T0000_install_eql_bundle/migration.json
  • examples/mongo-demo/migrations/app/20260409T1030_migration/migration.json
  • examples/mongo-demo/migrations/app/20260415_add-posts-author-index/migration.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260302T1200_staging_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260305T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260303T1000_merge_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260303T1100_merge_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260303T1200_merge_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260302T1200_bob_experiment/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260303T1200_bob_experiment_2/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260302T1100_widen_email/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260303T1000_email_default/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260304T1000_change_default/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260305T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260306T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260307T1000_kitchen_sink/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260308T1000_rollback/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260326T1428_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/linear/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/linear/20260302T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260304T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260305T1000_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260306T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260307T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260307T1100_late_branch/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260308T1000_add_everything/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260326T1430_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260326T1431_foobar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260326T1431_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260326T1432_foobar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260302T1100_staging/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260305T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260306T1000_rollback_to_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260304T1000_rollback_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260305T1000_rollback_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260306T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260304T1000_rollback_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260305T1000_rollback_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260303T1000_merge_1a/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260303T1100_merge_1b/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260304T1100_add_posts_branch/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260305T1000_merge_2a/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260305T1100_merge_2b/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260304T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260305T1000_rollback_to_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260306T1000_rollback_to_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260303T1100_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1300_add_category/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1400_add_settings/migration.json
  • examples/prisma-next-demo/migrations/app/20260422T0720_initial/migration.json
  • examples/prisma-next-demo/migrations/app/20260422T0742_migration/migration.json
  • examples/prisma-next-demo/migrations/app/20260422T0748_migration/migration.json
  • examples/prisma-next-postgis-demo/migrations/app/20260512T1309_migration/migration.json
  • examples/prisma-next-postgis-demo/migrations/postgis/20260601T0000_install_postgis_extension/migration.json
  • examples/retail-store/migrations/app/20260513T0505_initial/migration.json
  • examples/retail-store/migrations/app/20260513T0507_add_product_category_index/migration.json
  • examples/retail-store/migrations/app/20260513T0508_backfill_product_status/migration.json
  • packages/1-framework/1-core/framework-components/src/control/control-migration-types.ts
  • packages/1-framework/1-core/framework-components/src/control/control-spaces.ts
  • packages/1-framework/3-tooling/cli/src/commands/migration-new.ts
  • packages/1-framework/3-tooling/cli/src/commands/migration-plan.ts
  • packages/1-framework/3-tooling/cli/src/control-api/types.ts
  • packages/1-framework/3-tooling/cli/test/commands/migration-apply.test.ts
  • packages/1-framework/3-tooling/cli/test/commands/migration-e2e.test.ts
  • packages/1-framework/3-tooling/cli/test/commands/migration-invariants.test.ts
  • packages/1-framework/3-tooling/cli/test/commands/migration-plan-command.test.ts
  • packages/1-framework/3-tooling/cli/test/commands/migration-plan.test.ts
  • packages/1-framework/3-tooling/cli/test/commands/migration-ref.test.ts
  • packages/1-framework/3-tooling/cli/test/commands/migration-show.test.ts
  • packages/1-framework/3-tooling/cli/test/commands/migration-tamper.test.ts
  • packages/1-framework/3-tooling/cli/test/control-api/db-init.test.ts
  • packages/1-framework/3-tooling/cli/test/control-api/db-update.test.ts
  • packages/1-framework/3-tooling/cli/test/migration-cli.test.ts
  • packages/1-framework/3-tooling/cli/test/utils/contract-space-seed-phase.test.ts
  • packages/1-framework/3-tooling/migration/README.md
  • packages/1-framework/3-tooling/migration/src/errors.ts
  • packages/1-framework/3-tooling/migration/src/hash.ts
  • packages/1-framework/3-tooling/migration/src/io.ts
  • packages/1-framework/3-tooling/migration/src/migration-base.ts
  • packages/1-framework/3-tooling/migration/test/deletable-node-modules.test.ts
  • packages/1-framework/3-tooling/migration/test/fixtures.ts
  • packages/1-framework/3-tooling/migration/test/hash.test.ts
  • packages/1-framework/3-tooling/migration/test/io.test.ts
  • packages/1-framework/3-tooling/migration/test/materialise-extension-migration-package-if-missing.test.ts
  • packages/1-framework/3-tooling/migration/test/materialise-migration-package.test.ts
  • packages/1-framework/3-tooling/migration/test/migration-base.test.ts
  • packages/2-mongo-family/9-family/src/core/mongo-target-descriptor.ts
  • packages/2-sql/9-family/src/core/migrations/types.ts
  • packages/3-extensions/cipherstash/migrations/20260601T0000_install_eql_bundle/migration.json
  • packages/3-extensions/paradedb/migrations/20260601T0000_install_pg_search_extension/migration.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/migration.json
  • packages/3-extensions/pgvector/migrations/20260601T0000_install_vector_extension/migration.ts
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/migration.json
  • packages/3-extensions/postgis/migrations/20260601T0000_install_postgis_extension/migration.ts
  • packages/3-targets/6-adapters/postgres/test/migrations/db-init-update.cli.integration.test.ts
  • packages/3-targets/6-adapters/sqlite/test/migrations/db-init-update.cli.test.ts
  • test/integration/test/contract-space-fixture-mongo/migrations.ts
  • test/integration/test/contract-space-fixture/migrations.ts
  • test/integration/test/extension-pgvector-scenario-a.e2e.integration.test.ts
💤 Files with no reviewable changes (111)
  • examples/prisma-next-demo/migration-fixtures/diamond/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/linear/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260303T1000_email_default/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260304T1000_rollback_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260303T1100_merge_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260304T1000_rollback_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260303T1000_merge_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260302T1200_staging_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260305T1000_rollback_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1400_add_settings/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260304T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/linear/20260302T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260306T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260303T1000_merge_1a/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260306T1000_rollback_to_init/migration.json
  • examples/multi-extension-monorepo/packages/feature-flags/migrations/20260601T0000_create_feature_flag/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260305T1000_rollback_to_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260303T1100_merge_1b/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260326T1431_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260303T1200_merge_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migrations/app/20260422T0720_initial/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260305T1100_merge_2b/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260326T1430_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260303T1000_add_bio/migration.json
  • examples/mongo-demo/migrations/app/20260409T1030_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260326T1432_foobar/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback/20260305T1000_rollback_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/rollback-continue/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260305T1000_merge_2a/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260304T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260304T1100_add_posts_branch/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260307T1000_kitchen_sink/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260326T1431_foobar/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migrations/app/20260422T0742_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260303T1100_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260326T1428_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-branch/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260304T1000_change_default/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260302T1100_widen_email/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260307T1100_late_branch/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260305T1000_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260303T1000_add_bio/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260306T1000_rollback_to_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260301T1000_init/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260305T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260306T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260305T1000_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260302T1100_staging/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1100_add_posts/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260307T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260308T1000_rollback/migration.json
  • examples/prisma-next-demo/migration-fixtures/converging-branches/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/kitchen-sink/20260306T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1200_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260303T1000_merge_alice/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260305T1000_add_tags/migration.json
  • examples/prisma-next-demo/migration-fixtures/single-branch/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migrations/app/20260422T0748_migration/migration.json
  • examples/prisma-next-demo/migration-fixtures/long-spine/20260308T1000_add_everything/migration.json
  • examples/prisma-next-demo/migration-fixtures/sub-branches/20260303T1000_add_bio/migration.json
  • examples/multi-extension-monorepo/packages/audit/migrations/20260601T0000_create_audit_event/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond/20260303T1100_merge_bob/migration.json
  • examples/prisma-next-demo/migration-fixtures/skip-rollback/20260302T1000_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260303T1200_bob_experiment_2/migration.json
  • examples/prisma-next-demo/migration-fixtures/diamond-sub-branch/20260302T1200_bob_experiment/migration.json
  • examples/prisma-next-demo/migration-fixtures/multi-rollback-branch/20260304T1000_add_comments/migration.json
  • examples/prisma-next-demo/migration-fixtures/complex/20260302T1100_bob_add_avatar/migration.json
  • examples/prisma-next-demo/migration-fixtures/sequential-diamonds/20260302T1000_alice_add_phone/migration.json
  • examples/prisma-next-demo/migration-fixtures/wide-fan/20260302T1300_add_category/migration.json

@wmadden
wmadden force-pushed the tml-2512-gotcha-migrationjson-inlines-full-fromto-contracts-already branch from 86c4f24 to 486f8c8 Compare May 14, 2026 14:44
@wmadden wmadden mentioned this pull request May 14, 2026
5 tasks done
wmadden added a commit that referenced this pull request May 15, 2026
Adds projects/prisma-next-agent-skill/specs/upgrade-skill.spec.md as a
hand-off artefact for an implementer.

Pins the two-skill architecture (published @prisma-next/upgrade-skill
plus in-repo .agents/skills/record-recipe/), the per-transition recipe
layout (one recipe.md per transition plus colocated portable scripts),
the publish-pipeline gate that refuses to ship a version with an
examples/ or packages/3-extensions/ diff but no covering recipe, and
the validation-by-execution protocol (the change-making agent runs the
recipe against in-repo example apps and extensions before merge).

Records 20 functional requirements, 8 non-functional requirements,
12 acceptance criteria, and 2 residual implementer questions. PR #502
(migration.json bookend drop) is the worked example throughout.

Refs: TML-2514, TML-2515
Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 15, 2026
Adds projects/prisma-next-agent-skill/specs/upgrade-skill.spec.md as a
hand-off artefact for an implementer.

Pins the two-skill architecture (published @prisma-next/upgrade-skill
plus in-repo .agents/skills/record-recipe/), the per-transition recipe
layout (one recipe.md per transition plus colocated portable scripts),
the publish-pipeline gate that refuses to ship a version with an
examples/ or packages/3-extensions/ diff but no covering recipe, and
the validation-by-execution protocol (the change-making agent runs the
recipe against in-repo example apps and extensions before merge).

Records 20 functional requirements, 8 non-functional requirements,
12 acceptance criteria, and 2 residual implementer questions. PR #502
(migration.json bookend drop) is the worked example throughout.

Refs: TML-2514, TML-2515
Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 15, 2026
Adds projects/prisma-next-agent-skill/specs/upgrade-skill.spec.md as a
hand-off artefact for an implementer.

Pins the two-skill architecture (published @prisma-next/upgrade-skill
plus in-repo .agents/skills/record-recipe/), the per-transition recipe
layout (one recipe.md per transition plus colocated portable scripts),
the publish-pipeline gate that refuses to ship a version with an
examples/ or packages/3-extensions/ diff but no covering recipe, and
the validation-by-execution protocol (the change-making agent runs the
recipe against in-repo example apps and extensions before merge).

Records 20 functional requirements, 8 non-functional requirements,
12 acceptance criteria, and 2 residual implementer questions. PR #502
(migration.json bookend drop) is the worked example throughout.

Refs: TML-2514, TML-2515
Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 15, 2026
Adds projects/prisma-next-agent-skill/specs/upgrade-skill.spec.md as a
hand-off artefact for an implementer.

Pins the two-skill architecture (published @prisma-next/upgrade-skill
plus in-repo .agents/skills/record-recipe/), the per-transition recipe
layout (one recipe.md per transition plus colocated portable scripts),
the publish-pipeline gate that refuses to ship a version with an
examples/ or packages/3-extensions/ diff but no covering recipe, and
the validation-by-execution protocol (the change-making agent runs the
recipe against in-repo example apps and extensions before merge).

Records 20 functional requirements, 8 non-functional requirements,
12 acceptance criteria, and 2 residual implementer questions. PR #502
(migration.json bookend drop) is the worked example throughout.

Refs: TML-2514, TML-2515
Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 15, 2026
Introduces the new `packages/0-shared/` tier (alongside `0-config`) and
populates it with the two leaf publish-only workspace packages that
will be distributed via npm as agent skills:

- `@prisma-next/upgrade-skill` — for users of Prisma Next. Its
  `SKILL.md` carries the consumer-facing flow: Step 0 ensure-latest,
  the FR27 pre-flight that reads `prisma-next.config.ts` and each
  installed extension's pinned `@prisma-next/*` version before
  refusing to upgrade past the lowest pin, role detection, version
  detection, the per-minor transition chain, and the bump → install →
  instructions → validate → commit per-step loop.

- `@prisma-next/extension-upgrade-skill` — for extension authors.
  Same shape minus the user-side pre-flight, plus a
  `pnpm exec prisma-next-check-pins` sanity check after each bump
  step. Declares a `bin` for `prisma-next-check-pins`; the bin file
  is a stub for this milestone (real CLI lands next).

Both packages ship a placeholder `upgrades/0.6-to-0.7/instructions.md`
with `changes: []` so the publish gate has a real directory to verify
against; the first real entries land via PR #502's rebase.

Neither package declares the other as any kind of dependency
(satisfies the hard requirement that the two skills have no
cross-package dep).

The `0-shared` tier mirrors `0-config`'s precedent: not registered
in `architecture.config.json` (and therefore not enumerated by
`dependency-cruiser.config.mjs` either) — the packages have no
runtime dependencies and are not imported by any other workspace
package, so they need no module-group entry.

`pnpm-workspace.yaml` already covers them via `packages/**`; no
additional wiring is needed.

m1 of the upgrade-skill mechanism (TML-2519). The placeholder
`SKILL.md` bodies, README content, and stub bin are the substrate
the next milestones will fill in.

Signed-off-by: Will Madden <[email protected]>
wmadden added a commit that referenced this pull request May 15, 2026
Introduces the new `packages/0-shared/` tier (alongside `0-config`) and
populates it with the two leaf publish-only workspace packages that
will be distributed via npm as agent skills:

- `@prisma-next/upgrade-skill` — for users of Prisma Next. Its
  `SKILL.md` carries the consumer-facing flow: Step 0 ensure-latest,
  the FR27 pre-flight that reads `prisma-next.config.ts` and each
  installed extension's pinned `@prisma-next/*` version before
  refusing to upgrade past the lowest pin, role detection, version
  detection, the per-minor transition chain, and the bump → install →
  instructions → validate → commit per-step loop.

- `@prisma-next/extension-upgrade-skill` — for extension authors.
  Same shape minus the user-side pre-flight, plus a
  `pnpm exec prisma-next-check-pins` sanity check after each bump
  step. Declares a `bin` for `prisma-next-check-pins`; the bin file
  is a stub for this milestone (real CLI lands next).

Both packages ship a placeholder `upgrades/0.6-to-0.7/instructions.md`
with `changes: []` so the publish gate has a real directory to verify
against; the first real entries land via PR #502's rebase.

Neither package declares the other as any kind of dependency
(satisfies the hard requirement that the two skills have no
cross-package dep).

The `0-shared` tier mirrors `0-config`'s precedent: not registered
in `architecture.config.json` (and therefore not enumerated by
`dependency-cruiser.config.mjs` either) — the packages have no
runtime dependencies and are not imported by any other workspace
package, so they need no module-group entry.

`pnpm-workspace.yaml` already covers them via `packages/**`; no
additional wiring is needed.

m1 of the upgrade-skill mechanism (TML-2519). The placeholder
`SKILL.md` bodies, README content, and stub bin are the substrate
the next milestones will fill in.

Signed-off-by: Will Madden <[email protected]>
@wmadden
wmadden force-pushed the tml-2512-gotcha-migrationjson-inlines-full-fromto-contracts-already branch from 486f8c8 to 69a386e Compare May 16, 2026 12:44
wmadden added 12 commits May 16, 2026 18:30
…512)

Spec and plan for removing the inlined fromContract / toContract fields
from migration.json. The destination contract already lives in the
sibling end-contract.json on disk; the inlined copy roughly doubles
every migration artefact for non-trivial schemas.

Locks in a structural property along the way: the runner depends only on
migration.json + ops.json + the project-root contract.json. Per-migration
*-contract.json files are authoring-time conveniences for migration plan
and migration.ts, never apply-time dependencies. A regression test pins
this.

Refs: TML-2512, TML-2515 (broader back-compat policy work)
Supersedes: TML-2274 (closed as duplicate)
Signed-off-by: Will Madden <[email protected]>
…oContract fields

Locks in the post-TML-2512 manifest shape: a migration.json carrying
either inlined contract field must be rejected at read time, not silently
tolerated. The fields will be removed from MigrationMetadata in the next
commit; this test fails today (the manifest is currently accepted) and
goes green once the schema drops them.

Refs: TML-2512
Signed-off-by: Will Madden <[email protected]>
…ifest

The migration.json manifest no longer carries fromContract / toContract.
The destination contract for a migration lives in the sibling
end-contract.json file authored alongside the package; the predecessor
contract lives in its own directory's end-contract.json. This removes
the duplication that roughly doubled every migration artefact for
non-trivial schemas.

Concrete changes:

- MigrationMetadata no longer declares fromContract / toContract.
- MigrationMetadataSchema in io.ts rejects manifests carrying either
  field (strict mode via the existing `+: reject` policy). A pair of
  regression tests pins this.
- computeMigrationHash continues to ignore the dropped fields (no behavior
  change for the hash itself - ADR 199 has always treated contracts as
  out-of-hash); the strip destructure is simplified accordingly.
- migration plan now reads the predecessor's contract by parsing
  <predecessorDir>/end-contract.json. migration new no longer needs the
  parsed contract at all (it only scaffolds an empty migration.ts).
- materialiseMigrationPackage stops writing a per-package contract.json
  side-car. The runtime aggregate loader has always read the per-space
  contract head from <migrationsDir>/<spaceId>/contract.json, never from
  individual migration directories - the side-car was dead bytes.
- assertBookendsMatchMeta and the MIGRATION.STALE_CONTRACT_BOOKENDS error
  code are removed. With contracts no longer inlined in the manifest, the
  staleness mismatch they guarded against can no longer occur.
- Test fixtures and CLI tests updated to match the new metadata shape.

Refs: TML-2512
Supersedes: TML-2274 (closed as duplicate)
Signed-off-by: Will Madden <[email protected]>
Repo-wide cross-check pass after Checkpoint A surfaced sites the
TypeScript-only sweep missed:

- `MigrationApplyStep.toContract` was a dead public-API field with no
  producer or consumer; dropped, along with the now-unused `Contract`
  import in the CLI control-api types.
- Two contract-space integration fixtures (sqlite + postgres + mongo)
  still hand-rolled `fromContract`/`toContract` into the metadata they
  wrote with `materialiseMigrationPackage`. The new schema rejected
  these as legacy fields and the loader surfaced a "contract-space
  integrity failure". Stripped the fields from each fixture.
- Refreshed stale doc-comments and README phrasing that referenced
  `metadata.toContract` as the source of truth for the predecessor
  contract (now read from `end-contract.json`) or the runners
  contract input (now the project-root contract).
- Dropped a leftover `toContract: {}` mock literal in
  `migration-plan-command.test.ts` that the CLI no longer reads.

`pnpm -r typecheck` and `pnpm test:packages` both clean (modulo two
pre-existing pg pool flakes that pass on focused reruns).

Refs: TML-2512
Signed-off-by: Will Madden <[email protected]>
…or rename

`f82073a6b examples(retail-store): rename masterCategory → primaryCategory`
edited the manifests' ops payloads in place but did not recompute
`migrationHash`, leaving these three entries internally inconsistent
(stored hash no longer reproduced against the on-disk ops). Healed by
recomputing the hash; identity is intentionally allowed to shift here
since these are example artefacts with no external pinned references
(verified by grep across the repo) and no `signature` field is present
on any manifest in the tree.

Caught while running the manifest-strip pass for TML-2512: the strip
pass's hash-invariance guard refused to write these three because the
recomputed hash did not match the stored one, even though no actual
field-strip had taken place yet. Fixing this drift first keeps the
TML-2512 strip pass a pure deletion with no identity churn.

Signed-off-by: Will Madden <[email protected]>
…ifests

T7 of TML-2512. Sweep every on-disk `migration.json` in the tree and
remove the redundant `fromContract` / `toContract` keys; the full
contract IRs already live in sibling `start-contract.json` /
`end-contract.json` artefacts (or are reachable through them via the
predecessor link), so inlining them in the manifest was pure
duplication.

The pass is a pure deletion. Stored `migrationHash` values are
preserved verbatim — the hash framing in `computeMigrationHash` was
designed (ADR 199) to anchor migration identity on storage-hash
bookends (`from`, `to`) and the ops payload, not on contract IRs, so
stripping the keys does not change the content-addressed identity.
The strip script reads each manifest, deletes the two keys,
recomputes the hash against the bookend-less envelope, and refuses to
write if the value drifts. All 123 manifests cleared the invariance
check after the preceding retail-store heal commit.

Net diff: -26282 insertions / +132 deletions across 123 files (the
+132 is JSON re-serialisation of preserved keys; no value changes).

Refs: TML-2512
Signed-off-by: Will Madden <[email protected]>
… files

T8 of TML-2512. The migration loader must not require sibling
`start-contract.json` / `end-contract.json` files on disk; those are
author-time conveniences (TypeScript imports for `migration.ts` data
migrations, IDE jump-to-definition) rather than structural inputs to
the runner. The new tests:

- `loads a package whose directory holds only migration.json + ops.json`
  asserts the single-package reader succeeds against a directory that
  literally contains nothing else, and additionally asserts the
  directory listing itself is exactly those two files.
- `readMigrationsDir loads packages whose directories hold only
  migration.json + ops.json` asserts the multi-package directory
  scanner has the same property when iterating siblings.

These pin the contract that the apply / verify pipelines only consume
`{migration.json, ops.json}` per migration; future changes that
re-introduce a sidecar dependency (e.g. parsing `end-contract.json`
inside the loader) will fail here.

Refs: TML-2512
Signed-off-by: Will Madden <[email protected]>
…ndependence

T9 of TML-2512. Two doc updates:

- `docs/architecture docs/subsystems/7. Migration System.md`. The
  "File Layout" diagram now shows the actual per-package contents
  (`start-contract.{json,d.ts}` + `end-contract.{json,d.ts}` next to
  the manifest, not a single `contract.{json,d.ts}` pair). The "Model"
  paragraph drops the "edge embeds the full fromContract / toContract
  IR" wording — the bookends now hold storage hashes only — and points
  readers to the sibling snapshot files. The "Storage-only identity"
  paragraph drops the "canonicalized fromContract / toContract … are
  excluded from the hash" wording: the fields are not part of the
  manifest at all any more, so framing them as "excluded" is
  misleading. A new "Runner-side independence from contract snapshots"
  section names the durable property (apply only needs migration.json
  + ops.json per package, plus the project-root contract) and cites
  the regression test that pins it.
- `docs/architecture docs/adrs/ADR 169 - On-disk migration persistence.md`.
  Added a "Status" section at the top marking the ADR as partially
  superseded — sections 3 ("Content-addressed migration identity")
  and 7 ("Full contracts embedded in migration packages") were
  reversed by ADR 199 (storage-only identity) and the manifest strip
  driven by TML-2512. The body is preserved unchanged for historical
  context per the supersession convention used elsewhere in the ADR
  set.

Refs: TML-2512
Signed-off-by: Will Madden <[email protected]>
…sing

Closing the spec acceptance gap for TML-2512: `migration plan` and
`migration new` both reach for the previous migration's sibling
`end-contract.json` when an earlier migration exists, but neither
surfaced a useful diagnostic if that file was gone — they bubbled the
raw `ENOENT` up to Commander, which prints a bare stack trace.

Wrap both reads. `migration plan` raises `errorFileNotFound` from
within `readPredecessorEndContract`, names the predecessor directory
in the `why`, and points the operator at re-emitting the predecessor
migration in the `fix`. `migration plan`'s outer load-phase `catch`
forwards a `CliStructuredError` instance through unchanged rather than
re-wrapping it in a generic `errorUnexpected` envelope. `migration
new` does not parse the predecessor contract (it only copies the
sibling files), so the file read happens later inside
`copyFilesWithRename`; the same envelope is produced there.

New unit test in `migration-plan-command.test.ts` injects an `ENOENT`
into the mocked `readFile`, runs the command, and asserts the emitted
JSON error envelope names the missing file path, the predecessor
migration directory, and the operator-facing fix string. Empirically
verified end-to-end against the `prisma-next-demo` example: deleting
the latest migration's `end-contract.json` and re-running `migration
plan` now exits with `PN-CLI-4004` and the same structured payload
the unit test pins.

Refs: TML-2512
Signed-off-by: Will Madden <[email protected]>
…he on-disk key

The migration manifest field is named `migrationHash` in the schema
(`MigrationMetadataSchema` in `io.ts`) and in every committed
`migration.json`, but the subsystem doc inherited a long-standing
`migrationId` label that was used inconsistently — most uses referred
to the on-disk field name, not to a distinct conceptual identifier.

The runner-independence section added in this branch (line 255) already
uses `migrationHash`; this commit aligns the rest of the document with
the code and with that section, so a reader who lands on the File
Layout block or the Storage-only identity subsection sees the same
key name they will see when they open a `migration.json`.

Refs: TML-2512
Signed-off-by: Will Madden <[email protected]>
…s (TML-2512)

Adds matching `changes[]` entries to both the user-facing
`@prisma-next/upgrade-skill` and the `@prisma-next/extension-upgrade-skill`
packages, plus a shared `strip-inline-contracts.ts` colocated script
(duplicated per the no-cross-dep policy). The script walks the project
root, identifies every `migration.json` whose JSON has the manifest
shape (`from` / `to` / `migrationHash` keys), and excises any
`fromContract` / `toContract` properties at the text level.

The text-level strip preserves the formatting of every surviving field
byte-for-byte (whitespace, inline-vs-multiline arrays, key ordering,
trailing newline conventions), so the resulting diff for a downstream
consumer is exclusively the two key removals — no incidental
re-pretty-printing churn. The script reparses its own output as a
guard against accidental corruption.

The user-facing entry is purely the strip; users almost never read
`metadata.fromContract` / `metadata.toContract` from application code,
so the residual work is filesystem-level. The extension-author entry
adds a second `changes[]` entry naming the source-level rename / drop
work (TypeScript that constructs or destructures `MigrationMetadata`)
plus a prose pointer to scrub stale `toContract` references from seed
`migration.ts` doc comments — the framework-shipped seed migrations in
this PR were updated for exactly that reason.

Validation: ran the script against the substrate reverted to
`origin/main` state and confirmed it strips all 123 affected manifests
to the same shape the PR carries forward (the residual diff after
running consists only of three project-specific stale-hash repairs and
a couple of trailing-newline conventions, none of which are
upgrade-shaped transformations). `pnpm check:upgrade-coverage` passes.

Refs: TML-2512
Signed-off-by: Will Madden <[email protected]>
…nHash

Rebase resolution incorrectly kept a `signature` destructure that was
removed from `MigrationMetadata` on main, breaking typecheck and the
in-test type checker.

Signed-off-by: Will Madden <[email protected]>
@wmadden
wmadden force-pushed the tml-2512-gotcha-migrationjson-inlines-full-fromto-contracts-already branch from 2d4245b to 08fafe6 Compare May 16, 2026 16:33
@wmadden
wmadden merged commit f79849d into main May 16, 2026
16 checks passed
@wmadden
wmadden deleted the tml-2512-gotcha-migrationjson-inlines-full-fromto-contracts-already branch May 16, 2026 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant