Skip to content

CI: streamdeck validate step flakes on transient network errors fetching Elgato validation rules #1436

Closed

Description

@amrmelsayed

Flake (recurring; hit PR #1432 and PR #1434 CI runs)

The streamdeck validate CI step shells the Elgato CLI, which fetches validation rules over the network at run time; transient 'fetch failed' / UND_ERR_SOCKET errors fail the job with no code defect. Observed twice in two days on unrelated PRs (#1432 - confirmed infra flake by rerun; #1434 run 1).

Fix direction

Add a retry (2-3 attempts with backoff) around the validate step, or vendor/cache the validation rules so the step runs offline. Either removes the network from the pass/fail path.

Impact

Fails unrelated PRs' CI intermittently; each occurrence costs a human-triggered rerun.

Activity

  1. added
    area/streamdeck
    on Aug 12, 2026
  2. amrmelsayed commented on Aug 14, 2026

    @amrmelsayed
    CollaboratorAuthor

    On it! Working on a fix now.

  3. added 5 commits that reference this issue on Aug 14, 2026
    84fd5e7
    188732a
    781fff3
    50953ae
    6e3c9ec
  4. added a commit that references this issue on Aug 15, 2026
    9fe014a
  5. amrmelsayed commented on Aug 15, 2026

    @amrmelsayed
    CollaboratorAuthor

    Shipping record: PR #1451 merged 2026-08-15T03:02:02Z (9fe014a95), all seven checks green against a stationary head. streamdeck validate now runs through a bounded retry that discriminates: transient network signatures retry with backoff, real validation errors fail fast on the first attempt, and ENOTFOUND is deliberately excluded (the CLI already surfaces a bad URL gracefully) while EAI_AGAIN is included. Root-caused in the CLI's own manifestUrlsExist rule, which does a live HEAD request and rethrows anything that is not ENOTFOUND — that is why the flake crashed whole runs rather than failing one check.

    No release-notes entry, deliberately: this is CI infrastructure with no user-visible behaviour change, the same call made on #1390.

    The story worth recording, because it is not the one anyone believed while it was happening.

    This branch was red on seven consecutive heads — e731e82d2, 188732af9, 02eef029d, 4c24ca30f, 781fff35e, 50953ae0c, 0455c7b43 — from its first pushed commit to its gate commit. The Tests workflow failed on every one of them, with a type-check error in the lane's own new test file. CLI Integration Tests was green on all seven.

    Three agents reported or accepted "CI green" on that branch, and every one of us was reading something true at the moment we read it: a passing sibling workflow, a gh pr checks exit code that is non-zero while checks are merely pending, a snapshot of in-flight checks measured before the gate commit, and a run-history query whose --limit silently truncated the window. None of those was a lie; each answered a narrower question than the one that mattered. The failure was never hidden — it simply sat in a workflow nobody opened until the last responsible moment, when the full check list was read before merging.

    Two inferences were floated during the diagnosis and both were withdrawn on evidence: that the merge-window churn (#1462) had hidden the defect behind a stale pass (there was no green to go stale), and that the two file renames had knocked the @ts-expect-error off its target line (the failed log from 188732af9, which predates both renames, shows the identical TS2578 at (2,1) and TS7016 at (7,8) against the original filenames). The real cause was the multi-line import form itself: a directive above import { covers the next line, while TypeScript reports the error on the module specifier several lines below.

    The fix was made at the cause rather than the symptom, and that matters for what shipped: a validate.d.mts declaration removes the need for suppression entirely, so the test now type-checks runWithBackoff and isTransientError for real instead of importing any. Relocating the directive would have turned the board green while leaving the test asserting against an untyped module. The lane therefore ends in a better state than the one it was believed to be in when it was reported green.

    Carried forward as rules: read the branch's run history, not its current state — "is anything failing right now" and "has this branch ever been green" are different questions, and only the second one matters before a merge. Watch --limit truncation when the answer is "how many". And treat a tool's failure-shaped output as not-success, not failed.

  6. added a commit that references this issue on Aug 15, 2026
  7. added a commit that references this issue on Aug 21, 2026
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

    area/streamdeck

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions