Skip to content

Commit 5cd0c62

Browse files
tobyhedeclaude
authored andcommitted
test(protect-ffi): migrate Protect.js 10.2.1 EQL v2 data to v4 end to end
The v3 -> v4 suite covers data Stack 1.x wrote. Customers still on Protect.js hold EQL v2 data written by an older client (protect-ffi 0.18.1, cipherstash-client 0.28), and nothing showed that data can reach v4 and keep answering the same queries. The new suite writes v2 rows with the real @cipherstash/protect@10.2.1 into eql_v2_encrypted columns and queries them with its own search terms. It then runs the same migration as the v3 suite: add a v4 column per v2 column, decrypt with the engine Stack 1.x encrypts through (in-tree protect-ffi, which still reads v2), re-encrypt through the v4 codec, and check equality, ORE range and ordering, and match queries return the same rows from both columns. Every v4 value must decrypt to the original plaintext, and the v4 columns must still answer after the cut-over rename. Protect's dataType('number') encrypted a float64, so that column migrates to DoubleOrdOre rather than an integer type. v2 hazards are pinned too: a v2 payload cast into a v4 column fails the domain CHECK, and relabelling `v` gives a value Stack Encrypt refuses. @cipherstash/protect@10.2.1 is added exact-pinned as a dev dependency of the private integration-tests package. It is loaded through import() because its `types` export condition names ESM declarations.
1 parent b097560 commit 5cd0c62

4 files changed

Lines changed: 578 additions & 0 deletions

File tree

‎languages/typescript/packages/protect-ffi/integration-tests/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
},
1717
"devDependencies": {
1818
"@cipherstash/eql": "workspace:^",
19+
"@cipherstash/protect": "10.2.1",
1920
"@types/pg": "^8.23.1",
2021
"@vitest/coverage-v8": "catalog:repo",
2122
"dotenv": "17.4.2",

0 commit comments

Comments
 (0)