Skip to content

test: Wave 12 - insta snapshot tests for HMAC and PGP crates#38

Closed
EffortlessSteven wants to merge 4 commits intomainfrom
wave-12/hmac-pgp-snapshots
Closed

test: Wave 12 - insta snapshot tests for HMAC and PGP crates#38
EffortlessSteven wants to merge 4 commits intomainfrom
wave-12/hmac-pgp-snapshots

Conversation

@EffortlessSteven
Copy link
Copy Markdown
Member

Adds insta snapshot tests for HMAC and PGP crates. HMAC: 4 tests (HS256/HS384/HS512 shapes + spec matrix). PGP: 5 tests (Ed25519/RSA-2048 shapes + negative fixtures).

Copilot AI review requested due to automatic review settings March 1, 2026 07:26
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 1, 2026

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 17 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 0489cd1 and 9887e9b.

⛔ Files ignored due to path filters (10)
  • Cargo.lock is excluded by !**/*.lock
  • crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_all_specs.snap is excluded by !**/*.snap
  • crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_hs256_shape.snap is excluded by !**/*.snap
  • crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_hs384_shape.snap is excluded by !**/*.snap
  • crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_hs512_shape.snap is excluded by !**/*.snap
  • crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_ed25519_shape.snap is excluded by !**/*.snap
  • crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_negative_corrupt_armored.snap is excluded by !**/*.snap
  • crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_negative_mismatch.snap is excluded by !**/*.snap
  • crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_rsa_2048_shape.snap is excluded by !**/*.snap
  • crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_truncated_binary.snap is excluded by !**/*.snap
📒 Files selected for processing (4)
  • crates/uselesskey-hmac/tests/snapshots_hmac.rs
  • crates/uselesskey-pgp/Cargo.toml
  • crates/uselesskey-pgp/tests/snapshots_pgp.rs
  • fuzz/Cargo.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch wave-12/hmac-pgp-snapshots

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

Review Summary by Qodo

Add insta snapshot tests for HMAC and PGP crates

🧪 Tests

Grey Divider

Walkthroughs

Description
• Add insta snapshot tests for HMAC crate (HS256/HS384/HS512 shapes and spec matrix)
• Add insta snapshot tests for PGP crate (Ed25519/RSA-2048 shapes and negative fixtures)
• Add dev dependencies (insta, serde) to both crate Cargo.toml files
Diagram
flowchart LR
  A["HMAC Crate"] -->|"4 snapshot tests"| B["HS256/HS384/HS512 shapes + spec matrix"]
  C["PGP Crate"] -->|"5 snapshot tests"| D["Ed25519/RSA-2048 shapes + negative fixtures"]
  E["Dev Dependencies"] -->|"insta, serde"| F["Both crates"]
Loading

Grey Divider

File Changes

1. crates/uselesskey-hmac/tests/snapshots_hmac.rs 🧪 Tests +100/-0

HMAC snapshot tests for algorithm shapes

• New file with 4 insta snapshot tests for HMAC functionality
• Tests cover HS256, HS384, HS512 algorithm shapes with secret metadata
• Includes comprehensive spec matrix test validating all HMAC specifications
• Snapshots redact sensitive secret data while preserving structure validation

crates/uselesskey-hmac/tests/snapshots_hmac.rs


2. crates/uselesskey-pgp/tests/snapshots_pgp.rs 🧪 Tests +149/-0

PGP snapshot tests for key shapes and negatives

• New file with 5 insta snapshot tests for PGP key generation
• Tests cover Ed25519 and RSA-2048 key pair shapes with fingerprints and armor headers
• Includes 3 negative fixture tests: corrupt armored keys, mismatched public keys, truncated binary
 keys
• Dynamic redaction validates fingerprint length without exposing sensitive data

crates/uselesskey-pgp/tests/snapshots_pgp.rs


3. crates/uselesskey-hmac/Cargo.toml Dependencies +2/-0

Add insta and serde dev dependencies

• Add insta workspace dependency for snapshot testing
• Add serde workspace dependency for serialization in tests
• Dependencies placed in dev-dependencies section

crates/uselesskey-hmac/Cargo.toml


View more (1)
4. crates/uselesskey-pgp/Cargo.toml Dependencies +2/-0

Add insta and serde dev dependencies

• Add insta workspace dependency for snapshot testing
• Add serde workspace dependency for serialization in tests
• Dependencies placed in dev-dependencies section

crates/uselesskey-pgp/Cargo.toml


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown

qodo-free-for-open-source-projects bot commented Mar 1, 2026

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Remediation recommended

1. PGP fingerprint_len not snapshotted🐞 Bug ✓ Correctness
Description
The PGP snapshot tests redact fingerprint_len to a constant string, so the committed snapshots
cannot detect fingerprint length changes (only a runtime lower-bound assert remains). This reduces
the value of the snapshot for catching unexpected format/version shifts.
Code

crates/uselesskey-pgp/tests/snapshots_pgp.rs[R44-50]

+    insta::assert_yaml_snapshot!("pgp_ed25519_shape", result, {
+        ".fingerprint_len" => insta::dynamic_redaction(|val, _| {
+            let n = val.as_u64().unwrap();
+            assert!(n >= 40, "fingerprint too short: {n}");
+            "[FINGERPRINT_LEN_OK]"
+        }),
+    });
Evidence
The tests serialize fingerprint_len but immediately replace it with a constant via
dynamic_redaction, and the committed snapshot stores that constant. As a result, even if the
fingerprint length changes (e.g., 40->64), the snapshot would still match and only the n >= 40
assertion would run.

crates/uselesskey-pgp/tests/snapshots_pgp.rs[28-50]
crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_ed25519_shape.snap[6-13]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`fingerprint_len` is currently redacted to a constant string in the PGP snapshots, which means snapshot files cannot detect changes in the fingerprint length.
### Issue Context
The tests already compute `kp.fingerprint().len()`; redacting it to a constant removes the change-detection benefit of snapshot testing for this field.
### Fix Focus Areas
- crates/uselesskey-pgp/tests/snapshots_pgp.rs[44-50]
- crates/uselesskey-pgp/tests/snapshots_pgp.rs[69-75]
- crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_ed25519_shape.snap[6-13]
- crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_rsa_2048_shape.snap (update snapshot accordingly)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. HMAC secret value never compared 🐞 Bug ✓ Correctness
Description
The HMAC snapshot tests compute a base64-encoded secret but redact it to a constant, so the
snapshots won’t detect secret-byte changes that preserve length. If the intent is to detect
deterministic output drift without committing secrets, snapshotting a non-reversible hash would
better match the stated goal.
Code

crates/uselesskey-hmac/tests/snapshots_hmac.rs[R26-35]

+    let result = HmacSnapshot {
+        label: "snapshot-hs256",
+        alg: "HS256",
+        secret_len: secret.secret_bytes().len(),
+        secret_b64: STANDARD.encode(secret.secret_bytes()),
+    };
+
+    insta::assert_yaml_snapshot!("hmac_hs256_shape", result, {
+        ".secret_b64" => "[REDACTED]",
+    });
Evidence
The test constructs secret_b64 from the raw secret bytes and then forces the serialized snapshot
output to always contain [REDACTED]. The committed snapshot confirms that the actual value is not
stored/compared, so content changes with the same length would not be caught by the snapshot.

crates/uselesskey-hmac/tests/snapshots_hmac.rs[21-36]
crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_hs256_shape.snap[6-9]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The snapshot currently redacts the base64-encoded secret to a constant, so secret-byte changes that keep the same length won’t be detected.
### Issue Context
This is test-only, but the module-level comment suggests the snapshots are meant to detect unintended changes in deterministic generation.
### Fix Focus Areas
- crates/uselesskey-hmac/tests/snapshots_hmac.rs[21-36]
- crates/uselesskey-hmac/tests/snapshots_hmac.rs[38-53]
- crates/uselesskey-hmac/tests/snapshots_hmac.rs[55-70]
- crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_hs256_shape.snap[6-9]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Extra slow PGP keygens 🐞 Bug ➹ Performance
Description
The new PGP snapshot suite adds more key generations per unique label (including an RSA-2048 case),
which can noticeably increase test runtime. The repo already acknowledges RSA keygen slowness and
optimizes test/dev profiles accordingly, so additional RSA-based snapshot tests may impact CI and
developer iteration time.
Code

crates/uselesskey-pgp/tests/snapshots_pgp.rs[R54-57]

