You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
queued_observer_events_come_before_session_shutdown (integrations/yoagent-rutis/tests/pi_test.rs ~2217) is flaky. It ran twice on the same commit (8337e3f, release PR #373), as a push run and as a PR run. One run passed and one failed:
What the test checks. It unloads at once after a run, while a slow turn_end observer (1.5 s) is still running and agent_end is queued behind it. It expects unloading to wait (bounded, OBSERVER_DRAIN_MS 5 s) for both, so agent_end comes before session_shutdown.
Likely cause (not verified). Sometimes agent_end is not in the adapter's queue when the drain starts. The bridge delivers agentEnd after the run's finish, so it can arrive after host.root.shutdown() has begun. At that point the adapter is closed and drops it (observe returns early on closed). The drain then sees only turn_end.
To decide:
Is this ordering pi's semantics that we must keep (an agent_end for a run that ended before unload must always fire)? Then the fix is in the adapter or bridge: unloading should also wait for the bridge to deliver a finished run's agentEnd.
Or is it a race we accept? Then the test should wait for the run's events to reach the adapter (e.g. a marker from turn_end's start) before unloading.
Activity
fix(rutis): review round 2 — AgentEnd by whether finish reached the h…