Skip to content

flake: contract TestWSFilesUnwatch gets a late beta.md fs_event at step 05 #363

Closed as not planned

Description

@barelyworkingcode

Found while working #356. ship-blocker: no (a contract-scenario flake; seen once).

Problem

PR #361's contract job (run 38093619414, attempt 1) failed; #361 touches only cmd/devboxverify:

--- FAIL: TestWSFilesUnwatch (167.93s)
    s_wsfiles_test.go:45: fakerelay and relay differ at step 05 WS /ws/files frame fs_event
      fakerelay: ws {"path":"after-unwatch.md","project_id":"p_acme","type":"fs_event"}
      relay:     ws {"path":"beta.md","project_id":"p_beta","type":"fs_event"}

main's last five CI runs are green.

Root cause (not yet shown)

Relay delivered an fs_event for p_beta's beta.md, a file an earlier step wrote, when step 05 expected the event for after-unwatch.md. A watcher event from the earlier step arrived late (file-system event coalescing or latency on the runner), and the scenario reads the next frame rather than the next frame for the expected path. The 168 s runtime suggests waits ran long.

Fix

Smallest deterministic change: the step waits for the frame it expects (matching project and path) and skips frames an earlier step caused, or the earlier step waits for its own event before the next step starts. Confirm the late frame first.

Activity

  1. added
    flakeTest that fails intermittently; every rerun-to-green links one
    on Oct 10, 2026
  2. barelyworkingcode commented on Oct 19, 2026

    @barelyworkingcode
    OwnerAuthor

    Closing as stale. These flakes predate the stack-per-run harness (devboxWorld#25, merged in barelyworkingcode/devboxWorld#32 on 2026-10-17): each verification run now gets its own seeded stack, so shared-world load and mid-run rebuilds no longer reach it. Owner decision, 2026-10-18. If it fails again on a stack run, reopen with the run log.

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

    flakeTest that fails intermittently; every rerun-to-green links one

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions