Skip to content

test(stack-encrypt): add declaration grammar and shared conformance - #1460

Draft
coderdan wants to merge 2 commits into
feat/rust-scalar-ciphertextfrom
feat/stack-encrypt-conformance
Draft

coderdan wants to merge 2 commits into
feat/rust-scalar-ciphertextfrom
feat/stack-encrypt-conformance

Conversation

@coderdan

@coderdan coderdan commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Stack Encrypt bindings need a shared contract for declarations and interoperability. This adds two experimental profiles that run the same cases in native Rust and Go WASI:

  • record-scalars-v1: 11 cases for typed integer/text values, equality terms, context binding and query-input diagnostics. Frozen Rust scalar ciphertexts open in Go; fresh Go ciphertexts open through both Rust APIs.
  • record-declarations-v1: a documented typed grammar and 201 cases for syntax, defaults, context composition, null policies and the complete 21-kind/five-index admission matrix. The corpus preserves accepted aliases such as {"eq": null} while rejecting a null field type. Native Rust also observes normalization.

Go calls the existing engine checker without credentials or a cipher. Declaration diagnostics agree across the runners; malformed transport frames explicitly distinguish the native parser's error from the earlier WASI boundary error. The declaration profile fixes NoTargets; EQL resolver behavior, SQL operations and Python/TypeScript runners remain follow-up profiles.

mise run test:conformance runs both profiles and fresh artifact exchange. CI requires the guest, triggers on corpus changes, and guards that both profiles remain invoked. The plan and coverage map document consolidation candidates; existing language-specific and implementation tests remain intact.

Stacked on #1404; merge that first and retarget this PR to next.

Validation: all 212 shared cases and fresh artifact exchange pass locally; Rust clippy/formatting, Go lint, Biome and 34 CI wiring checks pass. No live ZeroKMS or database tests were required. Test/docs/CI changes only; no release changeset required.

@changeset-bot

changeset-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 53d1948

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing (cargo-mutants, --in-diff, stack-auth + stack-encrypt)

No mutants were generated for the changed lines.

@coderdan coderdan changed the title test(stack-encrypt): add shared Rust/Go conformance corpus test(stack-encrypt): add declaration grammar and shared conformance Oct 31, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant