Skip to content

fix(cli): exclude server-side scheduling delay from the per-check timeout [RED-814] - #1421

Open
sorccu wants to merge 1 commit into
mainfrom
simo/red-814-timeout-excludes-scheduling-delay
Open

fix(cli): exclude server-side scheduling delay from the per-check timeout [RED-814]#1421
sorccu wants to merge 1 commit into
mainfrom
simo/red-814-timeout-excludes-scheduling-delay

Conversation

@sorccu

@sorccu sorccu commented Jul 24, 2026

Copy link
Copy Markdown
Member

Linear: RED-814

What

--timeout (default 600s) armed a timer for every check at run start, on the client, with no awareness of server-side scheduling delay. On large sessions the backend staggers non-priority check types across SQS DelaySeconds slots of up to 900s, so the tail of a big session was reported as Reached timeout ... waiting for check result before those checks ever started — while the server ran them anyway and the recorded session could end up PASSED.

Now --timeout measures execution:

  • At run start each check's timer is armed at timeout + 900s (the SQS delay ceiling the backend guarantees it never exceeds), with a distinct Check did not start within N seconds message. The entry must exist from run start — the timeouts map doubles as the "still pending" sentinel and messages for absent entries are dropped.
  • When the check's run-start message arrives, the timer re-arms to the plain --timeout. Identical behavior to before from that point on, including the Playwright default bump. Retry attempts re-arm again (fresh window per attempt; the backoff between attempts runs against the previous window — no worse than the old single shared window).
  • An already-timed-out check is never resurrected by a late run-start.
  • The --timeout flag help on test and trigger is updated to match.

Accepted tradeoff

A dispatched-but-never-started check (lost-message class) now surfaces at timeout + 900s instead of timeout. Dispatch-level failures are caught within seconds by the scheduling watch from #1420, which this complements but does not depend on.

Relationship to #1420

Originally stacked on #1420 (the diffs share file regions); now that #1420 has merged, this PR targets main directly and contains only the timeout change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HFcrNm7uzzkD1p87Nf9AhP

@sorccu
sorccu force-pushed the simo/red-814-timeout-excludes-scheduling-delay branch from 9b4ac8e to 614641e Compare July 27, 2026 08:09
@sorccu
sorccu force-pushed the simo/red-680-fail-fast-on-scheduling-failure branch from 90db48b to 5f3aa74 Compare July 27, 2026 12:05
@sorccu
sorccu force-pushed the simo/red-814-timeout-excludes-scheduling-delay branch from 614641e to 96cbf14 Compare July 27, 2026 12:05
Base automatically changed from simo/red-680-fail-fast-on-scheduling-failure to main July 27, 2026 13:17
…eout [RED-814]

Per-check timers (default 600s) all started at run start, so on large
staggered sessions — where the backend spreads non-priority checks
across up to 900s of SQS delay — the tail was reported as timed out
before those checks ever started. Timers now carry scheduling-delay
headroom (timeout + 900s, with a distinct did-not-start message) until
the check's run-start message arrives, then re-arm to the plain
timeout: --timeout measures execution, not queue delay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFcrNm7uzzkD1p87Nf9AhP
@sorccu
sorccu force-pushed the simo/red-814-timeout-excludes-scheduling-delay branch from 96cbf14 to 47e8112 Compare July 27, 2026 13:19
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