!5325ci/flake-sweep-2026-11-02 → developc86fe5e0ba

Weekly flaky test sweep: three observer tests, test code only

AI-generatedEverything on this page was written by an AI agent from the diff: the summaries, the narration, the diagrams, the flags and the glossary. It can be wrong or incomplete, so check it against the code before you rely on it.

4commits
3files
81lines changed
81lines to read
0production lines
3flaky tests fixed

Where the diff is

2-minute explainer

What changed

Budgets outlast the dial

Window and attempt budgets go from 50ms to 1s; reset proof stays.

50ms1s

Exact failure counts hold

30ms becomes 1s; settle hang guard grows from 2s to 10s.

  • 5 dials
  • empty 1
  • failed 4

Poll instead of sleep

Fixed sleeps become require.Eventually, 10s for ticker, 5s for force.

sleep + countpoll every 10ms

Logs stop touching t

Unjoined senders log to a buffer, printed only on failure.

sendermutex buffert.Log on failure

Evidence, and what's left

A neighbouring test keeps 50ms and hangs under injected delay.

TestStartupStateSyncWindowCapsOriginalAttempt

Line by line · every changed logic line, narrated

5:39runtime
7code chapters
100%logic lines narrated (72/72)
5flagged spots
speed

Chapters

What to check

Ask an AI about this change

Chat assistantClaude, ChatGPT, … (reads a link)

Coding agentClaude Code, Cursor, … (reads the repo)

The context file is context.md. Use Copy with context for an AI that can't open links; it pastes the whole file in.

Glossary

Force send
The batcher sends immediately once a queue reaches its maximum batch size, instead of waiting for the ticker. attestation_batcher.go ↗
require.Eventually
A testify helper that polls a condition at an interval and fails the test if it stays false until the timeout.
settleStartupRetry
A test helper that waits for a dispatched peer group to finish, then ticks the state machine once. attestation_state_retry_test.go ↗
Startup state sync
A bifrost observer asks peers for attestation state after starting, retrying in groups within a collection window. attestation_state_retry.go ↗
stateSyncTestFrameTimeout
A shared one second test constant, which this MR reuses as the budget in the fixed tests. attestation_state_init_test.go ↗
StateSyncTimeout
The budget for one state exchange attempt. It defaults to 30 minutes, and these tests shorten it. attestation_state_init.go ↗