test: bound the amplification, not the machine - #77
Merged
Conversation
`three_node_2000_file_continuous_mutation_stays_bounded` capped reconciles per SECOND, and derived the scan and persist caps from that same per-second figure. Every bound was therefore a function of how fast the machine happened to be, so the test failed on hardware that was merely quick. IT FAILED THAT WAY TWICE AND THE SECOND ONE WAS MINE. The cap was 4/s, derived when a persist wrote 72 MB of pretty-printed JSON. Compact bookkeeping made a pass cheaper, more legitimate passes fit the same fixed burst, and I re-derived the cap as 5/s from macOS runs. Linux CI then produced 5.04/s and turned main red on a run whose behaviour was fine. Raising it again from one platform's numbers would just move the trap. MEASURED ON BOTH, AND THIS IS THE POINT. The rate moves a lot. The ratios barely move. macOS 3.99 to 4.27 reconciles/s 2.50-2.61 scans 1.86-1.95 persists Linux CI 5.04 reconciles/s 2.53 scans 1.81 persists Scans and persists PER RECONCILE are what amplification means, and they do not depend on clock speed. So they are bounded directly, at exactly the strictness the old per-second forms implied: 112/36 scans and 76/36 persists per reconcile. NOTHING IS LOOSENED. The failing CI run sits inside both, at 2.53 and 1.81. The reconcile rate keeps a ceiling, but only as a runaway backstop, and it sits far above anything either platform has produced. A feedback loop is orders of magnitude, not a fast laptop. I PROVED THE NEW BOUNDS CAN FAIL. Tightening the scan allowance makes it fail and name the real figure. AND THE FIRST FAILURE MESSAGE LIED, so the allowance now has ONE source. With a tightened numerator the message still printed the OLD limit, because the assertion used the constant and the message hardcoded the number. That would send the next reader looking in the wrong place. Agent: Silber.fabric
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
three_node_2000_file_continuous_mutation_stays_boundedcapped reconciles per second, and derived the scan and persist caps from that same per-second figure. Every bound was a function of how fast the machine happened to be, so the test failed on hardware that was merely quick.It failed that way twice, and the second one was mine
The cap was
4/s, derived when a persist wrote 72 MB of pretty-printed JSON. #74 made a pass cheaper, more legitimate passes fit the same fixed burst, and I re-derived the cap as5/sfrom macOS runs only. Linux CI then produced 5.04/s and turnedmainred on a run whose behaviour was fine.Raising it again from one platform's numbers would just move the trap.
Measured on both — the rate moves, the ratios don't
Scans and persists per reconcile are what amplification means, and they don't depend on clock speed.
What changed
Both are now bounded directly, at exactly the strictness the old per-second forms implied —
112/36scans and76/36persists per reconcile. Nothing is loosened. The failing CI run sits inside both, at 2.53 and 1.81.The reconcile rate keeps a ceiling, but only as a runaway backstop, far above anything either platform has produced. A feedback loop is orders of magnitude, not a fast laptop.
I proved the new bounds can fail
Tightening the scan allowance makes it fail and name the real figure:
And the first version of that message lied. With a tightened numerator it still printed the old limit, because the assertion used the constant while the message hardcoded the number. The allowance now has one source, so the two can never disagree.
Agent: Silber.fabric