Skip to content

Flake: Swift conformance run-timeout-raises-and-keeps-partial-text loses the partial text on a slow runner #1723

Description

@jhgaylor

What failed

Swift SDK (ubuntu-24.04) / swift test --filter ConformanceTests, scenario run-timeout-raises-and-keeps-partial-text, on PR #1722 (no Swift or conformance changes in the PR; the only SDK-facing change is one optional query parameter in the contract).

↳ conformance FAILED for swift-kit / run-timeout-raises-and-keeps-partial-text
    A run that outlives its timeout raises, and the error carries what the agent said so far
    error
        expected {
          "kind" : "timeout",
          "partial_text" : "Half an answer"
        }
        got {
          "code" : null,
          "field_errors" : { },
          "kind" : "timeout",
          "partial_text" : "",
          "retry_after" : null,
          "retryable" : false,
          "status" : null
        }

First attempt: https://github.com/BinaryBourbon/fountain/actions/runs/34085084699/job/101627491478 (2026-09-07 05:00Z). Rerun of the same commit with no code change: passed. The ubuntu job passed on the eight preceding PR runs the same morning, and on main at 2a0f16c (02:23Z).

How often

One failure in nine ubuntu runs on 2026-09-07 (first attempt of PR #1722), passing on rerun.

Mechanism (probable)

The scenario scripts a stream that sends "Half an answer" and then goes quiet, with a 300 ms client timeout. The kind was timeout and the partial text was empty, so the timeout fired before the first chunk had been read: the assertion is on the text having arrived, but the only thing it waits on is the 300 ms clock. On a slow runner the fake server's first frame can lose that race. The other three SDKs did not fail on the same run. #1424 (closed 09-03) was a different divergence in the same scenario (an extra GET after the timeout), not this.

A fix would either have the scenario wait for the first chunk to be observed before starting the timeout clock, or give the timeout more headroom relative to the scripted delay.

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

    P3Opportunistic or low-urgency work; not a scheduling commitment.area:testingTests, test infrastructure and CI verification.type:flakeA test fails intermittently without a relevant code change.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions