Repository navigation
Resolve the macOS system temp link in the output tests - #176
Merged
Merged
Conversation
The default temp root sits behind the /var -> /private/var system link, and the output validator rightly refuses a link anywhere above the output, so the six output::tests failed on macOS while passing in CI, which has no macOS lane. The test scratch helper now hands the validator the resolved root; production logic is unchanged. Co-Authored-By: Claude Code <[email protected]>
axisrow
commented
Oct 22, 2026
axisrow
left a comment
Collaborator
Author
There was a problem hiding this comment.
Ревью PR #176 — одобряю
Один коммит против base 9291a96: тест-хелпер scratch в crates/host/src/output.rs на macOS отдаёт валидатору канонизированный корень временной директории (var ссылается на private/var), потому что валидатор вывода отказывает путям с симлинками выше вывода.
Проверил: правка только в тестовом модуле; fs::canonicalize в скоупе через use std::fs::{self, ...}, COUNTER и структура пути не тронуты; expect в тестах разрешён правилами крейса; на прочих платформах ветка не меняет поведение. Комментарий объясняет причину. Согласуется с известным поведением macOS-окружения тестов.
Blogbotana
approved these changes
Oct 22, 2026
Blogbotana
left a comment
Member
There was a problem hiding this comment.
Agree. I just don't have Mac
This was referenced Oct 22, 2026
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.
What this changes
crates/host/src/output.rstest helperscratch()resolves the default temp root beforehanding it to the validator, on macOS only. The system path
/var/folders/...sits behindthe
/var -> /private/varlink, andresolve_destinationrightly refuses a link anywhereabove the output, so six
output::testsfailed on macOS:a_link_anywhere_above_the_output_is_refuseda_new_file_is_installed_whole_and_no_temporary_remainsa_failing_writer_leaves_no_output_and_no_temporaryan_existing_file_is_kept_unless_overwrite_is_askednothing_is_installed_until_every_staged_output_is_writtendestinations_compare_by_directory_and_nameThe production logic is untouched and stays strict: the fix is that tests hand the
validator a link-free root, the same convention the storage tests already follow.
Upstream CI does not run a macOS lane, so these failures were invisible there; on a
Mac the suite fails on a clean checkout of
master.How you verified it
cargo test -p beamcraft-host --libon cleanmaster, macOS (Apple M5,aarch64):
36 passed; 6 failed, all six withInvalidArgument: the output directory, or one of its ancestors, is a link or not a directory42 passed; 0 failedcargo fmt -p beamcraft-host -- --checkcargo clippy -p beamcraft-host -- -D warningsNever-crash
expectsits in test code, production paths unchangedProvenance (clean-room)
🤖 Generated with Claude Code
Issue tracking
Fixes #370