Skip to content

fix(redhat): isolate signature framing and count rejections - #350

Merged
bzawisto merged 1 commit into
mainfrom
fix/345-signature-framing
Nov 13, 2026
Merged

bzawisto merged 1 commit into
mainfrom
fix/345-signature-framing

Conversation

@bzawisto

@bzawisto bzawisto commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Signature fixtures now isolate complete Legacy/V0 count mismatches, truncated payloads, and missing or extra V1 signatures. Each case keeps its expected rejection stage and repaired control.

Closes #345

@bzawisto
bzawisto added this pull request to stack #352 November 13, 2026 15:36
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The structure scenario replaces one ambiguous signature mutation with separate signature-count, missing-signature, and extra-signature cases. It adds format-specific test coverage and checks that each mutation fails at the expected parsing or sanitization stage.

Changes: Signature fixture validation

Layer / File(s) Summary
Signature mutation checks
redhat/src/scenarios/aperture/structure.rs
The scenario adds format-specific cases for signature-count mismatches, missing signatures, and extra signatures. Count mismatches are expected to deserialize and then fail sanitization. Missing and extra signature data are expected to fail parsing.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other · Severity of issue fixed: Low

Suggested reviewers: bmuddha

Merge Risk: Minimal · up to e66a2

This change only adjusts test fixtures for signature rejection cases. No merge-blocking risk is evident.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: signature fixtures now isolate count rejections and framing errors, which matches the structure.rs mutation changes (SignatureCount, MissingSignature, ExtraSignature) …
Description check Passed The description states that signature fixtures now isolate Legacy/V0 count mismatches, truncated payloads, and missing or extra V1 signatures, which matches the raw summary of the structure.rs changes…
Linked Issues check Passed Issue #345 has one direct, open, coding objective set. Each objective is addressed in redhat/src/scenarios/aperture/structure.rs at head e66a20f:

1. Legacy/V0 count mismatch [#345]: `Mutation::Sign…
Out of Scope Changes check Passed The PR summary and the AI-generated change summary report changes only in redhat/src/scenarios/aperture/structure.rs (+28/-5). These changes replace the Signatures mutation with SignatureCount, …
Full details: Title check

Explanation

The title names the main change: signature fixtures now isolate count rejections and framing errors, which matches the structure.rs mutation changes (SignatureCount, MissingSignature, ExtraSignature) and the linked issue #345. It is specific and follows conventional commit style.

Full details: Description check

Explanation

The description states that signature fixtures now isolate Legacy/V0 count mismatches, truncated payloads, and missing or extra V1 signatures, which matches the raw summary of the structure.rs changes. It also references the closed issue #345.

Full details: Linked Issues check

Explanation

Issue #345 has one direct, open, coding objective set. Each objective is addressed in redhat/src/scenarios/aperture/structure.rs at head e66a20f:

  1. Legacy/V0 count mismatch [#345]: Mutation::SignatureCount splices one 64-byte zero signature at offset 65 (after the first signature), sets bytes[0] = 2, and calls wincode::deserialize(&bytes)?. The parse must succeed. ensure!(tx.sanitize().is_err()) then requires sanitization to fail. The gate is SanitizeError. Both Legacy and V0 are in the matrix. The first signature and message are preserved.
  2. Legacy/V0 truncated payload [#345]: Mutation::MissingSignature sets bytes[0] = 2 and truncates to 65 + 32 bytes. The second signature needs bytes 65..129, so the packet ends before it is complete. The gate is ParseError.
  3. V1 missing or extra signature [#345]: MissingSignature truncates the final 64 bytes. ExtraSignature appends 64 zero bytes. Both keep the version prefix and message. Both expect ParseError. ExtraSignature is in the matrix for V1.

The ambiguous prior Signatures mutation no longer exists in the file. The retained checks apply to every case for both skip_preflight values: rejection code (-32602), not_admitted, unchanged, check_control with the repaired message, and the vacant-account and base-account checks. The issue's request to replay the failing seed and extra seeds is an execution task, not a coding requirement, so it is not assessed here.

Stack objectives [#345 via PR #350]: PR #350 addresses all coding objectives on its own, so no stack-level gap remains. PR #351 (uncertain) was not inspected and is not credited.

Full details: Out of Scope Changes check

Explanation

The PR summary and the AI-generated change summary report changes only in redhat/src/scenarios/aperture/structure.rs (+28/-5). These changes replace the Signatures mutation with SignatureCount, MissingSignature, and ExtraSignature, adjust the run matrix, and add the classification and wire-mutation logic for those cases. Every changed behavior maps to the signature-fixture objectives of #345. No unrelated file or mutation change is reported.

Limitation: the whole-PR text diff could not be read because the changed blobs are missing from the checkout. The out-of-scope judgment rests on the supplied summary and the head file contents. Unchanged hunks were not verified against the base line by line.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution failed

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6afdd2e and e66a20f.

Files selected for processing: 1

  • redhat/src/scenarios/aperture/structure.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@bzawisto bzawisto added the bug Something isn't working label Nov 13, 2026
@bzawisto
bzawisto marked this pull request as ready for review November 13, 2026 15:42
@bzawisto
bzawisto merged commit f57c0f4 into main Nov 13, 2026
10 checks passed
@bzawisto
bzawisto deleted the fix/345-signature-framing branch November 13, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signature fixtures can fail at the wrong rejection stage

1 participant