Skip to content

flake: TestSyncCommands_Golden/start_with_dependencies #1376

@flake-investigator

Description

@flake-investigator

CI Run: https://github.com/coder/coder/actions/runs/22639933232
Failing job: https://github.com/coder/coder/actions/runs/22639933232/job/65613285949
Commit: 6acdd6ca7d3cd935a3c23c424a47acffafb50388 (Danielle Maywood) — fix: wire agents-tab-visible metadata to experiments flag (#22553)

Summary
TestSyncCommands_Golden/start_with_dependencies failed on Windows with a golden file mismatch. The output sometimes skips the expected “Waiting for dependencies…” line and only prints “Success”, indicating a timing-dependent flaky test.

Failure evidence

=== FAIL: cli TestSyncCommands_Golden/start_with_dependencies (0.28s)
    clitest.go:86: invoking command: coder --global-config C:\Users\ADMINI~1\AppData\Local\Temp\TestSyncCommands_Goldenstart_with_dependencies2007397451\001 exp sync start test-unit --socket-path \\.\pipe\com.coder.agentsocket_test.TestSyncCommands_Golden/start_with_dependencies.EB5P5CXMZFVKOTNIWWZ2JHK2RW
    golden.go:192:
        Error:       Should be empty, but was  string(
            -   "Waiting for dependencies of unit 'test-unit' to be satisfied...\nSuccess\n",
            +   "Success\n",
          )
        Messages:   golden file mismatch (-want +got): testdata\TestSyncCommands_Golden\start_with_dependencies.golden

Root cause classification

  • Flaky test (timing): the test relies on time.Sleep(100 * time.Millisecond) to ensure the “Waiting…” line appears. On Windows, the dependency completes quickly enough that the waiting message is skipped, causing the golden mismatch.
  • No data race / panic / OOM indicators found.

Assignment analysis

  • Function-level blame (git blame -L) isn’t available via current tooling.
  • Used git log --oneline -10 --follow cli/sync_test.go to find recent meaningful changes.
  • Most recent relevant change: 1069ce6e “feat: add support for agentsock on Windows (#22171)” by Spike Curtis, which introduced/updated Windows sync behavior and touches this test file.
  • Assigning to @spikecurtis for triage.

Related issues searched (none found)

  • “TestSyncCommands_Golden”
  • “start_with_dependencies”
  • “exp sync”
  • Closed issues updated in last 30 days with “TestSyncCommands”

Reproduction (best effort)

  • Windows: go test ./cli -run TestSyncCommands_Golden/start_with_dependencies -count=1

Suggested next steps

  • Make the test output deterministic (e.g., explicit synchronization/ready signal instead of fixed sleep) or relax golden expectations for the optional waiting line on fast paths.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions