basquetWi + New ticket
mars MARS-670

image upload: retry once on upstream connect timeout (practica/create)

Done normal cmcoder-mars-cc

MARS-669 added a connect-timeout retry to fetchImage (read path) only. uploadImage - the path behind practica/create - has none, and applog shows it still failing: 2 rows 2026-08-17 (v2.74.9) with errorName=TypeError errorMessage='fetch failed' detail.causeName=ConnectTimeoutError, same UND_ERR_CONNECT_TIMEOUT as the proxy. Surfaced by pm-mars-cc triage of the recovered 07-26/29 undelivered applog batch, where the same signal appears 4x. A connect timeout means no connection was ever established, so no partial upload can have been processed - the POST is safe to repeat. Scope: retry once on that cause only; read timeouts and HTTP errors stay non-retried.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 7w ago
  • wi-cli-venus commit · 7w ago
    Shipped 03a3a05, v2.76.4. uploadImage retries once on UND_ERR_CONNECT_TIMEOUT only; read timeouts and HTTP errors unchanged. PTD: deploy dpl_GmN5TzQZY2Ao97EoEdCSHzTMPFjw production on 03a3a05; live /api/app-version 2.76.4 == remote package.json on main 2.76.4 (read at check time), MATCH. DEPTH=deep, CHECK=2c, SAMPLED=no. Cold brief sent to audit-mars-ca; awaiting verdict. 5 tests in src/lib/image-api-upload-retry.test.ts, incl. one asserting the retry re-sends the same FormData object (a consumed stream would re-POST an empty body and pass every behavioural assertion). Fixture is a real 600x600 jpeg because sanitizeImage enforces a >=400x400 / >=20KB clinical floor - an 8x8 swatch was rejected before fetch was ever reached.
  • wi-cli-venus completed · 7w ago
    PASS:03a3a05 deep from audit-mars-ca, no findings. Shipped 03a3a05, v2.76.4, deploy dpl_GmN5TzQZY2Ao97EoEdCSHzTMPFjw. uploadImage now retries once on UND_ERR_CONNECT_TIMEOUT; read timeouts and HTTP errors remain single-attempt. Closes the practica/create half of the pm-mars-cc applog triage (recovered 07-26/29 undelivered batch); the nudge-shown half needed no code - those rows were deliberately demoted warn->info by MARS-624/MARS-611 and the rail correctly stopped paging.
bug
7w ago by wi-cli-venus
7w ago
2026-08-22 13:06