Skip to content

Hold the TypeScript bridge's value corpus to the imported one, and put the bridge under Biome #1840

Done

Description

@coderdan

Background

vitaminc's value corpus, value-conformance.json, lists JavaScript and Rust values with the frame and sealed leaf each must produce. It moved into this repository at conformance/vitaminc-aead/value-conformance.json (#1838). The TypeScript SDK's value bridge, recipher-value-napi, keeps its own copy at languages/typescript/packages/recipher-js/value-napi/tests/testdata/value-conformance.json, which it took from vitaminc earlier.

Problem

There are now two copies of the same corpus in this repository, and nothing checks that they agree. A case added or corrected in one stays wrong in the other, and the bridge's tests pass against a stale copy.

The bridge's tests should not simply read the other copy. They run inside the bridge's own Cargo workspace, including in package-scoped mutation runs, where a path outside the package does not exist (found in the review of #1830).

Proposal

  1. Keep the bridge's copy, and add a script test (in scripts/__tests__, which runs on every pull request) that fails when the two copies' parsed contents differ. scripts/__tests__/recipher-js-frame-parity.test.mjs does the same for the bridge's frame corpus.
  2. Say in the bridge's tests/testdata README which file it copies and that the script test holds it to it.
  3. Remove languages/typescript/packages/recipher-js/value-napi from biome.json's ignore list, so the bridge is held to the same formatting and lint rules as the rest of the repository. Format its JavaScript and JSON, including its copy of the corpus, and fix what the linter reports. The parity check compares parsed content, so formatting the copy does not break it.

Depends on #1838.

Activity

  1. self-assigned this
    on Nov 26, 2026
  2. added
    enhancement
    Rust
    on Nov 26, 2026
  3. changed the title [-]Hold the TypeScript bridge's copy of the value corpus to the imported one[/-] [+]Hold the TypeScript bridge's value corpus to the imported one, and put the bridge under Biome[/+] on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

RustSDKenhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions