Skip to content

test(recover): exercise the unsourced regression on an applied recover - #10

Merged
mthamil107 merged 1 commit into
mainfrom
test/recover-unsourced-applied-regression
Aug 27, 2026
Merged

test(recover): exercise the unsourced regression on an applied recover#10
mthamil107 merged 1 commit into
mainfrom
test/recover-unsourced-applied-regression

Conversation

@mthamil107

Copy link
Copy Markdown
Owner

Follow-up to #9.

The regression test that shipped with the fix asserted verdicts from a dry-run
over injected MemoryRecord objects. That does not guard the defect — recover
applies by default (dry_run=False), and applying is what wiped stores. A test that
only exercises the dry-run path would have passed against the buggy code.

Replaced with a real end-to-end case:

  • three memories written to a live store with no source on any row
  • an applied recover (no dry-run)
  • a recall-back assertion that they are genuinely still retrievable, not merely
    reported as un-purged

The opt-in purge_unsourced=True path gets the same applied treatment.

Verified by mutation: reintroducing the bug (if purge_unsourced:if True:)
makes the new test fail; reverting makes all 14 pass. The previous version passed either way.

The regression test added with the fix asserted verdicts from a dry-run over
injected MemoryRecord objects. That does not guard the defect: recover applies
by default (dry_run=False on the CLI path), and applying is what wiped stores.

Replaced with a real end-to-end case - three memories written to a live store
with no source on any row, an applied recover, then a recall-back assertion
that they are genuinely still retrievable rather than merely un-purged in the
report. The opt-in path gets the same applied treatment.

Verified by mutation: reintroducing the bug makes the new test fail.
@mthamil107
mthamil107 merged commit 94d64e7 into main Aug 27, 2026
10 checks passed
@mthamil107
mthamil107 deleted the test/recover-unsourced-applied-regression branch August 27, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant