macOS contributor gates: Messaging config tests fail under the symlinked macOS temporary directory

Open Beginner friendly
#2,704 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
83/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, macos, rust
Domain
ci-cd, testing

Research direction

Start with the three failing tests in crates/registry-messaging/src/config.rs around lines 1798 and 1817, then compare how other products' config tests handle temporary directories. Reproduce the failures on macOS or inspect the scheduled "macOS contributor gates" workflow. Done when the tests use a canonicalized fixture path and pass while preserving the loader's symlink refusal behavior.

Written by the indexing model from the issue text.

Description

The scheduled "macOS contributor gates" workflow has failed on every run since at least 15 November (the runs for 7f47a330f6, a8e5e49efe, fd2a888614 and 4be684f206). The 19 November run, which tested 4be684f206, failed in "Direct Cargo binaries and database-free gates": three registry-messaging config tests fail on macOS.

  • config::tests::runtime_loader_accepts_an_owner_writable_file_in_a_private_directory (crates/registry-messaging/src/config.rs:1817): the loader refuses the file with platform.runtime-config.unsafe-file, "the runtime configuration path must not pass through" a symlink. The temporary directory is under /var/folders/..., and /var is a symlink to /private/var on macOS.
  • config::tests::runtime_loader_refuses_a_group_writable_ancestor and config::tests::runtime_loader_refuses_a_group_writable_file (config.rs:1798): the refusal arrives, but for the symlinked path, so the assertion that the message mentions "owned by root or the runtime user" fails.

Likely cause

The tests build their fixtures under the default temporary directory without canonicalising it. Linux has no symlink there, so CI on Linux passes. The loader's refusal of symlinked paths is intended. The tests probably need to canonicalise the temporary directory, as other products' config tests do.

Not checked

I did not check whether the earlier failing runs failed for the same reason. They failed in the same job.

Dominant language
Rust
Stars
2
Forks
0
Avg merge
9h 48m
Merged PRs (30d)
151

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from registrystack/registry-stack

All issues in registrystack/registry-stack

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.