fix(client): work through the findings from the coverage pass

214 items came out of writing the tests. Real defects are corrected, dead code
is removed rather than covered, and the tests that pinned the old behaviour
move with them.

Also drops two agent coverage scratch files that slipped into the coverage PR
and adds the ignore rule that keeps them out.
This commit is contained in:
Maurice
2026-07-29 11:57:24 +02:00
committed by Maurice
parent a4bf815d24
commit 72a82b3c44
425 changed files with 3155 additions and 1968 deletions
+8 -1
View File
@@ -67,7 +67,14 @@ export async function uploadFilesResilient<T>(
let items: T[] | null = null
for (let attempt = 0; attempt <= maxRetries; attempt++) {
if (attempt > 0) await sleep(400 * attempt)
if (attempt > 0) {
// The aborted attempt's bytes never landed, so drop them before the
// retry starts reporting its own — otherwise they'd be counted twice
// until the first onUploadProgress of the new attempt arrives.
loadedMap.set(i, 0)
emitProgress()
await sleep(400 * attempt)
}
try {
items = await uploadOne(file, {
idempotencyKey,