test(ha-entity-snapshots): RED test for the rotation guard (task 4.2)

A checkpoint file whose position matches an in-flight peer transfer
(task 4.1's snapshot_inflight_lsn[]) must survive rotate_snapshots even
when snap_keep_n would otherwise delete it. Genuinely fails today (file
removed, access() returns -1) since rotate_snapshots has no awareness of
in-flight transfers yet.

Executed directly (no subagent dispatch) per the hybrid execution-mode
decision -- small, single-file, isolated test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JDYFbrgyDHbvNYcxApKhrX
This commit is contained in:
Rongsong Shen 2026-07-01 07:34:37 +00:00
parent 164c9a9d2e
commit 221d86788d
2 changed files with 57 additions and 1 deletions

View file

@ -57,7 +57,7 @@
goes out and cleared after completion
- _Requirements: 3.1, 3.2, 3.3_
- _Boundary: HA Replication Layer_
- [ ] 4.2 RED: rotation-guard test
- [x] 4.2 RED: rotation-guard test
- Assert a checkpoint file whose position matches an in-flight transfer survives file rotation
even when it would otherwise be rotated out
- Observable: new test compiles and fails (RED) against the current rotation logic