Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4495b1b
feat(stack-encrypt): re-export what a hand-written Encrypt or Decrypt…
coderdan Nov 28, 2026
020a096
refactor(stack-encrypt-derive)!: make Encrypt and Decrypt Stack Encry…
coderdan Nov 28, 2026
20e26a6
build: drop the vitaminc-aead-derive patch from the other Cargo works…
coderdan Nov 28, 2026
26fb5ca
test(stack-encrypt-downstream): build a crate that depends on stack-e…
coderdan Nov 28, 2026
5a64505
docs: record that Encrypt and Decrypt are Stack Encrypt's derives
coderdan Nov 28, 2026
a53eae2
Merge origin/fix/encrypt-derived-newtype into feat/stack-encrypt-own-…
coderdan Nov 28, 2026
01acb74
ci(supply-chain): vet and deny-check stack-encrypt-derive's graph
coderdan Nov 28, 2026
59b2128
fix(stack-encrypt-derive): name MAX_DEPTH through the crate path
coderdan Nov 28, 2026
0f566a1
test(stack-encrypt-downstream): read every dependency table
coderdan Nov 28, 2026
a685a32
test(stack-encrypt-downstream): say why the ui errors match every fea…
coderdan Nov 28, 2026
6e5cda5
docs(supply-chain): say which licence the two exceptions are for
coderdan Nov 28, 2026
d2274a9
docs: count stack-encrypt-downstream among the root workspace crates
coderdan Nov 28, 2026
afdfcff
docs: say there are two AEAD crates, not three
coderdan Nov 28, 2026
4c4a3d3
ci(udeps): start when stack-encrypt-downstream changes
coderdan Nov 28, 2026
1c29cbd
build(stack-encrypt-downstream): turn on the stack-* security lints
coderdan Nov 28, 2026
be75de1
docs(stack-encrypt): say where a vitaminc_aead crate path works
coderdan Nov 28, 2026
40ef42f
Merge fix/encrypt-derived-newtype into feat/stack-encrypt-own-derives
coderdan Nov 29, 2026
220b79a
chore: remove two empty files the merge added by mistake
coderdan Nov 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .cargo/mutants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,27 @@ additional_cargo_args = ["--all-features"]
test_tool = "nextest"
additional_cargo_test_args = ["-E", "not binary(ui) & not test(stress_tests)"]

# Skip the derive crate: its logic runs inside `#[proc_macro_derive]` entry
# points at compile time, not in the instrumented test binary, so every
# mutant there survives spuriously. Its behaviour is pinned by stack-encrypt's
# `tests/derive.rs` and the trybuild UI suite instead.
# Skip the record derives of stack-encrypt-derive (`EncryptTarget`,
# `DecryptSource`, `predicate!`): their logic runs inside the
# `#[proc_macro_derive]` entry points at compile time, not in the
# instrumented test binary, so every mutant there survives spuriously. Their
# behaviour is pinned by stack-encrypt's `tests/derive.rs` and the trybuild UI
# suite instead.
#
# vitaminc-aead-derive is mutated: only its `#[proc_macro_derive]` shims in
# lib.rs run at compile time, and the expansion they delegate to is in
# modules its unit tests call directly.
# Its `Encrypt` and `Decrypt` derives, in `src/value/`, are mutated: only
# their `#[proc_macro_derive]` shims in lib.rs run at compile time, and the
# expansion they delegate to is in modules its unit tests call directly.
#
# recipher-frame's Kani harnesses build only under `cfg(kani)`, so no
# test binary contains them. kani.yml checks them.
exclude_globs = [
"packages/stack-encrypt-derive/**",
"packages/vitaminc-aead-derive/src/lib.rs",
"packages/stack-encrypt-derive/src/lib.rs",
"packages/stack-encrypt-derive/src/attrs.rs",
"packages/stack-encrypt-derive/src/json_paths.rs",
"packages/stack-encrypt-derive/src/owned_decrypt.rs",
"packages/stack-encrypt-derive/src/owned_encrypt.rs",
"packages/stack-encrypt-derive/src/predicate.rs",
"packages/stack-encrypt-derive/src/shape.rs",
"packages/recipher-frame/src/storage/proofs.rs",
]

Expand Down
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@
# conformance corpus their tests read. Not published from here yet.
/packages/vitaminc-aead/ @cipherstash/developers
/packages/recipher-frame/ @cipherstash/developers
/packages/vitaminc-aead-derive/ @cipherstash/developers
/conformance/vitaminc-aead/ @cipherstash/developers
1 change: 0 additions & 1 deletion .github/workflows/bench-eql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ on:
- "packages/stack-encrypt-jsonpath/**"
- "packages/vitaminc-aead/**"
- "packages/recipher-frame/**"
- "packages/vitaminc-aead-derive/**"
- "packages/stack-kms/**"
- "packages/stack-auth/**"
- "packages/stack-profile/**"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
- packages/stack-encrypt/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- packages/stack-encrypt-derive/**
- Cargo.toml
- Cargo.lock
- mise.toml
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/mutants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ name: Mutants
#
# Gates pull requests on mutation testing of the lines they change in
# stack-auth, stack-encrypt, stack-encrypt-jsonpath (the path grammar, moved
# out of stack-encrypt), and vitaminc-aead, recipher-frame and
# vitaminc-aead-derive (imported from cipherstash/vitaminc, which gated them
# the same way). Ported from cipherstash-suite's `mutants.yml`.
# out of stack-encrypt), stack-encrypt-derive (its `Encrypt` and `Decrypt`
# derives; .cargo/mutants.toml leaves out the record derives), and
# vitaminc-aead and recipher-frame (imported from cipherstash/vitaminc, which
# gated them the same way). Ported from cipherstash-suite's `mutants.yml`.
#
# cargo-mutants rewrites small pieces of logic (flip `<` to `<=`, replace a
# body with `Default::default()`) and reruns the tests; a mutant that survives
Expand Down Expand Up @@ -37,9 +38,9 @@ on:
- packages/stack-auth/**
- packages/stack-encrypt/**
- packages/stack-encrypt-jsonpath/**
- packages/stack-encrypt-derive/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- Cargo.toml
- Cargo.lock
- mise.toml
Expand Down Expand Up @@ -107,7 +108,7 @@ jobs:
strategy:
fail-fast: false
matrix:
crate: ${{ fromJSON(github.event_name == 'pull_request' && '["all"]' || '["stack-auth","stack-encrypt","stack-encrypt-jsonpath","vitaminc-aead","recipher-frame","vitaminc-aead-derive"]') }}
crate: ${{ fromJSON(github.event_name == 'pull_request' && '["all"]' || '["stack-auth","stack-encrypt","stack-encrypt-jsonpath","stack-encrypt-derive","vitaminc-aead","recipher-frame"]') }}
permissions:
contents: read
# Posts and updates the report comment on the PR.
Expand Down Expand Up @@ -177,7 +178,7 @@ jobs:
CRATE: ${{ matrix.crate }}
run: |
set +e
crates=(-p stack-auth -p stack-encrypt -p stack-encrypt-jsonpath -p vitaminc-aead -p recipher-frame -p vitaminc-aead-derive)
crates=(-p stack-auth -p stack-encrypt -p stack-encrypt-jsonpath -p stack-encrypt-derive -p vitaminc-aead -p recipher-frame)
if [ "$CRATE" = "all" ]; then
cargo mutants --no-shuffle -vV "${crates[@]}" --in-diff pr.diff
else
Expand All @@ -198,7 +199,7 @@ jobs:
timeout=$(count timeout.txt)
{
echo '<!-- cargo-mutants-report -->'
echo "## Mutation testing (cargo-mutants, \`--in-diff\`, stack-auth, stack-encrypt, stack-encrypt-jsonpath, vitaminc-aead, recipher-frame, vitaminc-aead-derive)"
echo "## Mutation testing (cargo-mutants, \`--in-diff\`, stack-auth, stack-encrypt, stack-encrypt-jsonpath, stack-encrypt-derive, vitaminc-aead, recipher-frame)"
echo
if [ ! -d "$out" ]; then
# No output dir: either nothing to mutate (exit 0) or the run
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/supply-chain-vitaminc-aead.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Supply chain (vitaminc-aead)

# cargo deny and cargo vet over vitaminc-aead, recipher-frame and
# vitaminc-aead-derive and their dependency graph ONLY. Their config is
# supply-chain/vitaminc-aead/ (see its README.md). The rest of the root
# cargo deny and cargo vet over three crates and their dependency graph
# ONLY: vitaminc-aead, recipher-frame, and stack-encrypt-derive. The derive
# is here because it writes every derived `Encrypt` and `Decrypt` impl. Their
# config is supply-chain/vitaminc-aead/ (see its README.md). The rest of the root
# workspace is not checked by either tool; that is #1842.
#
# Neither tool compiles anything: both read `cargo metadata` and Cargo.lock,
Expand All @@ -21,7 +22,7 @@ on:
paths:
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- packages/stack-encrypt-derive/**
- supply-chain/vitaminc-aead/**
- Cargo.toml
- Cargo.lock
Expand Down Expand Up @@ -73,16 +74,25 @@ jobs:

# `--manifest-path` on a workspace member checks that package's graph,
# not the workspace's. `--locked` refuses to touch Cargo.lock, so the
# graph checked is the one the pull request ships.
# graph checked is the one the pull request ships. The derive's
# dev-dependencies reach the rest of the workspace. So the derive's
# check leaves out dev-dependencies (`--exclude-dev`). The tests of the
# other two crates use the derive, so their checks leave the derive
# out. See deny.toml.
- name: cargo deny check, one crate at a time
run: |
status=0
for crate in vitaminc-aead recipher-frame vitaminc-aead-derive; do
check() {
local crate=$1
shift
echo "::group::$crate"
cargo deny --locked --config supply-chain/vitaminc-aead/deny.toml \
cargo deny --locked "$@" --config supply-chain/vitaminc-aead/deny.toml \
--manifest-path "packages/$crate/Cargo.toml" check || status=1
echo "::endgroup::"
done
}
check vitaminc-aead --exclude stack-encrypt-derive
check recipher-frame --exclude stack-encrypt-derive
check stack-encrypt-derive --exclude-dev
exit "$status"

vet:
Expand All @@ -106,7 +116,8 @@ jobs:
cache_key_prefix: mise-v1-ubuntu-2404

# The filter drops every other root workspace member, so the graph
# vetted is the three crates and their dependencies. `--locked` reads
# vetted is the three crates, stack-encrypt-jsonpath (the derive's
# path grammar), and their dependencies. `--locked` reads
# imports.lock as committed rather than fetching the registries.
- name: cargo vet
id: vet
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-eql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ on:
- "packages/stack-encrypt-jsonpath/**"
- "packages/vitaminc-aead/**"
- "packages/recipher-frame/**"
- "packages/vitaminc-aead-derive/**"
- "packages/stack-kms/**"
- "packages/stack-auth/**"
- "packages/stack-profile/**"
Expand Down Expand Up @@ -221,7 +220,6 @@ jobs:
- "packages/stack-encrypt-jsonpath/**"
- "packages/vitaminc-aead/**"
- "packages/recipher-frame/**"
- "packages/vitaminc-aead-derive/**"
- "packages/stack-kms/**"
- "packages/stack-auth/**"
- "packages/stack-profile/**"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ on:
- conformance/stack-encrypt/**
- conformance/vitaminc-aead/**
- packages/stack-encrypt-derive/**
- packages/stack-encrypt-downstream/**
- packages/stack-encrypt-jsonpath/**
- packages/stack-guest-abi/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- languages/typescript/packages/auth/**
- languages/typescript/packages/profile/**
- languages/typescript/packages/stack-auth-wasm/**
Expand All @@ -54,11 +54,11 @@ on:
- conformance/stack-encrypt/**
- conformance/vitaminc-aead/**
- packages/stack-encrypt-derive/**
- packages/stack-encrypt-downstream/**
- packages/stack-encrypt-jsonpath/**
- packages/stack-guest-abi/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- languages/typescript/packages/auth/**
- languages/typescript/packages/profile/**
- languages/typescript/packages/stack-auth-wasm/**
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/tests-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ on:
- packages/stack-guest-abi/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
# The eql guest build links eql-bindings.
- packages/eql/crates/eql-bindings/**
- packages/eql/crates/eql-domains/**
Expand Down Expand Up @@ -93,7 +92,6 @@ on:
- packages/stack-guest-abi/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
# The eql guest build links eql-bindings.
- packages/eql/crates/eql-bindings/**
- packages/eql/crates/eql-domains/**
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/tests-recipher-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ on:
- packages/stack-encrypt-jsonpath/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- Cargo.toml
- mise.toml
- pnpm-lock.yaml
Expand All @@ -47,7 +46,6 @@ on:
- packages/stack-encrypt-jsonpath/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- Cargo.toml
- mise.toml
- pnpm-lock.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
- '!packages/stack-guest-abi/**'
- '!packages/vitaminc-aead/**'
- '!packages/recipher-frame/**'
- '!packages/vitaminc-aead-derive/**'
- '!packages/stack-encrypt-downstream/**'
- '!packages/stack-auth/fuzz/**'
# The TypeScript SDK on Stack Encrypt. Nothing these jobs build
# depends on it, and tests-recipher-js.yml runs its tests.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/udeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ on:
- packages/stack-kms/**
- packages/stack-encrypt/**
- packages/stack-encrypt-derive/**
- packages/stack-encrypt-downstream/**
- packages/stack-encrypt-jsonpath/**
- packages/stack-guest-abi/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor packages/stack-encrypt-downstream/** is missing from both path lists (the pull_request list here and the push list at line 42), though tests-crates.yml lists it. A PR that changes only packages/stack-encrypt-downstream/tests/manifest.rs to stop using toml leaves an unused dev-dependency, and udeps never starts. Add the path to both lists.

Source: code-review · claude-opus-5-5


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 4c4a3d3. packages/stack-encrypt-downstream/** is in both the pull_request and push path lists, and the two lists match. No other workflow needs it: the others list the derive because their builds depend on stack-encrypt, and nothing depends on the downstream crate.

- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- languages/typescript/packages/auth/**
- languages/typescript/packages/profile/**
- languages/typescript/packages/stack-auth-wasm/**
Expand All @@ -39,11 +39,11 @@ on:
- packages/stack-kms/**
- packages/stack-encrypt/**
- packages/stack-encrypt-derive/**
- packages/stack-encrypt-downstream/**
- packages/stack-encrypt-jsonpath/**
- packages/stack-guest-abi/**
- packages/vitaminc-aead/**
- packages/recipher-frame/**
- packages/vitaminc-aead-derive/**
- languages/typescript/packages/auth/**
- languages/typescript/packages/profile/**
- languages/typescript/packages/stack-auth-wasm/**
Expand Down
Loading
Loading