Skip to content

Conversation

@sanity
Copy link
Collaborator

@sanity sanity commented Dec 2, 2025

Problem

The config::tests::test_serde_config_args test was failing intermittently on our self-hosted CI runners with:

thread 'config::tests::test_serde_config_args' panicked at crates/core/src/config/mod.rs:1264:38:
called `Result::unwrap()` on an `Err` value: Permission denied (os error 13)

This blocked 5 of 7 Dependabot PRs from passing CI, even though the test failure was unrelated to the dependency updates.

Root Cause

The test used id: Some(unique_id) which triggers ConfigPathsArgs::default_dirs() to create directories under /tmp/freenet-{id}. Self-hosted runners can have restrictive permissions on /tmp directories that prevent this.

Solution

Use tempfile::tempdir() to create a guaranteed-writable temporary directory, then explicitly set config_paths.config_dir and config_paths.data_dir to that path. This bypasses the /tmp code path entirely.

Testing

  • Verified locally that the test passes
  • The fix is minimal and low-risk since it only affects test code

Impact

Once merged, the 5 blocked Dependabot PRs should pass CI:

[AI-assisted - Claude]

The test was failing on self-hosted runners with "Permission denied"
errors when writing to /tmp. Self-hosted runners can have restrictive
permissions on /tmp directories.

This fix uses tempfile::tempdir() to create a guaranteed-writable
temporary directory, bypassing the /tmp path entirely.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sanity sanity added this pull request to the merge queue Dec 2, 2025
Merged via the queue into main with commit 4243d93 Dec 2, 2025
8 checks passed
@sanity sanity deleted the fix/config-test-tempdir branch December 2, 2025 01:35
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.

2 participants