Skip to content

testing: the reaper test reads the reaper's stderr through a pipe - #14829

Merged
TrapsterDK merged 1 commit into
mainfrom
fix-reaper-windows
Nov 24, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
fix-reaper-windows

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

portable_tests::the_reaper_stops_servers_after_the_owner_is_killed failed on Windows (evidence run 45370306679) with the reaper waiting did not happen within 30s.

Root cause: #14818 waits for the reaper's "waiting for owner" line with watch_until on reaper.log, which uses notify. On Windows, ReadDirectoryChangesW reports a size or last-write change only after the cached write reaches the disk. The reaper appends that line through a handle it already holds open, so no event arrives and the wait times out even though the line is in the file.

Fix: spawn_reaper now takes the reaper's stderr. Server::acquire still passes reaper.log. The tests pass a pipe, and a reader thread blocks on it and signals when the waiting line shows up. It keeps draining the pipe so later reaper output can't hit a broken pipe, and it returns the full log for failure messages. The wait is still event-driven and adds no sleeps.

The 7 nested_bazel_harness_test failures caused by the stale nested lock are out of scope here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

/evidence platforms=["windows_x86_64"] task=test scope=//tools/testing/nested/...

@github-actions

Copy link
Copy Markdown
Contributor

Evidence started on fix-reaper-windows: https://github.com/devhusdk/rules_dx/actions/runs/45371977960

On Windows, ReadDirectoryChangesW reports a size or last-write change
only once the cached write reaches the disk, so appending the waiting
line to reaper.log through the reaper's open handle raised no notify
event and the_reaper_stops_servers_after_the_owner_is_killed timed out
after 30s. spawn_reaper now takes the reaper's stderr; the server keeps
logging to reaper.log, and the tests pipe it and block on the waiting
line, which a read returns as soon as the reaper writes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

/evidence platforms=["windows_x86_64"] task=test scope=//tools/testing/nested/...

@github-actions

Copy link
Copy Markdown
Contributor

Evidence started on fix-reaper-windows: https://github.com/devhusdk/rules_dx/actions/runs/45372383848

@TrapsterDK
TrapsterDK merged commit fc243a4 into main Nov 24, 2026
11 of 22 checks passed
@TrapsterDK
TrapsterDK deleted the fix-reaper-windows branch November 24, 2026 10:22
TrapsterDK added a commit that referenced this pull request Nov 24, 2026
…#14830)

#14829 merged before its Windows evidence finished. dx_nested_test_upstream
fails to compile there: drop(waiting.try_send(())) trips
dropping_copy_types under -D warnings, since the Result is Copy.


Claude-Session: https://claude.ai/code/session_01Xut2hyBydsMejdwk6QdKus

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant