Repository navigation
msbuild: names MSBuild seeds from the profile read inexact unseeded (#1130) - #1138
Merged
Merged
Conversation
…1130) MSBuild's evaluator defines `LocalAppData` from the process's profile when the environment lacks it (`Utilities.GetEnvironmentProperties`, 18.9), as it does the extension paths. The walk read an unseeded `LocalAppData` as exactly unset, and committed what rested on that: `$(LocalAppData)` as empty, a gate on it as false, a write gated on it as absent. It also believed the SDK's self-default idiom for `MSBuildExtensionsPath64`, which MSBuild likewise defines before any project text runs. - `is_toolset_initial_property_name` now includes `localappdata`, so an undefined read of it is inexact. This is the one name of the profile-seeded set that the `msbuild` prefix does not cover. - `TOOLSET_PREDEFINED_NAMES` now includes `localappdata` and `msbuildextensionspath64`, so the self-default exemption no longer treats their absence as a fact. Test first: `profile_seeded_names_are_exact_or_declined` reads each of the five names `GetEnvironmentProperties` seeds, in three spellings, in four shapes: direct, an emptiness gate either way, a write gated on the name being set (the `TasksAssembly` shape), and the self-default. Each read must be exact against design-time MSBuild, or declined. It failed with 15 commits before the fix, and each half of the fix, reverted, fails it. Decline cost: the msbuild corpus differential and the SDK chain attribution do not move. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…absence graded Round 1 of review: `profile_seeded_names_are_exact_or_declined` handed the walk `oracle_environment()`. That mirrors MSBuild's `MSBuildUserExtensionsPath` into the walk's environment, so the name was never unseeded. Unseeded, the self-default idiom committed its fallback. - `TOOLSET_PREDEFINED_NAMES` now includes `msbuilduserextensionspath`, so every name `GetEnvironmentProperties` seeds is either listed or seeded. - The test drops the names under test from the walk's environment. It grades `PropertyRead`: a value must equal MSBuild's; `Unset` is an exact claim and fails where MSBuild holds a value; only `UnsetInexact` and `Untrusted` count as declines. Without the list entry, all three spellings of the self-default commit `/FALLBACK`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 25, 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.
Claim
When the caller's environment lacks one of the names that MSBuild's evaluator defines from the process profile before any project text runs, every read of that name is exact against MSBuild or declined. MSBuild 18.9's
Utilities.GetEnvironmentPropertiesseeds five such names:MSBuildExtensionsPath,MSBuildExtensionsPath32,MSBuildExtensionsPath64,LocalAppDataandMSBuildUserExtensionsPath. "Every read" covers a direct read, an emptiness gate either way, a write gated on the name being set, and the SDK's self-default idiom (<X Condition="'$(X)' == ''">fallback</X>).Domain
Change
is_toolset_initial_property_nameaddslocalappdata. An undefined read of it is now inexact. It is the one profile-seeded name that themsbuildprefix does not already cover.TOOLSET_PREDEFINED_NAMESaddslocalappdata,msbuildextensionspath64andmsbuilduserextensionspath. The self-default exemption no longer treats their absence as a fact. Every profile-seeded name is now either on this list or seeded by the walk.Tests
toolset_predefined_names_diff::profile_seeded_names_are_exact_or_declinedreads each of the five names in three spellings and four shapes, against design-time MSBuild:PropertyRead. AValuemust equal MSBuild's.Unsetis an exact claim, so it fails wherever MSBuild holds a value. OnlyUnsetInexactandUntrustedcount as declines.predefined_names_without_an_sdk_are_exact_or_declinedadds the three names to its overridable list.Mutation checks:
msbuilduserextensionspathentry, all three spellings of the self-default commit/FALLBACK.Decline cost
None measured. Each of these is unchanged:
fsproj_msbuild_corpus_diff);restore_cone_reads_*.txt);The real-SDK must-commit lists in
fsproj_global_perturbation_diffandfsproj_sdk_import_graph_generative_diffstill pass.Review and gate
Codex ran two rounds against origin/main
193c28caa.Round 1 had two findings:
MSBuildUserExtensionsPath, so that name was never unseeded.Both are fixed in
f351945f9, which adds a test that fails without the fix.Round 2 had no findings.
The full gate ran locally on
f351945f9, because the build box is unreachable: fmt, clippy, doc, the msbuild corpus and SDK chain sweeps, and every step oftools/ci/project-corpus-gate.sh, including the restore-cone census. All are green. The machine's load average was 40–80 throughout, because other worktrees were building.cargo test --workspacefailed only on wall-clock watchdogs that this PR does not touch, and each passes on rerun:incremental_state_machine::a_session_whose_requests_stop_agrees_with_a_fresh_onetimed out waiting on a barrier. The--no-fail-fastrerun passed the wholeborzoicrate.deep_nesting::deep_project_text_evaluates_without_abortinghit its 120 s watchdog. Run alone, it passes in 112 s.Closes #1130
🤖 Generated with Claude Code