Skip to content

fix(tests): strengthen checksum verification assertion against regression#48

Merged
jamesadevine merged 2 commits intomainfrom
copilot/fix-checksum-test-assertion
Mar 17, 2026
Merged

fix(tests): strengthen checksum verification assertion against regression#48
jamesadevine merged 2 commits intomainfrom
copilot/fix-checksum-test-assertion

Conversation

Copy link
Contributor

Copilot AI commented Mar 17, 2026

The positive-only checksum assertion would pass even with the old regressed pattern (sha256sum -c checksums.txt --ignore-missing | grep -q ": OK"), since it's a substring match.

Changes

  • tests/compiler_tests.rs: Add a negative assertion alongside the existing positive check to explicitly reject the grep -q pipe pattern:
assert!(
    template_content.contains("sha256sum -c checksums.txt --ignore-missing"),
    "Template should verify checksum using checksums.txt"
);
assert!(
    !template_content.contains("grep -q"),
    "Checksum verification should not pipe through grep"
);
Original prompt

This section details on the original issue you should resolve

<issue_title>fix: strengthen checksum test assertion to guard against regression</issue_title>
<issue_description>The checksum test assertion in tests/compiler_tests.rs:148 is weaker than intended:

ust template_content.contains("sha256sum -c checksums.txt --ignore-missing")

This substring match would also pass against the old pattern (sha256sum -c checksums.txt --ignore-missing | grep -q ": OK"), so it doesn't guard against regression.

Suggested fix: Add a negative assertion alongside the positive check:

ust assert!( template_content.contains("sha256sum -c checksums.txt --ignore-missing"), "Template should verify checksum using checksums.txt" ); assert!( !template_content.contains("grep -q"), "Checksum verification should not pipe through grep" );

From PR #43 review feedback.
</issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…ssion

Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix checksum test assertion to guard against regression fix(tests): strengthen checksum verification assertion against regression Mar 17, 2026
Copilot AI requested a review from jamesadevine March 17, 2026 15:01
@jamesadevine jamesadevine marked this pull request as ready for review March 17, 2026 16:01
@jamesadevine jamesadevine merged commit 7fcabe2 into main Mar 17, 2026
6 checks passed
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.

fix: strengthen checksum test assertion to guard against regression

2 participants