+fn snapshot_pgp_rsa_2048_shape() {
+    let fx = fx();
+    let kp = fx.pgp("snapshot-rsa2048", PgpSpec::rsa_2048());
+
Evidence
The snapshot test explicitly generates an RSA-2048 keypair via fx.pgp(..., PgpSpec::rsa_2048()).
Key generation happens inside SecretKeyParamsBuilder::generate(rng), and the workspace profiles
include a note that RSA keygen is slow (indicating the suite is sensitive to added RSA work). Also,
the cache key includes (domain, label, spec, variant), so using many distinct labels prevents
reuse across tests.

crates/uselesskey-pgp/tests/snapshots_pgp.rs[54-76]
crates/uselesskey-pgp/src/keypair.rs[151-172]
Cargo.toml[135-140]
crates/uselesskey-core-factory/src/lib.rs[82-105]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The added PGP snapshot tests introduce additional PGP key generations (including RSA), which may slow the test suite.
### Issue Context
`Factory` caching is keyed by `(domain, label, spec, variant)`, so using many unique labels prevents reuse.
### Fix Focus Areas
- crates/uselesskey-pgp/tests/snapshots_pgp.rs[28-76]
- crates/uselesskey-pgp/tests/snapshots_pgp.rs[78-149]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds insta YAML snapshot test coverage for the uselesskey-hmac and uselesskey-pgp crates to lock down key/secret “shape” outputs (headers, lengths, etc.) and a few negative-fixture helpers.

Changes:

  • Add snapshot test suites for HMAC (HS256/384/512 + spec matrix) and PGP (Ed25519/RSA-2048 + negative fixtures).
  • Add corresponding .snap artifacts under each crate’s tests/snapshots/.
  • Add insta + serde as dev-dependencies for the two crates and update Cargo.lock.

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/uselesskey-pgp/tests/snapshots_pgp.rs New PGP snapshot tests (shapes + negative fixtures)
crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_truncated_binary.snap New snapshot artifact for truncated binary test
crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_rsa_2048_shape.snap New snapshot artifact for RSA-2048 shape
crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_negative_mismatch.snap New snapshot artifact for mismatch negative fixture
crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_negative_corrupt_armored.snap New snapshot artifact for corrupt-armor negative fixture
crates/uselesskey-pgp/tests/snapshots/snapshots_pgp__pgp_ed25519_shape.snap New snapshot artifact for Ed25519 shape
crates/uselesskey-pgp/Cargo.toml Add insta and serde dev-deps for snapshots
crates/uselesskey-hmac/tests/snapshots_hmac.rs New HMAC snapshot tests (shapes + spec matrix)
crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_hs512_shape.snap New snapshot artifact for HS512 shape
crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_hs384_shape.snap New snapshot artifact for HS384 shape
crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_hs256_shape.snap New snapshot artifact for HS256 shape
crates/uselesskey-hmac/tests/snapshots/snapshots_hmac__hmac_all_specs.snap New snapshot artifact for all-specs matrix
crates/uselesskey-hmac/Cargo.toml Add insta and serde dev-deps for snapshots
Cargo.lock Lockfile updates for new dev-deps

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +69 to +75
insta::assert_yaml_snapshot!("pgp_rsa_2048_shape", result, {
".fingerprint_len" => insta::dynamic_redaction(|val, _| {
let n = val.as_u64().unwrap();
assert!(n >= 40, "fingerprint too short: {n}");
"[FINGERPRINT_LEN_OK]"
}),
});
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

Same issue here: redacting fingerprint_len to a placeholder means the snapshot won’t surface or fail on fingerprint length changes (beyond the >= 40 check). If the goal is regression detection, it’s more effective to snapshot the actual fingerprint_len value (or assert it equals the expected length).

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +50
insta::assert_yaml_snapshot!("pgp_ed25519_shape", result, {
".fingerprint_len" => insta::dynamic_redaction(|val, _| {
let n = val.as_u64().unwrap();
assert!(n >= 40, "fingerprint too short: {n}");
"[FINGERPRINT_LEN_OK]"
}),
});
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

fingerprint_len is being dynamically redacted to a constant placeholder, which makes this snapshot unable to detect changes in fingerprint length (it only enforces >= 40). Since the fingerprint length isn’t secret, consider snapshotting the actual numeric length (and, if needed, add an explicit assertion for the expected value) so this test can catch unintended changes.

Copilot uses AI. Check for mistakes.
@qodo-free-for-open-source-projects
Copy link
Copy Markdown

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: pr

Failed stage: xtask pr [❌]

Failed test name: snapshots_hmac

Failure summary:

The action failed during the cargo xtask pr step because Clippy is run with -D warnings, and it
found a lint treated as an error in crates/uselesskey-hmac/tests/snapshots_hmac.rs:90:43.
- Clippy
error: clippy::clone_on_copy (clone_on_copy) triggered by calling spec.clone() where HmacSpec
implements Copy.
- Suggested fix from Clippy: remove the clone call and pass spec directly (or
explicitly allow the lint).
- As a result, compilation of uselesskey-hmac test target snapshots_hmac
failed and the workflow exited with status 101 / exit code 1.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

181:  �[36;1mecho "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT�[0m
182:  �[36;1mecho "downgrade=" >> $GITHUB_OUTPUT�[0m
183:  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
184:  env:
185:  targets: 
186:  components: rustfmt, clippy
187:  ##[endgroup]
188:  ##[group]Run : set $CARGO_HOME
189:  �[36;1m: set $CARGO_HOME�[0m
190:  �[36;1mecho CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV�[0m
191:  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
192:  ##[endgroup]
193:  ##[group]Run : install rustup if needed
194:  �[36;1m: install rustup if needed�[0m
195:  �[36;1mif ! command -v rustup &>/dev/null; then�[0m
196:  �[36;1m  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y�[0m
197:  �[36;1m  echo "$CARGO_HOME/bin" >> $GITHUB_PATH�[0m
...

264:  �[36;1mif [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then�[0m
265:  �[36;1m  if rustc +1.92.0 --version --verbose | grep -q '^release: 1\.6[89]\.'; then�[0m
266:  �[36;1m    touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true�[0m
267:  �[36;1m    echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV�[0m
268:  �[36;1m  elif rustc +1.92.0 --version --verbose | grep -q '^release: 1\.6[67]\.'; then�[0m
269:  �[36;1m    touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true�[0m
270:  �[36;1m    echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV�[0m
271:  �[36;1m  fi�[0m
272:  �[36;1mfi�[0m
273:  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
274:  env:
275:  CARGO_HOME: /home/runner/.cargo
276:  CARGO_INCREMENTAL: 0
277:  CARGO_TERM_COLOR: always
278:  ##[endgroup]
279:  ##[group]Run : work around spurious network errors in curl 8.0
280:  �[36;1m: work around spurious network errors in curl 8.0�[0m
281:  �[36;1m# https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation�[0m
...

350:  targets: 
351:  components: 
352:  ##[endgroup]
353:  ##[group]Run : set $CARGO_HOME
354:  �[36;1m: set $CARGO_HOME�[0m
355:  �[36;1mecho CARGO_HOME=${CARGO_HOME:-"$HOME/.cargo"} >> $GITHUB_ENV�[0m
356:  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
357:  env:
358:  CARGO_HOME: /home/runner/.cargo
359:  CARGO_INCREMENTAL: 0
360:  CARGO_TERM_COLOR: always
361:  ##[endgroup]
362:  ##[group]Run : install rustup if needed
363:  �[36;1m: install rustup if needed�[0m
364:  �[36;1mif ! command -v rustup &>/dev/null; then�[0m
365:  �[36;1m  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y�[0m
366:  �[36;1m  echo "$CARGO_HOME/bin" >> $GITHUB_PATH�[0m
...

440:  �[36;1mif [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol ]; then�[0m
441:  �[36;1m  if rustc +nightly --version --verbose | grep -q '^release: 1\.6[89]\.'; then�[0m
442:  �[36;1m    touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true�[0m
443:  �[36;1m    echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV�[0m
444:  �[36;1m  elif rustc +nightly --version --verbose | grep -q '^release: 1\.6[67]\.'; then�[0m
445:  �[36;1m    touch "/home/runner/work/_temp"/.implicit_cargo_registries_crates_io_protocol || true�[0m
446:  �[36;1m    echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV�[0m
447:  �[36;1m  fi�[0m
448:  �[36;1mfi�[0m
449:  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
450:  env:
451:  CARGO_HOME: /home/runner/.cargo
452:  CARGO_INCREMENTAL: 0
453:  CARGO_TERM_COLOR: always
454:  ##[endgroup]
455:  ##[group]Run : work around spurious network errors in curl 8.0
456:  �[36;1m: work around spurious network errors in curl 8.0�[0m
457:  �[36;1m# https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation�[0m
...

657:  - /home/runner/work/uselesskey/uselesskey/crates/uselesskey-x509/Cargo.toml
658:  - /home/runner/work/uselesskey/uselesskey/crates/uselesskey/Cargo.toml
659:  - /home/runner/work/uselesskey/uselesskey/rust-toolchain.toml
660:  - /home/runner/work/uselesskey/uselesskey/tests/Cargo.toml
661:  - /home/runner/work/uselesskey/uselesskey/xtask/Cargo.toml
662:  ##[endgroup]
663:  ... Restoring cache ...
664:  No cache found.
665:  ##[group]Run cargo install cargo-fuzz
666:  �[36;1mcargo install cargo-fuzz�[0m
667:  shell: /usr/bin/bash -e {0}
668:  env:
669:  CARGO_HOME: /home/runner/.cargo
670:  CARGO_INCREMENTAL: 0
671:  CARGO_TERM_COLOR: always
672:  CACHE_ON_FAILURE: false
673:  ##[endgroup]
...

696:  �[1m�[92m  Downloaded�[0m serde_derive v1.0.228
697:  �[1m�[92m  Downloaded�[0m getrandom v0.4.1
698:  �[1m�[92m  Downloaded�[0m memchr v2.8.0
699:  �[1m�[92m  Downloaded�[0m serde_core v1.0.228
700:  �[1m�[92m  Downloaded�[0m serde_json v1.0.149
701:  �[1m�[92m  Downloaded�[0m proc-macro2 v1.0.106
702:  �[1m�[92m  Downloaded�[0m tempfile v3.26.0
703:  �[1m�[92m  Downloaded�[0m clap v4.5.60
704:  �[1m�[92m  Downloaded�[0m current_platform v0.2.0
705:  �[1m�[92m  Downloaded�[0m syn v2.0.117
706:  �[1m�[92m  Downloaded�[0m clap_derive v4.5.55
707:  �[1m�[92m  Downloaded�[0m serde v1.0.228
708:  �[1m�[92m  Downloaded�[0m itoa v1.0.17
709:  �[1m�[92m  Downloaded�[0m colorchoice v1.0.4
710:  �[1m�[92m  Downloaded�[0m cfg-if v1.0.4
711:  �[1m�[92m  Downloaded�[0m thiserror-impl v1.0.69
712:  �[1m�[92m  Downloaded�[0m thiserror v1.0.69
713:  �[1m�[92m  Downloaded�[0m clap_builder v4.5.60
...

726:  �[1m�[92m  Downloaded�[0m linux-raw-sys v0.12.1
727:  �[1m�[92m   Compiling�[0m proc-macro2 v1.0.106
728:  �[1m�[92m   Compiling�[0m quote v1.0.44
729:  �[1m�[92m   Compiling�[0m unicode-ident v1.0.24
730:  �[1m�[92m   Compiling�[0m serde_core v1.0.228
731:  �[1m�[92m   Compiling�[0m serde v1.0.228
732:  �[1m�[92m   Compiling�[0m utf8parse v0.2.2
733:  �[1m�[92m   Compiling�[0m zmij v1.0.21
734:  �[1m�[92m   Compiling�[0m libc v0.2.182
735:  �[1m�[92m   Compiling�[0m anstyle-parse v0.2.7
736:  �[1m�[92m   Compiling�[0m getrandom v0.4.1
737:  �[1m�[92m   Compiling�[0m is_terminal_polyfill v1.70.2
738:  �[1m�[92m   Compiling�[0m colorchoice v1.0.4
739:  �[1m�[92m   Compiling�[0m serde_json v1.0.149
740:  �[1m�[92m   Compiling�[0m anstyle v1.0.13
741:  �[1m�[92m   Compiling�[0m thiserror v1.0.69
742:  �[1m�[92m   Compiling�[0m syn v2.0.117
...

745:  �[1m�[92m   Compiling�[0m rustix v1.1.4
746:  �[1m�[92m   Compiling�[0m anstream v0.6.21
747:  �[1m�[92m   Compiling�[0m bitflags v2.11.0
748:  �[1m�[92m   Compiling�[0m anyhow v1.0.102
749:  �[1m�[92m   Compiling�[0m current_platform v0.2.0
750:  �[1m�[92m   Compiling�[0m memchr v2.8.0
751:  �[1m�[92m   Compiling�[0m clap_lex v1.0.0
752:  �[1m�[92m   Compiling�[0m semver v1.0.27
753:  �[1m�[92m   Compiling�[0m cfg-if v1.0.4
754:  �[1m�[92m   Compiling�[0m heck v0.5.0
755:  �[1m�[92m   Compiling�[0m itoa v1.0.17
756:  �[1m�[92m   Compiling�[0m strsim v0.11.1
757:  �[1m�[92m   Compiling�[0m linux-raw-sys v0.12.1
758:  �[1m�[92m   Compiling�[0m clap_builder v4.5.60
759:  �[1m�[92m   Compiling�[0m serde_derive v1.0.228
760:  �[1m�[92m   Compiling�[0m thiserror-impl v1.0.69
761:  �[1m�[92m   Compiling�[0m clap_derive v4.5.55
...

766:  �[1m�[92m   Compiling�[0m clap v4.5.60
767:  �[1m�[92m   Compiling�[0m cargo_metadata v0.18.1
768:  �[1m�[92m   Compiling�[0m toml v0.5.11
769:  �[1m�[92m   Compiling�[0m rustc_version v0.4.1
770:  �[1m�[92m   Compiling�[0m cargo-fuzz v0.13.1
771:  �[1m�[92m    Finished�[0m `release` profile [optimized] target(s) in 17.25s
772:  �[1m�[92m  Installing�[0m /home/runner/.cargo/bin/cargo-fuzz
773:  �[1m�[92m   Installed�[0m package `cargo-fuzz v0.13.1` (executable `cargo-fuzz`)
774:  ##[group]Run cargo install cargo-mutants
775:  �[36;1mcargo install cargo-mutants�[0m
776:  shell: /usr/bin/bash -e {0}
777:  env:
778:  CARGO_HOME: /home/runner/.cargo
779:  CARGO_INCREMENTAL: 0
780:  CARGO_TERM_COLOR: always
781:  CACHE_ON_FAILURE: false
782:  ##[endgroup]
...

825:  �[1m�[92m  Downloaded�[0m regex-automata v0.4.14
826:  �[1m�[92m  Downloaded�[0m bstr v1.12.1
827:  �[1m�[92m  Downloaded�[0m sharded-slab v0.1.7
828:  �[1m�[92m  Downloaded�[0m jiff v0.1.29
829:  �[1m�[92m  Downloaded�[0m winnow v0.7.14
830:  �[1m�[92m  Downloaded�[0m flickzeug v0.4.5
831:  �[1m�[92m  Downloaded�[0m linux-raw-sys v0.3.8
832:  �[1m�[92m  Downloaded�[0m log v0.4.29
833:  �[1m�[92m  Downloaded�[0m schemars v0.9.0
834:  �[1m�[92m  Downloaded�[0m nix v0.30.1
835:  �[1m�[92m  Downloaded�[0m toml_edit v0.22.27
836:  �[1m�[92m  Downloaded�[0m toml v0.8.23
837:  �[1m�[92m  Downloaded�[0m tracing v0.1.44
838:  �[1m�[92m  Downloaded�[0m indexmap v2.13.0
839:  �[1m�[92m  Downloaded�[0m thread_local v1.1.9
840:  �[1m�[92m  Downloaded�[0m thiserror-impl v2.0.18
841:  �[1m�[92m  Downloaded�[0m target-spec v3.5.7
...

863:  �[1m�[92m  Downloaded�[0m rustversion v1.0.22
864:  �[1m�[92m  Downloaded�[0m regex v1.12.3
865:  �[1m�[92m  Downloaded�[0m pin-project-lite v0.2.17
866:  �[1m�[92m  Downloaded�[0m matchers v0.2.0
867:  �[1m�[92m  Downloaded�[0m indoc v2.0.7
868:  �[1m�[92m  Downloaded�[0m lazy_static v1.5.0
869:  �[1m�[92m  Downloaded�[0m jobserver v0.1.34
870:  �[1m�[92m  Downloaded�[0m guppy-workspace-hack v0.1.0
871:  �[1m�[92m  Downloaded�[0m globset v0.4.18
872:  �[1m�[92m  Downloaded�[0m env_filter v1.0.0
873:  �[1m�[92m  Downloaded�[0m dyn-clone v1.0.20
874:  �[1m�[92m  Downloaded�[0m ctrlc v3.5.2
875:  �[1m�[92m  Downloaded�[0m crossbeam-epoch v0.9.18
876:  �[1m�[92m  Downloaded�[0m color-print v0.3.7
877:  �[1m�[92m  Downloaded�[0m toml_datetime v0.6.11
878:  �[1m�[92m  Downloaded�[0m thiserror v2.0.18
879:  �[1m�[92m  Downloaded�[0m test-log-macros v0.2.19
...

919:  �[1m�[92m   Compiling�[0m serde_derive v1.0.228
920:  �[1m�[92m   Compiling�[0m anstyle v1.0.13
921:  �[1m�[92m   Compiling�[0m anstream v0.6.21
922:  �[1m�[92m   Compiling�[0m target-lexicon v0.13.3
923:  �[1m�[92m   Compiling�[0m smallvec v1.15.1
924:  �[1m�[92m   Compiling�[0m io-lifetimes v1.0.11
925:  �[1m�[92m   Compiling�[0m crossbeam-utils v0.8.21
926:  �[1m�[92m   Compiling�[0m itoa v1.0.17
927:  �[1m�[92m   Compiling�[0m heck v0.5.0
928:  �[1m�[92m   Compiling�[0m tracing-core v0.1.36
929:  �[1m�[92m   Compiling�[0m guppy-workspace-hack v0.1.0
930:  �[1m�[92m   Compiling�[0m rustix v0.37.28
931:  �[1m�[92m   Compiling�[0m strsim v0.11.1
932:  �[1m�[92m   Compiling�[0m camino v1.2.2
933:  �[1m�[92m   Compiling�[0m rustversion v1.0.22
934:  �[1m�[92m   Compiling�[0m thiserror v2.0.18
935:  �[1m�[92m   Compiling�[0m terminal_size v0.4.3
936:  �[1m�[92m   Compiling�[0m tracing-attributes v0.1.31
937:  �[1m�[92m   Compiling�[0m thiserror-impl v2.0.18
938:  �[1m�[92m   Compiling�[0m nix v0.31.2
...

1017:  �[1m�[92m   Compiling�[0m path-slash v0.2.1
1018:  �[1m�[92m   Compiling�[0m whoami v1.6.1
1019:  �[1m�[92m   Compiling�[0m mutants v0.0.3
1020:  �[1m�[92m   Compiling�[0m indoc v2.0.7
1021:  �[1m�[92m   Compiling�[0m cargo-mutants v26.2.0
1022:  �[1m�[92m    Finished�[0m `release` profile [optimized] target(s) in 1m 10s
1023:  �[1m�[92m  Installing�[0m /home/runner/.cargo/bin/cargo-mutants
1024:  �[1m�[92m   Installed�[0m package `cargo-mutants v26.2.0` (executable `cargo-mutants`)
1025:  ##[group]Run git fetch origin main
1026:  �[36;1mgit fetch origin main�[0m
1027:  shell: /usr/bin/bash -e {0}
1028:  env:
1029:  CARGO_HOME: /home/runner/.cargo
1030:  CARGO_INCREMENTAL: 0
1031:  CARGO_TERM_COLOR: always
1032:  CACHE_ON_FAILURE: false
1033:  ##[endgroup]
1034:  From https://github.com/EffortlessMetrics/uselesskey
1035:  * branch            main       -> FETCH_HEAD
1036:  ##[group]Run cargo xtask pr
1037:  �[36;1mcargo xtask pr�[0m
1038:  shell: /usr/bin/bash -e {0}
1039:  env:
1040:  CARGO_HOME: /home/runner/.cargo
1041:  CARGO_INCREMENTAL: 0
1042:  CARGO_TERM_COLOR: always
1043:  CACHE_ON_FAILURE: false
1044:  ##[endgroup]
...

1207:  �[1m�[92m  Downloaded�[0m pgp v0.19.0
1208:  �[1m�[92m  Downloaded�[0m rfc6979 v0.4.0
1209:  �[1m�[92m  Downloaded�[0m replace_with v0.1.8
1210:  �[1m�[92m  Downloaded�[0m rand_xorshift v0.4.0
1211:  �[1m�[92m  Downloaded�[0m rand_chacha v0.3.1
1212:  �[1m�[92m  Downloaded�[0m powerfmt v0.2.0
1213:  �[1m�[92m  Downloaded�[0m percent-encoding v2.3.2
1214:  �[1m�[92m  Downloaded�[0m httpdate v1.0.3
1215:  �[1m�[92m  Downloaded�[0m http-body v1.0.1
1216:  �[1m�[92m  Downloaded�[0m socket2 v0.6.2
1217:  �[1m�[92m  Downloaded�[0m snafu-derive v0.8.9
1218:  �[1m�[92m  Downloaded�[0m slab v0.4.12
1219:  �[1m�[92m  Downloaded�[0m ripemd v0.1.3
1220:  �[1m�[92m  Downloaded�[0m rand_core v0.6.4
1221:  �[1m�[92m  Downloaded�[0m radium v0.7.0
1222:  �[1m�[92m  Downloaded�[0m quick-error v1.2.3
1223:  �[1m�[92m  Downloaded�[0m proc-macro-crate v3.4.0
...

1383:  �[1m�[92m   Compiling�[0m generic-array v0.14.9
1384:  �[1m�[92m   Compiling�[0m zeroize_derive v1.4.3
1385:  �[1m�[92m   Compiling�[0m blake3 v1.8.3
1386:  �[1m�[92m    Checking�[0m zeroize v1.8.2
1387:  �[1m�[92m    Checking�[0m constant_time_eq v0.4.2
1388:  �[1m�[92m    Checking�[0m arrayvec v0.7.6
1389:  �[1m�[92m    Checking�[0m arrayref v0.3.9
1390:  �[1m�[92m   Compiling�[0m serde_json v1.0.149
1391:  �[1m�[92m    Checking�[0m zmij v1.0.19
1392:  �[1m�[92m    Checking�[0m crypto-common v0.1.6
1393:  �[1m�[92m   Compiling�[0m serde_derive v1.0.228
1394:  �[1m�[92m    Checking�[0m subtle v2.6.1
1395:  �[1m�[92m   Compiling�[0m serde v1.0.228
1396:  �[1m�[92m    Checking�[0m rand_chacha v0.3.1
1397:  �[1m�[92m    Checking�[0m smallvec v1.15.1
1398:  �[1m�[92m   Compiling�[0m thiserror v2.0.18
1399:  �[1m�[92m   Compiling�[0m crossbeam-utils v0.8.21
1400:  �[1m�[92m    Checking�[0m uselesskey-core-hash v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-hash)
1401:  �[1m�[92m    Checking�[0m spin v0.9.8
1402:  �[1m�[92m   Compiling�[0m thiserror-impl v2.0.18
1403:  �[1m�[92m    Checking�[0m const-oid v0.9.6
...

1419:  �[1m�[92m    Checking�[0m uselesskey-core-sink v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-sink)
1420:  �[1m�[92m    Checking�[0m base64ct v1.8.3
1421:  �[1m�[92m    Checking�[0m fnv v1.0.7
1422:  �[1m�[92m    Checking�[0m uselesskey-core-cache v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-cache)
1423:  �[1m�[92m    Checking�[0m uselesskey-core-jwks-order v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-jwks-order)
1424:  �[1m�[92m    Checking�[0m signature v2.2.0
1425:  �[1m�[92m    Checking�[0m uselesskey-core-factory v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-factory)
1426:  �[1m�[92m    Checking�[0m rand_core v0.9.5
1427:  �[1m�[92m    Checking�[0m uselesskey-core v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core)
1428:  �[1m�[92m    Checking�[0m pem-rfc7468 v0.7.0
1429:  �[1m�[92m    Checking�[0m uselesskey-core-jwk-shape v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-jwk-shape)
1430:  �[1m�[92m    Checking�[0m wait-timeout v0.2.1
1431:  �[1m�[92m    Checking�[0m der v0.7.10
1432:  �[1m�[92m    Checking�[0m bit-vec v0.8.0
1433:  �[1m�[92m    Checking�[0m uselesskey-core-jwk-builder v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-jwk-builder)
1434:  �[1m�[92m    Checking�[0m quick-error v1.2.3
1435:  �[1m�[92m    Checking�[0m rusty-fork v0.3.1
...

1507:  �[1m�[92m   Compiling�[0m aho-corasick v1.1.4
1508:  �[1m�[92m    Checking�[0m futures-util v0.3.31
1509:  �[1m�[92m    Checking�[0m num-bigint v0.4.6
1510:  �[1m�[92m    Checking�[0m pem v3.0.6
1511:  �[1m�[92m   Compiling�[0m synstructure v0.13.2
1512:  �[1m�[92m    Checking�[0m bytes v1.11.1
1513:  �[1m�[92m   Compiling�[0m regex-automata v0.4.14
1514:  �[1m�[92m    Checking�[0m minimal-lexical v0.2.1
1515:  �[1m�[92m    Checking�[0m nom v7.1.3
1516:  �[1m�[92m    Checking�[0m rustls-pki-types v1.14.0
1517:  �[1m�[92m    Checking�[0m log v0.4.29
1518:  �[1m�[92m   Compiling�[0m displaydoc v0.2.5
1519:  �[1m�[92m   Compiling�[0m asn1-rs-impl v0.2.0
1520:  �[1m�[92m    Checking�[0m rusticata-macros v4.1.0
1521:  �[1m�[92m    Checking�[0m uselesskey-core-x509-spec v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-x509-spec)
1522:  �[1m�[92m   Compiling�[0m thiserror v1.0.69
1523:  �[1m�[92m    Checking�[0m uselesskey-core-x509-negative v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-core-x509-negative)
1524:  �[1m�[92m    Checking�[0m yasna v0.5.2
1525:  �[1m�[92m   Compiling�[0m regex v1.12.3
1526:  �[1m�[92m    Checking�[0m inout v0.1.4
1527:  �[1m�[92m   Compiling�[0m thiserror-impl v1.0.69
1528:  �[1m�[92m    Checking�[0m cipher v0.4.4
...

1710:  �[1m�[92m    Checking�[0m futures v0.3.31
1711:  �[1m�[92m    Checking�[0m globwalk v0.9.1
1712:  �[1m�[92m    Checking�[0m der-parser v10.0.0
1713:  �[1m�[92m   Compiling�[0m cucumber-codegen v0.22.1
1714:  �[1m�[92m    Checking�[0m console v0.16.2
1715:  �[1m�[92m   Compiling�[0m smart-default v0.7.1
1716:  �[1m�[92m    Checking�[0m linked-hash-map v0.5.6
1717:  �[1m�[92m    Checking�[0m uselesskey-feature-grid v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-feature-grid)
1718:  �[1m�[92m    Checking�[0m inventory v0.3.21
1719:  �[1m�[92m    Checking�[0m humantime v2.3.0
1720:  �[1m�[92m    Checking�[0m x509-parser v0.18.1
1721:  �[1m�[92m    Checking�[0m uselesskey-test-grid v0.3.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-test-grid)
1722:  �[1m�[92m    Checking�[0m uselesskey-interop-tests v0.0.0 (/home/runner/work/uselesskey/uselesskey/crates/uselesskey-interop-tests)
1723:  �[1m�[92m    Checking�[0m cucumber v0.22.1
1724:  �[1m�[92m    Checking�[0m xtask v0.0.0 (/home/runner/work/uselesskey/uselesskey/xtask)
1725:  �[1m�[91merror�[0m�[1m: using `clone` on type `HmacSpec` which implements the `Copy` trait�[0m
1726:  �[1m�[94m--> �[0mcrates/uselesskey-hmac/tests/snapshots_hmac.rs:90:43
1727:  �[1m�[94m|�[0m
1728:  �[1m�[94m90�[0m �[1m�[94m|�[0m         let secret = fx.hmac("spec-test", spec.clone());
1729:  �[1m�[94m|�[0m                                           �[1m�[91m^^^^^^^^^^^^�[0m �[1m�[91mhelp: try removing the `clone` call: `spec`�[0m
1730:  �[1m�[94m|�[0m
1731:  �[1m�[94m= �[0m�[1mhelp�[0m: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#clone_on_copy
1732:  �[1m�[94m= �[0m�[1mnote�[0m: `-D clippy::clone-on-copy` implied by `-D warnings`
1733:  �[1m�[94m= �[0m�[1mhelp�[0m: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`
1734:  �[1m�[91merror�[0m: could not compile `uselesskey-hmac` (test "snapshots_hmac") due to 1 previous error
1735:  �[1m�[33mwarning�[0m: build failed, waiting for other jobs to finish...
1736:  ==> clippy [FAILED, 75.5s]
1737:  command failed with status: exit status: 101
1738:  2 passed, 1 failed, 0 skipped (76.0s total)
1739:  Error: command failed with status: exit status: 101
1740:  ##[error]Process completed with exit code 1.
1741:  ##[group]Run actions/upload-artifact@v4
1742:  with:
1743:  name: receipt-pr
1744:  path: target/xtask/receipt.json
1745:  if-no-files-found: warn
1746:  compression-level: 6
1747:  overwrite: false
1748:  include-hidden-files: false
1749:  env:
1750:  CARGO_HOME: /home/runner/.cargo
1751:  CARGO_INCREMENTAL: 0
1752:  CARGO_TERM_COLOR: always
1753:  CACHE_ON_FAILURE: false
1754:  ##[endgroup]

@EffortlessSteven EffortlessSteven force-pushed the wave-12/hmac-pgp-snapshots branch 2 times, most recently from 3f4a2ef to 194ca17 Compare March 1, 2026 17:20
EffortlessSteven and others added 4 commits March 1, 2026 16:13
HMAC snapshots: HS256/HS384/HS512 shapes and spec matrix.
PGP snapshots: Ed25519/RSA-2048 shapes, negative fixtures (corrupt, mismatch, truncated).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove unnecessary .clone() on Copy type HmacSpec.
Snapshot fingerprint_len directly instead of redacting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The fuzz target file is named jwks_order.rs but the Cargo.toml bin entry
referenced jwk_order.rs. This caused xtask fuzz to fail when auto-discovering
targets by filename.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
RSA PGP key binary lengths may differ between Windows and Linux due to
platform-specific PGP key serialization. Redact these values to prevent
cross-platform snapshot failures during mutation testing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@EffortlessSteven EffortlessSteven force-pushed the wave-12/hmac-pgp-snapshots branch from 65f43b7 to 9887e9b Compare March 1, 2026 21:15
@EffortlessSteven
Copy link
Copy Markdown
Member Author

Closing: Branch is too stale to salvage cheaply. The fuzz/Cargo.toml misses the renamed jwks_order target from main, and most HMAC snapshot coverage is superseded by merged waves 17 and 23. Superseded by wave-53 fuzz expansion (PR #68). [Class E: superseded]

@EffortlessSteven EffortlessSteven deleted the wave-12/hmac-pgp-snapshots branch March 5, 2026 15:16
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.

2 participants