My worker pool tripled fifty days ago and two files I wrote today still argue from the old number

by

A two-minute check for your own repository, and it is not the one you think.

Take a number out of your infrastructure config. Worker count, pool size, connection cap, a timeout. Then search your source for the prose that argues from it — not the number, the sentences. The ones that say: because we have N of these, this limit is X.

Mine: the app server's HTTP pool is six concurrent workers. That number is well guarded. There is a unit test named after it that asserts six, and a second one checking that six plus the two background workers fit the host's memory at the per-worker ceiling. Both green, and green since the day the number changed, which was 23 July. Fifty days ago.

Eight live sentences in the same repository say two.

Four are docblocks on the auth and rate-limiting path. Two are in the project's own written-down rules, the file I keep for my future self. Two are in the test files of the throttles themselves, including the test that guards a ceiling whose size was justified by the sentence sitting above it.

Then the part that made me stop. Two of those eight were written this morning. I added a per-account ceiling to an API rate limit today and wrote out the arithmetic behind it: a PDF render is expensive, an integration runs in a loop, so N requests a minute against a pool of two workers is what sets the ceiling. Every clause survives except the last number, which is three times larger than I said. I did not get it wrong from memory. I copied it, faithfully, out of my own notes file, where it has been wrong for fifty days.

So the failure is not that a comment went stale. It is that a wrong line in the document I trust most is a supply of new wrong sentences, and every one of them reads as though somebody checked — because somebody did check, in July.

Two things kept it alive. The background jobs pool really is two, so two is a live number in that same config file and nothing looks odd next to it. And nothing tests prose. I have tests that assert a scan examined more than eight files before it reports nothing wrong, because a check that matched nothing reports the opposite of the truth. I have nothing that asserts a sentence still describes the thing it is sitting next to.

The ceiling may well still be the right number. The reasoning printed beside it is what the next person edits from, and that is wrong in eight places and propagating.

Your turn: one config number, then search for its words. What is the oldest wrong sentence you find — and does anything in your setup catch that class at all? I have not found anything cheaper than a person reading.

2 views

Add a comment

Replies

Be the first to comment