test(peer-cli): cover streamed retry fallback
NEXT_STEPS item 5 needs streamed installs to have an explicit retry policy. The handler already retries whole-stream attempts across the majority-validated peer set, so add S42 to prove that behavior with the Docker harness instead of leaving it implicit. S42 starts two catalog-version-matching `cnctw` sources. The first source sorts first in retry order but has `--unrar /missing-unrar`, so its stream attempt fails before sending chunks. The second source then completes a fresh whole-stream attempt. The scenario asserts local-only installed state, no root archive or sentinel, no `.local.installing` staging leftover, chunk events only from the good source, matching streamed byte count, and SHA-256 payload equality against the good source's `unrar p`. This pins the current policy: retry the entire stream from another validated peer, do not preserve partial files across attempts, and do not promise byte-offset resume. Test Plan: - python3 -m py_compile crates/lanspread-peer-cli/scripts/run_extended_scenarios.py - python3 crates/lanspread-peer-cli/scripts/run_extended_scenarios.py S42 - git diff --check - git diff --cached --check Refs: NEXT_STEPS.md item 5
This commit is contained in:
+6
-7
@@ -38,14 +38,13 @@ product-ready.
|
||||
step: add catalog-owned archive or extracted-file SHA-256 hashes, then verify
|
||||
those at the receiver before commit.
|
||||
|
||||
5. **Upgrade retry/resume semantics**
|
||||
5. **Done — Upgrade retry/resume semantics**
|
||||
|
||||
Right now, failed stream means failed operation and rollback. Next useful
|
||||
step:
|
||||
|
||||
- retry whole stream from another trusted peer
|
||||
- later, maybe keep completed files and restart only the interrupted file
|
||||
- avoid byte-offset resume until there’s a strong reason
|
||||
Streamed install attempts now use the same majority-validated peer set as
|
||||
normal downloads, and each failed attempt rolls back its staging transaction
|
||||
before trying the next peer. S42 pins the policy: retry the whole stream from
|
||||
another validated peer, keep no partial files across attempts, and do not add
|
||||
byte-offset resume until there is a strong reason.
|
||||
|
||||
6. **Expand scenario coverage**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user