Repository navigation
Description
Background
@cipherstash/recipher is the TypeScript SDK on the Stack Encrypt engine. Its Rust half is a Node addon and a value bridge, recipher-value-napi. Both are in languages/typescript/packages/recipher-js, with a TypeScript layer over them. The SDK is being built as a stack of pull requests, which the plan in #1747 describes.
Every pull request in that stack runs these checks, through tests-recipher-js.yml and the repository's JavaScript tests:
cargo fmt --check;- clippy with warnings denied;
- the Rust tests;
- the Node test suites, including the value conformance cases.
These checks are what let the stack move with confidence.
The slower quality gates are fuzzing, mutation testing (cargo-mutants), the CRAP gate (a check that complex code is well tested), and the unused-dependency check. We learned on the Rust SDK and the Go SDK that adding these early slowed the work down. While the API is still changing, each change means rewriting fuzz targets and writing tests to kill mutants in code that is about to change again.
Problem
Both the plan (its "Rust quality gates" bullet under Tests) and #1797 say the two crates get these gates. Neither says when.
- If the gates land with the early pull requests, they slow every one of them.
- If nobody schedules them, the SDK reaches users without them.
That matters because the value bridge is where every plaintext crosses between JavaScript and Rust, and it parses dates, timestamps, decimals and UUIDs from caller-supplied text.
Proposal
-
Now: every pull request in the stack runs the checks above, and nothing slower. A pull request that the checks skip, for example because its base branch has no merge ref, gets them running again before it merges.
-
Later: once the core API stops changing between pull requests, add the slower gates. They must be in place before the SDK is available to users. The list is
recipher-value-napilost its mutation, CRAP and dependency checks in the move from vitaminc, and Biome skips it — restore them and add fuzzing #1797's:- mutation testing on the two crates, with
--in-diff; - the CRAP gate, with an allow list for functions that need a live JavaScript engine;
- fuzz targets for the text parsers and the JSON conversion;
- the unused-dependency check.
Also decide whether the TypeScript layer gets mutation testing.
- mutation testing on the two crates, with
-
Any time: cheap checks can go in when convenient, because they don't slow the work. One example is bringing the copied JavaScript under Biome.
-
Update the plan's Tests section to say that the slower gates come later, and point to this issue.
Done when
- The gates in step 2 run on every pull request that touches
recipher-js. - The plan says when they were added.
Relationship to other work
recipher-value-napilost its mutation, CRAP and dependency checks in the move from vitaminc, and Biome skips it — restore them and add fuzzing #1797 lists the checks the value bridge lost when it moved from vitaminc. This issue decides when they are added.- docs(plans): the TypeScript SDK on Stack Encrypt, a core with EQL as an extension #1747 is the plan. chore(recipher-js): the JavaScript value bridge lives beside the addon #1794 moved the value bridge in.
Activity