Skip to content

Serialize directory helper tests that open descriptors - #57

Merged
SaladDay merged 1 commit into
mainfrom
codex/directory-test-lock
Sep 23, 2026
Merged

SaladDay merged 1 commit into
mainfrom
codex/directory-test-lock

Conversation

@SaladDay

@SaladDay SaladDay commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

The descriptor-count assertion in the codex-executor directory tests (repeated_reads_release_directory_descriptors) assumes that no other test in the same binary opens descriptors concurrently. The three not_directory and root-removal tests added in #49 opened descriptors without the shared TEST_LOCK. Under heavy host load, one server gate run failed on that assertion (4 vs 7 descriptors), and the poisoned lock then failed three more tests.

These tests now take the same lock (poison-tolerant). This is a test-only change; runtime code is untouched.

Validation

  • scripts/check-agents-executor.sh passes (fmt, tests, clippy).
  • A stress run of 60 concurrent executions of the directory test binary passes.
  • Server gate on this head: make -o check-web check plus Web typecheck, core-doctor, unit tests and the build all pass. The Playwright browser cases were not run on the server (no Google Chrome; the user approved the skip).

No behavior change. A small follow-up to #49, so no separate review was run.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

The descriptor-count assertion in the directory tests assumes no other test
in the same binary opens descriptors concurrently. The root-removal and
not_directory tests added for Environment Files now take the same test lock.
@SaladDay
SaladDay merged commit b77249c into main Sep 23, 2026
2 of 3 checks passed
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