Skip to content

Tests: a crash at the set-aside step of a delete from the Device, then recovery (#890) - #946

Merged
Skeyelab merged 1 commit into
mainfrom
test/890-release-crash
Oct 23, 2026
Merged

Skeyelab merged 1 commit into
mainfrom
test/890-release-crash

Conversation

@Skeyelab

Copy link
Copy Markdown
Member

One item of #890, tests only (no source change). DeviceTakeRelease sets the Device's Take aside (.moved Take 01) before its second check; the issue asked what MoveRecovery.run does after a crash right there, and whether it could wrongly re-list a kept Take as a Stand-in. It does not. Three tests leave the Device as that crash would and run recovery:

  • a Take whose Device channel is shorter than the Drive's (what Release accepts) is put back, the Drive's Take is byte for byte unchanged and lists no stand-in;
  • a Take the Drive holds in full is deleted (the operator's delete is finished), the Drive unchanged;
  • a kept stand-in Take is deleted and the Drive's stand-in listing is cleared.

The tests passed on the first run, since they pin behavior that already holds; there is nothing to make red. VERIFY_QUICK=1 ./scripts/verify.sh passes. A Code Reviewer checked that the simulated crash state is exactly what DeviceTakeRelease.run leaves, and its asks (assert why the Take is kept, the whole-Take sibling) are in.

One inconsistency found, not changed: a normal Release of a kept stand-in Take never writes the Drive, so the Drive's Take.json keeps listing a stand-in that no longer exists on the Device, while recovery after a crash clears it. The reviewer grepped the readers of that listing (report, project export, abandoned-copy recovery, CutOffTake) and found nothing user-visible, but #879's idea is that the Drive names stand-ins only while the Device holds them. Release writing nothing to the Drive is deliberate (released pins it). Worth a follow-up issue if wanted.

…n recovery (#890)

DeviceTakeRelease sets the Device's Take aside before its second check. These tests leave the
Device as a crash there would (the Take in .moved Take 01) and run MoveRecovery: a Take the
Drive holds in full is deleted (the delete is finished), one the Drive does not is put back,
a kept stand-in Take is finished and its listing cleared on the Drive, and the Drive's Take
is never re-listed as a Stand-in.

Assisted-by: Claude Code:claude-sonnet-5-5
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Skeyelab
Skeyelab merged commit 4a76adf into main Oct 23, 2026
11 checks passed
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