82 lines
3.2 KiB
Markdown
82 lines
3.2 KiB
Markdown
# QA Results — m9-retroactive-purge
|
||
|
||
## Summary
|
||
|
||
All QA gates passed. The retroactive signal purge feature is verified correct across unit and integration test suites.
|
||
|
||
## Test Execution
|
||
|
||
### Library Unit Tests
|
||
|
||
```
|
||
cargo test --manifest-path tidal/Cargo.toml --lib
|
||
```
|
||
|
||
**Result:** 1299 passing, 0 failed, 0 ignored
|
||
|
||
Relevant unit test suites:
|
||
- `cohort::purge::tests` — 5 tests (purge_retracts_from_ledger, second_purge_noop, manifest_entries_correct, manifest_json_round_trip, purge_unknown_cohort_empty_manifest)
|
||
- `cohort::contribution::tests` — ContributionLog push/drain/eviction semantics
|
||
- `cohort::ledger::tests` — retract(), lambdas_for(), drain_community_into()
|
||
- `signals::hot::tests` — subtract_contribution floors at 0.0
|
||
- `signals::warm::tests` — subtract_bucket floors at 0
|
||
|
||
### Integration Tests
|
||
|
||
```
|
||
cargo test --manifest-path tidal/Cargo.toml --test m9_retroactive_purge
|
||
```
|
||
|
||
**Result:** 8 passing, 0 failed
|
||
|
||
| Test | Outcome |
|
||
|------|---------|
|
||
| `basic_purge_retracts_score` | PASS — cohort score decreases after purge |
|
||
| `second_purge_is_idempotent` | PASS — empty contribution log on second purge; score unchanged |
|
||
| `purge_does_not_affect_other_users` | PASS — user B's contribution intact after purging user A |
|
||
| `manifest_persisted_and_listable` | PASS — manifest appears in list_purge_manifests; two purges = two manifests |
|
||
| `purge_unknown_cohort_is_noop` | PASS — empty manifest, no error |
|
||
| `score_never_goes_negative` | PASS — score >= 0.0 floored by subtract_contribution |
|
||
| `multiple_items_purged_together` | PASS — manifest contains entries for all signalled items |
|
||
| `non_cohort_member_purge_is_noop` | PASS — fr_user in en_users cohort is no-op; score unchanged |
|
||
|
||
### Code Quality
|
||
|
||
```
|
||
cargo fmt --manifest-path tidal/Cargo.toml -- --check
|
||
```
|
||
**Result:** Clean — no formatting issues
|
||
|
||
```
|
||
cargo clippy --manifest-path tidal/Cargo.toml -D warnings
|
||
```
|
||
**Result:** Clean — no warnings
|
||
|
||
```
|
||
cargo build --manifest-path tidal/Cargo.toml
|
||
```
|
||
**Result:** Clean — no errors or warnings
|
||
|
||
## QA Plan Coverage
|
||
|
||
| QA Scenario | Test | Result |
|
||
|-------------|------|--------|
|
||
| QA-1: Contribution log populated on signal_with_context | `basic_purge_retracts_score` | PASS |
|
||
| QA-2: Purge retracts from live cohort ledger | `basic_purge_retracts_score` | PASS |
|
||
| QA-3: Score never goes negative | `score_never_goes_negative` | PASS |
|
||
| QA-4: Second purge is idempotent | `second_purge_is_idempotent` | PASS |
|
||
| QA-5: Only target user's contributions retracted | `purge_does_not_affect_other_users` | PASS |
|
||
| QA-6: Manifest persisted to durable storage | `manifest_persisted_and_listable` | PASS |
|
||
| QA-7: list_purge_manifests retrieves persisted manifests | `manifest_persisted_and_listable` | PASS |
|
||
| QA-8: Multiple items purged in one request | `multiple_items_purged_together` | PASS |
|
||
| QA-9: Unknown cohort returns empty manifest | `purge_unknown_cohort_is_noop` | PASS |
|
||
| QA-10: Non-member purge is no-op | `non_cohort_member_purge_is_noop` | PASS |
|
||
|
||
## Regression Check
|
||
|
||
All prior test suites remain green after this feature's changes to `db/mod.rs`, `db/signals.rs`, and cohort internals. The 1299 lib tests include all regression coverage from M1–M8.
|
||
|
||
## Verdict
|
||
|
||
**PASSED** — Ready to merge.
|