Repository navigation
Conversation
Areson
force-pushed
the
Areson/level-collector-stop
branch
from
October 26, 2026 18:27
66c753e to
076b2b8
Compare
Areson
force-pushed
the
Areson/stop-loss-count
branch
2 times, most recently
from
October 26, 2026 19:37
3c70a5b to
98af9d4
Compare
Areson
force-pushed
the
Areson/level-collector-stop
branch
2 times, most recently
from
October 26, 2026 20:17
4e27986 to
f386824
Compare
Areson
force-pushed
the
Areson/stop-loss-count
branch
from
October 26, 2026 20:17
98af9d4 to
55030fb
Compare
Areson
force-pushed
the
Areson/level-collector-stop
branch
from
October 26, 2026 20:39
f386824 to
1ecfa67
Compare
Areson
force-pushed
the
Areson/stop-loss-count
branch
from
October 26, 2026 20:39
55030fb to
1a7153d
Compare
Areson
force-pushed
the
Areson/level-collector-stop
branch
from
October 26, 2026 21:30
1ecfa67 to
2aad61e
Compare
Areson
force-pushed
the
Areson/stop-loss-count
branch
from
October 26, 2026 21:30
1a7153d to
d747dfc
Compare
Areson
force-pushed
the
Areson/level-collector-stop
branch
from
October 26, 2026 22:37
2aad61e to
b033f87
Compare
Areson
force-pushed
the
Areson/stop-loss-count
branch
from
October 26, 2026 22:37
d747dfc to
1e480bb
Compare
Loader.Load used the number of removed monitors as the number left, and compared a 0-1 loss fraction against the whole-number percent from blip.StopLoss, so a percent stop-loss never triggered. Count the net drop (before - removed + new; changed monitors don't count) and compare lost*100 > limit*before for percent stop-loss. TestLoaderUnloadedMonitorsHaveNoCounters relied on the miscount; it now removes 3 of 4 monitors to get ErrStopLoss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Areson
force-pushed
the
Areson/level-collector-stop
branch
from
October 27, 2026 00:13
b033f87 to
4125884
Compare
Areson
force-pushed
the
Areson/stop-loss-count
branch
from
October 27, 2026 00:14
1e480bb to
2f972b5
Compare
This branch has not been deployed
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.
Stacked on #191.
Stop-loss in
Loader.Loadmiscounts and its percent form never triggers.len(diff.removed), the number of removed monitors, not the number left. A small removal could trigger stop-loss (removing 2 of 10 with limit 3 counted as a loss of 8), and removing every monitor never did.blip.StopLossreturns the percent as a whole number (50for50%), but the check compared it to a 0 to 1 fraction, so a percent stop-loss could never trigger. The error message also printed the fraction as a percent.Stop-loss now counts the net drop: monitors loaded before minus monitors loaded after (before − removed + new). New monitors offset removed ones, and changed monitors don't count. This matches the existing "before/now" message and the "big drop in the number" intent, and it allows a legitimate replacement such as renamed hosts. A drop equal to the limit is still allowed. The percent check compares
lost*100 > limit*beforeso a drop exactly at the limit isn't pushed over by rounding. Only one of number or percent can be configured, so the two branches are now aswitch.Tests:
TestLoaderStopLosscovers number and percent stop-loss below, at, and above the limit, with and without new monitors, plus full replacement and changed monitors. 10 of its 19 cases fail on the old code.TestLoaderUnloadedMonitorsHaveNoCountersgotErrStopLossonly because of the miscount, so it now removes 3 of 4 monitors (a net loss of 2 against limit 1).Docs: explained the count in
monitors/loading.mdandconfig-file.md#stop-loss, and added an Unreleased note that a percent stop-loss now triggers.🤖 Generated with Claude Code