Repository navigation
test: pass the suite under any umask - #294
Merged
Merged
Conversation
funes refuses an integration others could write to. Some test fixtures left their modes to the umask, so under umask 002 (the default on Debian and Ubuntu, where each user has a group of their own) 18 tests failed on funes refusing what they built: - the registry tests' integration() helper, and the temporary directories ten of them used as the registry root - the bundle add_fifth_integration places by hand, and the .memory note it writes Each now sets the mode funes gives its own files. CI runs the full suite under umask 002, so a fixture that depends on the umask fails there. The unit job keeps the runner's 022. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dacorvo
commented
Nov 13, 2026
Comment on lines
+99
to
+101
| /// [`bundle`], declaring `repo` as where it is published from. Its directories are 0755 whatever | ||
| /// the umask, as funes makes its own: funes refuses a bundle under `~/.funes/agents` that others | ||
| /// could write to. |
Collaborator
Author
There was a problem hiding this comment.
Do not paraphrase code
| // included, and the notes beside the agents go. A note saying `local`, which funes never | ||
| // wrote, is no binding and no disagreement. | ||
| fs::remove_file(&bound).unwrap(); | ||
| // 0644 whatever the umask, as funes wrote them: one others could write is refused. |
Comment on lines
+63
to
+66
| The suite passes under any umask, and CI runs it under `umask 002`. funes refuses an integration | ||
| others could write to, so a test that builds one by hand (its directories, its `setup`, a note | ||
| beside it) sets their modes itself, as funes does when it installs one. | ||
|
|
Comment on lines
+1002
to
+1003
| /// Its directories are created as funes creates its own, so `open` judges what the test meant | ||
| /// and not the umask of whoever runs it. |
Comment on lines
+991
to
+993
| /// A registry root closed to other writers, as funes makes its own. `open` judges the root as | ||
| /// well, and a temporary directory otherwise takes its mode from the umask, which 002 leaves | ||
| /// group-writable. |
Collaborator
Author
There was a problem hiding this comment.
Suggested change
| /// A registry root closed to other writers, as funes makes its own. `open` judges the root as | |
| /// well, and a temporary directory otherwise takes its mode from the umask, which 002 leaves | |
| /// group-writable. | |
| /// A registry root closed to other writers, as funes makes its own. |
Comment on lines
+204
to
+206
| # Under umask 002, the default on hosts with a group per user (Debian, Ubuntu). funes refuses | ||
| # an integration others could write to, so a test fixture that leaves its modes to the umask | ||
| # fails here, not only on those hosts. The unit job keeps the runner's 022. |
Collaborator
Author
There was a problem hiding this comment.
My understanding is that this is now redundant
And the paragraph in CONTRIBUTING. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 9 tasks
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.
On a host whose umask is 002 (the default on Debian and Ubuntu, where each user has a group of their own), 18 tests fail: 7
agents::registryunit tests and 11 inadd_fifth_integration. funes refuses an integration others could write to, and these fixtures left their modes to the umask. funes itself is not affected: it creates its registry at 0755 and writes its files at 0644 whatever the umask.