Two Classes of Section, Two Policies
Once you accept that a corpus is an allocation, the sections sort themselves into two kinds. Some are small, unique and irreplaceable: a handful of temperature readings, two articles read in full, yesterday's summary. Others are bulky, repetitive and elastic: headlines, of which there are always more and each of which adds a little.
These deserve opposite policies. The small unique sections should be reserved in full, because a fraction of them is nearly worthless — half a temperature reading tells you nothing. The bulky elastic section should take whatever remains and stop cleanly, because it degrades gracefully by construction: fewer headlines is a smaller survey, not a broken one.
Within the Elastic Section, Order Matters Too
Having reserved the fixed sections, you still have to decide how the remaining allowance is spent among many shelves. The natural implementation walks shelf by shelf, and it reproduces the original bug one level down: the first few shelves are fully represented and the last several are entirely absent.
Round-robin by rank fixes it. Take every shelf's top headline, then every shelf's second, and so on. Running out of budget then costs each topic a little depth rather than erasing whole topics — and for a survey of the day, a missing subject is a far bigger defect than slightly thinner coverage of each one.
Continuity for Free
One reserved section deserves special mention because it is a spending decision disguised as a feature. "What changed since yesterday" is a genuinely useful thing for a daily brief to say, and the obvious implementation is a second generation that diffs two days. That would double a standing cost.
It is also unnecessary, because it is the same question this generation is already answering. Including yesterday's brief as a reserved section costs a few hundred characters and no additional call. The model can then say what has moved — and, usefully, what it got wrong yesterday. Before adding a generation step, check whether the answer is already reachable inside the one you are about to make.
Protect the Reservation With a Test That Floods
A reservation is only real if something enforces it. The test that matters does not check a normal day; it deliberately floods the elastic section with far more content than the budget allows, and then asserts the reserved sections are still present and intact. That test fails on the original implementation and passes on the budgeted one, which is exactly what a regression test for this class of bug should do.