Repository navigation
build: the portable-names test runs every time, since a reused pass can't see a name added since - #2311
Merged
Conversation
This was referenced Nov 6, 2026
…an't see a name added since It walks zig, docs, tools and .github for names Windows can't check out. Those directory listings aren't inputs the build knows of, so since pull requests reuse main's test passes (#2274), a pull request that adds such a name would reuse the pass and stay green until main's own run. Found by tracing what every run in test-host opens (the review of #2095): of the runs the build can skip, this is the only one that reads tracked paths it doesn't declare; the others declare theirs in zig/build/test_reads.zig.
ashhart
force-pushed
the
lead/portable-names-always
branch
from
November 6, 2026 14:19
57bf941 to
4d1f1ef
Compare
8 tasks done
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.
zig/tests/portable_names.zigwalkszig,docs,toolsand.githuband fails on any name Windows can't check out. Since #2274, a pull request reuses main's pass for a test whose binary and declared inputs didn't change. A directory listing isn't an input the build knows of, so a pull request that adds such a name would reuse the pass and stay green. Only main's own run, which builds from nothing, would catch it, after landing.This makes that run always repeat (
has_side_effects). It takes milliseconds.How it was found
The review of #2095 asked for a trace of what its new steps read while they run. I ran
zig build test-hostfrom a cold cache under strace on a hosted Linux runner (run 42166246710), with every test binary named after its root file. A check against the build summary confirmed the trace saw every one of the 618 runs (273 binaries).Of the runs the build can skip:
core/root,server/root,lfm2andexlr8_oracle_testread tracked files, andzig/build/test_reads.zigdeclares each one.portable_namesopens 388 tracked directories.Every other run that reads tracked files always repeats anyway: the goldens,
kernel_symbols, the q35 launch arguments, the picture tests and the Python and shell checks. So #2095's new steps need no new declarations.The trace covered opens and launches on Linux, not existence checks (
stat,access) or the Windows and macOS graphs.Test plan
zig build teststill runsportable_nameson each platform