From 882372d968141f22b6a11e6739e4b39c77b9f4af Mon Sep 17 00:00:00 2001 From: Steven McClankerton Date: Wed, 12 Aug 2026 17:17:55 +0000 Subject: [PATCH 1/2] chore(prisma7): remove completed project artifacts --- .../design-decisions.md | 11 - projects/prisma7-compatibility-cli/plan.md | 46 -- .../reviews/code-review.md | 711 ------------------ .../rollups/2026-08-10-opening-rollup.md | 36 - .../cli-owned-distribution-identity/plan.md | 81 -- .../pr-description.md | 18 - .../cli-owned-distribution-identity/spec.md | 68 -- .../walkthrough.md | 100 --- .../downstream-actionable-guidance/plan.md | 49 -- .../pr-description.md | 18 - .../downstream-actionable-guidance/spec.md | 66 -- .../walkthrough.md | 102 --- .../slices/side-by-side-wrapper/plan.md | 50 -- .../side-by-side-wrapper/pr-description.md | 19 - .../slices/side-by-side-wrapper/spec.md | 68 -- .../side-by-side-wrapper/walkthrough.md | 66 -- projects/prisma7-compatibility-cli/spec.md | 91 --- 17 files changed, 1600 deletions(-) delete mode 100644 projects/prisma7-compatibility-cli/design-decisions.md delete mode 100644 projects/prisma7-compatibility-cli/plan.md delete mode 100644 projects/prisma7-compatibility-cli/reviews/code-review.md delete mode 100644 projects/prisma7-compatibility-cli/rollups/2026-08-10-opening-rollup.md delete mode 100644 projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/plan.md delete mode 100644 projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/pr-description.md delete mode 100644 projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/spec.md delete mode 100644 projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/walkthrough.md delete mode 100644 projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/plan.md delete mode 100644 projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/pr-description.md delete mode 100644 projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/spec.md delete mode 100644 projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/walkthrough.md delete mode 100644 projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/plan.md delete mode 100644 projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/pr-description.md delete mode 100644 projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/spec.md delete mode 100644 projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/walkthrough.md delete mode 100644 projects/prisma7-compatibility-cli/spec.md diff --git a/projects/prisma7-compatibility-cli/design-decisions.md b/projects/prisma7-compatibility-cli/design-decisions.md deleted file mode 100644 index 639730e7911a..000000000000 --- a/projects/prisma7-compatibility-cli/design-decisions.md +++ /dev/null @@ -1,11 +0,0 @@ -# Design decisions - -## 1. Infer CLI distribution identity from the executed binary - -**Trigger:** Mid-flight falsified assumption, operator-authorized after a package-manager probe. - -**What was learned:** The original design assumed a private environment marker plus a global symbol was needed to carry `prisma7` identity across the wrapper and Prisma's separately bundled dispatcher/CLI/completion modules. A real-tarball `/tmp` probe showed that supported npm, pnpm, Yarn node-modules/PnP, Bun, package-script/exec, direct Node, and npm-global launches expose either a `prisma7` shim path or a `prisma7.js` target in `process.argv[1]`; normalizing the filename stem yields `prisma7` in every supported binary launch tested. - -**Decision:** Give the wrapper a distinctive `prisma7.js` target and derive immutable identity from `path.parse(process.argv[1]).name`. `prisma7` selects the compatibility identity; all other names default to ordinary `prisma`. Remove the environment marker, marker cleanup, global symbol, and dispatcher-side cross-bundle initialization. Custom renamed symlinks and programmatic `require()` callers default to `prisma` and are outside the supported binary-invocation contract. Windows execution remains a validation item because the Linux probe could inspect but not execute Windows shims. - -**Affected artifacts:** `projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/spec.md`, `projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/plan.md`, and open PR #29949. diff --git a/projects/prisma7-compatibility-cli/plan.md b/projects/prisma7-compatibility-cli/plan.md deleted file mode 100644 index 721ef95e4376..000000000000 --- a/projects/prisma7-compatibility-cli/plan.md +++ /dev/null @@ -1,46 +0,0 @@ -# prisma7 compatibility CLI — Plan - -**Spec:** `projects/prisma7-compatibility-cli/spec.md` -**Linear Project:** N/A — operator authorized planning and delivery without a Linear Project - -## At a glance - -This is a four-slice stack. It first establishes a runnable side-by-side package and stable identity contract, then completes Prisma 7 behavior under that identity in two reviewable layers, and finally makes the artifact safely publishable whenever the matching `prisma@7` version is published. - -## Composition - -### Stack (deliver in order) - -1. **Slice `side-by-side-wrapper`** — Linear: N/A - - **Outcome:** The workspace contains a buildable, packable `prisma7` package whose `prisma7` binary resolves and executes its exact Prisma 7 dependency alongside a direct Prisma 8 CLI, while forwarding the supported root and `prisma7/config` exports. The ordinary `prisma` invocation remains unchanged. - - **Builds on:** The existing Prisma CLI dispatcher and its published `./build/index.js`, root, and `./config` contracts. - - **Hands to:** A stable distribution-identity contract and an unpublished wrapper artifact that downstream work can invoke, inspect, and test without knowing its physical dependency layout. - - **Focus:** Identity selection, wrapper/package structure, exact dependency semantics, forwarded exports, executable dispatch/completion behavior, and focused resolution tests. Exhaustive user-facing wording and release automation remain for later slices. - -2. **Slice `cli-owned-distribution-identity`** — Linear: N/A - - **Outcome:** Every actionable distribution reference owned by `packages/cli` uses `prisma7` under the compatibility invocation: CLI-owned help and examples, generated `prisma7/config` imports, initialization/bootstrap guidance, version and mismatch labels, shell-completion setup, and update-check suppression. Existing `prisma` output and behavior remain regression-pinned. - - **Builds on:** Slice `side-by-side-wrapper`'s stable identity contract and runnable package. - - **Hands to:** A self-consistent CLI shell and project-creation lifecycle with an explicit primitive identity handoff for lower command packages. - - **Focus:** Direct CLI consumers of `CliDistributionIdentity`, dual-identity regression coverage, and a classified audit of remaining lower-layer guidance. Migrate, internals, and generator messages remain for the next slice; publishing stays out of scope. - -3. **Slice `downstream-actionable-guidance`** — Linear: N/A - - **Outcome:** Migrate/db commands and lower generator diagnostics receive the selected executable name and render actionable `prisma7` guidance without reversing package dependencies or changing Prisma domain terminology. - - **Builds on:** Slice `cli-owned-distribution-identity`'s identity-aware CLI composition and primitive handoff. - - **Hands to:** A complete, unpublished `prisma7` artifact whose command behavior and public identity satisfy the project contract and are safe for release integration. - - **Focus:** Systematic identity propagation through `@prisma/migrate`, `@prisma/internals`, and generator-owned diagnostics, plus dual-identity regression coverage. No lower package imports from `packages/cli`; low-level nested dependency paths remain intentionally visible. - -4. **Slice `release-mirroring-and-package-proof`** — Linear: N/A - - **Outcome:** Every exercised `prisma@7` publication path publishes the exact matching `prisma7` artifact afterward, can recover when the wrapper publication fails after Prisma succeeds, and never emits `prisma7` for a non-v7 publication. Packed side-by-side installs preserve the correct binaries and exports across npm, pnpm, Yarn, and Bun. - - **Builds on:** Slice `downstream-actionable-guidance`'s identity-complete package behavior and public surface. - - **Hands to:** A releasable compatibility package, deterministic mirroring/order contract, and package-manager evidence suitable for the first real `prisma7` publication. - - **Focus:** Version rewriting, unscoped dependency modeling, publish ordering and retry/idempotency, publication selection, packed-artifact inspection, and the cross-package-manager acceptance matrix. It consumes release-channel decisions made elsewhere and does not define their policy. Validation must use local artifacts and pre-provisioned package managers rather than installing or fetching tools inside repository tests. - -## Dependencies (external) - -- [ ] **npm package name and publish authority for `prisma7`** — the public registry currently returns `E404`; ownership/reservation and Prisma's authority to publish the unscoped name must be established before the release slice can close. -- [ ] **Prisma 7 publication signal/contract** — the separate release-policy project decides when and through which channel Prisma 7 is published; this project requires a reliable fact that a specific `prisma@7` artifact was published so it can mirror that exact version. -- [ ] **Provisioned package-manager environments for release acceptance** — local design probes succeeded with npm 11.16.0, pnpm 11.13.1/11.18.0, Yarn 4.14.1, and Bun 1.3.13; the release slice must place equivalent checks where those tools are already provisioned, without network installation inside tests. - -## Sequencing rationale - -The wrapper and identity transport are one coherent first boundary: an identity abstraction without a runnable alternate distribution would be preparation rather than a valuable slice, while a wrapper without the identity seam cannot meet even its package/version/config contract. Identity propagation then follows package ownership: CLI-owned lifecycle and rendering first, lower command and generator guidance second. This keeps each PR reviewable and preserves dependency direction while the package remains unpublished. Publication is last because the spec forbids exposing a half-branded artifact, and its ordering/recovery tests need the final package manifest and packed surface. No slices can safely run in parallel without either duplicating identity transport or creating a path that could publish incomplete behavior. diff --git a/projects/prisma7-compatibility-cli/reviews/code-review.md b/projects/prisma7-compatibility-cli/reviews/code-review.md deleted file mode 100644 index d12103915ef6..000000000000 --- a/projects/prisma7-compatibility-cli/reviews/code-review.md +++ /dev/null @@ -1,711 +0,0 @@ -# Code review — `prisma7 compatibility CLI` - -## Summary - -- **Current verdict:** SATISFIED -- **Dispatches SATISFIED:** side-by-side-wrapper D1, D2, D3, D4, D5, D6, D7; cli-owned-distribution-identity D1, D2, D3, D4, D5, D6, D7, D8, D9, D10; downstream-actionable-guidance D1, D2, D3, D4, D5, D6 -- **AC scoreboard totals:** 95 PASS / 0 FAIL / 0 NOT VERIFIED -- **Open findings:** 0 -- **Open escalations:** 0 - -## downstream-actionable-guidance D1 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | -------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D1-AC1 | Active migrate/db command-group and representative leaf help surfaces require explicit `cliCommand` and render it in help paths. | PASS | `b7fa50bea3`; `packages/migrate/src/commands/MigrateCommand.ts` and `DbCommand.ts` now require `cliCommand`, render help through instance-bound `renderHelp(...)`, and feed that help into `unknownCommand(...)` and `HelpError`. Representative leaves `MigrateResolve.ts` and `DbExecute.ts` also require `cliCommand` and use it in usage/examples plus validation-help strings such as `migrate resolve --applied ...` and `db execute -h`. Focused dual-identity coverage lives in `packages/migrate/src/__tests__/{MigrateCommand,DbCommand,MigrateResolve,DbExecute}.test.ts`. | -| D1-AC2 | CLI passes the selected identity; standalone/ordinary callers explicitly pass `prisma`. | PASS | `packages/cli/src/bin.ts` now threads `identity` into `MigrateCommand.new(...)`, `DbCommand.new(...)`, and every active migrate/db leaf factory. `packages/migrate/src/bin.ts` passes `'prisma'` explicitly for the standalone migrate entrypoint. Ordinary production/test callers were migrated to explicit `'prisma'` in `packages/cli/src/bootstrap/Bootstrap.ts`, `packages/client/src/__tests__/integration/__helpers__/migrateDb.ts`, `packages/client/tests/functional/_utils/setupTestSuiteEnv.ts`, and touched migrate/CLI test suites such as `packages/cli/src/__tests__/incomplete-schemas.test.ts`. | -| D1-AC3 | Tests prove both executable names for command-group and representative leaf paths without broad identity-suite duplication. | PASS | `packages/migrate/src/__tests__/MigrateCommand.test.ts` and `DbCommand.test.ts` use `describe.each(['prisma', 'prisma7'])` to prove help plus unknown-command output for both command groups with opposite-identity negatives. `MigrateResolve.test.ts` and `DbExecute.test.ts` use the same two-name matrix to prove help/examples plus validation-help errors for representative leaves, while the broader existing ordinary-`prisma` suites remain in place unchanged. | -| D1-AC4 | Dispatch stays in help-scope; runtime/recovery guidance remains out of scope for later work. | PASS | The commit is confined to constructor/callsite fanout and help-path renderers; it does not thread identity through the remaining runtime/recovery strings in `DbPull.ts`, `DbPush.ts`, `MigrateDev.ts`, or `MigrateStatus.ts`, which still contain ordinary `prisma ...` guidance and therefore remain clearly queued for Dispatch 2 rather than being partially mixed into this round. | -| D1-AC5 | Gates and mandatory transient scan are credible. | PASS | `git diff --check b7fa50bea3^..b7fa50bea3` passed in review. Root `package.json` has no `lint:deps` script, matching the implementation report's classification. The mandatory transient-ID scan over the round's added TS/JS diff produced no plan-ID or `projects/prisma7-compatibility-cli/` hits. Nothing on disk contradicts the reported focused migrate build/tests, Prisma build/tsc, Bootstrap test, Prettier, and transient scan. | - -**Overall slice verdict:** SATISFIED. D1 delivers the help-surface identity seam without dragging runtime guidance or generator work forward. - -## downstream-actionable-guidance D2 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | --------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------- | -| D2-AC1 | Active runtime migrate/db guidance derives actionable command strings from required `cliCommand`, including nested helpers. | PASS | `451c633d10`; active runtime guidance now threads `this.cliCommand` through `DbPull.ts`, `DbPush.ts`, `MigrateDev.ts`, `MigrateStatus.ts`, `utils/errors.ts`, and `utils/handleEvaluateDataloss.ts`. The changed `getCommandWithExecutor(...)` inputs all now receive full `${cliCommand} ...` strings, and a production grep over `packages/migrate/src/{commands,utils}` leaves no remaining active hardcoded `prisma db | migrate | generate | validate`runtime guidance outside disabled`DbDrop` help/comments and stable Prisma domain/path terminology. | -| D2-AC2 | Internals helper contract migration requires exact full commands, migrates all callsites, and adds no fallback identity. | PASS | `packages/internals/src/utils/validatePrismaConfigWithDatasource.ts` and `packages/internals/src/cli/checkUnsupportedDataProxy.ts` now require a full `command` string and render it verbatim. All active callsites were migrated: every `validatePrismaConfigWithDatasource(...)` / `checkUnsupportedDataProxy(...)` use in active migrate commands now passes `${cliCommand} ...`, while CLI/integration callers `packages/cli/src/Generate.ts`, `packages/cli/src/Init.ts`, `packages/client/tests/functional/_utils/setupTestSuiteClient.ts`, `packages/client/tests/functional/_utils/setupTestSuiteEnv.ts`, and `packages/migrate/src/bin.ts` pass explicit full commands with no optional/default identity path. | -| D2-AC3 | Focused tests prove both identities across representative runtime categories without unnecessary production test seams. | PASS | `cc07b4f32a` deletes the exported `renderCreateOnlySuccessMessage(...)` seam from `packages/migrate/src/commands/MigrateDev.ts` and removes the direct-helper assertion from `packages/migrate/src/__tests__/runtime-guidance.test.ts`. The remaining focused runtime suite still proves both identities across config-validation, warning/non-interactive errors, and unexecutable-step guidance categories, and no replacement seam/mock was introduced after the attempted command-level `prisma7` create-only proof hit the known Nix schema-engine limitation. | -| D2-AC4 | Remaining production literals are exhaustively and defensibly classified. | PASS | Reviewer audit over production `prisma ...` literals in the touched lower-package scope classifies the remaining occurrences as: disabled `DbDrop` help/examples (`packages/migrate/src/commands/DbDrop.ts`), stable domain/path names such as `prisma/migrations` and `prisma.config.ts`, or comments/docstrings. No additional active runtime command guidance escapee remains in the changed migrate/internals surfaces, and the standalone explicit ordinary entrypoint continues to pass `'prisma'` deliberately. | -| D2-AC5 | Gates are credible, the mandatory transient scan is clean, and D1 help remains intact. | PASS | Reviewer reran `pnpm --filter @prisma/migrate build`, `pnpm --filter @prisma/migrate test runtime-guidance.test.ts --runInBand`, and `git diff --check 451c633d10^..451c633d10`; all passed. The mandatory transient-ID scan over the 23 touched files found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. The D1 help renderers remain unchanged in this commit; the D2 diff is confined to runtime guidance, internals helper signatures, mechanical callsite migration, and focused tests. | - -**Overall slice verdict:** SATISFIED. D2 runtime guidance propagation, helper-contract migration, audit, and focused proof now meet the dispatch contract without a production-only test seam. - -## downstream-actionable-guidance D3 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D3-AC1 | `getGenerators` and its callers require an explicit `cliCommand`; missing model/no-generator guidance renders the selected command. | PASS | `2695ccd8a9`; `packages/internals/src/get-generators/getGenerators.ts` makes `cliCommand` required on `GetGeneratorOptions` and uses it for both SQL and Mongo missing-model guidance. `packages/cli/src/Generate.ts` now passes `cliCommand: this.identity` and renders `missingGeneratorMessage(this.identity)` in both normal and watch paths. Repo callsite audit shows active production `getGenerators(...)` calls only from `Generate`, while `getGenerator(...)` preserves the same required option for direct ordinary callers and touched tests pass `'prisma'` explicitly. Focused dual-identity coverage lands in `packages/internals/src/__tests__/getGenerators/getGenerators.test.ts` and `packages/cli/src/__tests__/commands/Generate.test.ts`. | -| D3-AC2 | Built-in client-generator identity is invocation-scoped, and missing-client recovery uses the selected command while package resolution stays stable. | PASS | `packages/cli/src/Generate.ts` switched from module-global `defaultRegistry` to `createDefaultRegistry(this.identity).toInternal()` for each generate invocation and each watch rebuild, so CLI identity no longer shares a mutable JS-generator instance across invocations. `packages/client-generator-registry/src/default.ts` keeps `defaultRegistry = createDefaultRegistry('prisma')` as an explicit ordinary export for existing consumers, while `createDefaultRegistry(cliCommand)` binds only the JS generator. `packages/client-generator-js/src/resolvePrismaClient.ts` now formats the rerun command with `cliCommand` but still resolves low-level packages via stable `resolvePkg('prisma', ...)` and `resolvePkg('@prisma/client', ...)`. Focused proof lives in `resolvePrismaClient.test.ts` and `default.test.ts`. | -| D3-AC3 | The change avoids CLI imports, ambient mutation, optional/default identity fallback, RPC/generator protocol expansion, and generated-runtime spillover. | PASS | The diff stays inside `packages/cli/src/Generate.ts`, `packages/internals/src/get-generators/getGenerators.ts`, `packages/internals/src/utils/missingGeneratorMessage.ts`, `packages/client-generator-registry/src/default.ts`, `packages/client-generator-js/src/{generator,resolvePrismaClient}.ts`, and focused tests/fixtures. No touched file imports from `packages/cli` into lower packages, no env/global channel or shared-state mutation is introduced, `cliCommand` is required rather than optional/defaulted, and no `@prisma/generator` RPC payload or generated-runtime surface changes. The remaining production `prisma generate` text under `packages/client-generator-js/src/generateClient.ts` is an unchanged generated-runtime/custom-output warning outside this dispatch boundary. | -| D3-AC4 | Dual-identity tests are focused, non-tautological, and do not add a production-only seam. | PASS | The new proof is proportionate: two `getGenerators` negative/positive identity assertions for missing-model guidance, one `Generate` no-generator identity assertion, two `resolvePrismaClient` assertions for selected-vs-ordinary rerun guidance, and a light `createDefaultRegistry('prisma7')` provider-shape check. No new production export/test seam was added, no broad snapshot suite was introduced, and the ordinary control remains explicit through existing `'prisma'` callers in touched generator tests. | -| D3-AC5 | Literal audit, gates, and mandatory transient scan are credible. | PASS | Reviewer reran `pnpm --filter @prisma/internals build`, `pnpm --filter @prisma/client-generator-registry build`, `pnpm --filter @prisma/client-generator-js build`, `pnpm --filter prisma build`, `pnpm exec vitest run tests/resolvePrismaClient.test.ts tests/generator.test.ts` from `packages/client-generator-js`, `pnpm exec vitest run src/default.test.ts` from `packages/client-generator-registry`, `pnpm exec jest --runInBand src/__tests__/commands/Generate.test.ts -t 'renders no-generator guidance with the selected executable'` from `packages/cli`, `PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1 pnpm exec vitest run src/**tests**/getGenerators/getGenerators.test.ts -t 'prisma7 sqlite guidance | prisma7 mongodb guidance'`from`packages/internals`, and `git diff --check 2695ccd8a9^..2695ccd8a9`; all passed. The mandatory transient-ID scan over the 14 touched files found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/`hits. A broader rerun of the full`getGenerators`and`Generate` suites still hits known Nix/env issues (engine checksum/download noise, platform-specific snapshots, and missing external test env vars) outside the new D3 identity assertions, so I treated those as non-blocking environmental noise rather than regressions in this commit. | - -**Overall slice verdict:** SATISFIED. D3 completes the generator-diagnostic identity seam without leaking CLI ownership or widening the protocol surface. - -## downstream-actionable-guidance D4 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D4-AC1 | The single packed installed-artifact scenario proves representative `migrate`, `db`, and `generate` downstream guidance with positive `prisma7` and negative `prisma` evidence while keeping the prior smoke. | PASS | `4f08193fc8`; `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` extends the existing lone packed test rather than adding a second scenario. The installed `prisma7` artifact now exercises `migrate status` config guidance, `db push` data-loss guidance after a seeded destructive schema change, `generate` no-generator guidance, `generate --require-models` missing-model guidance, and `generate` missing-`@prisma/client` guidance. Each new assertion proves the `prisma7` string and the opposite ordinary-`prisma` negative, while the pre-existing top-level/delegated help, version, completion, init, `tsc`, `generate`, `db push --force-reset`, and generated-client smoke remain intact in the same test body. | -| D4-AC2 | The new evidence is deterministic, proportionate, command-local, and cleanup/failure semantics remain explicit. | PASS | The diff stays inside the packed test plus its lockfile refresh; no product seam, mock suite, second scenario, or broad snapshot file is added. `runExpectFailure(...)` asserts nonzero exit codes for every negative command, `finally` removes all six temp projects, and the helper builds each project from minimal local files only. I independently confirmed Node drops `undefined` env entries passed through `spawnSync`, so the helper does not leak host-specific identity if an override is omitted. I also independently reproduced `@antfu/ni` detection for a bare temp project under `pnpm exec`: with only `package.json` present it deterministically falls back to npm and formats the missing-client rerun hint as `npx "prisma7 generate"`, which matches the passing packed assertion. The full reviewer rerun `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility` passed in 39.495s including pack/install/Docker overhead, leaving comfortable margin under the test's 120_000ms timeout despite the six serial temp projects. | -| D4-AC3 | The production literal audit is exhaustive and leaves no active actionable ordinary-`prisma` escapee inside the slice boundary. | PASS | Reviewer grep across the named production scope found only classified residuals: `packages/migrate/src/commands/DbDrop.ts` retains disabled preview help/examples outside the active boundary; `packages/migrate/src/commands/MigrateStatus.ts` retains comment-only references; `packages/internals/src/cli/checkUnsupportedDataProxy.ts` retains JSDoc example text; and `packages/client-generator-js/src/generateClient.ts` retains a generated-runtime warning/comment about `prisma generate`, which the slice spec explicitly leaves ordinary because it executes later without CLI invocation context. No active runtime/help/diagnostic string reachable from `prisma7 migrate`, `prisma7 db`, or `prisma7 generate` remains as an unclassified actionable ordinary-`prisma` escapee. | -| D4-AC4 | Ordinary behavior and relevant gates are green; reported root lint/Prettier failures are verified unrelated to this change. | PASS | Reviewer reran `pnpm exec prettier --check packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts packages/client/tests/e2e/prisma7-compatibility/pnpm-lock.yaml`, `pnpm exec eslint packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts`, `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility`, and `git diff --check 4f08193fc8^..4f08193fc8`; all passed. Root `pnpm prettier-check` does fail, but only on unrelated pre-existing generated fixture files under `packages/client-generator-js/tests/generated-no-models/**`, not on the two files touched by `4f08193fc8`. Root `pnpm lint` still reports large repo-wide debt (113 errors / 3237 warnings before the reviewer timeout) and never implicates `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` or its lockfile, so I accept the round's root failures as unrelated noise rather than a regression introduced by this commit. | -| D4-AC5 | The overall slice contract still holds with no open finding. | PASS | `4f08193fc8` changes only the packed E2E proof (`tests/main.test.ts`) plus the expected tarball-integrity refresh in the fixture lockfile; no production package surface, dependency direction, ambient/global identity channel, fallback/backcompat API, or RPC/generator-protocol contract changes are introduced. The D1-D3 downstream propagation work remains intact on disk, D4 adds the requested representative installed-artifact proof and final audit only, and the mandatory transient-ID scan over the two touched files found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. No open finding remains. Slice DoD is met. | - -**Overall slice verdict:** SATISFIED. D1-D4 now hold together as one complete downstream actionable-guidance slice, and the slice-specific done condition is met. - -## downstream-actionable-guidance D5 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | --------- | ------ | ------ | ---------- | ------------- | -------------- | ------------ | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D5-AC1 | All external direct construction of D1-required command classes is eliminated; only class-internal factories still call `new`. | PASS | Reviewer grep over `new (DbPull | DbPush | DbExecute | DbSeed | DbDrop | MigrateDev | MigrateStatus | MigrateResolve | MigrateReset | MigrateDeploy | MigrateDiff)\(`now returns only the`return new ...`lines inside each command class factory in`packages/migrate/src/commands/\*.ts`. No external constructor bypass remains on disk. | -| D5-AC2 | Every migrated legacy `DbPull` ordinary test now uses explicit `'prisma'`, preserving ordinary snapshot intent. | PASS | `115752f540` is a pure mechanical replacement round: 57 deletions of `new DbPull()` become 57 insertions of `DbPull.new('prisma')` across 13 legacy test files in `packages/migrate/src/__tests__/DbPull/**`, `packages/migrate/src/__tests__/handlePanic.introspect.test.ts`, and `packages/cli/src/__tests__/artificial-panic.test.ts`. The diff introduces no `prisma7` argument and no behavioral assertion churn, so the existing ordinary snapshots stay semantically anchored to the same executable name. | -| D5-AC3 | No production API weakening or unrelated snapshot churn is introduced. | PASS | `git show --stat 115752f540` shows test-only fanout: 13 test files changed, 0 production files, 0 helper signatures, 0 overload/default/fallback additions. The diff contains only constructor-call replacements; no snapshot text or unrelated assertions changed. | -| D5-AC4 | The CI failure mechanism is addressed proportionately across the failing Migrate/macOS/Windows jobs, with environment limits stated honestly. | PASS | The reported CI root cause was runtime bypass of the now-private required constructor: legacy direct `new DbPull()` yielded undefined identity in suites exercised by the failing migrate-related and cross-platform package jobs. This commit removes those bypasses everywhere the repo grep found them, so the failure mechanism is fully cut off rather than patched per-suite. I did not rerun the broader DB-backed/macOS/Windows suites locally because those environments are unavailable here; the evidence is the exact diff plus the exhaustive constructor audit. | -| D5-AC5 | Reported gates are defensible and the mandatory transient scan is clean. | PASS | Reviewer reran `git diff --check 115752f540^..115752f540`, which passed. The mandatory transient-ID scan over all 13 touched files found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. | - -**Overall slice verdict:** SATISFIED. D5 cleanly re-closes the slice after the CI-only constructor-bypass reopen without weakening the required production identity contract. - -## downstream-actionable-guidance D6 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D6-AC1 | The missing-`@prisma/client` ordinary-control test now requires the rejection path instead of silently passing on unexpected resolve. | PASS | `103246ff48`; `packages/client-generator-js/tests/resolvePrismaClient.test.ts` adds `expect.assertions(2)` to the ordinary-`prisma` missing-client case before the `try/catch`, so a surprising resolve now fails the test rather than skipping both message assertions. The selected-command `prisma7` rejection snapshot remains unchanged beside it, preserving the dual-identity control. | -| D6-AC2 | Representative migrate/db negative assertions now prove the opposite identity is absent, and the incorrect duplicate `.resolves.toThrow()` checks are removed. | PASS | `packages/migrate/src/__tests__/{DbCommand,MigrateCommand,DbExecute}.test.ts` now computes `otherCliCommand` and asserts the returned/raised help text excludes the opposite executable while still containing the selected one. The old standalone `unknown command` cases using `await expect(...).resolves.toThrow()` are deleted from `DbCommand.test.ts` and `MigrateCommand.test.ts`, leaving only the correct `Error`-instance/message assertions on the resolved parse result. | -| D6-AC3 | Dormant `DbDrop` help is identity-aware without broadening dormant command wiring, and the added unsupported-URL test stays proportionate. | PASS | `packages/migrate/src/commands/DbDrop.ts` replaces the static help string with `renderHelp(this.cliCommand)` and uses that same rendered value for normal help and `HelpError`, so the dormant preview command now matches the required explicit identity contract. `packages/migrate/src/__tests__/DbDrop.test.ts` adds a narrow two-name help assertion plus one unsupported-Accelerate regression proving the touched dormant command still rejects before stdout; that extra test is related and proportionate because it documents existing parse-order behavior on the same command surface without changing production wiring. | -| D6-AC4 | `migrate reset` rejects unsupported Accelerate URLs before printing datasource output. | PASS | `packages/migrate/src/commands/MigrateReset.ts` now calls `checkUnsupportedDataProxy({ command: cmd, validatedConfig })` immediately after config validation and before `inferDirectoryConfig(...)`, `parseDatasourceInfo(...)`, or `printDatasource(...)`. `packages/migrate/src/__tests__/MigrateReset.test.ts` pins the Accelerate error and asserts `ctx.normalizedCapturedStdout()` stays empty, proving the unsupported URL is rejected before any datasource banner is emitted. | -| D6-AC5 | Reported focused gates are defensible and the mandatory transient scan is clean. | PASS | Reviewer inspection of `103246ff48` matches the reported focused migrate/client-generator follow-up: the diff is confined to the eight named files, `git diff --check 103246ff48^..103246ff48` passes, and the mandatory transient-ID scan over the touched files found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. I trusted the reported focused test/build gates because nothing on disk contradicted them. | - -**Overall slice verdict:** SATISFIED. D6 closes the current review-thread follow-up without reopening the downstream identity contract or broadening the dormant `DbDrop` surface. - -## cli-owned-distribution-identity D10 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------- | ------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D10-AC1 | Identity-bearing packed command evidence is split into local inline snapshots and the old file is gone. | PASS | `84401c2318`, `c244dd6669`; `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` now carries inline snapshots for top-level help, delegated help, text version projection, JSON version projection, generated `.env`, generated `prisma.config.ts`, and `init` stdout. `packages/client/tests/e2e/prisma7-compatibility/tests/__snapshots__/main.test.ts.snap` is deleted, so the old aggregate external snapshot no longer exists. | -| D10-AC2 | Completion identity stays on concise direct assertions rather than snapshotting the generated script. | PASS | `main.test.ts` keeps `complete zsh` coverage as direct string assertions only: positive `#compdef prisma7`, `compdef _prisma7 prisma7`, and `requestComp="prisma7 complete --` substring checks plus opposite-identity negatives. No completion script text is committed in any snapshot file because the external snapshot file is deleted and the inline snapshots cover only help/version/init artifacts. | -| D10-AC3 | Bootstrap selects the Windows `.cmd` shim via one adapted narrow regression test. | PASS | `packages/cli/src/bootstrap/Bootstrap.ts` now resolves `node_modules/.bin/${identity}.cmd` on Windows and the bare identity on Unix. The pre-existing focused `Bootstrap.vitest.ts` case was adapted in place to a Windows fixture (`vi.spyOn(process, 'platform', 'get').mockReturnValue('win32')`) and asserts `execFileSync` receives `prisma7.cmd` for both `migrate dev` and `generate`; no new mock-heavy suite was introduced. | -| D10-AC4 | Exact `prisma`/`prisma7` aliases work for tsc and bundling, including wildcard preservation. | PASS | `25e8174e1e`; `helpers/compile/plugins/resolvePathsPlugin.ts` now converts each tsconfig key into either an escaped exact matcher or a single-capture wildcard matcher, substitutes the captured subpath into the target, and only then applies `resolvePathTarget(...)`. The focused esbuild/Vitest coverage in `helpers/compile/plugins/resolvePathsPlugin.test.ts` proves exact `prisma -> packages/cli/src/types.ts`, exact `prisma7 -> packages/prisma7/src/index.ts`, wildcard `prisma/config -> packages/cli/src/config.ts`, wildcard `prisma7/config -> packages/prisma7/src/config.ts`, and exact external passthrough for `prisma/config`. That preserves exact-alias precedence, escapes regex metacharacters, performs one wildcard substitution, and keeps explicit-file versus directory target handling intact after substitution. | -| D10-AC5 | Required gates and transient scan are credible. | PASS | Reviewer reran `pnpm exec vitest run helpers/compile/plugins/resolvePathsPlugin.test.ts`, `pnpm --filter prisma build`, `pnpm --filter prisma7 build`, `pnpm tsc -p tsconfig.utils.typecheck.json`, `pnpm exec vitest run src/bootstrap/__tests__/Bootstrap.vitest.ts` (from `packages/cli`), `git diff --check 25e8174e1e^..25e8174e1e`, and the mandatory transient-ID scan over the two touched tracked files; all passed. The D10 R2 diff touches only `helpers/compile/plugins/resolvePathsPlugin.{ts,test.ts}`, so the committed D10 R1 inline snapshot/completion evidence in `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` remains unchanged on disk. An exploratory rerun of `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility` timed out inside that unchanged packed test body after fixture install under Docker, so I do not score it as an R2 regression. | - -**Overall slice verdict:** SATISFIED. D10 R2 closes F7: wildcard tsconfig aliases now resolve in esbuild without regressing the committed D10 R1 snapshot/completion evidence or the Windows bootstrap fix. - -## cli-owned-distribution-identity D9 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | --------------------------------------------------------------------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D9-AC1 | Exact CI `prisma7` import-resolution failure is fixed with source root/subpath aliases and no typecheck weakening. | PASS | `8ca24fe182`; `tsconfig.build.bundle.json` now maps `prisma` to `packages/cli/src/types`, `prisma/*` to `packages/cli/src/*`, `prisma7` to `packages/prisma7/src/index`, and `prisma7/*` to `packages/prisma7/src/*`. That matches the package export shapes used by `packages/prisma7/src/index.ts` (`from 'prisma'`) and `packages/prisma7/src/config.ts` (`from 'prisma/config'`) instead of the prior package-root-to-directory alias that broke exact workspace typecheck resolution. The change is scoped to path targets only; no compiler strictness or include/exclude surface is relaxed. | -| D9-AC2 | Generated package forwarding artifacts are ignored consistently while root lint/Prettier stay green with artifacts present. | PASS | `.prettierignore` and `eslint.config.cjs` now ignore `packages/prisma7/{index,config}.{js,d.ts}`, mirroring the existing `packages/cli/config.{js,d.ts}` treatment for generated forwarding artifacts. The ignore additions are limited to those generated Prisma7 root/config files; they do not widen to `packages/prisma7/build/**` or source files. | -| D9-AC3 | Bootstrap resolves the selected local CLI binary and preserves existing behavior. | PASS | `packages/cli/src/bootstrap/Bootstrap.ts` changes only the local-bin lookup from hardcoded `.bin/prisma` to `.bin/${identity}` and threads `this.identity` into that lookup; migrate/generate shell-out conditions, subprocess env, cwd, stdio, and in-process fallback logic are otherwise unchanged. This directly addresses the `prisma7 bootstrap` bug where existing-project migrate/generate would have invoked the wrong local binary. | -| D9-AC4 | Platform comments are removed and current review-comment classifications are defensible. | PASS | `packages/cli/src/platform/$.ts` and `packages/cli/src/platform/_lib/help.ts` drop the two redundant comments without behavior change. The remaining review classifications described in the implementation report are consistent with the diff: the Bootstrap/local-bin issue is fixed, the platform comments are removed, the deleted-test suggestion targets code already removed in D7 and is obsolete, and the `pnpm`/`npx` review suggestions conflict with the slice's user-facing CLI-output scope rather than contributor-tooling rules. | -| D9-AC5 | Gates are credible and the remaining local benchmark typecheck issue is shown unrelated to this PR/CI failure. | PASS | `git diff --check 8ca24fe182^ 8ca24fe182` passed. The commit scope is confined to ignore config, one path-mapping file, one Bootstrap fix, one focused Bootstrap test, and comment removals; nothing touches the generated type-benchmark fixtures mentioned in the implementation report. The alias correction explains the reported exact CI failure mode (`prisma7` root/config imports in workspace typecheck), while the unrelated unused `@ts-expect-error` noise lives outside the touched surfaces and does not undermine the PR's CI-root-cause claim. | -| D9-AC6 | The round honors the operator's anti-mock direction; the new Bootstrap test is proportionate rather than slice drift. | PASS | The new 45-line case lives in the pre-existing `packages/cli/src/bootstrap/__tests__/Bootstrap.vitest.ts` suite and asserts one regression the packed `prisma7` E2E does not observe: that an existing project shells out through the selected local `.bin/prisma7` for `migrate dev` and `generate` instead of hardcoded `.bin/prisma`. This is a narrow command-selection assertion on a new D9 fix, not a revival of the removed identity mock suites from D7. Given the current executable-boundary coverage never exercises `bootstrap`, removing this test would leave the fix backed only by code audit. | - -**Overall slice verdict:** SATISFIED. D1-D9 are satisfied, and D9 closes the remaining CI/review follow-up without reopening the slice. - -## cli-owned-distribution-identity D8 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | -------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D8-AC1 | All identity-sensitive CLI command constructors, factories, and helpers require explicit identity with no fallback. | PASS | `46c4cdc1c7`; the commit removes default/optional identity plumbing from every touched CLI-owned boundary: `CLI.new`, `DebugInfo.new`/constructor, `Format.new`/constructor, `GenerateOptions.identity` plus `Generate.new`, `defaultEnv`, `defaultConfig`, `Init.new`/constructor, `Status.new`/constructor, `Studio.new`/constructor, `SubCommand` constructor, `Validate.new`/constructor, `Version.new`/constructor, `Bootstrap.new`/constructor, `formatBootstrapOutput`, `Completions.new`, `parseCompletionCommand`, `printPpgInitOutput`, `Mcp.new`, `Platform.$.new`, `PostgresCommand.new`, `Link.new`/constructor, `formatCompletionOutput`, and `getGlobalLocalVersionMismatchWarning`. The reviewer audit over the touched surfaces found zero remaining `identity?:`, `identity ?? 'prisma'`, or `= 'prisma'` fallbacks at those boundaries. | -| D8-AC2 | Production roots and nested composition pass the selected identity explicitly, while ordinary scripts/tests pass `prisma`. | PASS | `packages/cli/src/bin.ts` resolves `const identity = getCliDistributionIdentity()` once and passes it into every identity-sensitive CLI-owned constructor, including `CLI.new(...)`, `PostgresCommand.new(...)`, `Completions.new(identity)`, and `Platform.$.new(..., identity)`. The separate completion entrypoint independently passes `getCliDistributionIdentity()` into `parseCompletionCommand(...)` in `packages/cli/src/completions/completion-entry.ts`. Nested composition remains explicit in `packages/cli/src/bootstrap/Bootstrap.ts` (`Link.new(this.identity)`, `Generate.new(this.identity)`, `Init.new(this.identity)`), while ordinary call sites intentionally pass `'prisma'` in `scripts/run-studio.ts` and the updated existing CLI test suites (`CLI.test.ts`, `Generate.test.ts`, `Init.vitest.ts`, `PostgresCommand.vitest.ts`, `completion-command.test.ts`). | -| D8-AC3 | Executable inference defaults only at the true executable boundary. | PASS | After `46c4cdc1c7`, the only remaining defaulted inference is `getCliDistributionIdentity(executedScript = process.argv[1])` in `packages/cli/src/utils/cli-distribution-identity.ts`. `bin.ts` and `completions/completion-entry.ts` are the only product call sites using that getter directly, and `parseCompletionCommand(...)` no longer falls back to it internally. No other touched constructor/helper defaults identity from `process.argv`, nullish coalescing, or an optional parameter. | -| D8-AC4 | No lower-package/backcompat scope was added, and no new identity mock suite or reexport/overload was introduced. | PASS | `git diff --name-status 46c4cdc1c7^ 46c4cdc1c7` shows only modifications under `packages/cli/src/**` plus `scripts/run-studio.ts`; no lower-package files, reexports, or compatibility overload shims were added. The commit adds no new files at all, so there is no replacement identity mock suite; instead it updates existing ordinary-Prisma tests and helper call sites to pass `'prisma'` explicitly. | -| D8-AC5 | The reported gates, audit, and transient scan are defensible, and the Generate-failure classification is honest. | PASS | `git diff --check 46c4cdc1c7^ 46c4cdc1c7` passed. The mandatory transient scan over the touched files found no UUID, `agent_id`, `subagent`, `trace_id`, or `projects/prisma7-compatibility-cli/` strings; the only `session` match is the pre-existing semantic `Session expired...` wording in Postgres link code/tests, not a transient identifier. No on-disk evidence contradicts the reported `pnpm --filter prisma tsc`, Prisma/Prisma7 builds, affected ordinary tests, packed compatibility E2E, Prettier, lint, or diff-check gates. The broader Generate-suite failure remains honestly classified as unrelated Nix/OpenSSL noise: this commit only hardens explicit identity plumbing, updates the affected Generate coverage to pass `'prisma'`, and does not touch the known engine/download surfaces behind the previously documented NixOS failure mode. | - -**Overall slice verdict:** SATISFIED. D1-D8 are satisfied, and D8 closes the slice with explicit identity requirements at CLI command boundaries while keeping executable inference confined to the real entrypoints. - -## cli-owned-distribution-identity D7 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | -------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D7-AC1 | Slice-added mock-heavy identity suites/assertions are removed while pre-existing ordinary tests stay coherent. | PASS | `09de26b02d`; the four slice-added `distribution-identity-*` suites are deleted, and the slice-added identity assertions are removed from `packages/cli/src/completions/completion-command.test.ts` and `packages/cli/src/__tests__/commands/SubCommand.vitest.ts`. Those two files still retain their pre-existing ordinary-Prisma coverage (`parseCompletionCommand(['fish'])`, unsupported-shell rejection, and Deno abort-without-install), and no production files are touched. | -| D7-AC2 | Exactly one packed compatibility scenario snapshots representative real-command identity behavior deterministically. | PASS | `37d7f251f9`; `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` still uses the single packed scenario and real installed commands, but now projects version output into stable identity-bearing evidence via `projectVersion(...)`: `prisma7`/`@prisma/client` labels and versions, absence of an ordinary `prisma` key/label, metadata key/label sets, and stderr. The snapshot no longer hardcodes architecture, engine hashes/paths, runtime/toolchain versions, or peer-layout paths. | -| D7-AC3 | Normalization hides only dynamic noise and the snapshot stays reviewable rather than an opaque churn-prone dump. | PASS | `37d7f251f9`; the raw help/completion/init snapshots remain intact, while version evidence is reduced to a concise projection that still proves identity semantics: `distributionKey`/`distributionLabel` are `prisma7`, `hasPrismaKey`/`hasPrismaLabel` are false, both distribution and client versions are captured, metadata is represented as key/label sets only, and stderr preserves the config/schema-load proof. The result is reviewable without churn from host-specific values. | -| D7-AC4 | Existing generate/db push/client smoke remains and no second scenario or test-only production seam was added. | PASS | `tests/main.test.ts` still runs `pnpm exec tsc --noEmit`, `pnpm exec prisma7 generate`, `pnpm exec prisma7 db push --force-reset`, TypeScript-compiles `smoke.ts`, and executes `tsx smoke.ts` after the snapshot assertion. `_steps.ts` still keeps a single packed scenario (`pnpm install` then `pnpm exec vitest run`), and the diff adds no production code or new seam. | -| D7-AC5 | Update/mismatch evidence boundaries are honest and no fake mock replacement remains. | PASS | The removed suites include the old mock-only update-check and mismatch tests; the new packed scenario does not pretend to observe checkpoint suppression or mismatch internals from one executable-boundary run. The remaining evidence is honestly limited to command-visible help/version/completion/init behavior plus the existing packed generate/db push/client smoke, which matches the dispatch plan's stated boundary for unobservable internals. | -| D7-AC6 | Reported gates/transient scan are defensible and no production behavior changed. | PASS | The commit changes only tests plus the e2e fixture lockfile/package manifest; there is no product-code diff. No on-disk evidence contradicts the reported builds, affected tests, packed E2E, Prettier, lint, diff-check, or transient-scan gates. Reviewer reran the mandatory transient-ID scan over the changed test/lockfile surfaces: no UUID, `subagent`, `session`, or `projects/prisma7-compatibility-cli/` hits were found; the only bare `agent` string is the lockfile dependency name `tunnel-agent`. | - -**Overall slice verdict:** SATISFIED. D1-D6 remain satisfied, and D7 now closes with a deterministic packed snapshot projection that preserves the CLI-identity proof without host-specific churn. - -## cli-owned-distribution-identity D6 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D6-AC1 | Exactly one packed scenario proves CLI-owned help/version/completion/init and retains the prior generate/db push/client smoke. | PASS | `8c41d0a6e6`; `packages/client/tests/e2e/prisma7-compatibility/_steps.ts` remains the fixture's sole `_steps.ts` scenario and now adds packed assertions for `prisma7 --help`, text/JSON `--version`, `complete zsh`, and `init --datasource-provider sqlite --no-skills` generating `prisma7/config`. The same file still keeps the pre-existing `pnpm exec tsc --noEmit`, `prisma7 generate`, `prisma7 db push --force-reset`, and `smoke.ts` generated-client proof, so the new identity checks extend rather than replace the established packed behavior. | -| D6-AC2 | The packed E2E assertions are deterministic and non-tautological, and lock/tar handling remains sound. | PASS | `8c41d0a6e6`; the new assertions read real packed-command output and generated files, and they pair positive checks with opposite-identity negatives (`prisma7` present, ordinary `prisma` absent) instead of snapshotting a value derived from the same input. The init proof executes the installed `node_modules/.bin/prisma7` inside a throwaway project, then reads `prisma.config.ts` from disk. The refreshed `packages/client/tests/e2e/prisma7-compatibility/pnpm-lock.yaml` still pins `/tmp/prisma7-0.0.0.tgz` at the importer and its nested `prisma: file:../../tmp/prisma-0.0.0.tgz` dependency in snapshots. | -| D6-AC3 | The CLI-owned literal audit is sufficient: escapees are fixed/tested and no unclassified actionable distribution literal remains in `packages/cli/src`. | PASS | `8c41d0a6e6`; `packages/cli/src/Generate.ts` now labels the mismatch hint with `${this.identity}@${cliVersion}`, covered by the added `generate mismatch hint labels the selected CLI package` case in `packages/cli/src/__tests__/distribution-identity-version-mismatch.vitest.ts`. `packages/cli/src/SubCommand.ts` now renders `npx ${this.identity} ` in Deno guidance, covered by the new dual-identity Deno cases in `packages/cli/src/__tests__/commands/SubCommand.vitest.ts`. The reviewer audit scan over `packages/cli/src` leaves only domain-stable surfaces (`@prisma/client`, `prisma-client`, `schema.prisma`, `prisma/schema.prisma`, `prisma.config.ts`, docs/protocol strings), internal runtime/storage invariants (`paths('prisma')`, checkpoint `product: 'prisma'`, local `node_modules/.bin/prisma` resolution), or comments/tests; no actionable CLI-owned distribution guidance remains unclassified in product code. | -| D6-AC4 | D5's control-flow proof remains the authoritative update-suppression evidence, so the packed E2E need not fake request-creation assertions. | PASS | The on-disk D5 proof remains `packages/cli/src/CLI.ts` gating `runCheckpointClientCheck(...)` behind `this.identity === 'prisma'`, with `packages/cli/src/__tests__/distribution-identity-update-check.test.ts` asserting zero checkpoint calls and zero update-print calls for `prisma7`. Commit `8c41d0a6e6` does not touch `CLI.ts`, checkpoint helpers, or update rendering. Because request creation has no stronger packed observable than the already-reviewed zero-call control-flow test, omitting a synthetic packed update assertion is justified and keeps the E2E on user-visible packed behavior only. | -| D6-AC5 | Reported full gates and the mandatory transient scan are defensible, and the slice closes without downstream/release spillover. | PASS | No on-disk evidence contradicts the reported `pnpm --filter prisma build`, `pnpm --filter prisma7 build`, focused identity suites, `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility`, root `pnpm prettier-check`, `pnpm lint`, `git diff --check`, and transient-scan gates for `8c41d0a6e6`. Reviewer reran `git diff --check 8c41d0a6e6^ 8c41d0a6e6`, which passed, and the mandatory transient-ID scan over the seven touched product/test files found no UUID, agent, subagent, or session identifiers. The commit scope stays inside `packages/cli/src/**` and the packed E2E fixture/lockfile, so downstream actionable guidance and release automation remain future-slice scope only. | - -### Durable audit classification - -- **Fixed in D6:** the remaining CLI-owned escapees were the Generate mismatch hint label and the SubCommand Deno rerun guidance; both now use the selected identity and both are regression-pinned. -- **Remaining `prisma` literals under `packages/cli/src` are intentionally non-actionable in this slice:** - - **Domain-stable surfaces:** `@prisma/client`, `prisma-client`, `schema.prisma`, `prisma/schema.prisma`, `prisma.config.ts`, Prisma docs URLs, and Studio's `prisma`/`prisma+postgres` protocol names. - - **Internal runtime/storage invariants:** `paths('prisma')`, checkpoint payload `product: 'prisma'`, and local `node_modules/.bin/prisma`/`node_modules/prisma` resolution helpers. - - **Non-product occurrences:** comments and tests. -- **Net result:** no unclassified actionable CLI-owned distribution literal remains in `packages/cli/src`; the remaining actionable identity propagation called out by the slice spec lives in later slices outside this package boundary. - -**Overall slice verdict at D6 close:** SATISFIED. `cli-owned-distribution-identity` had reviewer-passed D1-D6 dispatches, zero open findings/escalations, and a met slice-specific done condition before the follow-up D7 feedback landed. - -**Current status after D10 R2:** SATISFIED. D1-D10 are satisfied again after the D10 R1 reopen; F7 is resolved by wildcard-aware alias matching in `resolvePathsPlugin`. - -## cli-owned-distribution-identity D1 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | --------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D1-AC1 | Top-level and CLI-owned help/examples render the selected executable, including delegated, unknown-command, and error help paths. | PASS | `c944253750`; `packages/cli/src/__tests__/distribution-identity-help.test.ts` covers top-level CLI help, delegated `validate --help`, `lift` rename guidance, per-command help/examples, unknown-command paths, and help-error wrappers for both identities. | -| D1-AC2 | Ordinary `prisma` help remains unchanged and focused tests cover both identities non-tautologically. | PASS | `c944253750`; the new suite runs the same assertions under both `'prisma'` and `'prisma7'` via `describe.each(...)` and uses `not.toContain(...)` checks against the opposite identity, while constructors/defaults still fall back to `'prisma'` in `CLI.ts` and the touched command classes. | -| D1-AC3 | Identity stays the minimal `'prisma' \| 'prisma7'` seam with no object/map/global/env framework or lower-package spillover. | PASS | `c944253750`; `packages/cli/src/bin.ts` resolves one primitive via `getCliDistributionIdentity()` and threads it into CLI-owned constructors, while the diff stays inside `packages/cli/src/**` plus the focused test file. | -| D1-AC4 | Remaining actionable CLI literals are surfaced/classified; no D1 help literal silently remains in the changed CLI-owned surfaces. | PASS | `c944253750`; targeted literal checks over the touched files leave the remaining executable-specific runtime strings in `packages/cli/src/Init.ts` and `packages/cli/src/bootstrap/Bootstrap.ts` project-creation flows, while the D1 help renderers are parameterized. | -| D1-AC5 | Reported gates are defensible and the mandatory transient-ID scan is clean. | PASS | No on-disk evidence contradicts the reported focused `prisma` CLI tests / `pnpm --filter prisma tsc` / Prettier / diff-check gates for `c944253750`; the mandatory transient-ID scan over `c944253750^..c944253750` produced zero token or `projects/prisma7-compatibility-cli/` hits. | - -## cli-owned-distribution-identity D2 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | -------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D2-AC1 | `prisma7 init` generates `prisma7/config`, while ordinary init remains `prisma/config` without unrelated ordinary-init snapshot churn. | PASS | `f18a6738d5`; `packages/cli/src/__tests__/distribution-identity-project-creation.vitest.ts` asserts exact generated `prisma.config.ts` content for both identities, and `packages/cli/src/__tests__/Init.vitest.ts` still pins ordinary Prisma inline snapshots to `import { defineConfig } from "prisma/config"`. | -| D2-AC2 | Project-creation guidance uses the selected identity while stable domain paths/packages remain unchanged. | PASS | `c526edd56d`; `packages/cli/src/Init.ts` now threads identity into `defaultEnv()` and the appended `.env` banner, so compatibility init emits `${identity} dev` / `${identity} init` while domain-stable paths and packages remain unchanged. Focused dual-identity coverage for both comment surfaces lives in `packages/cli/src/__tests__/distribution-identity-project-creation.vitest.ts`. | -| D2-AC3 | Tests are focused, non-tautological, and cover both identities without broad snapshot duplication. | PASS | `f18a6738d5`; the new suite adds ten focused dual-identity assertions across Init/Bootstrap/Link outputs in `packages/cli/src/__tests__/distribution-identity-project-creation.vitest.ts`, reuses shared mocks, and avoids broad snapshot cloning of the existing ordinary-identity suites. | -| D2-AC4 | Identity remains the minimal primitive seam with no object/map/global/env framework or out-of-scope package change. | PASS | `f18a6738d5`; the implementation continues to thread the existing `'prisma' \| 'prisma7'` primitive through CLI-owned renderers only. The product diff stays in `packages/cli/src/**` plus the focused test file, with no new lower-package identity framework or package-surface churn. | -| D2-AC5 | Reported gates are defensible and the mandatory transient-ID scan is clean. | PASS | No on-disk evidence contradicts the reported `pnpm --filter prisma tsc`, focused project-creation Vitest suite, changed-file Prettier, diff-check, and transient-ID scan gates for `c526edd56d`. The mandatory reviewer rerun over `f18a6738d5..c526edd56d` produced zero plan-ID and `projects/prisma7-compatibility-cli/` hits in the round's added source/test diff. | - -## cli-owned-distribution-identity D3 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | ------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D3-AC1 | Text and JSON version output use the selected distribution label while ordinary `prisma` output remains unchanged. | PASS | `648c07ff6a`; `packages/cli/src/Version.ts` now renders `[this.identity, packageJson.version]` while leaving the rest of the table untouched. `packages/cli/src/__tests__/distribution-identity-version-mismatch.vitest.ts` exercises both identities and asserts the text table plus JSON key switch between `prisma` and `prisma7` without disturbing `@prisma/client`. | -| D3-AC2 | Mismatch lookup, labels, and the recommended command use the selected distribution while preserving `@prisma/client` semantics. | PASS | `648c07ff6a`; `packages/cli/src/utils/global-local-version-mismatch.ts` now compares local `[identity, '@prisma/client']`, formats `${identity}@${globalVersion}`, and recommends `npx ${identity} generate`; `packages/cli/src/Generate.ts` forwards the selected identity into that helper. The packed compatibility fixture lockfile at `packages/client/tests/e2e/prisma7-compatibility/pnpm-lock.yaml` still records `prisma7` resolving its nested exact `prisma` tarball, so intentionally ignoring the project's direct `prisma` package is correct for side-by-side wrapper topology. | -| D3-AC3 | Tests are focused, non-tautological, and behavior is not weakened. | PASS | `648c07ff6a`; the new Vitest file adds six dual-identity assertions across version text, version JSON, mismatch lookup, negative opposite-identity checks, and Generate plumbing without cloning broad snapshots. Reviewer reran `src/__tests__/distribution-identity-version-mismatch.vitest.ts` (6/6 passed) and `src/__tests__/globalLocalVersionMismatch.test.ts` (9/9 passed). | -| D3-AC4 | The change preserves the minimal seam, layering, and dispatch scope. | PASS | `648c07ff6a`; the product diff stays inside `packages/cli/src/Version.ts`, `packages/cli/src/Generate.ts`, and `packages/cli/src/utils/global-local-version-mismatch.ts`, plus one focused test file. The only new seam is an optional existing-helper `identity?: CliDistributionIdentity` parameter; no lower-package changes, identity framework, or wider refactor was introduced. | -| D3-AC5 | Formal gates are defensible, exploratory failures are honestly classified, and the mandatory transient-ID scan is clean. | PASS | Reviewer reran `pnpm --filter prisma tsc`, `pnpm exec vitest run src/__tests__/distribution-identity-version-mismatch.vitest.ts`, `pnpm exec jest --silent --runInBand src/__tests__/globalLocalVersionMismatch.test.ts`, and `git diff --check`; all passed. The mandatory transient scan over the D3 product/test diff was clean. A targeted rerun of the older Jest `src/__tests__/commands/Version.test.ts` failed before assertions on this NixOS shell because engine resolution fell into existing libssl/checksum download warnings and a `linux-nixos/schema-engine.sha256` 404, which matches the implementer's exploratory-only classification rather than a regression introduced by this diff. | - -## cli-owned-distribution-identity D4 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | ------------------------------------------------------------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D4-AC1 | Fish, Bash, Zsh, and PowerShell setup scripts register and reinvoke the selected executable. | PASS | `5ad733ced7`; `packages/cli/src/completions/Completions.ts` now calls `t.setup(identity, identity, firstArg)`, so both the registered command target and reinvocation path follow the selected primitive. `packages/cli/src/completions/completion-command.test.ts` asserts `${identity} complete` plus shell-specific registration patterns for fish, bash, zsh, and powershell under both `prisma` and `prisma7`. | -| D4-AC2 | CLI parsing/setup threads the primitive identity into completions while ordinary Prisma keeps the default behavior. | PASS | `5ad733ced7`; `packages/cli/src/bin.ts` now constructs `Completions.new(identity)`, and `packages/cli/src/completions/Completions.ts` stores that primitive and forwards it into `parseCompletionCommand(argv, this.identity)`. The constructor and parser both default to `'prisma'`, so ordinary invocation keeps the prior default path while compatibility invocation now receives the selected identity explicitly. | -| D4-AC3 | The separately bundled completion entry resolves identity independently with no mutable cross-bundle transport. | PASS | `5ad733ced7`; `packages/cli/src/completions/completion-entry.ts` now passes `getCliDistributionIdentity()` directly into `parseCompletionCommand(...)`, and `parseCompletionCommand` also defaults from the same executable-derived helper. No environment marker, global, or other mutable transport was introduced. The focused test mutates only `process.argv[1]` and verifies the completion bundle emits `prisma7` independently. | -| D4-AC4 | Ordinary output stays unchanged and the added coverage is focused and proportionate. | PASS | `5ad733ced7`; the pre-existing completion descriptor catalog in `packages/cli/src/completions/completion-definitions.ts` is untouched, and `completion-command.test.ts` still preserves the existing ordinary fish script assertion (`prisma complete -- ...`, `complete -c prisma`) alongside the unchanged top-level, nested-command, and option-value completion checks. The new coverage stays narrowly on shell setup, constructor forwarding, and separate-bundle inference without broad snapshot duplication. | -| D4-AC5 | Reported gates are defensible and the mandatory transient-ID scan is clean. | PASS | The product diff is confined to `packages/cli/src/bin.ts` and `packages/cli/src/completions/**`. Reviewer reran `git diff --check 5ad733ced7^ 5ad733ced7`, which passed, and the mandatory transient-ID scan over the four touched files found no UUID, agent, subagent, session, or `projects/prisma7-compatibility-cli/` hits. No on-disk evidence contradicts the reported `pnpm --filter prisma tsc`, focused package runner with cached engine, Prettier, diff-check, and transient scan gates for `5ad733ced7`. | - -## cli-owned-distribution-identity D5 acceptance criteria scoreboard - -| AC ID | Description (short) | Status | Evidence | -| ------ | ------------------------------------------------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D5-AC1 | Compatibility identity gates the update path before checkpoint promise/request creation. | PASS | `59d3ee7a63`; `packages/cli/src/CLI.ts` now creates `checkResultPromise` only when `this.identity === 'prisma'`, so `prisma7` skips `runCheckpointClientCheck(...)` entirely instead of creating a promise and hiding only the later output. The untouched `packages/cli/src/utils/checkpoint.ts` still owns the checkpoint payload, so this round changes control flow only. | -| D5-AC2 | `prisma7` starts zero checkpoint work and prints zero update guidance. | PASS | `packages/cli/src/__tests__/distribution-identity-update-check.test.ts` drives `CLI.parse(['validate'], ...)` under `prisma7` and asserts the delegated command still runs while both `runCheckpointClientCheck` and `printUpdateMessage` are never called. That proves compatibility invocation neither starts the request nor reaches the printing path. | -| D5-AC3 | Ordinary `prisma` behavior stays unchanged, including the hidden-message environment path. | PASS | The ordinary-identity tests in `distribution-identity-update-check.test.ts` assert one checkpoint call with the existing `{ schemaPathFromConfig, baseDir }` inputs and one `printUpdateMessage` call with the resolved result. A separate case sets `PRISMA_HIDE_UPDATE_MESSAGE=true` and still observes the same ordinary CLI call path. `packages/cli/src/utils/printUpdateMessage.ts` and `packages/cli/src/utils/checkpoint.ts` are untouched, so payload/telemetry and env-specific rendering behavior remain where they already lived. | -| D5-AC4 | Coverage is focused and non-tautological, and the seam/scope stay minimal. | PASS | `59d3ee7a63` changes only `packages/cli/src/CLI.ts` plus one focused test file. The new tests exercise real `CLI.parse` control flow across both identities and the env toggle while mocking only the checkpoint/print boundaries; they do not snapshot broad help output or duplicate lower-level checkpoint implementation tests. No new identity abstraction, checkpoint product, or telemetry surface was introduced. | -| D5-AC5 | Reported gates are defensible and the mandatory transient-ID scan is clean. | PASS | The product diff is confined to `packages/cli/src/CLI.ts` and `packages/cli/src/__tests__/distribution-identity-update-check.test.ts`. Reviewer reran `git diff --check 59d3ee7a63^ 59d3ee7a63`, which passed, and the mandatory transient-ID scan over those touched files found no UUID, agent, subagent, session, or `projects/prisma7-compatibility-cli/` hits. No on-disk evidence contradicts the reported `pnpm --filter prisma tsc`, focused CLI/update/checkpoint tests, Prettier, diff-check, and transient-scan gates for `59d3ee7a63`. | - -## Subagent IDs - -- **Implementer:** `c30416fe-2f1a-4bd` — replacement persistent implementer established at `downstream-actionable-guidance` D5 R1 after D1-D4 implementer `5c6162ab-7048-4a5` became inaccessible to resume. -- **Reviewer:** `506df1fa-9c76-4b8` — replacement persistent reviewer established at `downstream-actionable-guidance` D6 R1 after D5 reviewer `77c46ca7-9493-4c7` became inaccessible to resume. - -## Orchestrator notes - -- Linear synchronization was explicitly waived by the operator for this project. -- Drive trace emission is unavailable because the canonical emitter cannot resolve its `arktype` dependency; no hand-authored trace events will substitute for validated events. -- Before implementation resumed, the planned `identity-complete-prisma7` slice failed slice-Small during grounded planning and was split into `cli-owned-distribution-identity` followed by `downstream-actionable-guidance`; release work remains last. -- D1 required two replacement implementer sessions because foreground Pi agent handles were unavailable for resume. Validation was initially blocked by missing build tools; the operator authorized using the full Nix shell, and Nix-provided GNU Make plus GCC restored the formal gates without changing Node. -- After D2, the operator authorized replacing marker/global-symbol identity transport with normalized `process.argv[1]` stem inference. The supporting package-manager probe and scope are recorded in `design-decisions.md`; D3 was reviewer-SATISFIED. -- After D3, the operator rejected the production-only `delegateToPrismaCli` test seam as unnecessary indirection. D4 inlined the dependency load and was independently SATISFIED. -- After D4, the operator rejected the remaining package/identity/dispatcher unit and contract coverage as overtesting. D5 consolidated them to one scenario covering `prisma7/config` import/typechecking/config selection, `prisma7 --version`, `prisma7 generate`, and successful generated-client execution. -- After D5, the operator correctly rejected the package-local Vitest subprocess scenario as not using Prisma's E2E harness. D6 moved the scenario under `packages/client/tests/e2e`, installed packed tarballs in the standard Docker fixture, and removed the prisma7 package-level test job and test-only dependencies. -- D7 addresses current PR feedback only: simplify identity to `'prisma' | 'prisma7'`, use `prisma7 db push` instead of raw DDL in E2E, and guard chmod after esbuild errors. The `prepack` suggestion was rejected by the operator because root build precedes E2E packing; comments on deleted tests are obsolete. -- After D9 review, regenerating the ignored type-benchmark clients with `pnpm --filter @prisma/type-benchmark-tests dev` cleared the local stale `@ts-expect-error` noise. The exact CI commands `pnpm tsc -p tsconfig.utils.typecheck.json` and `pnpm lint` then passed with no tracked changes. -- `downstream-actionable-guidance` D1 touched 33 files despite a brief halt threshold of approximately 30 and the implementer did not stop. Review confirmed the overage was required mechanical factory/call-site fan-out rather than product drift, so the dispatch remains accepted; future briefs use outcome/scope halt conditions rather than a brittle file-count proxy for this mechanical migration shape. - -## Findings log - -### F1 — Identity initializer is tree-shaken from the built dispatcher - -**Severity:** must-fix - -**Where:** `packages/cli/src/bin-dispatcher.ts:3` and `packages/cli/package.json:206` - -**What:** The dispatcher imports the identity module only to evaluate `void cliDistributionIdentity`, but the CLI package declares `sideEffects: false`. Rebuilding with `pnpm --filter prisma build` emits `packages/cli/build/index.js` without `__PRISMA_CLI_DISTRIBUTION` or any identity-module code, so the wrapper's marker is never consumed by either normal or completion dispatch. - -**Why it matters:** The runnable wrapper currently delegates to an ordinary-identity CLI bundle; later identity propagation cannot distinguish `prisma7`, violating D1's private identity selection at the actual built entrypoint. - -**Recommended next action:** Make the identity module a preserved side effect (or otherwise force its initialization in the dispatcher), rebuild the CLI, and add/adjust a build-level assertion or executable-focused test proving the emitted dispatcher initializes the marker before both branches. - -**Status:** resolved (`e86b01a84c`) - -### F2 — Real-project E2E has no verified no-network engine path - -**Severity:** must-fix - -**Where:** `packages/prisma7/src/e2e.test.ts:104-109,133`; `.github/actions/setup/action.yml:47-66` - -**What:** The E2E invokes `prisma7 --version` and `generate`, both of which ensure the native schema engine. The checkout has no Linux schema-engine artifact or `PRISMA_SCHEMA_ENGINE_BINARY`; the only discovered cached binaries are macOS-only. CI restores a custom engine only when `engineHash` is nonempty, while the normal test workflow passes the optional input through without guaranteeing one. The reported local run therefore attempted an unavailable download, and there is no evidence supporting the assumption that ordinary CI will provide the engine. - -**Why it matters:** The required single test is not a verified network-free gate, and AC-1 cannot be promoted from a prior unit/contract result after those tests were deleted. A green result that depends on an unprovisioned or network-fetched engine would not be defensible release evidence. - -**Recommended next action:** Provide a compatible schema-engine artifact through the test environment before this package test runs (with an explicit, portable path for each supported runner), or otherwise make the existing CI setup guarantee that artifact without downloading from the test. Re-run the full `prisma7` test and record the successful version, generate, and SQLite execution output. - -**Status:** resolved — the test contains no provisioning/download path; the operator provisioned the ignored supported `linux-arm64-openssl-3.0.x` artifact outside the test, and the full test passed with `PRISMA_SCHEMA_ENGINE_BINARY` set. Clean CI installs invoke `@prisma/engines` postinstall for the runner's standard artifact. - -### F3 — Generated smoke program does not guarantee async failure propagation or disconnect - -**Severity:** must-fix - -**Where:** `packages/prisma7/src/e2e.test.ts:118-131` - -**What:** The generated program calls `void main()`, and `$disconnect()` is reached only after all operations succeed. A rejected operation is neither explicitly awaited by the top-level program nor caught into an explicit nonzero exit, and a failure before disconnect skips cleanup. - -**Why it matters:** The E2E can leave a live client/database handle and can report asynchronous failures through runtime-dependent unhandled-rejection behavior instead of a deterministic subprocess failure. That weakens the required proof of a working generated client and can make the matrix flaky. - -**Recommended next action:** Run the smoke body inside `try/finally` with `await client.$disconnect()` in the finally block, and await/catch the top-level promise so every failure is propagated as a nonzero subprocess exit. - -**Status:** resolved (`11c3681f70`) — the generated smoke program uses `try/finally` for `$disconnect()`, and catches the top-level promise while setting `process.exitCode = 1` and reporting the error. - -### F4 — Package test hides build/dependency assumptions behind redundant workspace rebuilds - -**Severity:** should-fix - -**Where:** `packages/prisma7/package.json:57`; `packages/prisma7/src/e2e.test.ts:46,95,133` - -**What:** The package `test` script rebuilds `prisma`, `@prisma/client`, the adapter, and `prisma7` immediately before Vitest, although the setup action's root `pnpm run build` already precedes both `prisma7` test-template entries. The new E2E also relies on the client and better-sqlite3 adapter as test-only workspace artifacts without declaring them in this package's manifest; the script's filter builds mask that dependency/setup requirement. - -**Why it matters:** CI spends time rebuilding a large part of the monorepo and a package test run can appear self-contained while actually relying on undeclared sibling artifacts and root-hoisted tooling. This makes dependency/order failures harder to detect and weakens the stated portability of the E2E. - -**Recommended next action:** Remove the redundant monorepo rebuilds from the package `test` script, and declare the test-only workspace packages (and any newly required direct tooling) explicitly or move their build/provisioning into the documented CI setup order. Verify the package test from the same clean built state used by CI. - -**Status:** resolved (`11c3681f70`) — `test` is back to `vitest run`; required workspace fixture packages and `tsx` are declared, the lockfile is updated, and the fixture only creates/junction-links temporary project files without rebuilding or installing. - -### F5 — Generated `.env` guidance still hardcodes `prisma` under `prisma7 init` - -**Severity:** must-fix - -**Where:** `packages/cli/src/Init.ts:151,625` - -**What:** `defaultEnv()` still emits the local Prisma Postgres comment with `prisma dev` and the append-to-existing-`.env` marker `# This was inserted by \`prisma init\`:`regardless of the selected distribution. A`prisma7 init`invocation therefore leaves generated`.env`guidance with ordinary-Prisma command names even though the same round updated the surrounding config and next-step output to`prisma7`. - -**Why it matters:** This slice's contract is that actionable CLI-owned distribution references follow the selected identity while stable domain paths remain unchanged. Leaving `prisma7 init` to generate `.env` comments that tell the user to run `prisma dev` or attribute edits to `prisma init` breaks that identity consistency in a project-creation surface the user is expected to read. - -**Recommended next action:** Thread the primitive identity into `.env` comment generation so compatibility init emits `prisma7 dev` and `prisma7 init` while ordinary Prisma output stays byte-for-byte stable, and add focused coverage for the default local-Postgres init path plus the existing-`.env` append path. - -**Status:** resolved (`c526edd56d`) — `defaultEnv()` now accepts the primitive identity, local Prisma Postgres `.env` comments render `${identity} dev`, the appended banner renders `${identity} init`, and `packages/cli/src/__tests__/distribution-identity-project-creation.vitest.ts` covers both identities for both comment surfaces. - -### F6 — Packed snapshot hardcodes environment-specific version metadata - -**Severity:** must-fix - -**Where:** `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts:66-113`; `packages/client/tests/e2e/prisma7-compatibility/tests/__snapshots__/main.test.ts.snap:387-413` - -**What:** The new single-scenario snapshot normalizes cwd/temp-path/ANSI/CRLF noise, but it keeps host-specific version fields and paths verbatim. The committed snapshot hardcodes `architecture: "arm64"`, the `schema-engine-linux-arm64-openssl-3.0.x` binary path, `default-engines-hash`, the PSL hash, `Node.js v22.23.2`, `TypeScript 5.7.3`, and a peer-suffixed `prisma-cli-path`. Those values are not part of the CLI-owned identity contract this dispatch is trying to prove. - -**Why it matters:** D7's contract is one readable deterministic packed proof. With the current snapshot, unrelated engine rolls, toolchain bumps, peer-layout changes, or a different runner architecture will churn or fail the snapshot even when `prisma7` identity behavior is unchanged. That makes the review surface noisy and undermines the operator's explicit request to replace mocks with honest executable-boundary evidence rather than with a brittle dump. - -**Recommended next action:** Keep the single packed scenario, but narrow or normalize the version snapshot to the identity-bearing fields only (for example package label plus selected command/help/config output), and strip environment-specific engine/platform/toolchain/path details that are not semantically required for this slice. - -**Status:** resolved (`37d7f251f9`) — `tests/main.test.ts` now projects version text/JSON into stable identity-bearing fields only, and the snapshot drops raw architecture, engine hash/path, runtime, toolchain, and peer-layout values while preserving package labels/versions, absence of ordinary `prisma`, metadata key/label sets, and stderr. - -### F7 — `resolvePathsPlugin` still drops wildcard alias matching - -**Severity:** must-fix - -**Where:** `helpers/compile/plugins/resolvePathsPlugin.ts:55-61` - -**What:** The new `resolvePathTarget()` helper correctly distinguishes explicit file targets from directory targets, but the plugin still builds its `packagesRegex` from raw tsconfig path keys. For wildcard entries that means the matcher is wrong: the literal regex fragment `prisma/*` does not match `prisma/config`, and `prisma7/*` does not match `prisma7/config`. - -**Why it matters:** D10's bundler contract is not just exact-root alias support. The review round explicitly requires the same `prisma`/`prisma7` alias family to work for both workspace typecheck and the bundler path resolver, with wildcard subpaths preserved. As written, the plugin only guarantees the exact-root half of that contract; subpath matching still depends on behavior outside the plugin. - -**Recommended next action:** Preserve wildcard aliases explicitly in `resolvePathsPlugin`: escape regex metacharacters in exact keys, convert `*` segments into capture groups, substitute captured wildcard text into the mapped target, and only append `/index.ts` for directory targets after substitution. - -**Status:** resolved (`25e8174e1e`) — `createPathAlias()` now escapes exact keys, turns wildcard keys into capture groups, substitutes the captured subpath into the mapped target, and the new focused esbuild test covers exact roots, wildcard `config` aliases, and exact external passthrough. - -### F8 — `MigrateDev` exports a production-only helper solely for direct test access - -**Severity:** must-fix - -**Where:** `packages/migrate/src/commands/MigrateDev.ts:73`; `packages/migrate/src/__tests__/runtime-guidance.test.ts:3,54` - -**What:** The round introduced `export function renderCreateOnlySuccessMessage(...)` and the only new consumer is the focused runtime-guidance test. The production command still has a single internal call site, so the export does not decompose shared behavior across multiple runtime consumers; it only opens the module so the test can bypass `MigrateDev.parse(...)` and assert the string directly. - -**Why it matters:** The operator explicitly rejected production-only test seams, and D2's contract calls for representative runtime proof without adding new exported helpers just to make assertions cheaper. This helper is not part of the CLI-owned/lower-package identity contract; it is an implementation detail of `MigrateDev`'s create-only success path. Keeping it exported increases surface area and weakens the review claim that the round stayed purely mechanical. - -**Recommended next action:** Remove the export and cover the `prisma7` create-only success path through command-level behavior instead — for example by extending the existing `MigrateDev.new(...).parse(['--create-only', '--name=...'], ...)` coverage to a dual-identity matrix or another focused command-level assertion that exercises the same message without a new production seam. - -**Status:** resolved (`cc07b4f32a`) — the export is removed, `MigrateDev` restores inline rendering with `this.cliCommand`, and the focused runtime-guidance suite no longer imports a production-only helper. - -## Round notes - -### side-by-side-wrapper D1 R1 — ANOTHER ROUND NEEDED - -**Scope:** runnable identity-aware wrapper. Commit `5ae58ae55`. - -**Tasks:** Wrapper delegation and focused unit coverage are clean; built identity initialization is regressed by tree-shaking. - -**AC delta:** AC-1 remains NOT VERIFIED — D2 pending. - -**Findings:** F1 (must-fix). - -**For orchestrator:** The reported normal `--version` smoke limitation is not the blocker; the rebuilt dispatcher omission is concrete and addressable in this PR. - -### side-by-side-wrapper D1 R2 — SATISFIED - -**Scope:** runnable identity-aware wrapper. Commit `e86b01a84c`. - -**Tasks:** Identity initialization, wrapper delegation, and focused coverage are clean. - -**AC delta:** AC-1 remains NOT VERIFIED — D2 pending. - -**Findings:** F1 resolved (`e86b01a84c`). - -**For orchestrator:** Emitted build coverage passes for normal and completion branches; generated build directories remain ignored and uncommitted. - -### side-by-side-wrapper D2 R1 — SATISFIED - -**Scope:** forwarded package surfaces and packed resolution proof. Commit `f5531d98da`. - -**Tasks:** Forwarded exports, exact packed dependency, package metadata/file list, side-by-side fixture, and D1 regression coverage are clean. - -**AC delta:** AC-1 NOT VERIFIED → PASS (commits `e86b01a84c`, `f5531d98da`; tests in `packages/prisma7/src/package-contract.test.ts` and `packages/prisma7/src/delegate-to-prisma-cli.test.ts`). - -**Findings:** none. - -**For orchestrator:** none. - -### side-by-side-wrapper D3 R1 — SATISFIED - -**Scope:** executable-stem identity inference and distinctive wrapper target. Commit `43ad8a7891`. - -**Tasks:** Exact POSIX/Windows stem selection, immutable identity, target/bin/export contract, argv delegation, and stale-transport cleanup are clean. - -**AC delta:** AC-1 remains PASS; amended packed-wrapper condition is confirmed by `43ad8a7891` and `packages/prisma7/src/package-contract.test.ts` (7/7), with CLI identity/dispatcher coverage in `packages/cli/src/utils/cli-distribution-identity.vitest.ts` and `packages/cli/src/bin-dispatcher.vitest.ts` (12/12). - -**Findings:** none. - -**For orchestrator:** none. - -### side-by-side-wrapper D4 R1 — SATISFIED - -**Scope:** inline wrapper delegation. Commit `0e44c96e11`. - -**Tasks:** Minimal direct delegation and packed executable evidence are clean. - -**AC delta:** AC-1 remains PASS; built/packed wrapper execution, argv preservation, and exit propagation are confirmed by `0e44c96e11` and `packages/prisma7/src/package-contract.test.ts` (6/6). - -**Findings:** none. - -**For orchestrator:** none. - -### side-by-side-wrapper D5 R1 — ANOTHER ROUND NEEDED - -**Scope:** Consolidation on one real-project E2E. Commit `6d07265187`. - -**Tasks:** Exactly one test declaration and the requested non-mock/non-contract shape are clean; executable engine setup, async client cleanup/propagation, and package test isolation are partial. - -**AC delta:** AC-1 PASS → NOT VERIFIED — the replacement E2E did not pass locally and no ordinary CI engine provisioning evidence was found. - -**Findings:** F2 (must-fix), F3 (must-fix), F4 (should-fix). - -**For orchestrator:** Require the implementer to address F2-F4 and rerun the full package test with a recorded no-network engine path before reconsidering AC-1. - -### side-by-side-wrapper D5 R2 — SATISFIED - -**Scope:** D5 reliability follow-up over commits `6d07265187` and `11c3681f70`. - -**Tasks:** The branch now leaves exactly one added test file, `packages/prisma7/src/e2e.test.ts`; removed unit/contract/identity/mocks/network/install/tar/source checks are absent. The single test has three substantive outcomes: `tsc --noEmit` validates a `prisma7/config` consumer, the built wrapper executes `--version`, and the built wrapper runs `generate` followed by generated-client SQLite create/read execution. The operator ran the supported engine postinstall/download outside the test, then ran the full package command with `PRISMA_SCHEMA_ENGINE_BINARY`; Vitest reported exactly 1 file / 1 test passed in 3.51s. `try/finally` plus caught rejection/nonzero exit makes smoke cleanup and failure propagation deterministic. R2 restores the minimal `vitest run` script, declares the direct workspace/tooling dependencies and lockfile entries, and links only the packages needed by the temporary project. Junction links, `process.execPath` spawning, config-relative SQLite, and temporary-directory cleanup are portable across the Windows/macOS job shape; the synchronous test body has no hidden async timeout path, and the observed test execution remains below Vitest's default timeout. - -**AC delta:** AC-1 NOT VERIFIED → PASS — real built local artifacts executed successfully with the supported engine artifact supplied before the test; prior exact dependency/packed-wrapper evidence remains from D1/D2/D4. - -**Findings:** F2, F3, and F4 resolved. No new findings. - -**Verification:** `pnpm --filter prisma7 tsc`, Prettier check, ESLint, `git diff --check`, and the full `PRISMA_SCHEMA_ENGINE_BINARY=... pnpm --filter prisma7 test` command passed. The mandatory transient-ID scan over the product, test, and planning surfaces found no UUID/agent/subagent identifiers. - -### side-by-side-wrapper D6 R1 — SATISFIED - -**Scope:** move the sole compatibility scenario into the client E2E harness. Commit `ce505fa9ad`. - -**Tasks:** The scenario is auto-discovered from `packages/client/tests/e2e`, runs in the standard Docker image, and installs packed tarballs mounted by the existing runner. The runner now rewrites unscoped `prisma7` dependencies and mounts its unscoped tarball separately from the hardcoded `prisma` tarball. The fixture proves `prisma7/config` typechecking and config selection, version execution, generation into a non-default output, and SQLite create/read execution with deterministic failure propagation and disconnect cleanup. The package-local Vitest test, its test-only dependencies/script, and both standalone workflow entries are removed. - -**AC delta:** D6-AC1 through D6-AC8 all PASS. The focused standard harness command passed exactly 1/1; logs confirm the non-default schema, `pnpm exec prisma7 --version`, generation to `generated/compatibility-client`, generated-client typechecking, and SQLite smoke execution. The fixture lockfile records the nested declared edge from packed `prisma7` to `/tmp/prisma-0.0.0.tgz`. - -**Findings:** none. - -**Verification:** `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility` passed. `git diff --check` passed. The mandatory transient-ID scan over the changed product, test, planning, runner, workflow, and review-input surfaces found no UUID or agent/subagent identifiers. No product, test, planning, or workflow files were edited during review; only this review artifact and the reviewer heartbeat were written. - -### side-by-side-wrapper D7 R1 — SATISFIED - -**Scope:** address current PR #29949 feedback in `f2933682d7 fix(prisma7): address compatibility CLI review feedback`. - -| AC ID | Description | Status | Evidence | -| ------ | ----------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| D7-AC1 | Identity is a minimal stable `'prisma' \| 'prisma7'` seam with exact POSIX/Windows stem normalization and ordinary-Prisma fallback. | PASS | `packages/cli/src/utils/cli-distribution-identity.ts` exports only the literal union and returns `prisma7` only for the normalized executable stem `prisma7`; backslashes are normalized before `path.posix.parse`, and undefined/other stems return `prisma`. Direct source assertions covered POSIX shim/target paths, Windows target paths, ordinary Prisma, and undefined fallback. No identity object, map, marker, global, or cast remains. | -| D7-AC2 | The client E2E prepares and exercises the configured database through the compatibility CLI without raw DDL. | PASS | `_steps.ts` runs `pnpm exec prisma7 --version`, `pnpm exec prisma7 generate`, then `pnpm exec prisma7 db push --force-reset` against the same `prisma.config.ts`. `smoke.ts` creates a record, reads it back by `createdNote.id`, catches failures into a nonzero exit, and disconnects in `finally`. The exact Docker log confirms config selection, non-default schema, generation, db push, and smoke completion. | -| D7-AC3 | Failed wrapper builds do not mask esbuild errors, while successful builds retain executable permissions. | PASS | `packages/prisma7/helpers/build.ts` returns before `statSync`/`chmodSync` when `result.errors.length > 0`; the successful `prisma7` build completed and `build/prisma7.js` was mode `755`/executable. | -| D7-AC4 | Reported verification gates are reproducible and defensible. | PASS | `pnpm --filter prisma tsc`, `pnpm --filter prisma7 tsc`, sequential Prisma/Prisma7 builds, and the exact `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility` command passed; Docker reported `All 1/1 tests passed`. Root `pnpm lint` passed with repository warnings and no errors, `pnpm prettier-check` passed, targeted Prettier passed, and `git diff --check` passed. | -| D7-AC5 | All current PR feedback is accounted for and the mandatory transient-ID scan is clean. | PASS | Identity-map and E2E comments are addressed. The cast/global comment is obsolete after the identity rewrite; forwarding-surface, package-contract, and package-local E2E-timeout comments target files deleted by D6; `prepack` is explicitly rejected because the private package is built before standard E2E packing, and CodeRabbit withdrew that finding. `gh api repos/prisma/prisma/pulls/29949/comments --paginate` showed no newer actionable thread after the withdrawn prepack reply (latest comment: 2026-08-10T14:17:59Z). The scan over changed product/test/planning/runner/workflow surfaces found no UUID, agent, subagent, or session identifiers. | - -**Findings:** none. All current human and CodeRabbit feedback is addressed, obsolete, withdrawn, or explicitly rejected; no further action is required for D7 R1. - -**Verification notes:** Product/tests/planning remain unedited during review. Only this ledger and `wip/heartbeats/reviewer.txt` were written. The E2E generated ignored logs/artifacts and a lockfile refresh during execution; generated artifacts were cleaned and the tracked lockfile was restored before this verdict. - -### cli-owned-distribution-identity D1 R1 — SATISFIED - -**Scope:** Dispatch 1 identity-aware CLI help. Commit `c944253750`; planning-only context `284f3496d7`, `e8e778161b`. - -**Tasks:** Top-level/delegated/error help identity flow, constructor/default plumbing, and focused dual-identity coverage are clean. Remaining executable-specific literals observed in the touched files stay confined to Init/Bootstrap project-creation output for later dispatches. - -**AC delta:** D1-AC1 through D1-AC5 PASS (commit `c944253750`, test `packages/cli/src/__tests__/distribution-identity-help.test.ts`; transient-ID scan clean). - -**Findings:** none. - -**For orchestrator:** none. - -### cli-owned-distribution-identity D2 R1 — ANOTHER ROUND NEEDED - -**Scope:** Dispatch 2 identity-correct project creation. Commit `f18a6738d5`. - -**Tasks:** Config import generation, bootstrap/link/postgres next-step guidance, and selected-package dependency detection are clean; generated `.env` command comments still hardcode ordinary Prisma under `prisma7 init`. - -**AC delta:** D2-AC1, D2-AC3, D2-AC4, and D2-AC5 PASS (commit `f18a6738d5`, test `packages/cli/src/__tests__/distribution-identity-project-creation.vitest.ts`). D2-AC2 FAIL on `packages/cli/src/Init.ts:151,625` (see F5). - -**Findings:** F5 (must-fix). - -**For orchestrator:** The new 331-line focused suite is proportionate: it reuses shared mocks, covers distinct Init/Bootstrap/Link identity surfaces, and avoids cloning the broad ordinary-identity snapshots. `node_modules/` is the correct bootstrap dependency invariant because generated `prisma.config.ts` imports and re-run guidance depend on the selected distribution package, not the nested implementation package. - -### cli-owned-distribution-identity D2 R2 — SATISFIED - -**Scope:** F5 follow-up. Commit `c526edd56d`. - -**Tasks:** Generated `.env` local-dev comments and inserted banner now follow the selected identity; focused dual-identity coverage widened cleanly. - -**AC delta:** D2-AC2 FAIL → PASS (commit `c526edd56d`, test `packages/cli/src/__tests__/distribution-identity-project-creation.vitest.ts`). F5 resolved (`c526edd56d`). - -**Findings:** none. - -**For orchestrator:** Root Prettier remains blocked only by this review ledger's uncommitted edits; format/commit the ledger after verdict. - -### cli-owned-distribution-identity D3 R1 — SATISFIED - -**Scope:** version output and global/local mismatch identity. Commit `648c07ff6a`. - -**Tasks:** `Version` now labels the first row with the selected distribution, mismatch lookup/labels/recommendation use the selected identity, and `Generate` forwards that identity into the mismatch helper. The focused dual-identity Vitest is proportionate and exercises positive plus negative cases for both `prisma` and `prisma7`. - -**AC delta:** D3-AC1 through D3-AC5 PASS (commit `648c07ff6a`, tests `packages/cli/src/__tests__/distribution-identity-version-mismatch.vitest.ts` and `packages/cli/src/__tests__/globalLocalVersionMismatch.test.ts`; transient scan clean). - -**Findings:** none. - -**For orchestrator:** Reviewer reran the old Jest `packages/cli/src/__tests__/commands/Version.test.ts` only as exploratory evidence; it failed before assertions on this NixOS shell with existing libssl/checksum download warnings and a `linux-nixos/schema-engine.sha256` 404, so that failure remains environment-only noise rather than an in-PR regression. - -### cli-owned-distribution-identity D4 R1 — SATISFIED - -**Scope:** completion identity. Commit `5ad733ced7`. - -**Tasks:** Completion setup now uses the selected executable for fish/bash/zsh/powershell registration and reinvocation, CLI construction forwards the primitive identity into `Completions`, and the separately bundled completion entry resolves executable identity independently without reintroducing mutable transport. - -**AC delta:** D4-AC1 through D4-AC5 PASS (commit `5ad733ced7`, test `packages/cli/src/completions/completion-command.test.ts`; transient scan clean). - -**Findings:** none. - -**For orchestrator:** No addressable review findings remain for D4 R1. - -### cli-owned-distribution-identity D5 R1 — SATISFIED - -**Scope:** suppress Prisma 8 update consultation. Commit `59d3ee7a63`. - -**Tasks:** `CLI.parse` now creates the checkpoint promise only for ordinary `prisma`, compatibility invocations skip both checkpoint startup and update printing, and the ordinary path still flows through the unchanged checkpoint/print helpers including the hidden-message env case. - -**AC delta:** D5-AC1 through D5-AC5 PASS (commit `59d3ee7a63`, test `packages/cli/src/__tests__/distribution-identity-update-check.test.ts`; transient scan clean). - -**Findings:** none. - -**For orchestrator:** No addressable review findings remain for D5 R1. - -### cli-owned-distribution-identity D6 R1 — SATISFIED - -**Scope:** packed CLI identity proof and final `packages/cli/src` audit. Commit `8c41d0a6e6`. - -**Tasks:** The sole packed compatibility E2E now proves CLI-owned help/version/completion/init while retaining the existing generate/db push/generated-client smoke. The fixture lockfile refresh still pins packed tarballs correctly. The last two CLI-owned escapees in Generate and SubCommand are fixed with focused regression tests, and the audit leaves only domain-stable or internal non-guidance `prisma` literals under `packages/cli/src`. - -**AC delta:** D6-AC1 through D6-AC5 PASS (commit `8c41d0a6e6`, tests `packages/client/tests/e2e/prisma7-compatibility/_steps.ts`, `packages/cli/src/__tests__/distribution-identity-version-mismatch.vitest.ts`, and `packages/cli/src/__tests__/commands/SubCommand.vitest.ts`; transient scan clean). The slice-specific done condition is met. - -**Findings:** none. - -**For orchestrator:** `cli-owned-distribution-identity` is review-complete; the next remaining work is the planned `downstream-actionable-guidance` slice. - -### cli-owned-distribution-identity D7 R1 — ANOTHER ROUND NEEDED - -**Scope:** replace mocked identity coverage with one packed executable-boundary snapshot. Commit `09de26b02d`. - -**Tasks:** The branch correctly deletes the slice-added mock-heavy suites, keeps the single packed compatibility scenario, uses the installed `node_modules/.bin/prisma7` binary for `init`, and preserves the pre-existing generate/db push/client smoke. The remaining issue is that the committed snapshot still hardcodes environment-specific version metadata and peer-layout paths instead of isolating durable identity behavior. - -**AC delta:** D7-AC1, D7-AC4, D7-AC5, and D7-AC6 PASS. D7-AC2 and D7-AC3 FAIL on `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` and `tests/__snapshots__/main.test.ts.snap` (see F6). - -**Findings:** F6 (must-fix). - -**For orchestrator:** Ask the implementer to keep the single packed scenario but trim/normalize the version snapshot so it stops encoding architecture, engine hashes/paths, toolchain versions, and peer-suffixed CLI paths. No product-code follow-up is required; this is a test-evidence correction only. - -### cli-owned-distribution-identity D7 R2 — SATISFIED - -**Scope:** stabilize the packed version snapshot without widening the scenario. Commit `37d7f251f9`. - -**Tasks:** The single packed scenario remains intact, and the version evidence is now projected from the real `--version` text/JSON into stable identity-bearing fields only. The snapshot still proves `prisma7` distribution labeling, `@prisma/client` labeling, absence of ordinary `prisma`, semantic metadata key/label sets, and config/schema-load stderr, while the raw architecture/hash/path/runtime/toolchain values are removed. - -**AC delta:** D7-AC2 and D7-AC3 FAIL → PASS on `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` and `tests/__snapshots__/main.test.ts.snap`; F6 resolved (`37d7f251f9`). D7-AC1, D7-AC4, D7-AC5, and D7-AC6 remain PASS. - -**Findings:** none. - -**For orchestrator:** Root Prettier remains blocked only by this review ledger edit. No further implementer action is required for D7. - -### cli-owned-distribution-identity D8 R1 — SATISFIED - -**Scope:** require explicit distribution identity at CLI command boundaries. Commit `46c4cdc1c7`. - -**Tasks:** Identity defaults and optional identity plumbing are removed from CLI-owned constructors/helpers, the production entry and separate completion entrypoint pass identity explicitly, nested CLI-owned composition stays explicit, and ordinary scripts/tests intentionally pass `'prisma'` without introducing any replacement mock suite. - -**AC delta:** D8-AC1 through D8-AC5 PASS (commit `46c4cdc1c7`; audit over touched product/test/script surfaces; transient scan clean). - -**Findings:** none. - -**Verification:** `git diff --check 46c4cdc1c7^ 46c4cdc1c7` passed. The reviewer audit found the only remaining defaulted identity inference in `getCliDistributionIdentity(executedScript = process.argv[1])`, consumed by `bin.ts` and `completions/completion-entry.ts`; all other touched CLI-owned boundaries now require explicit identity. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. - -**For orchestrator:** `cli-owned-distribution-identity` remains closed. The next planned work is `downstream-actionable-guidance` unless the operator reprioritizes. - -### cli-owned-distribution-identity D9 R1 — SATISFIED - -**Scope:** close the exact CI/typecheck and current review follow-up. Commit `8ca24fe182`. - -**Tasks:** Root/subpath typecheck aliases now match the actual `prisma` and `prisma7` source export shapes, generated Prisma7 forwarding artifacts are ignored by root lint/Prettier like the existing CLI forwarding artifacts, Bootstrap shells through the selected local binary, and the two redundant platform comments are removed. The remaining current review comments are either fixed, obsolete because their target test was deleted in D7, or rejected because they misapply contributor tooling rules to user-facing CLI guidance. - -**AC delta:** D9-AC1 through D9-AC6 PASS (commit `8ca24fe182`; diff audit; transient scan clean). - -**Findings:** none. - -**Verification:** `git diff --check 8ca24fe182^ 8ca24fe182` passed. The mandatory transient-ID scan over `.prettierignore`, `eslint.config.cjs`, `packages/cli/src/bootstrap/Bootstrap.ts`, `packages/cli/src/bootstrap/__tests__/Bootstrap.vitest.ts`, `packages/cli/src/platform/$.ts`, `packages/cli/src/platform/_lib/help.ts`, and `tsconfig.build.bundle.json` found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. - -**For orchestrator:** `cli-owned-distribution-identity` stays closed. The next planned work remains `downstream-actionable-guidance` unless the operator reprioritizes. - -### cli-owned-distribution-identity D10 R1 — ANOTHER ROUND NEEDED - -**Scope:** close the second review round over commits `84401c2318` and `c244dd6669`. - -**Tasks:** The packed E2E now keeps command-local inline evidence for help/version/init, the obsolete external snapshot file is gone, completion identity stays on concise direct assertions, and Bootstrap correctly selects `.cmd` shims on Windows via the existing narrow test. The remaining issue is the bundler-side alias contract: `resolvePathsPlugin` fixes exact file-vs-directory targets but still does not preserve wildcard alias matching for `prisma/*` and `prisma7/*`. - -**AC delta:** D10-AC1, D10-AC2, D10-AC3, and D10-AC5 PASS. D10-AC4 FAIL on `helpers/compile/plugins/resolvePathsPlugin.ts` (see F7). - -**Findings:** F7 (must-fix). - -**Verification:** `pnpm --filter prisma build`, `pnpm --filter prisma7 build`, `pnpm tsc -p tsconfig.utils.typecheck.json`, `pnpm exec vitest run src/bootstrap/__tests__/Bootstrap.vitest.ts` from `packages/cli`, `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility`, `pnpm lint`, `pnpm prettier-check`, and `git diff --check 84401c2318^..c244dd6669` passed. Independent probe evidence: a temporary esbuild build with `resolvePathsPlugin` resolved exact side-effect root imports `prisma -> packages/cli/src/types.ts` and `prisma7 -> packages/prisma7/src/index.ts`, while a direct regex check over the plugin's constructed matcher proved `prisma/config` and `prisma7/config` do not match the raw wildcard keys. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. - -**For orchestrator:** Reopen `cli-owned-distribution-identity` only for the wildcard branch of the bundler alias contract. The next implementer pass should keep the current exact-root/file-target behavior, preserve wildcard substitution in `resolvePathsPlugin`, and rerun the same D10 gate set. - -### cli-owned-distribution-identity D10 R2 — SATISFIED - -**Scope:** close F7 over commit `25e8174e1e`. - -**Tasks:** `resolvePathsPlugin` now preserves wildcard alias matching/substitution for `prisma/*` and `prisma7/*` while keeping the exact-root, explicit-file, directory-target, external-alias, snapshot/completion, and Windows-bootstrap behaviors intact. - -**AC delta:** D10-AC4 FAIL → PASS. D10-AC1, D10-AC2, D10-AC3, and D10-AC5 remain PASS. - -**Findings:** F7 resolved (`25e8174e1e`). No new findings. - -**Verification:** `pnpm exec vitest run helpers/compile/plugins/resolvePathsPlugin.test.ts`, `pnpm --filter prisma build`, `pnpm --filter prisma7 build`, `pnpm tsc -p tsconfig.utils.typecheck.json`, `pnpm exec vitest run src/bootstrap/__tests__/Bootstrap.vitest.ts` from `packages/cli`, and `git diff --check 25e8174e1e^..25e8174e1e` passed. The mandatory transient-ID scan over `helpers/compile/plugins/resolvePathsPlugin.ts` and `helpers/compile/plugins/resolvePathsPlugin.test.ts` found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. An exploratory rerun of `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility` timed out inside the unchanged packed `tests/main.test.ts` body after Docker fixture install, so I treated the committed `main.test.ts` diff staying empty plus the passing Bootstrap regression test as the proportional no-regression evidence for the D10 R1 snapshot/completion and Windows fixes. - -**For orchestrator:** `cli-owned-distribution-identity` is closed again. The next planned work remains `downstream-actionable-guidance` unless the operator reprioritizes. - -### downstream-actionable-guidance D1 R1 — SATISFIED - -**Scope:** Dispatch 1 migrate/db help identity propagation. Commit `b7fa50bea3`. - -**Tasks:** Command-group help/unknown-command paths are clean. Representative leaf help and validation-help paths are clean. Explicit ordinary-callsite migration is clean. - -**AC delta:** D1-AC1 PASS. D1-AC2 PASS. D1-AC3 PASS. D1-AC4 PASS. D1-AC5 PASS. - -**Findings:** none. - -**For orchestrator:** The round touched 33 files, slightly above the brief's ~30-file halt threshold, but the overage is mechanical constructor/callsite fanout rather than hidden scope creep, so I did not file a product finding. Dispatch 2 still owns the remaining hardcoded runtime/recovery guidance in `DbPull`, `DbPush`, `MigrateDev`, and `MigrateStatus`. - -### downstream-actionable-guidance D2 R1 — ANOTHER ROUND NEEDED - -**Scope:** Dispatch 2 migrate/db runtime guidance propagation. Commit `451c633d10`. - -**Tasks:** Active runtime guidance and internals helper migration are clean. Generate/Init callsite updates are necessary mechanical fallout from the full-command helper contract. Disabled `DbDrop` remains inactive and build-consistent via explicit constructor migration at its test/runtime helper callsites. The only substantive issue is the new exported `renderCreateOnlySuccessMessage(...)` test seam. - -**AC delta:** D2-AC1 PASS. D2-AC2 PASS. D2-AC4 PASS. D2-AC5 PASS. D2-AC3 FAIL on `packages/migrate/src/commands/MigrateDev.ts` / `packages/migrate/src/__tests__/runtime-guidance.test.ts` (see F8). - -**Findings:** F8 (must-fix). - -**Verification:** `pnpm --filter @prisma/migrate build`, `pnpm --filter @prisma/migrate test runtime-guidance.test.ts --runInBand`, and `git diff --check 451c633d10^..451c633d10` passed. The mandatory transient-ID scan over the 23 touched files found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. - -**For orchestrator:** Ask the implementer to keep the current runtime-guidance propagation but remove the `MigrateDev` export seam and prove the `prisma7` create-only success path through command-level behavior. No additional runtime literal fanout appears necessary after that cleanup. - -### downstream-actionable-guidance D2 R2 — SATISFIED - -**Scope:** Close F8 over commit `cc07b4f32a`. - -**Tasks:** The production-only `MigrateDev` export seam is removed. Inline create-only rendering again uses `this.cliCommand`, the direct helper assertion is gone, and the remaining focused dual-identity runtime suite stays proportionate. The attempted command-level `prisma7` create-only proof remains honestly blocked by the known Nix schema-engine resolution issue, and no replacement seam/mock was added. - -**AC delta:** D2-AC3 FAIL → PASS. D2-AC1, D2-AC2, D2-AC4, and D2-AC5 remain PASS. - -**Findings:** F8 resolved (`cc07b4f32a`). No new findings. - -**Verification:** `pnpm --filter @prisma/migrate build`, `pnpm --filter @prisma/migrate test runtime-guidance.test.ts --runInBand`, and `git diff --check cc07b4f32a^..cc07b4f32a` passed. The mandatory transient-ID scan over `packages/migrate/src/commands/MigrateDev.ts` and `packages/migrate/src/__tests__/runtime-guidance.test.ts` found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. - -**For orchestrator:** `downstream-actionable-guidance` D2 is closed. The next planned work remains Dispatch 3 unless the operator reprioritizes. - -### downstream-actionable-guidance D3 R1 — SATISFIED - -**Scope:** Dispatch 3 generator diagnostics identity propagation. Commit `2695ccd8a9`. - -**Tasks:** Required `cliCommand` propagation through `getGenerators` is clean. Invocation-scoped registry construction and selected-command missing-client recovery are clean. The retained exported `defaultRegistry = createDefaultRegistry('prisma')` does not undermine invocation isolation because `Generate` now constructs a fresh registry per invocation/watch cycle and the export remains only the explicit ordinary-control path. - -**AC delta:** D3-AC1 PASS. D3-AC2 PASS. D3-AC3 PASS. D3-AC4 PASS. D3-AC5 PASS. - -**Findings:** none. - -**Verification:** `pnpm --filter @prisma/internals build`, `pnpm --filter @prisma/client-generator-registry build`, `pnpm --filter @prisma/client-generator-js build`, `pnpm --filter prisma build`, `pnpm exec vitest run tests/resolvePrismaClient.test.ts tests/generator.test.ts` from `packages/client-generator-js`, `pnpm exec vitest run src/default.test.ts` from `packages/client-generator-registry`, `pnpm exec jest --runInBand src/__tests__/commands/Generate.test.ts -t 'renders no-generator guidance with the selected executable'` from `packages/cli`, `PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING=1 pnpm exec vitest run src/__tests__/getGenerators/getGenerators.test.ts -t 'prisma7 sqlite guidance|prisma7 mongodb guidance'` from `packages/internals`, and `git diff --check 2695ccd8a9^..2695ccd8a9` passed. The mandatory transient-ID scan over the 14 touched files found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. A broader rerun of the full `getGenerators` and `Generate` suites still reproduces known Nix/env failures unrelated to the new D3 assertions, so I treated those as environmental noise rather than product regressions. - -**For orchestrator:** `downstream-actionable-guidance` is review-complete through D3. The next planned work is Dispatch 4 unless the operator reprioritizes. - -### downstream-actionable-guidance D4 R1 — SATISFIED - -**Scope:** Dispatch 4 packed installed-artifact proof and final downstream literal audit. Commit `4f08193fc8`. - -**Tasks:** The existing lone packed compatibility scenario now proves representative installed-artifact `migrate`, `db`, and `generate` downstream guidance while preserving the earlier help/version/completion/init and generate/db-push/generated-client smoke. The new negative-command helper semantics are explicit and cleanup remains deterministic. The final production literal audit over `packages/migrate`, `packages/internals`, `packages/client-generator-js`, and `packages/client-generator-registry` is clean apart from already-classified disabled, comment-only, JSDoc, and generated-runtime surfaces. - -**AC delta:** D4-AC1 PASS. D4-AC2 PASS. D4-AC3 PASS. D4-AC4 PASS. D4-AC5 PASS. - -**Findings:** none. - -**Verification:** `pnpm exec prettier --check packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts packages/client/tests/e2e/prisma7-compatibility/pnpm-lock.yaml`, `pnpm exec eslint packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts`, `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility`, and `git diff --check 4f08193fc8^..4f08193fc8` passed. The packed E2E completed in 39.495s including tarball packing, fixture install, and Docker orchestration, so the test's 120_000ms budget remains safe. Independent probes confirmed `spawnSync` drops `undefined` env overrides and that `@antfu/ni` falls back to npm formatting for the bare temp project shape used by the missing-client proof, yielding the asserted `npx "prisma7 generate"` guidance from the packed command path. Root `pnpm prettier-check` still fails only on unrelated generated fixture files under `packages/client-generator-js/tests/generated-no-models/**`, and root `pnpm lint` still reports broad repo-wide debt without touching the changed packed-test surfaces. The mandatory transient-ID scan over `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` and `packages/client/tests/e2e/prisma7-compatibility/pnpm-lock.yaml` found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. - -**For orchestrator:** `downstream-actionable-guidance` is closed. Slice DoD is met, and there is no open review finding for D4 R1. - -### downstream-actionable-guidance D5 R1 — SATISFIED - -**Scope:** Dispatch 5 CI follow-up over commit `115752f540` after the slice reopened on failing migrate-related jobs. - -**Tasks:** The round is the expected mechanical close-out: every legacy external `DbPull` test construction now goes through `DbPull.new('prisma')`, preserving ordinary snapshot intent while restoring the required runtime identity. An exact repo audit finds no remaining external direct construction of the D1-required migrate command classes, and the commit does not weaken production APIs or broaden test scope. - -**AC delta:** D5-AC1 PASS. D5-AC2 PASS. D5-AC3 PASS. D5-AC4 PASS. D5-AC5 PASS. - -**Findings:** none. - -**Verification:** `git show --stat --oneline 115752f540`, exact diff inspection over the 13 touched files, `git diff --check 115752f540^..115752f540`, and a repo grep for `new (DbPull|DbPush|DbExecute|DbSeed|DbDrop|MigrateDev|MigrateStatus|MigrateResolve|MigrateReset|MigrateDeploy|MigrateDiff)\(` were all consistent with the implementation report: only class-internal factory `new` calls remain, and every migrated legacy `DbPull` site now passes explicit `'prisma'`. I did not rerun the broader DB-backed migrate or cross-platform package suites locally because those environments are unavailable here, and a focused SQLite rerun was unnecessary once the exact diff plus exhaustive constructor audit established the failure mechanism was fully removed. The mandatory transient-ID scan over the 13 touched files found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. - -**For orchestrator:** `downstream-actionable-guidance` is satisfied again through D5. No addressable review finding remains from the CI reopen. - -### downstream-actionable-guidance D6 R1 — SATISFIED - -**Scope:** Dispatch 6 current-review-thread close-out over commit `103246ff48`. - -**Tasks:** The round addresses the exact review follow-up without widening the slice: the ordinary missing-client test now fails if the rejection path disappears; representative `DbCommand`, `MigrateCommand`, and `DbExecute` negatives now assert the opposite executable name is absent; the incorrect duplicate `await expect(...).resolves.toThrow()` cases are removed; dormant `DbDrop` help now renders from the required `cliCommand`; and `MigrateReset` rejects unsupported Accelerate URLs before printing datasource info. The added `DbDrop` unsupported-URL regression is related and proportionate because it stays on the touched dormant command surface and documents existing no-stdout ordering rather than broadening production wiring. - -**AC delta:** D6-AC1 PASS. D6-AC2 PASS. D6-AC3 PASS. D6-AC4 PASS. D6-AC5 PASS. - -**Findings:** none. - -**Verification:** `git show --stat --oneline 103246ff48`, exact diff inspection over the eight touched files, `git diff --check 103246ff48^..103246ff48`, and the mandatory transient-ID scan over the touched files were all consistent with the implementation report. On-disk code matches the six requested corrections: `resolvePrismaClient.test.ts` now uses `expect.assertions(2)` on the ordinary-control rejection path; `DbCommand.test.ts`, `MigrateCommand.test.ts`, and `DbExecute.test.ts` now carry opposite-identity negatives; `DbDrop.ts` renders help from `this.cliCommand`; and `MigrateReset.ts` validates unsupported Accelerate URLs before any datasource output. I did not rerun the reported focused migrate/client-generator gates because the user asked me to trust them unless inconsistent, and nothing in the diff or file state contradicted that report. The mandatory transient-ID scan found no UUID, `agent_id`, `subagent`, `trace_id`, `session`, or `projects/prisma7-compatibility-cli/` hits. No product, test, planning, or workflow files were edited during review; only this review ledger and `wip/heartbeats/reviewer.txt` were written. - -**For orchestrator:** `downstream-actionable-guidance` is closed again through D6. No further implementer round is needed on the five current review threads. diff --git a/projects/prisma7-compatibility-cli/rollups/2026-08-10-opening-rollup.md b/projects/prisma7-compatibility-cli/rollups/2026-08-10-opening-rollup.md deleted file mode 100644 index c45be4754702..000000000000 --- a/projects/prisma7-compatibility-cli/rollups/2026-08-10-opening-rollup.md +++ /dev/null @@ -1,36 +0,0 @@ -# Project health rollup: prisma7 compatibility CLI - -**Cadence:** opening-rollup -**Date:** 2026-08-10 - -## Progress - -- **Slices delivered:** 0 / 3. -- **Slices in flight:** None. -- **Slices not started:** `side-by-side-wrapper`, `identity-complete-prisma7`, `release-mirroring-and-package-proof`. -- **Direct changes:** N/A — project work is slice-shaped. -- **Project-DoD coverage:** Side-by-side execution and forwarded exports begin in slice 1; complete identity behavior and update suppression complete in slice 2; packed package-manager coverage and all publication conditions complete in slice 3. Every project-specific condition has a named destination. - -## Drift signals - -- None. The project has not entered implementation. - -## Throughput - -- **Dispatches/day:** N/A — no dispatches yet. -- **Median dispatch wallclock:** N/A. -- **Median rounds-to-satisfied:** N/A. - -## Calibration - -- **Size prediction accuracy:** N/A until the first dispatch closes. -- **Retro-trigger frequency:** 0 — expected before implementation. -- **Spike-driven re-plans:** 0. The package-manager topology question was resolved by a pre-plan `/tmp` probe rather than an implementation spike. - -## Recommended next pick - -1. **`side-by-side-wrapper`** — first stack item and the only dependency-ready slice. Specify its exact wrapper/identity contract and decompose it before dispatch. - -## Triggers - -- No scope-shift, retro, or project-plan amendment trigger. diff --git a/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/plan.md b/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/plan.md deleted file mode 100644 index 01bf189c1b5a..000000000000 --- a/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/plan.md +++ /dev/null @@ -1,81 +0,0 @@ -## Dispatch plan - -### Dispatch 1: identity-aware CLI help - -- **Outcome:** Top-level and CLI-owned command help and examples render the selected executable name, with regression tests proving ordinary `prisma` output is unchanged. -- **Builds on:** The merged executable-derived `CliDistributionIdentity` seam. -- **Hands to:** An explicit primitive identity flow available to every CLI-owned renderer. -- **Focus:** Write focused dual-identity tests first, then thread the primitive through `bin.ts`, `CLI`, and CLI-owned command help such as Init, Generate, Validate, Format, Studio, Version, DebugInfo, Status, bootstrap, platform, MCP, and postgres commands. Change executable/package references only; no generic template framework and no migrate-owned output. -- **Validation gate:** `pnpm --filter prisma tsc`; focused CLI help tests through `pnpm --filter prisma test -- `; `pnpm prettier-check`; `git diff --check`. - -### Dispatch 2: identity-correct project creation - -- **Outcome:** `prisma7 init`, bootstrap, and postgres setup generate `prisma7/config` imports and recommend, install, and reinvoke `prisma7`, while domain paths and package names remain stable. -- **Builds on:** Dispatch 1's primitive identity flow through CLI-owned renderers. -- **Hands to:** Correct generated config files, package instructions, and next-step commands for the compatibility invocation. -- **Focus:** Add failing focused cases before changing `Init.defaultConfig`, Init output, `init/ppg-output.ts`, Bootstrap, `bootstrap/completion-output.ts`, and `postgres/link/completion-output.ts`. Keep `prisma.config.ts`, `prisma/schema.prisma`, Prisma Skills, URLs, and `@prisma/client` unchanged. -- **Validation gate:** `pnpm --filter prisma tsc`; focused Init/Bootstrap/postgres tests through `pnpm --filter prisma test -- `; `pnpm prettier-check`; `git diff --check`. - -### Dispatch 3: version and mismatch identity - -- **Outcome:** Text and JSON version output plus global/local mismatch diagnostics label and recommend `prisma7` under compatibility invocation, while ordinary Prisma and `@prisma/client` behavior remain unchanged. -- **Builds on:** Dispatch 1's identity-aware CLI construction. -- **Hands to:** Correct package/version diagnostics with the physical nested implementation path intentionally left visible. -- **Focus:** Add dual-identity tests first, then update `Version` and `getGlobalLocalVersionMismatchWarning` composition. Verify local package lookup and the recommended generate command use the selected distribution without renaming domain packages. -- **Validation gate:** `pnpm --filter prisma tsc`; focused Version, Generate, and global/local mismatch tests through `pnpm --filter prisma test -- `; `pnpm prettier-check`; `git diff --check`. - -### Dispatch 4: completion identity - -- **Outcome:** `prisma7 complete ` installs completion for `prisma7`, and generated fish, Bash, Zsh, and PowerShell scripts reinvoke `prisma7 complete` without changing completion descriptors. -- **Builds on:** The executable-derived identity available independently in the completion bundle. -- **Hands to:** Correct compatibility shell integration with ordinary Prisma output regression-pinned. -- **Focus:** Write completion-generation cases first, then pass the primitive identity through `Completions`, `parseCompletionCommand`, and shell setup. Do not introduce cross-bundle mutable state. -- **Validation gate:** `pnpm --filter prisma tsc`; focused completion tests through `pnpm --filter prisma test -- packages/cli/src/completions`; `pnpm prettier-check`; `git diff --check`. - -### Dispatch 5: suppress Prisma 8 update consultation - -- **Outcome:** Compatibility invocations neither start the checkpoint request nor print update guidance; ordinary Prisma performs the unchanged request and rendering path. -- **Builds on:** Identity availability in `CLI.parse` from Dispatch 1. -- **Hands to:** A Prisma 7 compatibility invocation isolated from the Prisma 8 release line. -- **Focus:** Add control-flow tests first, then gate `runCheckpointClientCheck` before promise creation. Do not invent a Prisma 7 checkpoint product, mutate checkpoint payloads, or rely only on `PRISMA_HIDE_UPDATE_MESSAGE`. -- **Validation gate:** `pnpm --filter prisma tsc`; focused CLI/update/checkpoint tests through `pnpm --filter prisma test -- `; `pnpm prettier-check`; `git diff --check`. - -### Dispatch 6: packed CLI identity proof and audit - -- **Outcome:** The packed compatibility fixture proves CLI-owned help, version, completion, init config generation, and update suppression, and a repository audit classifies every remaining actionable `prisma` literal in `packages/cli/src`. -- **Builds on:** Dispatches 1–5's complete CLI-owned identity behavior. -- **Hands to:** A review-ready CLI-owned identity slice plus a concrete downstream inventory for `downstream-actionable-guidance`. -- **Focus:** Extend the existing packed client Docker E2E rather than adding a second compatibility scenario; add only user-visible proof not already covered by focused tests. Record downstream/domain-stable audit results in the slice walkthrough or review artifact, not source comments. -- **Validation gate:** `pnpm --filter prisma build`; `pnpm --filter prisma7 build`; focused Prisma tests; `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility`; `pnpm prettier-check`; root `pnpm lint`; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 7: replace mocked identity tests with command snapshots - -- **Outcome:** The slice's mock-heavy unit coverage is removed and one packed E2E snapshots deterministic output from real `prisma7` command invocations across the CLI-owned identity behaviors. -- **Builds on:** Dispatch 6's packed compatibility fixture and the operator's PR feedback that command behavior should be proven at the executable boundary rather than through constructor/helper mocks. -- **Hands to:** A smaller review surface whose compatibility evidence comes from shipped commands, with existing ordinary-Prisma regression tests left intact. -- **Focus:** Delete the slice-added identity unit suites and additions to existing unit tests; extend the existing single packed fixture with a committed, normalized command-output snapshot for the representative help, version, completion, init/generated-file, warning, and update behavior that can be observed without mocks. Do not create a second scenario or a test-only production seam. If a contract cannot be observed from a real command, remove the mock assertion rather than simulating internals and record the resulting evidence boundary in review. -- **Validation gate:** `pnpm --filter prisma build`; `pnpm --filter prisma7 build`; `pnpm --filter @prisma/client test:e2e --verbose --runInBand prisma7-compatibility`; existing ordinary-Prisma regression tests affected by production signatures; `pnpm prettier-check`; root `pnpm lint`; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 8: require identity at CLI command boundaries - -- **Outcome:** Every CLI command/helper whose behavior depends on distribution identity requires an explicit `CliDistributionIdentity`; no constructor or renderer silently defaults to ordinary `prisma`. -- **Builds on:** Dispatch 7's executable-boundary evidence, which no longer needs optional identity defaults for mock-driven tests. -- **Hands to:** An explicit composition contract where normal and completion entrypoints select identity and all identity-sensitive command construction is mechanically auditable. -- **Focus:** Remove default identity values from CLI command constructors/factories/helpers, update all production composition roots and existing ordinary-Prisma tests/callers to pass `'prisma'` explicitly, and add no replacement mock suites. Keep `getCliDistributionIdentity` defaulting only at actual executable-entry inference where `process.argv[1]` is the intended source. -- **Validation gate:** `pnpm --filter prisma tsc`; `pnpm --filter prisma build`; `pnpm --filter prisma7 build`; existing affected ordinary-Prisma tests; packed compatibility E2E; `pnpm prettier-check`; root `pnpm lint`; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 9: close CI and current review findings - -- **Outcome:** Workspace typecheck and lint pass after a full build, and every current PR review comment is either fixed or explicitly classified against current code. -- **Builds on:** Dispatch 8's explicit identity contract and CI evidence showing unresolved workspace path mappings plus generated Prisma7 forwarding artifacts entering lint. -- **Hands to:** A pushed PR with green local reproductions of the failed CI jobs and no valid unaddressed review comment. -- **Focus:** Correct source-path mappings for `prisma` root/config imports used by `packages/prisma7`; exclude generated root forwarding artifacts from lint/Prettier consistently with `packages/cli`; make Bootstrap resolve the selected local CLI binary; remove the two redundant platform comments. Treat the deleted-test comment as obsolete and reject package-manager guidance comments that misapply contributor tooling rules to user-facing CLI output. -- **Validation gate:** reproduce CI with `pnpm tsc -p tsconfig.utils.typecheck.json` after the required workspace dev build; run root `pnpm lint` and `pnpm prettier-check` without deleting generated Prisma7 package artifacts; run focused Bootstrap tests and packed compatibility E2E; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 10: close second review round - -- **Outcome:** The packed E2E presents command-local inline evidence without snapshotting the generated completion script, Bootstrap selects Windows `.cmd` shims, and bundler path resolution supports the exact Prisma package aliases introduced for workspace typecheck. -- **Builds on:** Dispatch 9's green CI run and the four current unresolved review threads. -- **Hands to:** A pushed PR where each current thread is fixed with focused evidence and the obsolete aggregate snapshot is removed. -- **Focus:** Split the aggregate external snapshot into inline snapshots for each identity-bearing command output; retain concise assertions, not a script snapshot, for completion identity. Preserve one narrow Bootstrap regression test by adapting it to a `.cmd`-only Windows fixture. Represent exact path aliases as directory or explicit-file targets and make `resolvePathsPlugin` honor explicit file targets rather than blindly appending `/index.ts`. -- **Validation gate:** focused Bootstrap test; Prisma and Prisma7 builds; exact workspace typecheck; packed compatibility E2E with snapshots validated; root lint and Prettier; `git diff --check`; mandatory transient-ID scan. diff --git a/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/pr-description.md b/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/pr-description.md deleted file mode 100644 index 269b545bbec4..000000000000 --- a/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/pr-description.md +++ /dev/null @@ -1,18 +0,0 @@ -## Overview - -Complete the CLI-owned `prisma7` identity pass by making executable selection explicit at every identity-sensitive CLI boundary and by proving the shipped behavior from packed artifacts instead of slice-local mocks. The compatibility invocation now renders `prisma7` across CLI-owned help, setup, completion, and version surfaces while ordinary `prisma` callers and tests pass `'prisma'` explicitly. - -## Changes - -- **Explicit identity plumbing**: `packages/cli/src/bin.ts` and `packages/cli/src/completions/completion-entry.ts` are the only executable-boundary inference points, and they now pass the selected identity through `CLI`, CLI-owned commands, factories, and helpers. Existing ordinary call sites such as `scripts/run-studio.ts` and the updated CLI test suites pass `'prisma'` explicitly instead of relying on fallback defaults. -- **CLI-owned output stays on the selected executable**: help, init/bootstrap/postgres guidance, completion scripts, version labels, mismatch messaging, and CLI-owned rerun/install text now derive from the selected identity. `prisma7 init` emits `prisma7/config` and `prisma7` next-step commands, while stable Prisma domain surfaces such as `prisma/schema.prisma`, `prisma.config.ts`, and `@prisma/client` stay unchanged. `packages/cli/src/CLI.ts` also avoids starting the update-check path for `prisma7`. -- **Cross-platform execution and build aliases**: Bootstrap resolves the selected local CLI through its Unix shim or Windows `.cmd` shim. Workspace path mappings expose exact and wildcard `prisma`/`prisma7` entrypoints, and the esbuild resolver now handles explicit files, package directories, and wildcard subpaths consistently. -- **Packed proof replaces slice-local mock coverage**: the four mock-heavy identity suites and the slice-added mock assertions are gone. Evidence now comes from the single packed E2E in `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts`, which exercises real built/packed `prisma7 --help`, `validate --help`, text/JSON `--version`, `complete zsh`, `init`, `generate`, and `db push` flows. Identity-bearing command outputs use local inline snapshots with narrow path/version normalization; completion branding uses direct assertions rather than snapshotting the generated script. - -## Why - -Keep the identity seam mechanically auditable: executable entrypoints infer identity once, everything identity-sensitive receives it explicitly, and ordinary `prisma` callers say so explicitly. Using one packed executable-boundary proof captures the shipped wrapper behavior without over-claiming visibility into internal update or mismatch paths, while preserving stable Prisma product names that are not distribution identity. - -## Scope - -_CLI-owned identity completion only: explicit identity plumbing across `packages/cli`, compatibility-facing help/setup/completion/version surfaces, packed executable-boundary proof, and updated ordinary-Prisma call sites/tests. Lower-package guidance, release mirroring, and publication remain out of scope._ diff --git a/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/spec.md b/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/spec.md deleted file mode 100644 index d7a467dd0963..000000000000 --- a/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/spec.md +++ /dev/null @@ -1,68 +0,0 @@ -# Slice: cli-owned-distribution-identity - -_(Parent project `projects/prisma7-compatibility-cli/`. This slice makes the compatibility identity complete across the CLI-owned shell and project-creation lifecycle.)_ - -## At a glance - -Make every actionable distribution reference owned by `packages/cli` render `prisma7` when invoked through the compatibility wrapper, while preserving ordinary `prisma` output byte-for-byte. This covers CLI-owned help and examples, generated config imports, initialization/bootstrap guidance, version and mismatch labels, completion setup, and update-check suppression. - -## Chosen design - -`packages/cli/src/utils/cli-distribution-identity.ts` remains the only distribution-identity authority and stays deliberately minimal: - -```ts -type CliDistributionIdentity = 'prisma' | 'prisma7' -``` - -Each separately bundled CLI entry resolves that primitive identity from the executed script and passes it into the CLI-owned command constructors and output helpers it composes. Tests may inject the same primitive explicitly. The slice does not introduce an identity object, lookup map, environment marker, global state, compatibility reexport, or generic branding framework. - -Actionable distribution references derive directly from the primitive value: - -```text -command name prisma generate → prisma7 generate -config import prisma/config → prisma7/config -package label prisma@7.x → prisma7@7.x -completion target prisma complete zsh → prisma7 complete zsh -``` - -Prisma domain terminology remains unchanged: Prisma ORM and Prisma Client, `schema.prisma`, `prisma.config.ts`, `prisma/`, `.prisma`, `@prisma/client`, `PRISMA_*`, generator/provider names, documentation URLs, and low-level nested dependency paths are not distribution references. - -Compatibility invocations do not start the checkpoint update request and do not print update guidance. Suppressing only the rendered message is insufficient because the project contract requires `prisma7` never to consult the Prisma 8 release line. Ordinary `prisma` checkpoint behavior remains unchanged. - -This slice is bounded to direct `packages/cli` ownership. Migrate/db help and runtime guidance plus internals and generator diagnostics receive identity in `downstream-actionable-guidance`; lower packages do not import from `packages/cli`. - -## Coherence rationale - -The slice migrates one ownership boundary—the CLI shell and the project-creation lifecycle—to the existing primitive identity contract, leaving lower command packages as a separate dependency-direction review. - -## Scope - -**In:** CLI-owned command help and examples; initialization, bootstrap, platform/postgres guidance owned by `packages/cli`; generated `prisma7/config` imports; version output; global/local mismatch labels and recommendations; shell-completion installation and reinvocation; update-check suppression before checkpoint request creation; focused dual-identity tests; packed compatibility E2E coverage; an audit classifying remaining actionable `prisma` literals under `packages/cli/src`. - -**Out:** Migrate/db command help and runtime guidance in `packages/migrate`; internals and client-generator diagnostics; Prisma product/domain terminology; telemetry protocols unrelated to update checking; publication, version rewriting, release selection/order/recovery, and the cross-package-manager release matrix. - -## Pre-investigated edge cases - -| Edge case | Disposition | Notes | -| ---------------------------------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| Completion runs in a separately bundled entrypoint | Supported by design | The completion bundle resolves the same executable-derived primitive independently; no mutable cross-bundle transport is introduced. | -| Package managers expose either a `prisma7` shim or `prisma7.js` target | Already supported | The merged wrapper slice normalized both forms; this slice consumes that settled identity contract. | -| Distribution words overlap Prisma domain paths and package names | Audit explicitly | `prisma/config` varies because it is a distribution export; `prisma.config.ts`, `prisma/`, and `@prisma/client` remain stable domain surfaces. | - -## Slice-specific done conditions - -- [ ] A packed `prisma7` invocation proves the CLI-owned help/version/completion/init/update behavior, ordinary Prisma regression tests remain unchanged, and every remaining actionable `prisma` literal under `packages/cli/src` is either migrated or explicitly classified as downstream/domain-stable. - -## Open Questions - -None. - -## References - -- Parent project: `projects/prisma7-compatibility-cli/spec.md` -- Project plan: `projects/prisma7-compatibility-cli/plan.md` -- Prior slice: `projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/spec.md` -- Identity authority: `packages/cli/src/utils/cli-distribution-identity.ts` -- CLI composition: `packages/cli/src/bin.ts`, `packages/cli/src/CLI.ts` -- Update check: `packages/cli/src/utils/checkpoint.ts`, `packages/cli/src/utils/printUpdateMessage.ts` -- Linear issue: N/A — operator-authorized project without Linear diff --git a/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/walkthrough.md b/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/walkthrough.md deleted file mode 100644 index 0d0b44b519ae..000000000000 --- a/projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/walkthrough.md +++ /dev/null @@ -1,100 +0,0 @@ -## Sources - -- Commit range: `origin/v7...HEAD` -- Branch: `prisma7-cli-identity` -- Intent: [slice spec](projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/spec.md), [slice plan](projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/plan.md) -- Parent context: [project spec](projects/prisma7-compatibility-cli/spec.md), [project plan](projects/prisma7-compatibility-cli/plan.md) -- Review closure: [code review](projects/prisma7-compatibility-cli/reviews/code-review.md) - -## Intent - -Complete the CLI-owned `prisma7` identity slice by making identity selection explicit at CLI composition boundaries and proving the shipped behavior from packed artifacts. Product behavior stays within the CLI-owned identity seam, with only the workspace alias resolver adapted to bundle the new package entrypoints; stable Prisma domain names remain unchanged, and lower-package identity work is still follow-up scope. - -## Change map - -- **Implementation**: - - [packages/cli/src/bin.ts](packages/cli/src/bin.ts) and [packages/cli/src/completions/completion-entry.ts](packages/cli/src/completions/completion-entry.ts) — infer identity only at the real executable entrypoints and pass it onward. - - [packages/cli/src/CLI.ts](packages/cli/src/CLI.ts), [packages/cli/src/Init.ts](packages/cli/src/Init.ts), [packages/cli/src/Generate.ts](packages/cli/src/Generate.ts), [packages/cli/src/Version.ts](packages/cli/src/Version.ts), [packages/cli/src/bootstrap/Bootstrap.ts](packages/cli/src/bootstrap/Bootstrap.ts), [packages/cli/src/bootstrap/completion-output.ts](packages/cli/src/bootstrap/completion-output.ts), [packages/cli/src/init/ppg-output.ts](packages/cli/src/init/ppg-output.ts), [packages/cli/src/completions/Completions.ts](packages/cli/src/completions/Completions.ts), [packages/cli/src/SubCommand.ts](packages/cli/src/SubCommand.ts), [packages/cli/src/postgres/link/completion-output.ts](packages/cli/src/postgres/link/completion-output.ts), and [packages/cli/src/utils/global-local-version-mismatch.ts](packages/cli/src/utils/global-local-version-mismatch.ts) — render the selected executable across CLI-owned help, setup, diagnostics, and completion surfaces, and skip update consultation for `prisma7`. - - [packages/cli/src/DebugInfo.ts](packages/cli/src/DebugInfo.ts), [packages/cli/src/Format.ts](packages/cli/src/Format.ts), [packages/cli/src/Status.ts](packages/cli/src/Status.ts), [packages/cli/src/Studio.ts](packages/cli/src/Studio.ts), [packages/cli/src/Validate.ts](packages/cli/src/Validate.ts), [packages/cli/src/mcp/MCP.ts](packages/cli/src/mcp/MCP.ts), [packages/cli/src/platform/$.ts](packages/cli/src/platform/$.ts), [packages/cli/src/postgres/PostgresCommand.ts](packages/cli/src/postgres/PostgresCommand.ts), [packages/cli/src/postgres/link/Link.ts](packages/cli/src/postgres/link/Link.ts), and [scripts/run-studio.ts](scripts/run-studio.ts) — require explicit identity wherever behavior depends on it. - - [tsconfig.build.bundle.json](tsconfig.build.bundle.json) and [helpers/compile/plugins/resolvePathsPlugin.ts](helpers/compile/plugins/resolvePathsPlugin.ts) — resolve exact and wildcard Prisma package aliases to explicit files or package entrypoints during bundling. -- **Tests (evidence)**: - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) - - [packages/client/tests/e2e/prisma7-compatibility/\_steps.ts](packages/client/tests/e2e/prisma7-compatibility/_steps.ts) - - [packages/cli/src/bootstrap/**tests**/Bootstrap.vitest.ts](packages/cli/src/bootstrap/__tests__/Bootstrap.vitest.ts) - - [helpers/compile/plugins/resolvePathsPlugin.test.ts](helpers/compile/plugins/resolvePathsPlugin.test.ts) - - [packages/cli/src/**tests**/commands/CLI.test.ts](packages/cli/src/__tests__/commands/CLI.test.ts) - - [packages/cli/src/**tests**/commands/Generate.test.ts](packages/cli/src/__tests__/commands/Generate.test.ts) - - [packages/cli/src/**tests**/Init.vitest.ts](packages/cli/src/__tests__/Init.vitest.ts) - - [packages/cli/src/completions/completion-command.test.ts](packages/cli/src/completions/completion-command.test.ts) - - [packages/cli/src/postgres/**tests**/PostgresCommand.vitest.ts](packages/cli/src/postgres/__tests__/PostgresCommand.vitest.ts) - -## The story - -1. Keep identity inference at the true executable boundary: `bin.ts` and the separate completion entrypoint decide between `prisma` and `prisma7`, and everything downstream receives that value explicitly. -2. Move every CLI-owned user-facing surface onto the selected executable without renaming stable Prisma domain surfaces such as `prisma/schema.prisma`, `prisma.config.ts`, or `@prisma/client`. -3. Replace slice-local mock evidence with one packed installed-artifact scenario whose command-local inline snapshots stay beside the invocation, while completion branding uses concise assertions instead of snapshotting the generated script. - -## Behavior changes & evidence - -- **Identity selection is now explicit at CLI-owned composition boundaries**: identity-sensitive constructors, factories, and helpers no longer silently fall back to ordinary Prisma; real entrypoints choose the identity once, and ordinary callers/tests pass `'prisma'` explicitly. - - **Why**: this makes the seam mechanically auditable and keeps executable inference confined to the places where `process.argv[1]` is actually meaningful. - - **Implementation**: - - [packages/cli/src/bin.ts](packages/cli/src/bin.ts) - - [packages/cli/src/completions/completion-entry.ts](packages/cli/src/completions/completion-entry.ts) - - [packages/cli/src/platform/$.ts](packages/cli/src/platform/$.ts) - - [packages/cli/src/postgres/PostgresCommand.ts](packages/cli/src/postgres/PostgresCommand.ts) - - [packages/cli/src/postgres/link/Link.ts](packages/cli/src/postgres/link/Link.ts) - - [scripts/run-studio.ts](scripts/run-studio.ts) - - **Tests**: - - [packages/cli/src/**tests**/commands/CLI.test.ts](packages/cli/src/__tests__/commands/CLI.test.ts) - - [packages/cli/src/**tests**/commands/Generate.test.ts](packages/cli/src/__tests__/commands/Generate.test.ts) - - [packages/cli/src/**tests**/Init.vitest.ts](packages/cli/src/__tests__/Init.vitest.ts) - - [packages/cli/src/completions/completion-command.test.ts](packages/cli/src/completions/completion-command.test.ts) - - [packages/cli/src/postgres/**tests**/PostgresCommand.vitest.ts](packages/cli/src/postgres/__tests__/PostgresCommand.vitest.ts) - -- **CLI-owned help, setup, completion, and version surfaces now render the selected executable while stable Prisma names stay put**: the compatibility invocation says `prisma7` for commands and config imports it owns, but it leaves Prisma product terminology and domain-stable file/package names unchanged. - - **Why**: the wrapper needs a coherent shell without pretending that every `prisma` string in the repository is a distribution label. - - **Implementation**: - - [packages/cli/src/CLI.ts](packages/cli/src/CLI.ts) - - [packages/cli/src/Init.ts](packages/cli/src/Init.ts) - - [packages/cli/src/Version.ts](packages/cli/src/Version.ts) - - [packages/cli/src/Generate.ts](packages/cli/src/Generate.ts) - - [packages/cli/src/bootstrap/completion-output.ts](packages/cli/src/bootstrap/completion-output.ts) - - [packages/cli/src/init/ppg-output.ts](packages/cli/src/init/ppg-output.ts) - - [packages/cli/src/completions/Completions.ts](packages/cli/src/completions/Completions.ts) - - [packages/cli/src/SubCommand.ts](packages/cli/src/SubCommand.ts) - - [packages/cli/src/postgres/link/completion-output.ts](packages/cli/src/postgres/link/completion-output.ts) - - **Tests**: - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) - - [packages/cli/src/**tests**/Init.vitest.ts](packages/cli/src/__tests__/Init.vitest.ts) - - [packages/cli/src/completions/completion-command.test.ts](packages/cli/src/completions/completion-command.test.ts) - -- **Local execution and workspace alias resolution follow the selected distribution on every platform**: Bootstrap selects the bare local shim on Unix and the `.cmd` shim on Windows, while the build resolver handles both exact package aliases and wildcard config subpaths. - - **Why**: explicit identity plumbing must survive both Windows package-manager shims and esbuild's tsconfig-path adaptation. - - **Implementation / evidence**: - - [packages/cli/src/bootstrap/Bootstrap.ts](packages/cli/src/bootstrap/Bootstrap.ts) and [packages/cli/src/bootstrap/**tests**/Bootstrap.vitest.ts](packages/cli/src/bootstrap/__tests__/Bootstrap.vitest.ts) - - [tsconfig.build.bundle.json](tsconfig.build.bundle.json), [helpers/compile/plugins/resolvePathsPlugin.ts](helpers/compile/plugins/resolvePathsPlugin.ts), and [helpers/compile/plugins/resolvePathsPlugin.test.ts](helpers/compile/plugins/resolvePathsPlugin.test.ts) - -- **Packed compatibility proof now lives in one deterministic installed-artifact scenario**: the slice removes four mock-heavy identity suites and the slice-added mock assertions, then exercises real packed `prisma7` commands with command-local inline snapshots. Completion branding is asserted directly without snapshotting the generated shell script. - - **Why**: the reviewable proof should come from shipped commands, not constructor-level mock scaffolding, and each command's evidence should remain next to its invocation. - - **Implementation / evidence**: - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) runs `prisma7 --help`, `validate --help`, text/JSON `--version`, `complete zsh`, `init`, `generate`, and `db push`, then TypeScript-checks and runs the generated client smoke. - - [packages/client/tests/e2e/prisma7-compatibility/\_steps.ts](packages/client/tests/e2e/prisma7-compatibility/_steps.ts) keeps that proof inside the existing single packed scenario. - -## Compatibility / migration / risk - -- Ordinary `prisma` behavior is preserved, but call sites and existing tests now pass `'prisma'` explicitly instead of relying on constructor defaults. -- Stable Prisma domain surfaces remain unchanged, including `prisma/schema.prisma`, `prisma.config.ts`, `@prisma/client`, docs URLs, and protocol names. -- Inline-snapshot normalization is intentionally narrow: it replaces cwd/temp/bin paths and projects `--version` output down to stable identity-bearing fields and metadata key/label sets. -- The packed proof is limited to command-visible behavior; it does not claim direct executable-boundary observation of checkpoint suppression or mismatch lookup internals. - -## Follow-ups / open questions - -- Propagate the selected executable through lower-package migrate, internals, and generator-owned guidance in `downstream-actionable-guidance`. -- Handle release mirroring and publication workflow in the later release slice. - -## Non-goals / intentionally out of scope - -- No lower-package identity propagation in this slice. -- No generic branding framework or backwards-compat identity shim. -- No release automation, publish ordering, or package-publication work. diff --git a/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/plan.md b/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/plan.md deleted file mode 100644 index 47005e1122eb..000000000000 --- a/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/plan.md +++ /dev/null @@ -1,49 +0,0 @@ -## Dispatch plan - -### Dispatch 1: make migrate help identity-explicit - -- **Outcome:** Every `migrate` and `db` command factory that renders help requires a CLI executable name, and its usage, examples, help errors, and unknown-command output render that name; all ordinary call sites pass `'prisma'` explicitly. -- **Builds on:** The slice spec's required primitive handoff and the CLI-owned identity selected in `packages/cli/src/bin.ts`. -- **Hands to:** Instance-bound migrate/db command help with no hidden ordinary-identity fallback and focused dual-identity proof for command-group and representative leaf help paths. -- **Focus:** Tests first; migrate/db command construction, static-to-instance help conversion, CLI and standalone migrate composition, ordinary test call-site migration, and help-only actionable literals. Runtime recovery messages and generator diagnostics remain for later dispatches. -- **Validation gate:** `pnpm --filter @prisma/migrate build`; migrate package typecheck/test scripts covering command help; affected CLI typecheck/tests; root dependency lint; Prettier; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 2: propagate identity through migrate runtime guidance - -- **Outcome:** Runtime errors, warnings, successful next steps, and recovery instructions emitted by `migrate`/`db` subcommands render the required executable name while package-manager executor formatting and ordinary Prisma output remain unchanged. -- **Builds on:** Dispatch 1's identity-explicit command instances and ordinary call-site migration. -- **Hands to:** An exhaustively identity-aware `@prisma/migrate` user-guidance surface, including utilities and nested error construction, with representative behavior tests. -- **Focus:** Tests first; dynamic `getCommandWithExecutor` inputs, plain command literals in runtime messages, utility/error parameters, data-loss handling, and a classified migrate literal audit. Keep Prisma domain terminology, comments, docs, paths, and disabled `DbDrop` scope classified rather than blindly replaced. -- **Validation gate:** `pnpm --filter @prisma/migrate build`; affected migrate tests and snapshots; affected CLI tests; root dependency lint; Prettier; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 3: propagate identity through generator diagnostics - -- **Outcome:** Missing-model and missing-`@prisma/client` diagnostics causally emitted by `prisma7 generate` recommend the selected executable, using invocation-scoped primitive transport with no CLI import or ambient global state. -- **Builds on:** The CLI-owned `Generate` identity seam and the spec's boundary between active-invocation diagnostics and later generated-client runtime errors. -- **Hands to:** Identity-aware generator orchestration and built-in client-generator recovery messages, with ordinary Prisma callers explicit and lower package layering preserved. -- **Focus:** Tests first; required `cliCommand` transport through `getGenerators`; missing-model message renderers; invocation-scoped default-registry/client-generator configuration; missing-client recovery command; all call-site migrations. Do not add identity to generator RPC protocol/options unless evidence shows a user-facing consumer requires it; do not alter generated-client runtime diagnostics or low-level resolved paths. -- **Validation gate:** builds and local typecheck/test scripts for `@prisma/internals`, client generator registry, client generator JS, and `prisma`; focused generator diagnostic tests; root dependency lint; Prettier; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 4: prove the complete downstream boundary - -- **Outcome:** The packed compatibility E2E exercises representative installed `prisma7 migrate`, `db`, and `generate` guidance, ordinary Prisma regressions remain green, and an exhaustive classified audit finds no unclassified actionable distribution literal in the slice scope. -- **Builds on:** Dispatch 2's migrate guidance and Dispatch 3's generator diagnostics. -- **Hands to:** A complete unpublished Prisma7 artifact ready for `release-mirroring-and-package-proof`, plus reviewable evidence and an explicit classification of intentional ordinary-Prisma references. -- **Focus:** Real-command evidence over new mock-heavy identity suites; command-local inline snapshots or concise assertions as appropriate; retain the existing packed generate/db-push/client smoke; classify stable domain names, inactive/generated-runtime surfaces, comments, and low-level paths. Fix only audit escapees inside the slice contract. -- **Validation gate:** Prisma, Prisma7, migrate, internals, client-generator-registry, and client-generator-js builds; exact workspace typecheck; affected package tests; packed `prisma7-compatibility` E2E; root lint, dependency lint, and Prettier; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 5: close full-suite constructor migration - -- **Outcome:** Full migrate and cross-platform package suites use the required `DbPull` executable contract instead of constructing instances with an undefined runtime identity. -- **Builds on:** Dispatch 1's required factories and CI evidence that legacy tests bypassed the private TypeScript constructor at runtime. -- **Hands to:** Green Migrate jobs on all Node versions and green macOS/Windows package suites without weakening the required production API. -- **Focus:** Mechanically migrate every direct `new DbPull()` test/helper call to `DbPull.new('prisma')`; audit all other required migrate command classes for direct-constructor bypasses; preserve existing ordinary snapshots and do not add a fallback/default merely to accommodate tests. -- **Validation gate:** exhaustive direct-constructor grep; full `@prisma/migrate` test command with available databases/engines; affected cross-platform package tests where locally reproducible; migrate/CLI builds and exact workspace typecheck; Prettier; `git diff --check`; mandatory transient-ID scan. - -### Dispatch 6: close current review comments - -- **Outcome:** Every current PR review thread is resolved with required rejection evidence, opposite-identity negatives, identity-aware `DbDrop` help, and side-effect-free unsupported-URL validation ordering. -- **Builds on:** Dispatch 5's green constructor contract and the five current CodeRabbit findings against changed test/command surfaces. -- **Hands to:** A review-complete PR with focused tests proving each corrected behavior and no weakened identity contract. -- **Focus:** Require the ordinary missing-client test to reject; strengthen DbCommand/DbExecute negative assertions; replace the duplicate incorrect `.resolves.toThrow()` case with a resolved-Error assertion; render dormant `DbDrop` help from required `cliCommand`; reject unsupported Data Proxy reset URLs before datasource parsing/output. Keep changes minimal and do not broaden dormant `DbDrop` wiring. -- **Validation gate:** focused client-generator and migrate tests; migrate/client-generator builds; exact workspace typecheck; Prettier; `git diff --check`; mandatory transient-ID scan. diff --git a/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/pr-description.md b/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/pr-description.md deleted file mode 100644 index 3daef4e48e52..000000000000 --- a/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/pr-description.md +++ /dev/null @@ -1,18 +0,0 @@ -Prisma 7 now carries the selected executable name all the way through downstream migrate/db/generate guidance, so actionable output reached through `prisma7` tells users to run `prisma7` while ordinary `prisma` behavior and stable Prisma domain names stay unchanged. This finishes the slice’s unpublished downstream guidance boundary without pulling release packaging into scope. - -## Changes - -- **Required primitive downstream transport**: `packages/cli/src/bin.ts` and `packages/cli/src/Generate.ts` remain the identity owners and now pass a required `cliCommand` primitive into `@prisma/migrate`, generator orchestration, and lower guidance helpers instead of letting lower layers infer CLI identity or depend on CLI types. -- **Migrate/db help and runtime guidance**: `packages/migrate/src/commands/*`, `packages/migrate/src/bin.ts`, and `packages/migrate/src/utils/errors.ts` make help, unknown-command output, validation guidance, data-loss prompts, and recovery text render the selected executable name, with explicit ordinary-`prisma` call sites preserved for standalone/default flows. -- **Generator diagnostics with invocation-scoped registry**: `packages/internals/src/get-generators/getGenerators.ts`, `packages/internals/src/utils/missingGeneratorMessage.ts`, `packages/client-generator-registry/src/default.ts`, and `packages/client-generator-js/src/resolvePrismaClient.ts` thread the same primitive through missing-model, no-generator, and missing-`@prisma/client` diagnostics, using an invocation-scoped registry instead of ambient shared identity state. -- **Packed evidence and review closure**: `packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts` extends the installed-artifact proof to cover representative `prisma7 migrate`, `db`, and `generate` guidance with positive `prisma7` and negative `prisma` assertions, and the slice docs/review record the final literal audit and downstream boundary verdict. - -## Why - -This approach keeps branding ownership at the CLI composition layer and transports only the smallest required primitive downstream, which avoids target branches, lower-package CLI imports, and global identity leakage between invocations or tests. It also preserves intentionally stable Prisma names and concepts — including `Prisma`, `Prisma Migrate`, `schema.prisma`, `prisma.config.ts`, `prisma/`, `.prisma`, `@prisma/client`, `PRISMA_*`, docs URLs, and engine/runtime paths — while producing an identity-complete artifact that a later release-focused slice can package and publish. - -## Scope - -In scope: downstream actionable guidance reachable from `prisma7 migrate`, `prisma7 db`, and `prisma7 generate`, plus focused dual-identity tests, packed compatibility evidence, and the final classified audit. - -Out of scope: release/version rewriting and publication, package-manager acceptance work, generated-client runtime diagnostics that execute later without CLI invocation context, low-level dependency path rewriting, and any renaming of stable Prisma domain names. diff --git a/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/spec.md b/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/spec.md deleted file mode 100644 index 56e5dc4db609..000000000000 --- a/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/spec.md +++ /dev/null @@ -1,66 +0,0 @@ -# Slice: downstream-actionable-guidance - -_(Parent project `projects/prisma7-compatibility-cli/`. This slice completes the user-actionable Prisma 7 identity below the CLI-owned composition layer.)_ - -## At a glance - -Propagate the selected CLI executable name through `@prisma/migrate`, generator orchestration, and Prisma Client generator diagnostics so commands reached through `prisma7` tell users to run `prisma7`, while ordinary `prisma` output and stable Prisma domain names remain unchanged. This produces the identity-complete unpublished artifact that release integration can consume. - -## Chosen design - -`packages/cli/src/bin.ts` and `Generate` remain the distribution-identity owners. They pass the already-selected primitive executable name downstream; lower packages do not import `CliDistributionIdentity`, infer from `process.argv`, inspect package layout, or acquire distribution semantics. - -Identity-sensitive lower APIs take a required primitive such as `cliCommand: string`: - -```ts -MigrateDev.new(identity) -getGenerators({ ..., cliCommand: identity }) -getCommandWithExecutor(`${cliCommand} migrate dev`) -``` - -The standalone migrate entrypoint and ordinary tests pass `'prisma'` explicitly. Migrate command help becomes instance-bound where necessary so usage, examples, unknown-command help, and runtime recovery instructions share the same executable name. Utility error constructors and data-loss guidance receive the primitive at the point where their actionable command is rendered. - -Generator orchestration carries the primitive only as far as user-facing diagnostics need it: - -- missing-model guidance emitted by `getGenerators` uses the selected executable; -- the built-in Prisma Client generator's missing-`@prisma/client` recovery message tells the user to rerun the selected executable; -- registry construction/configuration conveys the primitive without introducing a CLI dependency or mutating global identity state. - -The migration is exhaustive for actionable command/package guidance reachable from `prisma7 migrate`, `prisma7 db`, and `prisma7 generate`. It deliberately does not rename Prisma domain concepts: `Prisma`, `Prisma Migrate`, `schema.prisma`, `prisma.config.ts`, `prisma/`, `.prisma`, `@prisma/client`, `PRISMA_*`, docs URLs, protocols, and engine/runtime paths remain stable. Generated-client runtime diagnostics that execute later without CLI invocation context remain ordinary Prisma guidance rather than receiving ambient identity. - -## Coherence rationale - -This is one reviewable mechanical fan-out of a single contract: every lower-layer message reachable from the selected CLI invocation renders the primitive executable name supplied by the CLI, with ordinary Prisma as the explicit control. Splitting migrate and generator diagnostics would leave an identity-incomplete artifact between PRs and duplicate the same propagation/audit reasoning. - -## Scope - -**In:** `packages/cli` construction of migrate/db commands and generator orchestration; `packages/migrate` command help, examples, runtime recovery/errors, and utilities containing actionable executable references; `packages/internals` missing-model generator guidance; the built-in Prisma Client generator/registry path needed to render missing-client recovery guidance; existing ordinary tests updated to pass `'prisma'`; focused dual-identity tests; representative packed `prisma7` command evidence; a final classified literal audit over the named lower packages. - -**Out:** release/version rewriting and publication; package-manager acceptance; Prisma 8 behavior beyond preserving the ordinary Prisma control; generated-client runtime errors without CLI invocation context; low-level resolved/nested dependency paths; stable Prisma terminology and file/package names; a shared branding framework, global/env identity channel, or lower-package import from `packages/cli`. - -## Pre-investigated edge cases - -| Edge case | Disposition | Notes | -| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- | -| Static migrate help cannot read an instance executable name. | Make identity-sensitive help instance-bound or generated from a pure renderer. | Unknown-command and help-error paths must use the same selected value, not a static fallback. | -| The migrate package has its own executable entrypoint. | Pass `'prisma'` explicitly there. | Lower packages do not infer a distribution identity. | -| The default generator registry is currently a module-global instance. | Convey the executable through an invocation-scoped registry/generator configuration. | Do not mutate a shared registry or use ambient state that can leak between invocations/tests. | -| Prisma Client runtime errors can occur after generation with no originating CLI process. | Keep those out of identity propagation. | This slice changes diagnostics causally emitted by the active CLI/generator invocation only. | -| Package-manager command formatting wraps complete command strings. | Substitute the executable before calling the existing formatter. | Preserve npm/pnpm/Yarn/Bun executor detection and argument formatting. | - -## Slice-specific done conditions - -- [ ] A classified production-literal audit finds no unclassified actionable ordinary-`prisma` command/package guidance reachable from `prisma7 migrate`, `prisma7 db`, or `prisma7 generate`, and the packed compatibility scenario proves representative migrate, db, and generator output through the installed `prisma7` executable. - -## Open Questions - -None. - -## References - -- Parent project: `projects/prisma7-compatibility-cli/spec.md` -- Project plan: `projects/prisma7-compatibility-cli/plan.md` -- Prior identity seam: `projects/prisma7-compatibility-cli/slices/cli-owned-distribution-identity/spec.md` -- CLI composition: `packages/cli/src/bin.ts`, `packages/cli/src/Generate.ts` -- Migrate composition and guidance: `packages/migrate/src/commands/`, `packages/migrate/src/utils/errors.ts`, `packages/migrate/src/utils/handleEvaluateDataloss.ts` -- Generator diagnostics: `packages/internals/src/get-generators/getGenerators.ts`, `packages/internals/src/utils/missingGeneratorMessage.ts`, `packages/client-generator-registry/src/default.ts`, `packages/client-generator-js/src/resolvePrismaClient.ts` diff --git a/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/walkthrough.md b/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/walkthrough.md deleted file mode 100644 index cdcfdcffb0a6..000000000000 --- a/projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/walkthrough.md +++ /dev/null @@ -1,102 +0,0 @@ -## Sources - -- Slice spec: [projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/spec.md](projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/spec.md) -- Slice plan: [projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/plan.md](projects/prisma7-compatibility-cli/slices/downstream-actionable-guidance/plan.md) -- Review: [projects/prisma7-compatibility-cli/reviews/code-review.md](projects/prisma7-compatibility-cli/reviews/code-review.md) -- Commit range: `origin/v7...HEAD` -- Commits read: `7bc4e37a97`, `b7fa50bea3`, `451c633d10`, `cc07b4f32a`, `2695ccd8a9`, `4f08193fc8`, `4354a9a36e` - -## Intent - -Make downstream guidance identity-complete for the unpublished `prisma7` distribution without teaching lower packages what `prisma7` is. The CLI remains the only owner of executable identity, and lower packages now accept a primitive command name only where they need to render actionable user instructions. - -## Change map - -- **Implementation**: - - [packages/cli/src/bin.ts](packages/cli/src/bin.ts) — threads the selected executable into migrate, db, and generate construction; lines 100-134. - - [packages/migrate/src/commands/MigrateCommand.ts](packages/migrate/src/commands/MigrateCommand.ts) — instance-bound help/unknown-command rendering for `migrate`; lines 6-103. - - [packages/migrate/src/commands/DbCommand.ts](packages/migrate/src/commands/DbCommand.ts) — instance-bound help/unknown-command rendering for `db`; lines 6-75. - - [packages/migrate/src/utils/errors.ts](packages/migrate/src/utils/errors.ts) — runtime recovery/error strings now format full commands from `cliCommand`; lines 18-74. - - [packages/migrate/src/utils/handleEvaluateDataloss.ts](packages/migrate/src/utils/handleEvaluateDataloss.ts) — unexecutable-step recovery now points at the selected executable; lines 6-31. - - [packages/internals/src/utils/validatePrismaConfigWithDatasource.ts](packages/internals/src/utils/validatePrismaConfigWithDatasource.ts) — config validation now takes the full command string; lines 22-38. - - [packages/internals/src/cli/checkUnsupportedDataProxy.ts](packages/internals/src/cli/checkUnsupportedDataProxy.ts) — unsupported-data-proxy guidance now echoes the caller-provided command; lines 8-31. - - [packages/internals/src/get-generators/getGenerators.ts](packages/internals/src/get-generators/getGenerators.ts) — generator orchestration requires `cliCommand` and uses it for missing-model guidance; lines 56-78 and 128-136. - - [packages/internals/src/utils/missingGeneratorMessage.ts](packages/internals/src/utils/missingGeneratorMessage.ts) — no-generator and missing-model diagnostics now render the selected executable; lines 6-59. - - [packages/client-generator-registry/src/default.ts](packages/client-generator-registry/src/default.ts) — registry creation becomes invocation-scoped while keeping `defaultRegistry` explicitly ordinary; lines 6-18. - - [packages/client-generator-js/src/resolvePrismaClient.ts](packages/client-generator-js/src/resolvePrismaClient.ts) — missing-client recovery reruns the selected executable, while low-level package resolution stays pinned to stable package names; lines 14-25 and 34-49. -- **Tests (evidence)**: - - [packages/migrate/src/**tests**/MigrateCommand.test.ts](packages/migrate/src/__tests__/MigrateCommand.test.ts) — dual-identity help and unknown-command coverage for `migrate`; lines 39-53. - - [packages/migrate/src/**tests**/DbCommand.test.ts](packages/migrate/src/__tests__/DbCommand.test.ts) — dual-identity help and unknown-command coverage for `db`; lines 39-53. - - [packages/migrate/src/**tests**/runtime-guidance.test.ts](packages/migrate/src/__tests__/runtime-guidance.test.ts) — config validation, warning, non-interactive, and recovery guidance prove both names; lines 7-53. - - [packages/internals/src/**tests**/getGenerators/getGenerators.test.ts](packages/internals/src/__tests__/getGenerators/getGenerators.test.ts) — missing-model guidance proves `prisma7` and the ordinary control; lines 657-758. - - [packages/cli/src/**tests**/commands/Generate.test.ts](packages/cli/src/__tests__/commands/Generate.test.ts) — no-generator guidance uses the selected executable; lines 31-44. - - [packages/client-generator-js/tests/resolvePrismaClient.test.ts](packages/client-generator-js/tests/resolvePrismaClient.test.ts) — missing-client recovery rerun command uses `prisma7` and keeps `prisma` explicit for the control; lines 15-40. - - [packages/client-generator-registry/src/default.test.ts](packages/client-generator-registry/src/default.test.ts) — invocation-scoped registry keeps the same provider shape; lines 5-15. - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) — packed installed-command proof for help, migrate/db/generate guidance, and negative ordinary-`prisma` checks; lines 286-558. - -## The story - -1. The branch turns executable identity into an explicit handoff: `packages/cli` decides whether the user invoked `prisma` or `prisma7`, then passes only that primitive downstream. -2. Migrate and db help stop being effectively static text and become instance-rendered surfaces, so help, examples, unknown-command output, and later recovery paths all speak with the same executable name. -3. Runtime guidance in migrate/db is then normalized around full command strings, which preserves existing package-manager/executor formatting while swapping only the executable token that users must rerun. -4. Generator diagnostics get the same treatment, but only for messages causally emitted by the current CLI invocation; the registry is made invocation-scoped so `prisma7` guidance cannot leak through shared mutable state. -5. The slice closes with packed installed-artifact proof that representative `prisma7 migrate`, `prisma7 db`, and `prisma7 generate` flows all surface actionable `prisma7` commands while stable Prisma names and the ordinary `prisma` control remain intact. - -## Behavior changes & evidence - -- **Required executable-name handoff from the CLI to lower layers**: lower packages no longer infer identity from `process.argv`, import CLI distribution code, or reach for ambient global state; they receive the selected executable name from the CLI-owned composition boundary. - - **Why**: the slice spec requires the CLI to remain the identity owner, with lower packages depending only on a primitive string. - - **Implementation**: - - [packages/cli/src/bin.ts](packages/cli/src/bin.ts) — lines 100-134. - - [packages/migrate/src/bin.ts](packages/migrate/src/bin.ts) — lines 46-66 keep the standalone migrate entrypoint explicitly ordinary by passing `'prisma'`. - - **Tests**: - - [packages/migrate/src/**tests**/MigrateCommand.test.ts](packages/migrate/src/__tests__/MigrateCommand.test.ts) — lines 39-53. - - [packages/migrate/src/**tests**/DbCommand.test.ts](packages/migrate/src/__tests__/DbCommand.test.ts) — lines 39-53. - -- **Migrate/db help and recovery now render the selected executable end-to-end**: help, examples, unknown-command output, validation errors, non-interactive guidance, data-loss guidance, and unexecutable-step recovery now point users at `prisma7 ...` when the command was reached through `prisma7`. - - **Why**: actionable follow-up commands are part of the product surface; if they stay ordinary while the executable changes, the distribution feels internally inconsistent and can misdirect users. - - **Implementation**: - - [packages/migrate/src/commands/MigrateCommand.ts](packages/migrate/src/commands/MigrateCommand.ts) — lines 6-103. - - [packages/migrate/src/commands/DbCommand.ts](packages/migrate/src/commands/DbCommand.ts) — lines 6-75. - - [packages/migrate/src/utils/errors.ts](packages/migrate/src/utils/errors.ts) — lines 18-74. - - [packages/migrate/src/utils/handleEvaluateDataloss.ts](packages/migrate/src/utils/handleEvaluateDataloss.ts) — lines 6-31. - - [packages/internals/src/utils/validatePrismaConfigWithDatasource.ts](packages/internals/src/utils/validatePrismaConfigWithDatasource.ts) — lines 22-38. - - [packages/internals/src/cli/checkUnsupportedDataProxy.ts](packages/internals/src/cli/checkUnsupportedDataProxy.ts) — lines 8-31. - - **Tests**: - - [packages/migrate/src/**tests**/runtime-guidance.test.ts](packages/migrate/src/__tests__/runtime-guidance.test.ts) — lines 7-53. - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) — lines 295-315 and 537-558 prove `migrate status` config recovery and `db push` data-loss recovery through the packed `prisma7` binary. - -- **Generator diagnostics are now invocation-scoped and identity-aware**: `generate` carries `cliCommand` into `getGenerators`, missing-generator and missing-model guidance renders the selected executable, and the built-in JS client generator gets a per-invocation registry so missing-`@prisma/client` recovery also points back at the active executable. - - **Why**: generator diagnostics belong to the current CLI invocation, but generated-client runtime failures may occur later with no CLI context; the slice needed the former without spilling into the latter. - - **Implementation**: - - [packages/cli/src/Generate.ts](packages/cli/src/Generate.ts) — lines 149-170 and 319-328 pass the selected command into config validation, registry creation, and generator orchestration. - - [packages/internals/src/get-generators/getGenerators.ts](packages/internals/src/get-generators/getGenerators.ts) — lines 56-78 and 128-136 require and consume `cliCommand`. - - [packages/internals/src/utils/missingGeneratorMessage.ts](packages/internals/src/utils/missingGeneratorMessage.ts) — lines 6-59. - - [packages/client-generator-registry/src/default.ts](packages/client-generator-registry/src/default.ts) — lines 6-18. - - [packages/client-generator-js/src/resolvePrismaClient.ts](packages/client-generator-js/src/resolvePrismaClient.ts) — lines 14-25 and 34-49. - - **Tests**: - - [packages/cli/src/**tests**/commands/Generate.test.ts](packages/cli/src/__tests__/commands/Generate.test.ts) — lines 31-44. - - [packages/internals/src/**tests**/getGenerators/getGenerators.test.ts](packages/internals/src/__tests__/getGenerators/getGenerators.test.ts) — lines 657-758. - - [packages/client-generator-js/tests/resolvePrismaClient.test.ts](packages/client-generator-js/tests/resolvePrismaClient.test.ts) — lines 15-40. - - [packages/client-generator-registry/src/default.test.ts](packages/client-generator-registry/src/default.test.ts) — lines 5-15. - -- **Packed installed-command proof now covers the downstream boundary, not just CLI-owned surfaces**: the compatibility E2E extends the existing installed `prisma7` scenario to assert representative migrate, db, and generate guidance, including opposite-identity negatives. - - **Why**: the slice done condition called for proof against a packed installed artifact, not only unit tests around constructors and helpers. - - **Implementation**: - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) — lines 286-315 create real installed-command scenarios; lines 537-558 assert downstream guidance. - - **Tests**: - - [packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts](packages/client/tests/e2e/prisma7-compatibility/tests/main.test.ts) — lines 286-558. - -## Compatibility / migration / risk - -- The behavioral contract is intentionally narrow: only actionable command/package guidance emitted during the active CLI or generator invocation changes. -- Stable Prisma domain names remain stable: `Prisma`, `schema.prisma`, `prisma.config.ts`, `prisma/`, `.prisma`, `@prisma/client`, docs URLs, environment variables, and low-level package resolution stay ordinary. -- The default ordinary path remains explicit, not implicit: standalone migrate and the exported `defaultRegistry` still pass `'prisma'`, which keeps existing consumers from inheriting `prisma7` accidentally. -- The main risk was identity leakage through shared generator state; the shift from a module-global default registry in CLI generate flows to `createDefaultRegistry(this.identity)` per invocation is the guardrail against that. - -## Non-goals / intentionally out of scope - -- Rebranding Prisma domain terminology, file names, package names, engine paths, or docs links. -- Propagating identity into generated-client runtime diagnostics that can fire later without an originating CLI invocation context. -- Adding a shared branding framework, global/env identity channel, CLI imports in lower packages, or protocol/RPC surface expansion. -- Release/publication work, package-manager acceptance, or broader Prisma 8 behavior beyond preserving the explicit ordinary-`prisma` control. diff --git a/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/plan.md b/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/plan.md deleted file mode 100644 index e5fdaef6b392..000000000000 --- a/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/plan.md +++ /dev/null @@ -1,50 +0,0 @@ -## Dispatch plan - -### Dispatch 1: runnable identity-aware wrapper - -- **Outcome:** The default Prisma CLI resolves its existing identity unchanged, while a buildable `prisma7` binary selects the private one-shot identity and delegates all arguments, completion dispatch, exit behavior, and subprocess re-entry to its declared Prisma CLI dependency. -- **Builds on:** The slice spec's chosen identity-transport and dependency-wrapper design. -- **Hands to:** A runnable unpublished wrapper with a frozen identity contract, no copied CLI implementation, and focused tests proving default Prisma and wrapped Prisma select the intended identities. -- **Focus:** Identity resolution lifecycle, marker consumption, executable delegation, package skeleton/build, argument and completion forwarding, and default-behavior regression coverage. Public root/config parity and packed-manifest proof belong to dispatch 2. - -### Dispatch 2: forwarded package surface and packed resolution proof - -- **Outcome:** `prisma7`, `prisma7/config`, and `prisma7/package.json` expose the intended forwarded runtime/type contracts, and a packed artifact records the exact matching Prisma dependency and resolves it correctly beside a different direct root Prisma version. -- **Builds on:** Dispatch 1's runnable wrapper and frozen identity contract. -- **Hands to:** A complete unpublished slice artifact satisfying the wrapper package contract, ready for exhaustive identity propagation in the next project slice. -- **Focus:** Export map and files manifest, root/config runtime and type forwarding, exact workspace-to-packed dependency semantics, package inspection, and local side-by-side resolution tests. Exhaustive CLI wording and all publication automation remain out of scope. - -### Dispatch 3: infer identity from the executed binary - -- **Outcome:** CLI identity is derived solely from the normalized stem of `process.argv[1]`; the distinctive `prisma7.js` target selects `prisma7` across supported package-manager launch forms, while ordinary Prisma and unsupported caller-defined entrypoints default to `prisma`. -- **Builds on:** Dispatch 2's complete wrapper package and the cross-package-manager `/tmp` probe that falsified the marker/global-symbol design. -- **Hands to:** A simpler reviewer-verified wrapper with no identity environment marker, cleanup, global symbol, package metadata lookup, or cross-bundle mutable state, ready for the next project slice. -- **Focus:** Replace marker/global identity transport, give the wrapper a distinctive executable target, update emitted/forwarding/packed contract tests, and regression-pin normalized shim-vs-target names. Exhaustive user-facing identity propagation remains the next slice. - -### Dispatch 4: inline wrapper delegation - -- **Outcome:** The `prisma7` executable directly loads `prisma/build/index.js`; the production-only delegation helper and callback-injection tests are removed, while built/packed executable coverage proves real dependency-edge loading, argv preservation, and exit propagation. -- **Builds on:** Dispatch 3's distinctive `prisma7.js` target and accepted packed package contract. -- **Hands to:** A minimal wrapper whose production code contains no abstraction beyond the required dependency load, backed by behavior-level executable evidence. -- **Focus:** Inline the literal Prisma entrypoint load, delete the helper and tautological unit seam, and replace its claims with a network-free built/packed wrapper execution fixture. No broader branding or publication work. - -### Dispatch 5: consolidate on one end-to-end project - -- **Outcome:** All unit/contract tests introduced for the wrapper and identity seam are replaced by one network-free end-to-end project test that typechecks and loads `prisma7/config`, proves the CLI uses that config, runs `prisma7 --version`, runs `prisma7 generate`, and executes the generated client successfully. -- **Builds on:** Dispatch 4's minimal direct wrapper and the real package/config/generator implementations already present in the built workspace. -- **Hands to:** A review surface with one user-visible behavioral proof instead of implementation-specific package, dispatcher, identity, and forwarding assertions. -- **Focus:** Delete `package-contract.test.ts`, `cli-distribution-identity.vitest.ts`, and `bin-dispatcher.vitest.ts`; keep only setup and assertions required for config import/typechecking, version execution, generation through the chosen config, and a working generated client. - -### Dispatch 6: move coverage into the client E2E harness - -- **Outcome:** The single compatibility scenario is an actual auto-discovered Docker E2E under `packages/client/tests/e2e`, installed from the packed `prisma7` and workspace dependency tarballs exactly like shipped client fixtures; `packages/prisma7` contains no Vitest test or package-level test job. -- **Builds on:** Dispatch 5's settled three-outcome scenario and the existing client E2E runner's package, engine, TypeScript, and SQLite environment. -- **Hands to:** A side-by-side wrapper proven through the repository's standard shipped-artifact E2E boundary rather than a package-local subprocess simulation. -- **Focus:** Remove `packages/prisma7/src/e2e.test.ts`, its test-only dev dependencies/script, and its standalone workflow entries; add one `prisma7-compatibility` fixture with `_steps.ts`, config consumer, non-default schema/output, and SQLite client smoke; teach the tarball mount/rewrite logic that unscoped `prisma7` packs as `prisma7-0.0.0.tgz` rather than the scoped-folder convention. No unit/contract tests. - -### Dispatch 7: address PR review feedback - -- **Outcome:** The distribution identity is the minimal `'prisma' | 'prisma7'` value downstream consumers actually need, the E2E prepares its schema through `prisma7 db push` rather than raw SQL, and failed wrapper builds do not mask esbuild diagnostics with a chmod `ENOENT`. -- **Builds on:** Dispatch 6's reviewed packed-artifact client E2E and final wrapper build shape. -- **Hands to:** A reviewer-ready PR with all still-applicable human and bot inline feedback addressed or explicitly classified obsolete/rejected. -- **Focus:** Remove the redundant identity object/map, add `db push --force-reset` to E2E setup and simplify the SQLite smoke, guard the executable plugin on build errors, rerun the focused Docker E2E/build gates, and leave rejected `prepack` plus comments on deleted tests untouched in code. diff --git a/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/pr-description.md b/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/pr-description.md deleted file mode 100644 index 90908330e37d..000000000000 --- a/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/pr-description.md +++ /dev/null @@ -1,19 +0,0 @@ -## Overview - -Add an unpublished `prisma7` compatibility package that runs the exact matching Prisma 7 CLI alongside a direct Prisma dependency, without copying CLI implementation or assets. The wrapper's distinctive executable target lets the CLI derive its distribution identity from the invoked script while ordinary `prisma` invocations retain their existing default. - -## Changes - -- **CLI identity and delegation**: Derive the immutable distribution identity from the normalized `process.argv[1]` filename stem: exact `prisma7` selects the compatibility identity and every other value defaults to `prisma`. The `prisma7` wrapper forwards arguments and exit behavior to `prisma/build/index.js` through its declared dependency. -- **Wrapper package surfaces**: Add the buildable `prisma7` workspace package with the distinctive `build/prisma7.js` bin target, an exact same-version packed Prisma dependency, root type forwarding, and `prisma7/config` runtime/type forwarding. The package contains only wrapper outputs and remains private/unpublished. -- **End-to-end coverage**: Add one client Docker E2E installed from the packed `prisma7` and workspace dependency tarballs. It imports and typechecks `prisma7/config`, proves the CLI honors a non-default schema and output, runs `prisma7 --version` and `prisma7 generate`, then executes the generated client through a real SQLite write/read. - -## Why - -Keeping `prisma@7` as the sole implementation avoids divergent CLI behavior and duplicated engines while giving package managers a declared dependency edge to resolve. A real-tarball probe across npm, pnpm, Yarn node-modules/PnP, Bun, package scripts/exec, direct Node execution, and npm-global launches found either a `prisma7` shim path or the `prisma7.js` target in `process.argv[1]`; normalizing that stem provides the same identity without package.json lookup or physical dependency-path parsing. - -Only the exact `prisma7` stem selects the compatibility identity. Custom renamed symlinks and programmatic `require()` callers default to `prisma` because they do not represent the supported binary-invocation contract. Windows execution remains unverified; the client E2E runs in the standard Linux Docker harness. - -## Scope - -This slice intentionally does not yet provide exhaustive `prisma7` branding across help, warnings, initialization, generated output, completion guidance, version/update handling, or update-prompt suppression. It also does not add release mirroring, publish ordering/recovery, release-channel policy, or the full cross-package-manager acceptance matrix; those belong to later slices. The artifact remains unpublished. diff --git a/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/spec.md b/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/spec.md deleted file mode 100644 index cfdfa4ead923..000000000000 --- a/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/spec.md +++ /dev/null @@ -1,68 +0,0 @@ -# Slice: side-by-side-wrapper - -_(Parent project `projects/prisma7-compatibility-cli/`. This slice establishes the runnable compatibility distribution that later identity and release work complete.)_ - -## At a glance - -Add an unpublished `prisma7` workspace package that resolves and runs its exact `prisma` dependency through a `prisma7` binary, while forwarding the matching root and `prisma7/config` package APIs. The existing Prisma CLI gains the smallest immutable distribution-identity seam needed for that wrapper, with ordinary `prisma` remaining the default. - -## Chosen design - -`prisma@7` remains the only full CLI implementation. The wrapper owns no copied CLI bundles, engines, Wasm assets, command implementations, or preinstall logic. - -```text -prisma7/build/prisma7.js - └─ require("prisma/build/index.js") - ├─ complete → nested Prisma 7 completion bundle - └─ other args → nested Prisma 7 CLI bundle -``` - -The wrapper's bin target has the distinctive filename `prisma7.js`. Each separately bundled CLI consumer derives an immutable identity from the normalized stem of `process.argv[1]`: `prisma7` selects the compatibility identity and every other value defaults to the existing `prisma` identity. This handles package managers that expose either the shim path (`.../.bin/prisma7`) or the real target (`.../build/prisma7.js`) without environment markers, global symbols, package metadata lookup, or physical dependency-path parsing. - -The wrapper declares `prisma` with workspace exact-version semantics so its packed manifest names the identical published version without a floating range. Runtime resolution always begins from the wrapper's declared dependency edge (`require`/`require.resolve`), never from a constructed `node_modules` path. - -The wrapper mirrors Prisma's supported package API shape through forwarding modules: - -```text -prisma7 → matching public root/type surface from prisma@7 -prisma7/config → matching config runtime and types from prisma@7/config -prisma7/package.json → wrapper metadata -``` - -This slice makes identity transport and the wrapper executable real, but deliberately leaves the exhaustive replacement of command/help/generated-output references to `identity-complete-prisma7`. The package remains unpublished. - -## Coherence rationale - -Identity transport and the first consuming wrapper form one rollback unit: either alone is preparation or non-functional, while together they produce a directly testable side-by-side executable and package API that one reviewer can evaluate as a single packaging boundary. - -## Scope - -**In:** Immutable CLI distribution identity inferred from the normalized executed-script stem; a distinct `prisma7.js` wrapper target; a new `prisma7` workspace package; its binary build, exact Prisma dependency, files/exports/types/config forwarding, and package-level tests; focused packed-install checks proving the wrapper resolves Prisma 7 while a direct root `prisma` remains a different version; regression coverage for the default Prisma identity. - -**Out:** Exhaustive identity propagation through all command help, warnings, initialization templates, completion text, update handling, and snapshots; update-prompt suppression; publish graph/order/recovery and release workflow integration; release-channel policy; hiding nested dependency paths; automatic reconciliation of v7/v8 project files. - -## Pre-investigated edge cases - -| Edge case | Disposition | Notes | -| -------------------------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| A direct root `prisma@8` conflicts with the wrapper's exact `prisma@7` dependency | Supported | npm, pnpm, Yarn node-modules/PnP, and Bun probes all preserved the root v8 command and resolved v7 from the wrapper edge. | -| Installing only `prisma7` under a hoisting linker exposes a top-level `prisma` command | Accepted | npm, Yarn node-modules, and Bun hoisted the v7 dependency; preventing this is a project non-goal. | -| Package managers expose either a shim path or the real target in `process.argv[1]` | Supported by design | npm, pnpm, Yarn node-modules/PnP, Bun, scripts, exec commands, direct Node execution, and npm global installs normalize to `prisma7`. | -| A custom renamed symlink or another script programmatically requires the bin | Defaults to `prisma` | Caller-defined entrypoints no longer identify the `prisma7` distribution and are outside the supported binary-invocation contract. | -| Completion dispatch loads a different bundle from normal CLI execution | Supported | Both branches derive the same identity independently from unchanged `process.argv[1]`; no cross-bundle mutable state is required. | - -## Slice-specific done conditions - -- [ ] A packed local `prisma7` artifact has an exact same-version Prisma dependency, exposes `prisma7` and `prisma7/config`, and demonstrably resolves Prisma 7 beside a different direct root Prisma version without changing ordinary Prisma's default invocation. - -## Open Questions - -None. - -## References - -- Parent project: `projects/prisma7-compatibility-cli/spec.md` -- Project plan: `projects/prisma7-compatibility-cli/plan.md` -- Linear issue: N/A — operator-authorized project without Linear -- Existing package contract: `packages/cli/package.json` -- Existing dispatcher/build: `packages/cli/src/bin-dispatcher.ts`, `packages/cli/helpers/build.ts` diff --git a/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/walkthrough.md b/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/walkthrough.md deleted file mode 100644 index 9ce30e0017ed..000000000000 --- a/projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/walkthrough.md +++ /dev/null @@ -1,66 +0,0 @@ -## Sources - -- PR: [#29949](https://github.com/prisma/prisma/pull/29949) -- Commit range: `origin/v7...HEAD` -- Final wrapper changes: `43ad8a7891 refactor(cli): infer prisma7 identity from executable`, `0e44c96e11 refactor(prisma7): inline CLI delegation` -- Final test change: `ce505fa9ad test(client): cover prisma7 compatibility in e2e` -- Intent: [slice spec](projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/spec.md) -- Dispatch plan: [slice plan](projects/prisma7-compatibility-cli/slices/side-by-side-wrapper/plan.md) -- Review ledger: [code review](projects/prisma7-compatibility-cli/reviews/code-review.md) - -## Intent - -Establish a runnable, unpublished `prisma7` distribution that delegates to the exact matching Prisma 7 implementation while a direct Prisma dependency continues serving the ordinary `prisma` command. The slice creates the executable and package boundary that later branding-completion and release-mirroring slices can build on. - -## Change map - -- **Implementation**: - - [CLI distribution identity](packages/cli/src/utils/cli-distribution-identity.ts) — derives the immutable identity from the normalized executed-script stem. - - [Wrapper executable](packages/prisma7/src/bin.ts) — directly loads `prisma/build/index.js` through the declared dependency edge. - - [Wrapper build](packages/prisma7/helpers/build.ts) — emits the distinctive `build/prisma7.js` executable and forwarded package bundles. - - [Wrapper package contract](packages/prisma7/package.json) — defines the `prisma7` bin, exact packed dependency semantics, exports, and file set. -- **Test (evidence)**: - - [Client Docker E2E](packages/client/tests/e2e/prisma7-compatibility/_steps.ts) — installs packed artifacts, typechecks a `prisma7/config` consumer, exercises the wrapper's version and generation commands with a non-default schema/output, and executes the generated client against SQLite. - -## The story - -1. **Create one implementation boundary for two distributions.** The new private `prisma7` package owns a small executable wrapper and forwards to `prisma/build/index.js` through its declared dependency. It does not copy CLI implementation, engines, Wasm assets, or command handlers. -2. **Make the invoked executable the identity source.** The wrapper's bin target is `build/prisma7.js`. Each separately bundled CLI consumer normalizes `process.argv[1]` and parses its filename stem; exact `prisma7` selects the compatibility identity, while every other stem defaults to `prisma`. The same rule handles package-manager shim paths and the real built target without package.json lookup or dependency-path parsing. -3. **Keep execution behavior unchanged apart from distribution selection.** The wrapper directly loads the existing dispatcher, which still selects normal or completion execution from the command arguments. Each bundled consumer observes the unchanged invoked script rather than relying on cross-bundle mutable state. -4. **Prove the shipped workflow once, end to end.** The standard client Docker harness installs the packed `prisma7`, Prisma, client-runtime, and adapter tarballs. Its fixture imports and typechecks `prisma7/config`, places its schema and generated output outside the defaults, runs the real wrapper's version and generation commands, then performs a SQLite write/read through the generated client. The separate package-manager probe covered npm, pnpm, Yarn node-modules/PnP, Bun, scripts/exec, direct Node, and npm-global launches; custom renamed symlinks and programmatic `require()` remain unsupported. - -## Behavior changes & evidence - -- **Adds executable-derived distribution identity**: a normalized stem of exactly `prisma7` selects `prisma7`; missing, ordinary, and unsupported executable names select `prisma`. - - **Why**: Supported package-manager launches expose either the `prisma7` shim or `prisma7.js` target, providing a stable identity signal without package metadata or physical dependency-path assumptions. - - **Implementation**: [CLI distribution identity](packages/cli/src/utils/cli-distribution-identity.ts) - - **Evidence**: [Package-manager probe decision](projects/prisma7-compatibility-cli/design-decisions.md), [client Docker E2E](packages/client/tests/e2e/prisma7-compatibility/_steps.ts) - -- **Adds a side-by-side executable wrapper**: `prisma7` delegates to `prisma/build/index.js` while preserving normal and completion arguments and delegated exit status. - - **Why**: Reuse the Prisma 7 implementation and assets instead of maintaining a second CLI bundle or constructing a nested filesystem path. - - **Implementation**: [Wrapper executable](packages/prisma7/src/bin.ts), [wrapper build](packages/prisma7/helpers/build.ts) - - **Test**: [Client Docker E2E](packages/client/tests/e2e/prisma7-compatibility/_steps.ts) - -- **Adds exact dependency and forwarded package surfaces**: the packed wrapper exposes `prisma7` and `prisma7/config`, records an exact same-version Prisma dependency, and resolves its config through that dependency beside a different direct root Prisma. - - **Why**: A declared dependency edge is portable across package-manager layouts and preserves the intended side-by-side command topology. - - **Implementation**: [Wrapper package contract](packages/prisma7/package.json), [config forwarding](packages/prisma7/src/config.ts), [root type forwarding](packages/prisma7/src/index.ts) - - **Test**: [Packed config, typecheck, and generation workflow](packages/client/tests/e2e/prisma7-compatibility/_steps.ts) - -## Compatibility / migration / risk - -- Ordinary `prisma` invocations retain the existing default identity and CLI implementation. -- The wrapper is private and unpublished in this slice. Its packed dependency and side-by-side resolution are tested locally; the broader package-manager acceptance matrix remains release-slice work. -- Custom renamed symlinks and programmatic `require()` callers intentionally default to `prisma` and are outside the supported binary-invocation contract. -- Windows execution remains unverified; the client E2E runs in the standard Linux Docker harness. -- The slice establishes identity transport, not complete `prisma7` branding, so mixed user-facing references are expected until the next slice. - -## Follow-ups / open questions - -- Complete `prisma7` branding across command help, initialization, generated config, diagnostics, version/mismatch output, completion, and update handling, including update-prompt suppression. -- Add release mirroring and publish ordering/recovery, then validate packed installs across the supported package managers. - -## Non-goals / intentionally out of scope - -- No copied CLI implementation, engines, Wasm assets, command handlers, or preinstall logic. -- No exhaustive user-facing branding or update behavior in this slice. -- No publication, release automation, release-channel policy, or automatic reconciliation of Prisma 7 and Prisma 8 project files. diff --git a/projects/prisma7-compatibility-cli/spec.md b/projects/prisma7-compatibility-cli/spec.md deleted file mode 100644 index 592eeca68d4b..000000000000 --- a/projects/prisma7-compatibility-cli/spec.md +++ /dev/null @@ -1,91 +0,0 @@ -# prisma7 compatibility CLI - -## Purpose - -Let projects adopt Prisma 8 without losing direct, reproducible access to the Prisma 7 CLI in the same dependency graph. This gives users a supported side-by-side migration and compatibility path instead of forcing them to switch versions through transient `npx` invocations, global installs, or lockfile edits. - -## At a glance - -A project can install both major CLI lines under distinct package and executable names: - -```json -{ - "devDependencies": { - "prisma": "8.0.0", - "prisma7": "7.5.0", - "@prisma/client": "7.5.0" - } -} -``` - -```text -pnpm prisma ... # Prisma 8 -pnpm prisma7 ... # Prisma 7 -``` - -`prisma7@7.5.0` is a small compatibility package with a `prisma7` binary and an exact dependency on `prisma@7.5.0`. It selects a Prisma 7 CLI identity before executing that dependency, so Prisma 7 remains the single implementation while user-facing package references, executable examples, generated config imports, version checks, and update guidance say `prisma7` or `prisma7/config`. - -The package-manager topology has been probed with real packed mock packages and a local registry. With direct `prisma@8` and `prisma7@7` dependencies, npm, pnpm, Yarn (node-modules and PnP), and Bun all kept the top-level `prisma` command on v8 while the `prisma7` wrapper resolved its exact v7 dependency. Both installation orders converged without stale binary links. - -## Non-goals - -- Adding `prisma7` as a second binary of the `prisma` package or relying on npm dependency-alias syntax. -- Forking or duplicating the Prisma 7 CLI implementation, or publishing a self-contained second copy of its build artifacts. -- Extracting a new public `@prisma/cli-core` package solely to support the compatibility wrapper. -- Hiding the nested `prisma@7` implementation from low-level stack traces or resolved filesystem paths; user-actionable diagnostics and version labels still use `prisma7`. -- Changing Prisma 8's package layout, generator architecture, or absence of `@prisma/client`. -- Defining when Prisma 7 releases occur or which npm channels and dist-tags they use; that policy belongs to a separate project. This project only mirrors each actual `prisma@7` publication to `prisma7`. -- Making Prisma 7 and Prisma 8 share or reconcile config files, generated output, schemas, migration directories, or database state automatically; users remain responsible for choosing compatible inputs and explicit `--config` paths where needed. -- Guaranteeing that installing `prisma7` alone never exposes a hoisted `prisma` binary. npm, Yarn's node-modules linker, and Bun may expose the transitive v7 binary when no direct `prisma` dependency occupies that name; the supported side-by-side topology includes direct `prisma@8`. -- Renaming Prisma domain concepts and established surfaces such as Prisma ORM, `schema.prisma`, `prisma.config.ts`, `.prisma`, `PRISMA_*`, `@prisma/client`, or Prisma documentation URLs. - -## Place in the larger world - -- **`packages/cli` / npm `prisma`** remains the complete Prisma 7 implementation and owns its existing dispatcher, completion entrypoint, config API, preinstall behavior, engine dependencies, Wasm assets, and command implementation. It gains only the distribution-identity seam needed for the normal `prisma` and wrapped `prisma7` entrypoints to render different package and command names. -- **A new `packages/prisma7` workspace package** owns the `prisma7` binary and matching root and `./config` forwarding exports. Its declared `prisma` dependency is exact-versioned when packed, and normal package resolution must be used so npm nesting, pnpm's virtual store, and Yarn PnP all resolve the dependency correctly. -- **`scripts/ci/publish.ts`** owns lockstep version rewriting and publish ordering. It currently discovers workspace packages automatically but only models `@prisma/*` dependencies in its graph and special-cases commit metadata for `prisma`; publishing `prisma7` therefore requires an explicit unscoped dependency/order contract and appropriate metadata handling. -- **Prisma 7 release automation** owns the mirroring contract: every published `prisma@7.x` version is followed by the exact matching `prisma7@7.x` version. The policy that decides when and through which channel Prisma 7 is published is external to this project. -- **Package managers** determine physical placement and binary linking. The supported logical invariant is stronger than any one layout: root `prisma` resolves the project's direct Prisma 8 dependency, while `prisma7` resolves its own declared Prisma 7 dependency. -- **Checkpoint/update infrastructure** does not currently model a distinct `prisma7` release line, so update prompts are suppressed for `prisma7` invocations rather than comparing them against or recommending Prisma 8. - -## Cross-cutting requirements - -- **Behavioral parity:** except for distribution identity, invoking `prisma7@7.x` has the same command set, arguments, defaults, exit behavior, engine/Wasm assets, and Prisma 7 semantics as invoking the exact matching `prisma@7.x`. -- **Identity consistency:** all actionable user-facing references emitted by the compatibility invocation use `prisma7`: command examples, install/update instructions, generated `prisma7/config` imports, version output labels, global/local mismatch checks, subcommand guidance, and completion-facing invocation text. Branding must be driven by one identity contract rather than independent string substitutions. -- **Domain-name stability:** the identity mechanism changes distribution names only; Prisma product terminology and file/environment conventions remain unchanged. -- **Exact version coupling:** `prisma7@X` always executes `prisma@X`. Floating ranges that could make an installed wrapper execute a different patch are not acceptable. -- **Resolution portability:** the wrapper resolves its declared dependency through Node/package-manager APIs and never assumes a physical `node_modules/prisma7/node_modules/prisma` path. -- **Side-by-side binary safety:** with direct Prisma 8 and `prisma7` dependencies, installation and reinstallation must leave the root `prisma` command on Prisma 8 and `prisma7` on Prisma 7 across supported npm, pnpm, Yarn, and Bun layouts. -- **Normal Prisma stability:** introducing identity selection must not change output, behavior, telemetry, completion, or package exports for ordinary `prisma@7` users. -- **Release mirroring:** every actual `prisma@7` publication produces a same-version `prisma7` publication afterward, regardless of the externally selected release channel. Publications outside the Prisma 7 line must not produce a `prisma7` artifact. - -## Transitional-shape constraints - -- The identity abstraction lands with the default `prisma` identity and regression coverage before any published wrapper depends on it; no intermediate release may change existing Prisma 7 output accidentally. -- `prisma7` is not published until its binary, forwarding exports, exact dependency, update behavior, and cross-package-manager installation topology work together end to end. -- Publish automation must establish `prisma@7.x` before `prisma7@7.x`; a failed wrapper publication must be retryable without republishing the immutable `prisma@7.x` version. -- Release integration must select `prisma7` from the fact that a Prisma 7 artifact is being published, not merely from workspace discovery, so non-v7 publication cannot create a same-version compatibility artifact. - -## Project Definition of Done - -The team-DoD floor document is absent in this checkout; the standard repository floor applies. Project-specific conditions: - -- [ ] A fixture project can install direct `prisma@8`, `prisma7@7`, and `@prisma/client@7`, then invoke both `prisma` and `prisma7` and observe the intended major version from each. -- [ ] Clean simultaneous installs and both sequential installation orders pass for npm, pnpm, Yarn node-modules, Yarn PnP, and Bun without the Prisma 7 dependency replacing the root Prisma 8 command. -- [ ] `prisma7` command help, initialization output, generated config imports, version output, mismatch warnings, completion guidance, and update guidance consistently use `prisma7`, while corresponding `prisma` snapshots and behavior remain unchanged. -- [ ] `prisma7/config` and the package's supported root type/runtime exports resolve to the exact Prisma 7 implementation under npm, pnpm, Yarn PnP, and Bun. -- [ ] Published-package inspection proves `prisma7@X` contains an exact dependency on `prisma@X`, and release automation proves `prisma` publishes first and can survive/recover from a later `prisma7` publication failure. -- [ ] For every exercised `prisma@7` publication path, release automation publishes the exact matching `prisma7` version afterward; an exercised non-v7 publication path produces no `prisma7` artifact. -- [ ] Update/version-check prompts are suppressed for `prisma7`, with coverage proving the compatibility invocation never consults or recommends the Prisma 8 `prisma` release line. - -## Open Questions - -None. - -## References - -- Prisma CLI package manifest: [`packages/cli/package.json`](../../packages/cli/package.json) -- Prisma CLI build and dispatcher: [`packages/cli/helpers/build.ts`](../../packages/cli/helpers/build.ts), [`packages/cli/src/bin-dispatcher.ts`](../../packages/cli/src/bin-dispatcher.ts) -- Publishing pipeline: [`scripts/ci/publish.ts`](../../scripts/ci/publish.ts) -- Identity-sensitive current surfaces: [`packages/cli/src/Version.ts`](../../packages/cli/src/Version.ts), [`packages/cli/src/Init.ts`](../../packages/cli/src/Init.ts), [`packages/cli/src/utils/global-local-version-mismatch.ts`](../../packages/cli/src/utils/global-local-version-mismatch.ts), [`packages/cli/src/utils/printUpdateMessage.ts`](../../packages/cli/src/utils/printUpdateMessage.ts) -- Package-manager probe: real packed mock packages tested with npm 11.16.0, pnpm 11.13.1/11.18.0, Yarn 4.14.1 (node-modules and PnP), and Bun 1.3.13 during design discussion From 8205a4ffd207a24b77e881c02317983003251e92 Mon Sep 17 00:00:00 2001 From: Steven McClankerton Date: Thu, 13 Aug 2026 08:27:29 +0000 Subject: [PATCH 2/2] docs(prisma7): add package README --- packages/prisma7/README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packages/prisma7/README.md diff --git a/packages/prisma7/README.md b/packages/prisma7/README.md new file mode 100644 index 000000000000..cff21120eaeb --- /dev/null +++ b/packages/prisma7/README.md @@ -0,0 +1,38 @@ +# `@prisma/prisma7` + +Compatibility package for running the Prisma 7 CLI alongside a newer `prisma` package in the same project. + +The package installs the `prisma7` executable and delegates to the exact matching Prisma 7 CLI version. For example: + +```bash +pnpm add -D prisma@8 @prisma/prisma7@7 +pnpm add @prisma/client@7 + +pnpm prisma --version +pnpm prisma7 --version +``` + +Use `prisma7` anywhere you would normally invoke the Prisma 7 CLI: + +```bash +pnpm prisma7 generate +pnpm prisma7 migrate dev +pnpm prisma7 studio +``` + +## Prisma Config + +Import Prisma Config helpers from the scoped compatibility package: + +```ts +import { defineConfig, env } from '@prisma/prisma7/config' + +export default defineConfig({ + schema: 'prisma/schema.prisma', + datasource: { + url: env('DATABASE_URL'), + }, +}) +``` + +The package is a compatibility wrapper, not a separate Prisma implementation. Its version is kept in lockstep with its exact `prisma` dependency.