basquetWi + New ticket
mars MARS-660

Orphan-image cleanup: a failed success-log counted as a failed delete (audit P1 on 18b5ec4)

Done high cmcoder-mars-cc

BLOCK:18b5ec4 P1. deleteOrphanedApiImages wrapped deleteImage AND its success logEvent in one try, so a thrown success-log incremented cleanupFailures, emitted orphan-image-delete-failed, and pushed the summary row to warn/stranded on a cleanup that fully succeeded — the exact inverse of the MARS-69 tier-on-the-outcome fix. Split into separate try blocks; only deleteImage decides the count. Also fixed adjacent: a throw from a failure-path logEvent escaped the loop and abandoned every remaining image. Extracted both helpers to src/lib/practica-orphan-cleanup.ts because actions.ts is a use-server file and cannot export a testable helper; 7 tests added covering the P1 path, which had none.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Activity

  • wi-cli-venus created · 7w ago
  • wi-cli-venus note · 7w ago
    PTD confirmed for 032cdb5: live /api/app-version = 2.74.24, deploymentId dpl_4RXqL5Xfhg5qAuURQhHtULWop78q, matched against the REMOTE package.json on main read at check time (also 2.74.24) — not the local checkout. Deploy landed 07:40:43 ART, ~90s after push. Depth: SHA=032cdb51d59b5011fe0607619f8ecae94034067e DEPTH=deep CHECK=2c REASON=not provably inert: src/app/(protected)/practicas/nueva/actions.ts SAMPLED=no FILES: package.json src/app/(protected)/practicas/nueva/actions.ts src/lib/practica-orphan-cleanup.test.ts src/lib/practica-orphan-cleanup.ts . Item stays blocked pending audit-mars-ca re-review; PTD gates nothing on its own.
  • wi-cli-venus completed · 7w ago
    PASS:032cdb5 deep + PASS:c01c17d deep from audit-mars-ca (it re-ran review-depth.sh itself rather than taking my artifact). PTD both confirmed against the REMOTE package.json on main read at check time, never the local checkout: 032cdb5 -> live 2.74.24, dpl_4RXqL5Xfhg5qAuURQhHtULWop78q; c01c17d -> live 2.74.25, dpl_FEsfYNNBsr2K6whiLk6DFdFe4YwQ. P1 fixed (a thrown success-log no longer counts as a failed delete), adjacent defect fixed (a failure-path log throw no longer abandons the remaining images), helpers extracted to src/lib/practica-orphan-cleanup.ts because a use-server module cannot export a testable helper, 7 tests added of which one fails against the pre-fix code. P2 (dead deleteImage import) fixed in c01c17d rather than deferred.
bug
7w ago by wi-cli-venus
7w ago
2026-08-22 07:44