Skip to content

Regression tests pinning the zero-deletion safety boundary #296

Description

@rfsbraz

Description

Nothing in the test suite asserts the single most important property of a deletion tool: when inputs are degraded, deleterr deletes NOTHING.

There is no test that empty/failed Tautulli watch activity yields zero deletions (#287), none that an mdblist fetch failure skips the library (#288), and the Trakt fail-safe behavior only recently gained coverage. These paths guard irreversible actions and currently rely on review vigilance instead of CI.

Proposed Tests

  • Empty Tautulli activity => zero deletions, library flagged, loud log
  • Partial/failed history pagination => fail safe, zero deletions
  • mdblist/Trakt fetch raising => library skipped, zero deletions, counted as failed
  • Dry run => state file byte-identical afterwards (Dry-run mutates the persistent state file #291)
  • A shared "no deletions happened" assertion helper so future safety fixes land with their boundary pinned

Notes

Best landed alongside the fixes for #287/#288/#291, but the helper and the already-safe paths can go in first - they document today's intended safety contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions