Skip to content

flaky(windows): compaction abort does not stop promptly during retry backoff #10

@Astro-Han

Description

@Astro-Han

Symptom

session.compaction.process > stops quickly when aborted during retry backoff flakes on Windows CI.

  • File: packages/opencode/test/session/compaction.test.ts:750
  • Seen: Attempt 1 of PR #8 validation run, 2016ms duration with ##[error] (not a Bun test timeout — test expects abort to complete within ~250ms but sometimes takes ~2s on slow runner)

Context

Part of the residual Windows CI flake surface identified after PR #8 (OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=true) landed. DISABLE_FILEWATCHER eliminated the file-watcher-cascade class of failures, but ~4 assertion-shaped tests still flake non-deterministically.

This is one of the 4 flakes that cannot be fixed by inflating timeout bounds — the assertion is about how fast abort propagates, which is the actual thing under test.

Root cause to investigate

Why does abort propagation take >250ms under Windows runner load? Is there a timer in Session.compaction that doesn't respect AbortSignal promptly during retry backoff? Could be fixed by plumbing AbortSignal into the retry-backoff sleep instead of relying on the next iteration to check abort.

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