Flaky fan-out test: TaskFinished never observed under load #178
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#178
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Flaky TestFanoutConcurrentEnqueueLosesNothing: TaskFinished never observed under load
make cifailed ininternal/notify:TestFanoutConcurrentEnqueueLosesNothing(15.01s) withlost 0/60 fan-out seqs: []. Passes solo (-count=3,-race -count=5).Analysis (from the failure text + test code)
The
missinglist is EMPTY — all 60 principals have exactly 1 notification. What never happened within the 15s deadline is the second conjunct:TaskStatus(repo, TaskKindFanout)returning a record withState == TaskFinished(tasks_test.go:448-452). So notifications are delivered; the task's terminal-state observability under full-./...parallel load is what's broken/flaky.Fix (evidence decides: test bug, implementation bug, or load-only flake)
TaskStatus, the task table janitor/recent-ring, and the drain/end path.http: TLS handshake error ... bad certificateline seen in the same CI output — determine whether it's expected test noise (a test asserting TLS failure) or a symptom; handle accordingly.Acceptance criteria
make cigreen end to end (vet, test, race, cover, contract, e2e), plus the failing test green-race -count=20in isolation AND undergo test -short ./internal/...parallel load.Root cause: test bug, not implementation bug — see PR #179 (#179). Single shared 15s deadline for delivery+termination misreports starvation as 'lost 0/60'; fixed with split polling windows. TLS handshake line is expected TestWebhookInsecureTLS noise (asserted self-signed rejection), now silenced.
Review of PR #179 (fix/issue-178, commit
a364a8a) — verified in scratch worktree /tmp/pr179 (since removed).LOAD-BEARING QUESTION (AGENTS.md law 11): does the 15s+15s phase split weaken the test? Verdict: NO, it preserves both pins.
RESULTS (scratch worktree @
a364a8a): gofmt clean; go vet clean; go test -race ./internal/notify/... ok (2.3s); -count=10 fan-out test 10/10 PASS; GOMAXPROCS=2 + taskset-constrained 10/10 PASS; TestWebhookInsecureTLS -count=3 PASS; coverage 96.2% (gate >=95% holds). No fix-push needed — nothing to fix.MERGE RECOMMENDATION: ready to merge (not merging per instructions; main worktree left untouched).
Fixed by PR #179 (review: split preserves the guarantee, reaping-path verified absent; all green), merged. Closing.