Repository navigation
tests: scripts a test runs are written by sh, not by the test process - #98
Merged
Merged
Conversation
agent::agy::tests::a_whole_turn_reports_these_events_and_this_outcome
failed once on ubuntu-latest (PR 97, run 43751808555) with no events at
all, and passed on a rerun of the same commit. The test asserted the
events before the turn's result, so the log could not say why the turn
produced nothing.
Two changes:
- That test's event assertion now prints how the turn ended, so a turn
that never started says why.
- The probable cause is removed everywhere it can happen. A test binary
runs its tests on many threads; a program another thread starts while
this process holds a script open for writing is handed that open file
until it has started, and running the script in that moment fails with
ETXTBSY ("Text file busy"). This is inferred, not shown by the log: it
fits a turn that fails before its first event. The new
crate::test_support::write_script (tests only, off Windows) has a
short-lived sh write the file and chmod it, so the test process never
opens it. All 13 test sites that wrote a script and then ran it use it:
agy_tests, agy/bridged_tests, claude_code/tests (6), codex/tests,
hooks/engine (2), toolbox/reading_tests and verify. self_update.rs is
production code and is unchanged.
The Unix-only sites do not compile on Windows; CI's Linux and macOS jobs
are their compile and test check (a local musl cross-check could not
build openssl-sys).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tests: scripts a test runs are written by sh, not by the test process
agent::agy::tests::a_whole_turn_reports_these_events_and_this_outcome
failed once on ubuntu-latest (PR 97, run 43751808555) with no events at
all, and passed on a rerun of the same commit. The test asserted the
events before the turn's result, so the log could not say why the turn
produced nothing.
Two changes:
that never started says why.
runs its tests on many threads; a program another thread starts while
this process holds a script open for writing is handed that open file
until it has started, and running the script in that moment fails with
ETXTBSY ("Text file busy"). This is inferred, not shown by the log: it
fits a turn that fails before its first event. The new
crate::test_support::write_script (tests only, off Windows) has a
short-lived sh write the file and chmod it, so the test process never
opens it. All 13 test sites that wrote a script and then ran it use it:
agy_tests, agy/bridged_tests, claude_code/tests (6), codex/tests,
hooks/engine (2), toolbox/reading_tests and verify. self_update.rs is
production code and is unchanged.
The Unix-only sites do not compile on Windows; CI's Linux and macOS jobs
are their compile and test check (a local musl cross-check could not
build openssl-sys).