Repository navigation
Prepare worker socket permissions before announcing readiness - #142
Merged
Merged
Conversation
bitomule
added a commit
that referenced
this pull request
Dec 3, 2026
bitomule
added a commit
that referenced
this pull request
Dec 3, 2026
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.
Worker startup currently treats a socket pathname as available before its permissions are configured. The existing lifecycle test can observe that intermediate state. Prepare the socket with
bind → chmod(0600) → listen, then announce readiness after worker initialization. Keep the process umask unchanged.The tests now synchronize with startup explicitly and still check the exact
0600mode, ping, stop, and removal. Channel barriers verify that connections and readiness are unavailable before chmod. Failure tests cover chmod errors, retry, and replacement sockets. Cleanup retains the identity captured at bind instead of adopting a replacement's inode.Validation:
origin/mainatbcce929: the original test passed 100 runs. A temporary barrier before chmod reproducedsocket mode=755 want 600deterministically.-race -count=10and inherited umasks000,002, and077in separate processes.go test ./...andgo vet ./...pass.Regression checks used temporary Go overlays, leaving the fixed source unchanged. Each variant failed its targeted test:
The fixed source passes all four checks. Timeouts only bound failures; the new startup tests use no sleeps or permission polling.