Skip to content

recipher-js review cleanups: remove the Label boundary check, derive OpaqueDebug on RecordPlan, and rewrite the doc comments in plain language #1803

In progress

Description

@coderdan

Background

@cipherstash/recipher is the TypeScript SDK on the Stack Encrypt engine (the Rust crate stack-encrypt, which encrypts and decrypts values). Its Rust half is at languages/typescript/packages/recipher-js: the Node addon recipher-js (crate/) and the value bridge recipher-value-napi (value-napi/), which reads JavaScript values into the engine's value model and builds them back.

Problem

Three small things from the review of #1774 and its stack:

  1. A test forbids the crate from naming Label or IntoLabel (crate/tests/boundaries.rs). It was added when the engine planned to replace both. The context design is now settled (ADR-0016, docs(stack-encrypt): ADR-0016, a context is a field path and named parts #1772), so the check guards against nothing.
  2. RecordPlan has a hand-written impl Debug (crate/src/record.rs). The repository's rule is to derive vitaminc's OpaqueDebug for a type whose contents should not print, and the other types in the crate do.
  3. The doc comments are hard to read. They are dense and use long sentences. They should follow the plain-language rules the rest of the SDK's documents follow.

Proposal

  1. Remove the Label check and its mention in AGENTS.md. Keep the two other checks in that file: the crate does not link eql-bindings, and a release build cannot reach the test keys.
  2. Derive OpaqueDebug on RecordPlan, or a derived Debug if nothing in it needs hiding.
  3. Rewrite the package's doc comments (Rust and TypeScript) and README in plain language. Change no behaviour.

Relationship to other work

Activity

  1. self-assigned this
    on Nov 24, 2026
  2. added 3 commits that reference this issue on Nov 24, 2026
    17a20ff
    68dd83e
    ce0079f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions