Skip to content

flaky(windows): nested directory snapshot revert assertion fails #12

@Astro-Han

Description

@Astro-Han

Symptom

nested directory revert flakes on Windows CI with assertion failure (not timeout).

  • File: packages/opencode/test/snapshot/snapshot.test.ts:216
  • Seen: Attempt 3 of PR #8 validation run, 344ms duration

Context

Post PR #8 residual flake. 344ms is fast enough that it's not a timeout bound issue — the snapshot diff/track/revert assertion sometimes doesn't reflect the nested directory state on Windows.

Root cause to investigate

Likely a Windows filesystem-semantics issue: mkdir -p level1/level2/level3 + write file + revert may have timing or atomicity differences on NTFS vs POSIX. Possible causes:

  • Snapshot.diff() reads before all filesystem writes settle (Windows directory updates are not synchronous)
  • path separator normalization (\ vs /) in the revert path
  • temp dir cleanup race from a prior test in the same file

Worth running this test in isolation on Windows to see if it still flakes alone, vs only under concurrent load from other tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low prioritybugSomething isn't workingciContinuous integration / GitHub Actionsflaky-testNon-deterministic test failurewindowsWindows-specific

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions