fc38c4cb5d
Two harness-side bugs that made a broken wn silently look like a working one: 1. whitenoise-skip-unprocessable-retry.patch's hunk header declared `@@ -178,7 +178,23 @@` but the new side only has 22 lines. GNU patch bails with "malformed patch at line 26" and leaves the target file untouched. Fix the count to +178,22 so the patch actually applies. 2. setup.sh's patch-apply loop piped `patch` through `tee`, which masked patch's exit code behind tee's. A miscounted hunk therefore still touched the `.headless-patched-*` marker and the next run skipped the "patch" step entirely, so the resulting wn ran the stock 10-retry exponential backoff on every MlsMessageUnprocessable — ~17min per event, which pegs the per-account serial event processor and makes every later test timeout "just because". Check patch's real exit status; fail preflight loudly instead. Same class of bug was also hiding cargo build failures: the `cargo build ... | tee` pipeline reported success even when rustup couldn't fetch the toolchain manifest (503 from static.rust-lang.org) or cargo couldn't hit the crates.io index (503 from fastly). setup.sh then `info`-logged the expected binary paths and happily moved on — until the daemon launch tripped over `nohup: No such file or directory`. Now each cargo build runs in a 4-attempt retry loop that terminates only when the binary actually exists on disk, and fails preflight loudly if it never materialises. Matches the jitpack 503 retry behaviour already in place for `:cli:installDist`. https://claude.ai/code/session_018kSBco5VVfctkW6vAm7NzA
27 lines
1.4 KiB
Diff
27 lines
1.4 KiB
Diff
--- a/src/whitenoise/event_processor/account_event_processor.rs
|
|
+++ b/src/whitenoise/event_processor/account_event_processor.rs
|
|
@@ -178,7 +178,22 @@
|
|
}
|
|
Err(e) => {
|
|
// Handle retry logic for actual processing errors
|
|
- if retry_info.should_retry() {
|
|
+ // marmot-interop-headless patch: MLS errors that come from
|
|
+ // mdk are ALREADY terminal — mdk doesn't retry internally, so
|
|
+ // any Err it returns (Unprocessable, PreviouslyFailed, decrypt
|
|
+ // failure, group-not-found, etc.) is provably permanent.
|
|
+ // Retrying those 10 times with exponential backoff (total
|
|
+ // ~17 min) just blocks later decryptable commits behind a
|
|
+ // queue of doomed retries, so every later join / rename /
|
|
+ // leave propagation races the test timeout. Treat them all
|
|
+ // as one-shot: log once, move on.
|
|
+ let is_terminal = matches!(
|
|
+ e,
|
|
+ WhitenoiseError::MlsMessageUnprocessable(_)
|
|
+ | WhitenoiseError::MlsMessagePreviouslyFailed
|
|
+ | WhitenoiseError::MdkCoreError(_),
|
|
+ );
|
|
+ if !is_terminal && retry_info.should_retry() {
|
|
self.schedule_retry(event, source, retry_info, e);
|
|
} else {
|
|
tracing::error!(
|