test(notice): pin the bound the failure notice keeps for itself #632

Closed
coilyco-ops wants to merge 1 commit from coilyco-ops/pin-the-notice-deadline into main AGit
Member

closes #627 - dropping WithTimeout from notifyFailure left a wedged send unbounded and nothing in the suite noticed; one row, verified against two mutations

closes #627 - dropping WithTimeout from notifyFailure left a wedged send unbounded and nothing in the suite noticed; one row, verified against two mutations
test(notice): pin the bound the failure notice keeps for itself
All checks were successful
ci / image-build (pull_request) Successful in 19s
ci / test (pull_request) Successful in 37s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
09c60c8bd3
notifyFailure discards the turn's deadline with WithoutCancel and then
gives the notice a 10 second one of its own. The first half is covered
by TestFailureNoticeSurvivesAnExpiredTurnContext. The second had
nothing, so removing WithTimeout left a wedged send unbounded and the
suite stayed green.

One row, verified against two mutations of notifyFailure. Dropping
WithTimeout fails this test alone; dropping WithoutCancel fails only
the existing one, which is why the redundant row I first wrote is not
here.

Test-only, no production change.

Refs sirens-echo#627

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Author
Member

Superseded by #634, which merged at 17:37 while this was open. Closing — Angie (ENG, claude seat). Nothing here needs reviewing.

noticedetachment_test.go on main is a strict superset of this branch:

TestANoticeSendsAfterTheTurnIsCancelled            the WithoutCancel half
TestTheNoticeCarriesItsOwnDeadline                 identical to my only row
TestALongTurnDeadlineDoesNotBecomeTheNoticesDeadline   which I did not write

Same technique too — capture the deadline inside Reply, because notifyFailure's defer cancels the context before a caller could read it. Two seats reached the same construction independently, which is at least a signal it is the right one.

The third row is the one worth having and I did not think of it. Mine derived the notice from context.Background(), so it proved a deadline exists and not that it is the notice's own. A turn already carrying a shorter deadline would have passed my row and failed theirs.

So this adds nothing and I am not going to argue for it. Closing rather than leaving a redundant branch in the queue behind #483, which is already the bottleneck.

Second duplicate in twenty minutes, both against branches ending -claude. Recorded on #552 with what I think the actual mechanism is, because it is not the one that issue currently describes.

**Superseded by https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/pulls/634, which merged at 17:37 while this was open. Closing — Angie (ENG, claude seat). Nothing here needs reviewing.** `noticedetachment_test.go` on `main` is a strict superset of this branch: ``` TestANoticeSendsAfterTheTurnIsCancelled the WithoutCancel half TestTheNoticeCarriesItsOwnDeadline identical to my only row TestALongTurnDeadlineDoesNotBecomeTheNoticesDeadline which I did not write ``` Same technique too — capture the deadline inside `Reply`, because `notifyFailure`'s defer cancels the context before a caller could read it. Two seats reached the same construction independently, which is at least a signal it is the right one. **The third row is the one worth having and I did not think of it.** Mine derived the notice from `context.Background()`, so it proved a deadline exists and not that it is *the notice's own*. A turn already carrying a shorter deadline would have passed my row and failed theirs. So this adds nothing and I am not going to argue for it. Closing rather than leaving a redundant branch in the queue behind https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/483, which is already the bottleneck. **Second duplicate in twenty minutes**, both against branches ending `-claude`. Recorded on https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/552 with what I think the actual mechanism is, because it is not the one that issue currently describes.
coilyco-ops closed this pull request 2026-08-13 17:39:07 +00:00
All checks were successful
ci / image-build (pull_request) Successful in 19s
ci / test (pull_request) Successful in 37s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!632
No description provided.