Skip to content

test(provider): routing beat tests wait for their beat before the bubble closes - #2918

Merged
AbirAbbas merged 2 commits into
org/mainfrom
org/routingbeat-wait
Nov 25, 2026
Merged

AbirAbbas merged 2 commits into
org/mainfrom
org/routingbeat-wait

Conversation

@AbirAbbas

Copy link
Copy Markdown
Collaborator

TestSilentRouterCanRecoverOnTheNextRoutingCompletion failed three CI runs in a row on org/main (13beb82) with panic: deadlock: main bubble goroutine has exited but blocked goroutines remain. The test passes every time on a laptop, and nothing in internal/provider or internal/lane changed on this line.

Cause. After the test's 30-minute fake sleep, the completion it makes and the beat's own reload wake at the same fake instant and race for the lane store's file lock. If the beat loses, it sleeps in the lock backoff. synctest.Wait counts that sleep as idle, so the assertions pass and the test returns while the beat goroutine is still asleep, and the bubble panics. The stack in the failing run shows that goroutine in lane.take (store.go:596) under ledger.compact.

Fix (test only). All seven routing beat tests start the beat through startRoutingBeat. The function it returns cancels the beat and waits for it to return; waiting lets the bubble's clock carry a sleeping beat through its backoff to the cancelled context.

Proof.

  • go vet and gofmt are clean.
  • The routing tests pass at -count=20.
  • The full internal/provider package passes at -count=1.
  • The race never reproduced locally (150 runs under -race), so this PR's CI run, and ci-full after merge, are the evidence.

Separately, internal/provider at -count=2 fails 4–5 other tests on dev too. Those tests rely on leftover state from earlier tests; that is not part of this change.

🤖 Generated with Claude Code

AbirAbbas and others added 2 commits November 25, 2026 08:29
…the bubble closes

TestSilentRouterCanRecoverOnTheNextRoutingCompletion failed three CI runs in a
row on org/main with "deadlock: main bubble goroutine has exited but blocked
goroutines remain": the beat was asleep in the lane store's lock backoff when
the test returned, after losing the file lock to the completion the test had
just made. synctest.Wait counts that sleep as idle. Every routing beat test now
starts the beat through startRoutingBeat, whose end cancels the beat and waits
for it to return.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AbirAbbas
AbirAbbas merged commit 334e88f into org/main Nov 25, 2026
7 checks passed
@AbirAbbas
AbirAbbas deleted the org/routingbeat-wait branch November 25, 2026 13:42
AbirAbbas added a commit that referenced this pull request Nov 25, 2026
…ack (#2903)

The hosted organisation line: a team-mode org server deciding every request through one access model (verbs, roles, grants and policy in SQLite), hosted chats run by the sessionhost under a per-chat uid inside a Landlock fence with minted model bearers, sealed keys and a git helper, shared chats acting through verbs, bots owned by their creator, the Hosting and chats policy settings, and a self-hosting stack (deploy/org Docker Compose, published images behind a leak gate, a Railway path).

Consolidates #2894 #2895 #2896 #2898 #2899 #2900 and the follow-ups #2904 #2905 #2907 #2908 #2910 #2911 #2912 #2913 #2915 #2916 #2918 #2927 #2936 #2944. Proven by the full suite, a keyless Compose smoke, a hostile wire client, sandbox escape probes, a real-model run and a production-style install from the published images.

Co-Authored-By: Santosh kumar <[email protected]>
Co-Authored-By: ZeroPoint95 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant