1fb6176783
Three rounds. Round 1 made exhaustedPattern a hot config key, made the quarantine warning name the fix instead of only the fact, and added model/reason to fleet_profiles' quarantined rows. Round 2 extracted the warning text into usageLimitFixWarning/usageLimitFixWarningNoModel and pinned both. Round 3 extracted the sink itself into a static exhaustionSink(...) factory and pinned what it actually logs, using a ListAppender on this class's own logger. Where the mutation numbers below come from, stated exactly. The battery ran on merge commit 3d2d521, tree1dcca23: origin/main at235644cplus this branch. This merge commit's tree is953ce11, which is that tree plus one file -- CharterToolSurfaceTest, from the #464 merge (49df792) that landed on main while the battery was running. So the battery did not run on this exact tree. That one added file was verified green on its own merge. The build on THIS tree, tree953ce11, is: Tests run: 1601, Failures: 0, Errors: 0, Skipped: 0, BUILD SUCCESS, 0 compile-error blocks. That is the battery tree's 1600 plus that one test, which is the arithmetic the two trees predict. Saying this rather than implying one tree. On the battery tree: 1600 tests green, 0 compile-error blocks. FleetMcp.java auto-merged there against #463's change to the same file, so that build was also the gate on the auto-merge -- a clean auto-merge is not a compiling merge. - M5, the round-2 survivor reproduced verbatim: the call site stops using either pinned method and logs a literal instead. Round 2 left this green across 1592 tests. Now KILLED by FleetdExhaustionSinkWarningTest.profileWithModelGetsTheActionableFix and .profileWithNoModelGetsTheFallbackNotAFix. - M6, the ternary's two branches swapped, so a profile WITH a model gets the no-model text and vice versa. Both extracted methods and both their unit tests untouched. KILLED by the same two tests, independently. - M7, THE HALF THIS ROUND DID NOT PIN, and it SURVIVED. main()'s call to the factory replaced with an inert lambda: the factory and its test stay perfect, the daemon quarantines nothing and logs nothing. 1600 green. M7 is the same defect shape as round 2, moved one level up, and it is worth naming plainly. Extracting a thing in order to pin it CREATES the seam the test then lands on. Round 2 extracted the warning TEXT, pinned the two methods, and left the call site that selects between them unpinned -- M5. Round 3 extracted the SINK, pinned the factory's behaviour, and left main()'s wiring of it unpinned -- M7. The question to ask on any such fix is which of three things a test now reaches: the value, the call site, or the selection between values. Extraction only ever answers the first. M7 is not a reason to hold this merge. Proving main() wires this factory means driving daemon startup, which nothing here does -- that is fleetd #460. A cheaper option exists and is recorded there: a source-reading assertion of the kind #439 used, which would kill M7 without starting the daemon. Round 3's own caveat, disclosed by the worker and worth keeping: its first Cell A run was corrupted by a second concurrent mvn against the same module directory. It killed that run, checked for stray ForkedBooter processes, and re-ran. The numbers above are mine, from this battery, not that run.