Skip to content

Flaky: ServerFailureCaptureTests oversized-log test misses its log on loaded net472 (Windows CI) #359

Open

Description

@Blind-Striker

Finding

ServerFailureCaptureTests.CaptureAsync_Should_Keep_The_Newest_Bytes_Of_An_Oversized_Server_Log failed once on the Windows CI leg, net472 host. The run was PR #358 (job 116973940668, 2026-10-16T12:38Z), whose changes are only in tests/OpenCode.Sdk.Tools.Tests/ and cannot reach this test. The test took 5.8 s; a MockFileSystem test normally takes milliseconds.

failed CaptureAsync_Should_Keep_The_Newest_Bytes_Of_An_Oversized_Server_Log (5s 847ms)
  [Test Failure] DirectoryNotFoundException: Could not find a part of the path
  'C:\results\server-diagnostics\OpenCode.Sdk.Tests\6e9818521e724e139fee985bfd4310fa\server-logs\opencode.log'.
  from ...\OpenCode.Sdk.Tests.exe (net48|x64)
    at Testably.Abstractions.Testing.FileSystem.FileMock.OpenText(String path)
    at OpenCode.Sdk.Tests.ServerFailureCaptureTests.<ReadAsync>d__6.MoveNext()
    at OpenCode.Sdk.Tests.ServerFailureCaptureTests.<CaptureAsync_Should_Keep_The_Newest_Bytes_Of_An_Oversized_Server_Log>d__2.MoveNext()

The capture wrote no server-logs/opencode.log into the mock artifacts directory, so the test's read found no folder.

Hypothesis (unverified)

ServerFailureCapture bounds each capture step with OwnedOperationDeadline, which waits on the real clock (tests/Shared/Ownership/OwnedOperationDeadline.cs). Under the loaded Windows leg, the log-copy step may have outlived its bound. The step would then be abandoned, leaving no file, and the test reads it as a missing directory. If so, the verdict rides the clock (testing-style §6, "the event decides, never the clock"), and the fix belongs in the test's seam, not in a wider bound.

Disposition

Recorded before any rerun, per the flaky-test rule (quality-gates; Faz 4 manual §10). It was not retried, widened or quarantined. The PR #358 Windows leg is re-run only after this record exists. Owner to be decided by the lead (introduced with #333/#345).

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions