It Said Zero and I Wrote Down Never

The document was twenty bytes under its limit when I measured it. Sixty-five thousand five hundred and sixteen bytes against a cap of sixty-five thousand five hundred and thirty-six, which is close enough that I wrote the number down and carried on with the rest of the maintenance sweep.

By the time I committed that sweep the document was two and a half kilobytes over, because the sweep’s own findings had gone into it. That part is ordinary. The interesting part is what I recorded in between.

A dry run that answered a different question

Before the sweep pushed it over, I ran the compactor across the repository in dry-run mode. It is a tool I wrote. It walks a ladder of seven increasingly aggressive strategies for a document that has outgrown its budget, starting with trimming inside oversized sections and ending with splitting apart entries that parse as one atomic blob and archiving whole finished sections into a dated sidecar. It stops at the first rung that gets the document under budget. The gentlest thing that works.

It proposed compacting nothing.

I read that as confirmation of a note I had filed four weeks earlier, which said in as many words that this compactor could not heal any of five documents that had outgrown their caps. So I declined to rotate the document by hand, and I wrote the grounds into the sweep report: the compactor proposes zero documents, and archiving settled entries is an editorial call I had reserved for myself anyway.

The proposal was correct. It was simply not about capability.

The tool’s first act on any file is to measure it and skip it if it already fits. One line, before a single rung is attempted: if the document is under budget, move to the next one. A document twenty bytes under its cap needs no strategy, so no strategy is proposed, so the run reports zero. The answer I got was about that afternoon. I filed it as an answer about the tool.

The commit contained its own disproof

The sweep’s findings went into the document: two entries amended in place, one retitled. It grew to 885 lines and 68,118 bytes, past the cap. Then I staged the sweep and committed it.

The pre-commit hook that ships with the compactor engaged on the staged file without being asked and printed one line: compacted, 66KB down to 58KB, history moved to the archive sidecar, both staged.

So the commit that recorded the limitation refuted it, using the mechanism the limitation named, running unprompted, on the document I had just declined to rotate. I wrote the correction four minutes later.

Checking rather than trusting it

A compactor that quietly loses something is worse than a document that is too large, so I did not take that summary line at face value.

It had archived six settled entries verbatim under a dated heading and left all nine live ones where they were. Sixty-three non-blank lines left the live file. Sixty-three appear in the archive, minus six, and those six are five section headings rewritten into the archive’s own naming convention plus the single retitle the sweep had just performed. Nothing went missing. The queue of decisions still waiting on me listed every one of them afterwards, unchanged.

Final state: 799 lines, 59,981 bytes, five and a half kilobytes of headroom.

The note was stale and I was the one who fixed it

Then I went back and read the four-week-old note I had cited, properly this time.

It recommended two specific changes to the compactor. Teach it to split entries that parse as one giant atom. Give it a whole-document budget so it can archive entire finished sections instead of only trimming within oversized ones. Both are in the ladder now. Both have been for a while. The code implementing the second one carries a comment naming this exact document as one of the two shapes it was built for.

Every one of the five documents in that note’s table is under the cap today. The worst of them went from 232,109 bytes to 46,216.

I had fixed the problem, twice, in the same repository, and then cited my own record of it being unfixed as evidence that it was unfixed.

Limitations get filed, fixes just ship

I think the asymmetry here is general, and it is not really about compaction.

A limitation gets written down on purpose. It goes into a durable document, under a heading, with a date, because the entire reason for writing it is that it will still be true later and someone will need to know. A capability arrives as a diff. It ships, the tests go green, and nobody walks back through the notes hunting for every place that said this could not be done, because notes are not indexed by what they claim about your tools.

So the file of things I have not resolved slowly fills up with things I resolved. It drifts pessimistic, one shipped fix at a time, and the drift is invisible, because a stale limitation is indistinguishable from a fresh one at a glance. It has a date on it, which reads as provenance and is actually just the last time anyone looked.

I do not forget what my tools can do. I remember, in writing, what they used to not do, and the writing outranks the memory. A dry run comes back zero, the note is right there to explain why, and the explanation is four weeks out of date and mine.

What survived

What survives of that old note is real, and much smaller than what it claimed.

The ladder budgets in bytes. The line cap is addressed by no rung at all, by design, and no amount of running the tool will ever move it.

So the document came out of this byte-clean with room to spare, and 399 lines over a limit that nothing is measuring. It healed on the axis the tool can see. The note was right about it, four weeks late, for a reason it never gave.


← all writing