Skip to content

async_lane: fix LaneTaskTest re-park race flake; neutral scope names in examples + test - #542

Merged
transfix merged 1 commit into
masterfrom
fix/async-lane-reparks-race-and-demo3
Oct 2, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/async-lane-reparks-race-and-demo3

Conversation

@transfix

@transfix transfix commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Fixes the flaky LaneTaskTest.ProcessChrootedToApp…ReceivesCrossThreadHashPosts (renamed from a downstream-app-specific name) that failed in the recipe lane under --gtest_shuffle, and removes a downstream application's name from libcvc core.

1. Re-park race. The test asserted status(pid) == waiting immediately after pump_until(got.size()==50). But got is appended inside apply-built (the msg-recv body); the instant the 50th value lands, the resident process hasn't re-entered (msg-recv …) yet and is momentarily ready, not waiting. The assert intermittently read ready (enum 0) vs expected waiting (3) → flake. Fixed by pumping until both processes settle back to waiting instead of asserting it on the same tick the last value arrived. Verified: 500× the specific test + 20× shuffled full suite, 0 failures.

2. Layering. The doc-comment examples and the test used a downstream application's name as the scope — libcvc core shouldn't name its consumers. Renamed the scope/channel/test-name uses to the neutral app in async_lane.h's doc-comment examples and async_lane_test.cpp (the scope string is arbitrary; no behavior change). The remaining mentions of that application in nav comments (material.h, nav_material_deploy_test.cpp) are cleaned up in a separate PR.

Test-only + doc-comment change; no production logic touched.

…from libcvc core

Two things, both in the async_lane layer:

1. Flake fix — LaneTaskTest.ProcessChrootedTo*ReceivesCrossThreadHashPosts asserted
   status(pid) == waiting immediately after pump_until(got.size()==50). But got is
   appended INSIDE apply-built (the msg-recv body); the moment the 50th value lands,
   the resident process has not yet re-entered (msg-recv …) and is momentarily
   `ready`, not `waiting`. The assert intermittently read `ready` (status 0 vs the
   expected waiting 3) and flaked under --gtest_shuffle in CI (recipe lane). Fixed by
   pumping until both processes have settled back to waiting instead of asserting it
   on the same tick the last value arrived. Verified 500x on the specific test and
   20x shuffled full suite, 0 failures.

2. Layering — "demo3" is a cvc::dbg DEMO; it should not be named in libcvc core.
   Renamed the scope/channel/test-name uses to the neutral "app" in async_lane.h's
   doc-comment examples and in async_lane_test.cpp. No behavior change (the scope
   string is arbitrary). (Remaining demo3 mentions in nav comments are cleaned up
   separately.)
@transfix
transfix enabled auto-merge October 2, 2026 17:02
@transfix
transfix merged commit 06149b9 into master Oct 2, 2026
13 checks passed
@transfix transfix changed the title async_lane: fix LaneTaskTest re-park race flake; drop DBG demo3 references async_lane: fix LaneTaskTest re-park race flake; neutral scope names in examples + test Oct 2, 2026
@transfix
transfix deleted the fix/async-lane-reparks-race-and-demo3 branch October 2, 2026 20:51
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