Repository navigation
fix(stack-encrypt): pass the cipher to record::decrypt in heap_hygiene - #1655
freshtonic wants to merge 1 commit into
Conversation
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Mutation testing (cargo-mutants,
|
cipherstash-agent
left a comment
There was a problem hiding this comment.
Review attestation
Reviewed 7bad7ae · posted from Claude Code · claude-opus-5-5 · effort medium
Sources: code-review · claude-opus-5-5
Skills: code-review, rust-security, review-cross-check
Findings (1): 1 minor — 0 inline, 1 below.
.github/workflows/tests-crates.yml:42(outside diff) minor No workflow in.github/workflows/runs on a push tonext: everypush.brancheshere is[main], andnexthas no ruleset that requires branches to be up to date and no merge queue. So two PRs that each pass alone, like #1610 and #1643, can land a compile break onnextwithout CI ever building it. Addingnexttopush.brancheswould only catch a break after it lands; to prevent one, require up-to-date branches or a merge queue onnext. This is a repo-settings follow-up, and it does not block this PR.
The fix itself checks out. At next (9f6b080), cargo check -p stack-encrypt --tests --features dynamic fails with E0433 on Scope. At 7bad7ae it passes, and cargo test -p stack-encrypt --features dynamic --test heap_hygiene passes 33/33. &cipher builds an unscoped CipherRef (pending.rs:181), and each leaf's key is fetched under the keyset that leaf records. That matches the file's other record::decrypt calls at lines 451 and 485. No Scope::Client call sites remain in any .rs file.
Generated by Claude Code
Fixes a build failure on
next:packages/stack-encrypt/tests/heap_hygiene.rsdoes not compile with thedynamicfeature.Cause
Two PRs that each built alone:
dynamic::ScopewithCipherRef.record::decryptnow takesimpl Into<CipherRef>, which&StackCipherconverts into. It merged first (aedd55e04).record::decrypt(Scope::Client(&cipher), …). It was written before refactor(stack-encrypt)!: replace CipherScope and dynamic::Scope with one CipherRef #1610 merged, and it merged after it (9f6b08095).cargo check -p stack-encrypt --tests --features dynamic5811ac412(#1643 before merge)aedd55e04(after #1610)9f6b08095(after #1643, currentnext)Nobody saw it because the test file is
#![cfg(all(feature = "dynamic", unix))], so a default-features build skips it, and no checks ran on the merge commit.Fix
Pass
&cipher, as the file's otherrecord::decryptcalls do (lines 451 and 485). Test-only; no changeset.Checks
cargo clippy --workspace --all-targets --all-features -- -D warnings: clean.cargo fmt --all -- --check: clean.cargo nextest run -p stack-encrypt --all-features: 1415 passed, 1 skipped.