Skip to content

Flaky test: a dirty worktree with an unmerged branch and an agent is deleted once both boxes are ticked #484

Closed

Description

@github-actions

CI found this test flaky: it failed, then passed on the one retry in the same job, so the run passed.

First attempt's failure:

Error: expect(locator).toBeVisible() failed

Locator: locator('[data-delete-worktree]').locator('[data-delete-result="finished"]')
Expected: visible
Timeout: 60000ms
Error: element(s) not found

Call log:
  - Expect "toBeVisible" locator('[data-delete-worktree]').locator('[data-delete-result="finished"]') with timeout 60000ms
  - waiting for locator('[data-delete-worktree]').locator('[data-delete-result="finished"]')

Fix the cause or delete the test by the expiry date; a flaky test is not left running. A longer timeout, more retries or a lower expectation does not end this issue. Each later flaky run adds a comment here.

Activity

  1. added
    bug
    quarantine
    on Oct 5, 2026
  2. github-actions commented on Oct 5, 2026

    @github-actions
    ContributorAuthor

    Flaky again on Windows: https://github.com/modakbul-gongbang/hide/actions/runs/37288613490 (pull request #497, commit 7a97707).

    Error: expect(locator).toBeVisible() failed
    
    Locator: locator('[data-delete-worktree]').locator('[data-delete-result="finished"]')
    Expected: visible
    Timeout: 60000ms
    Error: element(s) not found
    
    Call log:
      - Expect "toBeVisible" locator('[data-delete-worktree]').locator('[data-delete-result="finished"]') with timeout 60000ms
      - waiting for locator('[data-delete-worktree]').locator('[data-delete-result="finished"]')
    
  3. cc-bb-aa commented on Oct 5, 2026

    @cc-bb-aa

    Flaky deletion tests with an agent often come from the agent finishing work after the UI ticks both boxes. A robust pattern is to gate deletion on an explicit agent completion signal and log every step so you can see the race in CI. If helpful, our gateway docs have an example of logging agent driven state changes: https://shield-agent.com/docs

  4. github-actions commented on Oct 5, 2026

    @github-actions
    ContributorAuthor

    Flaky again on Windows: https://github.com/modakbul-gongbang/hide/actions/runs/37352905893 (refs/heads/main, commit 0db27d0).

    Error: git worktree remove failed: git worktree: error: failed to delete 'C:/Users/runneradmin/AppData/Local/Temp/hide-e2e-herdr-HpSlUg/repo-delete': Permission denied. The worktree remains; panes already closed stay closed.
    
    expect(locator).toHaveAttribute(expected) failed
    
    Locator:  locator('[data-delete-worktree]').locator('[data-delete-result]')
    Expected: "finished"
    Received: "failed"
    Timeout:  1000ms
    
    Call log:
      - git worktree remove failed: git worktree: error: failed to delete 'C:/Users/runneradmin/AppData/Local/Temp/hide-e2e-herdr-HpSlUg/repo-delete': Permission denied. The worktree r
    
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

    bugquarantine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions