Harden check_vendored_sync.sh curl calls against transient failures - #671
Harden check_vendored_sync.sh curl calls against transient failures#671realmarcin wants to merge 4 commits into
Conversation
Add --retry 3 --retry-delay 2 --max-time 30 to both curl calls, matching the fix propagated from culturebotai-claw's canonical shared/spoke copy (culturebotai-claw#88, CultureMech#298). Does not add the history.yaml MAPPED entry that the canonical copy now carries: scripts/.vendored_canon_ref here still pins a hub commit that predates history.yaml existing in the hub, so the entry would 404 rather than catch real drift. Tracked separately: #670.
…ttempt --max-time resets on every --retry attempt, so the prior fix (--retry 3 --retry-delay 2 --max-time 30) could take up to (1 + 3) x 30s + 3x2s ~= 126s per curl call, not the ~30s the flags suggest — empirically confirmed against a blackholed address and independently flagged by dynamic-review on TraitMech#492 and proteintraitsmech#525. With 6 sequential calls per invocation and this repo's own outer retry loop around the whole script, worst case could exceed the CI job's timeout — worse than before the retry flags were added. Replace with --max-time 10 --retry 2 --retry-delay 1 --retry-max-time 15, which bounds the whole retry sequence via --retry-max-time rather than relying on --max-time alone.
|
Round-2 fix pushed for the same nested-retry timing issue independently flagged on TraitMech#492: replaced |
… attempt dynamic-review on TraitMech#492 caught that --retry-max-time only gates the DECISION to start a new retry, not an already-in-flight attempt's duration — so --max-time 10 --retry 2 --retry-delay 1 --retry-max-time 15 still costs ~21s worst case per call (10s + 1s delay + 10s), empirically confirmed. With 6 sequential calls and this repo's own outer 3-attempt/5s-backoff loop around the whole script, worst case was still ~388s against a 5-minute job timeout. The workflow's own retry loop already exists specifically to handle transient failures across whole script invocations. Script-level --retry was redundant with it and is what caused the compounding. Drop it: --max-time 10 alone bounds each call, giving a worst case of 6 x 10s = 60s per invocation, ~190s with the outer retry loop — comfortable margin under 300s.
|
Round-3 fix pushed: dropped |
dynamic-review on MediaIngredientMech#428: the --retry decision (and why it was reverted) lived only in PR descriptions, not the script itself. Since this file is vendored byte-identical across the spokes and edited rarely, a future editor had no in-repo signal against re-adding --retry flags to "improve" resiliency and reintroducing the timeout risk already found and reverted once.
|
Propagated the same documentation comment added to MediaIngredientMech#428 (explaining why this script deliberately has no |
Summary
Propagates culturebotai-claw#88's hardening of the canonical `check_vendored_sync.sh` (CultureMech#298): adds `--max-time 10` to both `curl` calls, bounding each fetch instead of letting it hang indefinitely.
Retry history: an earlier revision of this PR (and the canonical claw source) also added `--retry`/`--retry-delay`/`--retry-max-time` flags. dynamic-review caught that curl's `--retry-max-time` only gates the decision to start a new retry, not an in-flight attempt — so the worst case still exceeded this workflow's 5-minute job timeout once combined with `vendored-sync.yaml`'s own outer 3-attempt/5s-backoff retry loop (which already exists to handle transient failures across whole script invocations). Final fix drops `--retry` entirely: `--max-time 10` alone, relying on the outer loop for retries.
Does not add the `history.yaml` MAPPED entry the canonical copy now carries — `scripts/.vendored_canon_ref` here still pins a hub commit (`6be694f3`) that predates `history.yaml` existing in the hub, so the entry would 404 rather than catch real drift. This repo's local `history.yaml` is currently byte-identical to the hub's current copy regardless. Tracked separately: #670.
Test plan