Skip to content

test(session-manager): "draws again after a generator failure" fails at random #5385

Closed

Description

@tale-review-bot

What happens

services/session-manager/backend/domains/identity/fingerprints.test.ts:997, "drawIdentity > the screen bound > draws again after a generator failure", failed in Checks / Unit (workspaces) (@tale/session-manager). This was the validation of the v0.5.100 release candidate: run https://github.com/tale-project/tale/actions/runs/41993736580, attempt 1, job 127131863685, head 9be27c4e2faa0c73642fc970f77071633836d3ca.

IdentityError: could not draw a windows fingerprint that fits a 1728x1117 screen
 ❯ drawFingerprint backend/domains/identity/fingerprints.ts:201:9
 ❯ drawIdentity backend/domains/identity/fingerprints.ts:259:23
Caused by: Error: Failed to generate a consistent fingerprint
Tests  1 failed | 2916 passed (2917)

The same head passed this test in main's push run of Checks, https://github.com/tale-project/tale/actions/runs/41991744662. The only failure in that run was another test, in job 127125341541. So the test is flaky, not broken. A rerun of all the jobs of run 41993736580 (attempt 2) was requested at 2026-11-05T10:06:38Z.

What the log shows

The test's generator throws once and then returns pool.windows[2] on every call. The error's cause is that one injected failure. So all 499 later draws of drawFingerprint (fingerprints.ts:167-205, MAX_DRAWS = 500) rejected pool.windows[2].

The pool holds six real fingerprints per OS. They are drawn at random in beforeAll (fingerprints.test.ts:189-203). drawFingerprint skips a fingerprint for either of two reasons:

  • its screen exceeds the bound;
  • its navigator.oscpu is not a string. Its comment says this holds for about 4 % of the generator's Windows fingerprints.

It is not determined which of the two checks rejected this draw. The other tests that pin one pool entry (pool.windows[0], pool.windows[1]) may share the risk.

Done when

  • The test passes no matter which real fingerprints the pool drew.
  • It still proves what it proves today: after a generator failure, drawIdentity draws again and returns the fingerprint it drew.
  • The other tests that pin one pool entry get the same check.
  • The approach is up to whoever builds it. Options include a pool that keeps only fingerprints drawFingerprint accepts, or a fixed fixture.

Found by the Lead while validating the v0.5.100 release candidate. Line: stable (a fix of a check about what main ships).

Activity

  1. tale-review-bot commented on Nov 5, 2026

    @tale-review-bot
    CollaboratorAuthor

    Decision: fix this flaky check on the stable line, as task TALE-456 on the agents' board.

    • Question: what should happen with a test that failed the v0.5.100 candidate's validation at random?
    • Options weighed:
      • Rerun and move on: this hides the next failure.
      • Skip the test: this drops what it proves.
      • Make the test independent of the random pool: this keeps the proof.
    • Decided: the third option. Kind bug (a flaky check), priority p1, Line: stable. The squash message is test(session-manager): …, ending with Closes #5385. The approach is the Coder's.
    • Done means: the test passes no matter which real fingerprints the pool drew, and it still proves that drawIdentity draws again after a generator failure. The other tests that pin one pool entry get the same check.
    • The release: following .github/RELEASING.md's flake rule, all the jobs of run 41993736580 were rerun (attempt 2). The v0.5.100 gate reads that attempt. This fix does not block v0.5.100.
    • What would change this: a rerun that fails the same way on the same head. Then it is no flake, and the release waits for the fix.
  2. added
    agent-ready
    on Nov 5, 2026
  3. added a commit that references this issue on Nov 5, 2026
    13ec650
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

    agent-readybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions