Prefer parsed server body limit over raw sentBytes when ratcheting budget
main·
Commit

When a server rejects a push with an explicit "body exceeded size limit N" message, that N is authoritative. The earlier code ratcheted selfImposedBudget down to raw sentBytes on every non-self-aborted failure, ignoring the parsed limit. With reverse proxies that reject the request after only a few MiB even though the actual cap is much higher (e.g. 100 MiB), the budget would lock onto that early-cutoff floor and over-subdivide on every subsequent run.
Extract the budget-ratchet decision into nextSelfImposedBudget and prefer the parsed server limit when available, falling back to sentBytes only when no parseable number was provided (e.g. Cloudflare HTML 413 pages). Budget still only ratchets down — never up.
Entire-Checkpoint: 566f7af7d862
Checkpoints
can you rebase soph/progress-indicators onto soph/smart-subdivision
Claude CodeOpus 4.7[1m]
View sessionCheckpoint 1
Checkpoint 1