Skip to content

stack-encrypt: seven PlanError variants and DefaultIndex docs survive the removed builder — remove them and amend ADR-0009 #1671

Open

Description

@coderdan

Background

Stack Encrypt (packages/stack-encrypt) is the Rust encryption engine that every CipherStash language SDK runs on. PlanError is the error a declaration is refused with. Each variant has a stable error code, and the Go SDK maps them through dynamic::Reason.

Problem

The plan builder and the chain were removed in #1666. These variants are now only mapped in dynamic::record and listed in the error-code tables. Nothing raises them: IdentityWithoutField, IndexNotDeclared, IndexOptions, MixedCiphers, NoContext, PassthroughIndexed and TargetWithVerbs. A reader of the error docs sees refusals that cannot happen.

ADR-0009 still describes DefaultIndex and .via, which are gone, and the MatchConfig documentation still says a field and its query agree "by construction". The plan's item The engine's rules, and the order of the work is finished only when PlanError::IndexOptions is gone and ADR-0009 is amended.

Proposal

  1. Remove each variant that nothing raises, with its error code, its dynamic::Reason mapping and its Go status-table entry, in one breaking commit with a CHANGELOG entry.
  2. Amend ADR-0009 to say what replaced DefaultIndex and .via: a field's target type answers through Answers, and the data plan through Op::answered_by.
  3. Correct the MatchConfig documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SDKrustPull requests that update Rust code

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions