remediation: unify-test-helpers
status: COMPLETED
phase: VERIFY

problem: 9 duplicate create_assertion/create_test_assertion factory functions across 8 files
solution: Created stemedb-core::testing module with AssertionBuilder + factory functions

audit:
  instances_found: 9
  files_affected: 8
  patterns:
    - "create_assertion(subject, timestamp)" # recency.rs
    - "create_assertion(subject, value, timestamp)" # consensus.rs, vote_aware_consensus.rs
    - "create_assertion(subject, confidence, timestamp)" # authority.rs
    - "create_assertion(subject, confidence, agent_id, timestamp)" # trust_aware_authority.rs
    - "create_test_assertion(subject, predicate, lifecycle)" # engine.rs, query.rs
    - "create_assertion(subject, predicate, value, timestamp)" # materializer.rs
    - "create_signed_assertion(subject, predicate)" # worker.rs (crypto)

fix:
  created:
    - crates/stemedb-core/src/testing.rs
  modified:
    - crates/stemedb-core/src/lib.rs
    - crates/stemedb-lens/src/recency.rs
    - crates/stemedb-lens/src/consensus.rs
    - crates/stemedb-lens/src/authority.rs
    - crates/stemedb-lens/src/vote_aware_consensus.rs
    - crates/stemedb-lens/src/trust_aware_authority.rs
    - crates/stemedb-query/src/engine.rs
    - crates/stemedb-query/src/query.rs
    - crates/stemedb-query/src/materializer.rs
    - crates/stemedb-ingest/src/worker.rs

verify:
  tests: 164 passed, 0 failed
  clippy: 0 warnings (deny level)
  fmt: clean
