A deadline is not size evidence, for provenance as well as classification

main

Commit

nodo4d ago

A target that drains the body and then times out — GitHub's 408 shape — leaves abortedEarly false and sentBytes above zero, so the budget ratcheted to those bytes AND recorded itself as a measured server cutoff. That flag gates escalation and is cleared only by a later parseable 413, so one deadline disabled the feature for the remainder of the run: exactly the wrong outcome on the flaky multi-GiB targets this path exists to serve.

It also contradicted the design's own principle. Classification already treats a deadline as availability rather than size; provenance was treating the same error as measured size evidence. The ratchet stays — smaller packs genuinely do finish inside the window, so the smaller budget is useful information about time — but it no longer masquerades as a size limit.

Pinned by a run that takes a one-shot 413 announcing 1 MiB, then a drain-then-408 on a divisible span, and must still escalate an indivisible span afterwards. Without the fix it fails with the same "aborted early: projected to exceed target body limit" the reviewer's probe produced.

The pre-flight subdivide had the same asymmetry the previous commit fixed after a failed push: subdivideCheckpoints splits every remaining gap, so a splittable later gap grew the list and re-planned an identical checkpoint even for a span that cannot shrink. Cheap there — a 12-byte header read, then Close — but the same shape, so it is closed the same way, which also sidesteps comparing the estimate against TargetMaxPack rather than the ceiling an indivisible span is actually pushed at.

Docs: the sentinel's comment claimed a Bootstrap method the root package does not have (it is unstable.Client.Bootstrap, and that comment is the mirror worker's contract); Plan, Sync and Replicate now document that the result is populated on error, what may be read from it, and that a validation or config failure still returns a zero result; and a duplicated doc comment from the rebase is removed.

Entire-Checkpoint: 01M1CG7DAC6WEPQGWG55D25GN4

Checkpoints

Fix Interrupted Batched Bootstrap Resume

Claude CodeOpus 5
View session
Checkpoint 1

Do not re-push an indivisible span while later gaps still split

Claude CodeOpus 5.[1m]
View session
Checkpoint 1