Skip to content

V-L2-C4: remove the wontfix tamper-evidence test (it asserts the bug) #30

Description

@hyperpolymath

Context

tests/integration_test.rs::test_provenance_chain_integrity_multi_step
contains an assertion that bakes in the current broken behaviour:

let mut tampered = update1.clone();
tampered.actor = "evil-mallory".to_string();
assert!(
    tampered.verify(),
    "Actor is not part of hash — tamper to actor alone is invisible"
);

Once V-L2-C1 lands and includes actor in the hash, this assertion
will fail (correctly). The test must be flipped — the new comment
should say "Actor IS part of the hash; tamper to actor breaks
verification."

What to do

After V-L2-C1 merges:

  1. Delete the four lines quoted above.

  2. Replace with:

    let mut tampered = update1.clone();
    tampered.actor = "evil-mallory".to_string();
    assert!(
        !tampered.verify(),
        "Tampering with actor must break verification"
    );
  3. Verify cargo test is green.

Acceptance

  • The wontfix assertion is gone
  • Replacement asserts the correct (post-V-L2-C1) behaviour
  • cargo test green

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaves incorrectly

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions