Skip to content

fix(ace): system-folder filter matches whole path components; macOS tests use a non-system scratch root - #973

Merged
runyourempire merged 1 commit into
mainfrom
fix/macos-system-folder-tests
Oct 16, 2026
Merged

runyourempire merged 1 commit into
mainfrom
fix/macos-system-folder-tests

Conversation

@runyourempire

Copy link
Copy Markdown
Collaborator

Why

The scheduled Validate run on main (38880007740, 10-16) failed on Rust (macos, nightly): two tests added in #961, confirmed_dirs_drop_missing_duplicates_and_drive_roots and a_typed_folder_is_checked_before_it_is_added, build their fixtures under tempfile's default dir. On macOS that is /var/folders/..., and the scan filter refuses /var by design, so the folder came back as system_folder.

Looking at the filter turned up two production defects on unix:

  • It matched by string prefix, so user folders like /variants/app or /usr-projects were refused.
  • macOS canonicalises /etc and /var to /private/etc and /private/var, so the check that folder_problem repeats after canonicalize let those system folders through.

What

  • is_system_directory (unix only) now matches whole path components with Path::starts_with against the system roots, and adds /private/etc and /private/var. The Windows branch is unchanged.
  • The auto_discover tests get scratch_root(), which puts fixtures under the crate dir on macOS only.
  • A new unix test pins component matching and the /private forms.

Verification

  • The Linux PR legs run the new unix test.
  • I dispatched a workflow_dispatch Validate run on this branch to exercise the macOS leg, which PR CI doesn't run.

Not in this PR: the same 10-16 run's Rust (default) failure and the nightly supply-chain audit (#971) both came from zip 4.6.1 and 8.6.0 being yanked on crates.io at the time. Both versions are unyanked again (checked on the sparse index), and I re-dispatched the nightly audit.

🤖 Generated with Claude Code

https://claude.ai/code/session_018hjX3pEMmC7CHfG41PiPj7

…ests use a non-system scratch root

The scheduled macOS leg has failed since #961: its folder-check tests build
their fixtures under tempfile's default dir, which on macOS is /var/folders,
and the filter refuses /var by design. The filter also matched by string
prefix, so a user folder like /variants or /usr-projects was refused, and
macOS's canonical /private/etc and /private/var forms slipped past the
post-canonicalize re-check.

- is_system_directory (unix): component-wise Path::starts_with over the
  system roots, plus /private/etc and /private/var.
- auto_discover tests: scratch_root() puts fixtures under the crate dir on
  macOS only.
- New unix test pins component matching and the /private forms.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018hjX3pEMmC7CHfG41PiPj7
@runyourempire
runyourempire added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit aaba143 Oct 16, 2026
44 checks passed
@runyourempire
runyourempire deleted the fix/macos-system-folder-tests branch October 16, 2026 22:48
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