Spotted while implementing #13205, in the same file but a different defect class, so it was deliberately not fixed in that PR.
packages/metadata/src/migrations/migrate-project-id-to-environment-id.ts throws its "driver is not raw-capable" guard with the same sentence twice:
'migrateProjectIdToEnvironmentId: driver must expose a .raw(sql, bindings?) method. ' +
'migrateProjectIdToEnvironmentId: driver must expose a .raw(sql, bindings?) method. ' +
'SqlDriver (better-sqlite3/knex) supports this; cloud-side TursoDriver also conforms.'
So an operator who calls it with a driver that has no raw() reads the same instruction twice in one message. The sibling migrate-env-id-to-project-id.ts carries the correct single-sentence form of the identical guard, which is where the duplication is visible as a copy-paste artifact rather than intent.
Cosmetic only: the guard fires correctly, the remedy it names is right, and nothing parses the message. Scope is one line.
Verified at main e22158fff; the #13205 PR leaves those three lines byte-identical.
Generated by Claude Code
Generated by Claude Code
Spotted while implementing #13205, in the same file but a different defect class, so it was deliberately not fixed in that PR.
packages/metadata/src/migrations/migrate-project-id-to-environment-id.tsthrows its "driver is not raw-capable" guard with the same sentence twice:So an operator who calls it with a driver that has no
raw()reads the same instruction twice in one message. The siblingmigrate-env-id-to-project-id.tscarries the correct single-sentence form of the identical guard, which is where the duplication is visible as a copy-paste artifact rather than intent.Cosmetic only: the guard fires correctly, the remedy it names is right, and nothing parses the message. Scope is one line.
Verified at
maine22158fff; the #13205 PR leaves those three lines byte-identical.Generated by Claude Code
Generated by Claude Code