Implements #116 in internal/notify/shutdown_test.go. Production code is unchanged.
drainSlack becomes three constants, one per meaning: longDrainDeadline
(deadline for a drain that should finish well before it), timeoutDrainBound
(watchdog on a drain given drainDeadline) and reachEndpointTimeout (wait
for a delivery to reach the test server). Each says what it bounds and why
2s. No value changed.
The idle-drain failure names idleDrainBound, the bound it checks, with the
deadline as context.
TestDrainWithCancelledContextDoesNotWarn also requires the drain to return
within idleDrainBound (a watchdog, as in TestDrainBoundedByContextDeadline) and to log its debug line.
Mutation checks in shutdown.go, each reverted:
Idle drain waits for its deadline: the idle test fails naming the 500ms bound.
Drain ignores its deadline: the watchdog fails naming 2s and the 50ms
deadline.
Delivery never runs: both endpoint waits fail.
Guard for nothing outstanding removed: the cancelled-context test fails on the
missing debug line and on the warning.
That guard's branch never returns: the cancelled-context test fails naming
500ms.
Drain does nothing: the cancelled-context test fails on the missing debug
line, which the absence-only check let through.
Judgement call: newLoggingService now records debug level for all three tests
that use it; the other two only gain lines in their failure output.
Model: opus-5-5
Implements https://git.eeqj.de/sneak/dnswatcher/issues/116 in
`internal/notify/shutdown_test.go`. Production code is unchanged.
- `drainSlack` becomes three constants, one per meaning: `longDrainDeadline`
(deadline for a drain that should finish well before it), `timeoutDrainBound`
(watchdog on a drain given `drainDeadline`) and `reachEndpointTimeout` (wait
for a delivery to reach the test server). Each says what it bounds and why
2s. No value changed.
- The idle-drain failure names `idleDrainBound`, the bound it checks, with the
deadline as context.
- `TestDrainWithCancelledContextDoesNotWarn` also requires the drain to return
within `idleDrainBound` (a watchdog, as in
`TestDrainBoundedByContextDeadline`) and to log its debug line.
Mutation checks in `shutdown.go`, each reverted:
- Idle drain waits for its deadline: the idle test fails naming the 500ms bound.
- Drain ignores its deadline: the watchdog fails naming 2s and the 50ms
deadline.
- Delivery never runs: both endpoint waits fail.
- Guard for nothing outstanding removed: the cancelled-context test fails on the
missing debug line and on the warning.
- That guard's branch never returns: the cancelled-context test fails naming
500ms.
- Drain does nothing: the cancelled-context test fails on the missing debug
line, which the absence-only check let through.
Judgement call: `newLoggingService` now records debug level for all three tests
that use it; the other two only gain lines in their failure output.
Model: opus-5-5
clawbot
self-assigned this 2026-10-01 20:11:42 +02:00
drainSlack stood for three things: the deadline given to a drain that
should finish early, the watchdog on a drain that should time out, and
the wait for a delivery to reach the test server. It is now three
constants, each commented with what it bounds and why it is 2s; no
value changed. The idle-drain failure printed that deadline instead of
idleDrainBound, the bound it checks. The cancelled-context test now
also requires the drain to return within idleDrainBound and to log its
debug line, so a drain that logs nothing no longer passes;
newLoggingService records debug level for this.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements #116 in
internal/notify/shutdown_test.go. Production code is unchanged.drainSlackbecomes three constants, one per meaning:longDrainDeadline(deadline for a drain that should finish well before it),
timeoutDrainBound(watchdog on a drain given
drainDeadline) andreachEndpointTimeout(waitfor a delivery to reach the test server). Each says what it bounds and why
2s. No value changed.
idleDrainBound, the bound it checks, with thedeadline as context.
TestDrainWithCancelledContextDoesNotWarnalso requires the drain to returnwithin
idleDrainBound(a watchdog, as inTestDrainBoundedByContextDeadline) and to log its debug line.Mutation checks in
shutdown.go, each reverted:deadline.
missing debug line and on the warning.
500ms.
line, which the absence-only check let through.
Judgement call:
newLoggingServicenow records debug level for all three teststhat use it; the other two only gain lines in their failure output.
Model: opus-5-5
Review passed on
de8953b.Model: opus-5-5