Repository navigation
test(ariadne): fix StillOuterPeerReentryNoRealignNoFreeze's realign in package-linux / libcvc-debug-grpc - #847
Merged
Merged
Conversation
…eze's realign Temporary: logs each room step (server tick, dropped quanta, broadcast, the relay tree's pose ticks, tiers), each of B's frames (its clock before and after, the pose ticks it read, the realign count) and every pose tick B's shard applies (live or snapshot), and dumps the log when the realign check fails. To be replaced by the fix.
RoomRelayLoopbackTest.StillOuterPeerReentryNoRealignNoFreeze failed most attempts in package-linux / libcvc-debug-grpc with one clock realign. A diagnostic run (job 122570275883) showed that the realign is not caused by a pushed tick: it is B's own clock joining the relay's late. A replica's clock started at its first frame, after the relay's first step, which the joins make slow (0.41 to 0.57 s there). Its first sample, stamped during that step, was within max_skew_ticks (60), so apply_authoritative left the replica 47 to 65 ticks behind. Both avatars stand still through the settle (heartbeat 1 s), so the first fresh sample was B's own pose once it walked, and that sample re-aligned it whenever the lag passed 60. bring_up now starts every client's clock just before the relay's first step when the room starts with them, so the replicas run in step with the relay. That also restores what the test guards: a heartbeat-old pushed tick is now well past max_skew_ticks from B's clock, where before a lagging B could miss it. The failure message reports B's lag at the start of the walk. Removes the temporary diagnostics.
transfix
marked this pull request as ready for review
October 28, 2026 05:07
transfix
enabled auto-merge (squash)
October 28, 2026 05:08
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RoomRelayLoopbackTest.StillOuterPeerReentryNoRealignNoFreezefailed most attempts inpackage-linux / libcvc-debug-grpc, on master and on most PRs. Each failing attempt had exactly one clock realign (B.h.clock_realigns()was 1, against a baseline of 0). This PR fixes the test harness. The product code is unchanged.Root cause
The realign does not come from a pushed tick, and it is not a stall. It comes from B's own clock starting late relative to the relay's.
server_pumpin its first room step. A test client's replica clock started on that client's first frame, which runs after that step. In this lane the first step is slow because the joins land during it: it took 0.41 to 0.57 s.max_skew_ticks(60) of B's clock at 0. The test clients set no lead, soholon::apply_authoritativeleft the replica where it was. B then ran 47 to 65 ticks behind the relay.The lag also weakened what the test guards. With B 60 ticks behind, a pushed heartbeat tick about 110 ticks old would sit only about 50 ticks from B's clock, inside tolerance, and the check would miss it.
CI evidence
The evidence comes from a diagnostic commit (since removed). It logged every relay step, every B frame, and every pose tick B applied, and failed on purpose so ctest printed all three attempts: run 40613441662, job 122570275883.
In every attempt the realigning sample was B's own pose, on the frame after
r.walk("B", 4, 0). Nothing re-aligned B after that:Fix
When the relay has not stepped yet,
bring_upnow advances every client's holon once, right before the relay's first step. This starts the replicas' clocks in step with the relay's, like clients that are already up when their server starts.If the first step takes longer than 0.5 s, the client's next frame hits the 60-quantum catch-up cap and drops a few quanta. That leaves the replica a few ticks behind, far inside tolerance.
As a result, a heartbeat-old pushed tick is again well past
max_skew_ticksfrom B's clock, so the check catches it. The assertion is unchanged. Its failure message now also prints B's lag at the start of the walk.Verification
package-linux / libcvc-debug-grpcon a4179b5, two runs. The test passed on its first attempt both times, and every test in the job passed (5516 of 5516):