Skip to content

CI flake: experimental-remote-runtime worker-owned-provider stream fails with socket queue stall (1/3446, rerun green) #1676

Description

@code-yeongyu

Summary

test/experimental-remote-runtime.test.ts > experimental durable server composition > streams prompt events through the worker-owned service provider failed once in CI with an event-sequence assertion while the RPC socket event queue logged stall/overflow warnings. It passed on rerun, on main, and on the branch head — classified as a timing flake, filed for a root-cause fix per the flake policy (fix merged to base, not just reruns).

Actual

CI run 34799956108, job 103840461978 (PR #1673, merged head 01863bd):

  • AssertionError: expected [ 'run_start', 'message_start', …(8) ] to deeply equal ArrayContaining{…}
  • Logged just before: socket event queue stalled: peer did not drain 57 queued bytes within 50ms (twice) and socket event queue overflow: 0 queued + 2166 incoming > 1024.

Expected

The worker-owned provider event stream is deterministic under CI load; a slow peer drain does not reorder or drop the expected prompt events.

Classification evidence (three-step)

  1. No intentional change: the PR diff touched only ask-user multi-select keys/state/render/tests + CHANGELOG.
  2. BASE contrast: main CI run 34797565211 (post-fix(coding-agent): cover Alt+Enter echo path and ignore kitty Escape releases in /btw #1675) all shards green; the PR's pre-merge branch head also had this shard green (10m12s pass).
  3. Rerun of the failed job: green. Fail 1 / 3446 passed in the failing attempt.

Hypothesis

Timing-sensitive RPC socket event-queue liveness guard: the 50ms peer-drain window can abort/close the queue under CI contention, disturbing the event sequence the test asserts. Related families: credit-timeout quarantine, RPC worker stall retries.

Scope / acceptance

  • Reproduce under load or fault injection (slow reader), identify whether the queue-close path can drop/reorder events the test expects.
  • Durable fix (backpressure tolerance, drain-window sizing, or test-level event subscription before trigger) merged to main; no test skip, no widened assertion.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions