Repository navigation
Make agenticd tests independent of umask and machine load - #159
Merged
Merged
Conversation
Tests that create a repo directory with tempfile inherited the umask, so under umask 002 the directory was 0775 and the daemon correctly refused it as group-writable. Pin the repo directory to 0700 in the startup_refusal, socket_limits_integration and state_dir tests instead of loosening the daemon check. The socket tests also treated "socket file exists" as "daemon is accepting", but the file appears at bind() before listen(), so connect could be refused. Retry a refused connect with a bounded deadline in socket_limits_integration and approval_key_discovery, and give the socket_limits startup wait 20 s instead of 2.5 s. A refused connect is never admitted, so the retry cannot affect the connection caps under test.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Later connections in a test must connect on the first attempt, so a real refusal after the daemon is accepting still fails the test.
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.
Some agenticd tests failed under a umask of 002, and a few failed now and then under load.
Umask: tests created their temp repo directories with the default umask. Under 002 those directories are 0775, and the daemon correctly refuses a group-writable repo, so 5 of 11
startup_refusaltests failed. The tests now set the modes they depend on. The daemon checks are unchanged.Load: the socket tests treated "the socket file exists" as "the daemon is accepting". The file appears at
bind(), beforelisten(), so an early connect could be refused. The tests now retry a refused connect until a deadline, and the startup wait is 20 s. A refused connect is never admitted, so the retry cannot affect the connection caps under test.Proof, before and after:
startup_refusal: 6/11 under umask 002, now 11/11 under both 002 and 022.socket_limits_integration: 72/75 under parallel load, now 75/75.approval_key_discovery: 74/75, now 75/75.cargo test --workspacepasses under both umasks.Created with Claude Opus 5.5 and Claude Sonnet 5.5 in Claude Code.