Skip to content

test: pass the suite under any umask - #294

Merged
dacorvo merged 3 commits into
mainfrom
test/umask-fixtures
Nov 13, 2026
Merged

dacorvo merged 3 commits into
mainfrom
test/umask-fixtures

Conversation

@dacorvo

@dacorvo dacorvo commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

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::registry unit tests and 11 in add_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.

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>
Comment thread tests/add_fifth_integration.rs Outdated
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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not paraphrase code

Comment thread tests/add_fifth_integration.rs Outdated
// 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Comment thread CONTRIBUTING.md Outdated
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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Comment thread src/agents/registry.rs Outdated
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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

Comment thread src/agents/registry.rs Outdated
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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread .github/workflows/ci.yml Outdated
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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that this is now redundant

dacorvo and others added 2 commits November 13, 2026 10:22
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>
@dacorvo
dacorvo merged commit 27fe65d into main Nov 13, 2026
12 checks passed
@dacorvo
dacorvo deleted the test/umask-fixtures branch November 13, 2026 11:16
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