Skip to content

test(server): fix the host_core boot-reconcile race in the product-subtree tests - #589

Merged
pgherveou merged 1 commit into
mainfrom
fix/host-core-boot-reconcile-race
Sep 3, 2026
Merged

test(server): fix the host_core boot-reconcile race in the product-subtree tests#589
pgherveou merged 1 commit into
mainfrom
fix/host-core-boot-reconcile-race

Conversation

@johnthecat

Copy link
Copy Markdown
Contributor

Two host_core product-subtree tests install a session directly on a PairingHostRuntime whose session store is empty. The boot reconcile runs on its own thread and clears the in-memory session when it finds nothing, so its clear can land after the test installed the session and the call under test answers Disconnected instead. a_cached_subtree_answers_without_reaching_the_wallet failed this way in the merge queue; locally the pair fails about 2 runs in 15.

Both tests now wait for the opening auth state before installing the session. The core reports that state after the boot reconcile has finished clearing, so the install always lands last. The two-second wait helper moves from the runtime tests into test_support so both modules share one copy.

Both product-subtree tests set a session directly on a runtime whose
session store is empty, so the boot reconcile's clear could land on top of
it and the call answered Disconnected. They now wait for the opening auth
state before installing, which reports after the clear. The wait helper
moves to test_support so both test modules share it.
@johnthecat
johnthecat requested a review from a team September 3, 2026 12:29
Comment thread rust/crates/truapi-server/src/host_core.rs
@pgherveou
pgherveou enabled auto-merge September 3, 2026 13:16
@pgherveou
pgherveou disabled auto-merge September 3, 2026 13:16
@pgherveou
pgherveou added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit 9984b04 Sep 3, 2026
18 checks passed
@pgherveou
pgherveou deleted the fix/host-core-boot-reconcile-race branch September 3, 2026 13:31
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.

3 participants