Context
Once V-L2-C1 lands, tampering with actor, before_snapshot, or
transformation must break verify(). Today only operation,
entity_id, timestamp, and previous_hash are protected.
What to do
In src/abi/mod.rs::tests add three parallel positive cases:
#[test]
fn test_provenance_tamper_actor() {
let mut e = ProvenanceEntry::genesis("post-1", "alice");
e.actor = "mallory".to_string();
assert!(!e.verify(), "actor must participate in the hash");
}
#[test]
fn test_provenance_tamper_before_snapshot() {
let mut e = ProvenanceEntry::genesis("post-1", "alice");
e.before_snapshot = Some("{\"redacted\":true}".to_string());
assert!(!e.verify(), "before_snapshot must participate in the hash");
}
#[test]
fn test_provenance_tamper_transformation() {
let mut e = ProvenanceEntry::genesis("post-1", "alice");
e.transformation = Some("evil-rewrite".to_string());
assert!(!e.verify(), "transformation must participate in the hash");
}
Plus a round-trip test: build genesis → chain → chain → chain;
assert each entry verifies; mutate each entry in turn and assert
the mutation breaks verify().
Acceptance
Context
Once V-L2-C1 lands, tampering with
actor,before_snapshot, ortransformationmust breakverify(). Today only operation,entity_id, timestamp, and previous_hash are protected.
What to do
In
src/abi/mod.rs::testsadd three parallel positive cases:Plus a round-trip test: build genesis → chain → chain → chain;
assert each entry verifies; mutate each entry in turn and assert
the mutation breaks
verify().Acceptance
every single mutation