Skip to content

msbuild: UsingTask registration refusals are rejections (#1099) - #1155

Merged
Smaug123 merged 23 commits into
mainfrom
issue-1099-using-task-registration
Nov 25, 2026
Merged

Smaug123 merged 23 commits into
mainfrom
issue-1099-using-task-registration

Conversation

@Smaug123

@Smaug123 Smaug123 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Claim

When MSBuild's design-time evaluation rejects a project because a <UsingTask> registration refuses a value, without any expression throwing, the walk claims that MSBuild may reject the project. When the walk claims the rejection is certain, the project is rejected, and the construct the walk names is one MSBuild refuses on its own. The walk does not claim that this construct is the first error MSBuild reports, and nothing reads which error that is. (#1099)

Domain

The walk commits only on a value it holds for certain, at a <UsingTask> the loader recognises, and claims a certain refusal only when the registration certainly refuses that value:

  • TaskName, or the AssemblyFile written (else the AssemblyName), expands to empty.
  • A body or parameter group sits under a TaskFactory that is empty, AssemblyTaskFactory or TaskHostFactory.
  • A body's Evaluate, or a parameter's Output or Required, is not read by Boolean.TryParse.
  • A parameter's ParameterType is empty.
  • Two parameters have names that fold to one under case-insensitive comparison (MSB1025).

The children are read as ProjectUsingTaskElement reads them: the body is the last child, if it is a <Task>, and the parameter group is the first, if it is a <ParameterGroup>. Both are matched by the name as written, prefix included.

Everything outside this domain declines, as a possible rejection or as no claim:

  • a value the walk doubts, or does not compute (an item list, a function it does not model, a padded reference such as $( Flag)), declines as possible;
  • a ParameterType naming a type outside the probed list declines as possible;
  • a TaskFactory name outside ASCII declines as possible;
  • a child that a parse configuration may skip declines as possible;
  • a value the walk holds none of makes no claim. That is msbuild: the candidate-value channel (part of #1009, stage 1) #1051, the judgement over the values a name may hold.

The walk's values are taken as given. Two names MSBuild defines where no document gives them a value were read as exact; their fixes landed first, in #1138 (#1130) and #1142 (#1131). A registration reading either name declines with no code of its own here (registrations_reading_names_msbuild_defines_claim_no_certain_rejection).

Tests

using_task_registration_diff grades every case against the oracle's design-time evaluation (grade):

  • MSBuild rejects ⇒ the walk claims a rejection.
  • MSBuild evaluates ⇒ there is no certain claim, and the value after the task is committed.
  • Every certain registration diagnostic names a construct that MSBuild refuses alone (assert_msbuild_refuses_alone), with the expected error, at the named attribute. The alone document is built from the original one:
    • it is the whole document, with its <UsingTask>s replaced by the one construct;
    • it sits at the document's own path;
    • it is under the task's Condition;
    • the task's children stay in their places, and are present only where the task had them;
    • the attribute is replayed as written.

Must-commit points. each_rule_refuses_the_hostile_classes_it_refuses covers each attribute the registration judges (TaskName, TaskFactory, AssemblyFile, AssemblyName, Evaluate, Required, Output, ParameterType). For each hostile-value class that attribute's rule refuses, plus a plain value, it puts the class's first alphabet entry in that attribute. The point passes only if the walk claims a certain refusal of that attribute, and MSBuild refuses it alone, pointing at that attribute. For TaskFactory, MSB4067 points at the <UsingTask> that bears the attribute.

  • The classes are probed: empty and whitespace for the rules that refuse an empty value, and every owed class for the boolean ones.
  • Mutating any rule to take what it refuses fails the test.
  • The hostile census (using_task_registration) records these points alone.

Sweeps and hand rows.

  • Hand rows cover each rule's corners.
  • registration_sweep covers every place × the hostile value alphabet × literal, certain, doubted (with an independently drawn competing value) and refused sources.
  • composite_sweep covers whole <UsingTask>s, one or two per document, with every attribute, both child orders, conditions, folding names and special values.
  • Both sweeps grade every case, and only print their tallies. They have no count floors and credit no census.

Other.

  • The oracle's new rejectionCode op reports the error code and the place it points to.
  • attributes_no_rule_judges_are_expanded_once and deep_nesting's parameter-group test both count work rather than time it.

Decline cost

Out of scope

Review

Codex ran 19 rounds.

  • Rounds 1–8: five rounds in a row were about which refusal MSBuild reports first, so the claim was narrowed to the verdict plus a construct MSBuild refuses alone.

  • Round 9:

    • an empty Evaluate reads as absent;
    • attributes written empty are the loader's to refuse;
    • bounded task names;
    • replay at the document's own path.
  • Round 10:

    • collisions only between names the loader takes;
    • bounded collision names;
    • each attribute expanded once;
    • the replay keeps the whole document.
  • Round 11:

    • the wording of possible refusals;
    • no throw claimed in a body MSBuild never expands;
    • throws replayed where they were;
    • only the project's own <UsingTask>s replaced.
  • Round 12:

    • the possible-refusal wording narrowed to "cannot confirm";
    • replay under the task's Condition;
    • the composite draws hostile values.
  • Round 13:

    • the gate added to every template;
    • malformed replays refused.

    Out of scope: msbuild: LocalAppData absent from the environment is read as exactly unset; MSBuild supplies it from the profile #1130 and msbuild: the item pass reads MSBuildAllProjects without MSBuild's SetAllProjectsProperty write #1131, now landed.

  • Round 14: children replayed in their places.

  • Rounds 15, 16 and 18: one stream about what the hostile census credited. It ended with this change: per-point must-commit witnesses replace the crediting, and the census records only them.

    • Round 15: the out-of-scope item-transform finding above.
    • Round 17: the TaskFactory replay supplied the child its own refusal depends on. Fixed, with a row that a mutation shows only the fix catches.
  • Round 19: no R1, and no census finding. Its R3 (the manifest header named a test that no longer writes it) is fixed. Its other finding is ci: run #1099's UsingTask registration soaks #1144.

Every finding in scope is fixed with a test that fails without its fix.

Gate

The full gate ran locally on 6406604f3, rebased onto origin/main 1f06d1eeb. fmt, clippy, doc, the msbuild corpus and SDK chain sweeps, and every step of tools/ci/project-corpus-gate.sh are green. cargo test --workspace failed on one test, which passes when run alone (67 s at load 60): incremental_state_machine::a_session_whose_requests_stop_agrees_with_a_fresh_one, a barrier wait that timed out. The load average was 40–60, and the same flake hit this branch's previous gate and #1138's. Filed as #1154. The #1132 sema wedge did not occur. CI is green on 6406604f3.

Closes #1099

🤖 Generated with Claude Code

Smaug123 and others added 23 commits November 25, 2026 17:17
…jection (#1099)

MSBuild's registration of a `<UsingTask>` refuses, rejecting the project,
without an expression throwing: a `TaskName` that expands to empty;
children under a `TaskFactory` that expands to empty, `AssemblyTaskFactory`
or `TaskHostFactory`; the `AssemblyFile` written (else the `AssemblyName`)
expanding to empty; a body's `Evaluate`, or a parameter's `Output` or
`Required`, that `Boolean.TryParse` does not read (written empty, it reads
as absent); a `ParameterType` that expands to empty or names no type it
takes. `rejection::judge_registration` judges each where MSBuild registers
the task: certain on a certain value reached for certain; possible on a
doubted value, an item list or metadatum MSBuild expands into it, or a type
outside the ones probed to resolve (`PARAMETER_TYPES`); no site on a value
the walk holds none of (#1051) or an expression it does not model (#1094).
A new `RejectionCause::UsingTaskRegistration` names the attribute and
value; the LSP renders it.

Tests:
- `using_task_registration_diff`: every rule's corners pinned against
  design-time evaluation, MSBuild's verdict and the walk's claim alike, and
  a sweep over every place, the hostile value alphabet and a spelling
  table, each written literally, through a certain, a doubted and a refused
  property; a rejection resting on a value the walk holds none of is shown
  to through a certain property. Census `using_task_registration`.
- `condition_diff`'s UsingTask grid takes back the `Evaluate` rows it left
  out for #1099.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…case-folded parameters

- The registration judgement expands with the file system where the walk
  has it, so a function that reads it (`GetPathOfFileAbove` finding
  nothing) is computed, not left unjudged.
- `AssemblyFile`'s own `\` turns into `/` before it expands, for the
  registration judgement as for the throwing one (`assembly_file_text`).
- Two parameters whose names fold to one fail MSBuild's case-insensitive
  registry: certain for ASCII names, possible where a fold outside ASCII
  may make them one; under a false condition, nothing is registered.
- A metadatum MSBuild leaves as written in a `<UsingTask>` attribute
  (`ExpandPropertiesAndItems`): text, not an unknown value; an item list
  stays unknown.
- The LSP says MSBuild "may be unable to" register a value the walk only
  doubts.
- The differential lets a possible rejection withdraw where MSBuild
  evaluates (a decline), counts every rejection before its floor, and
  grades the parameter collision through the oracle's report of MSBuild's
  internal error (`Oracle::design_time_verdict`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es not compute is a decline

- `judge_using_task` judges each attribute where MSBuild's registration
  expands it, in its order: `TaskName`, `TaskFactory`, the assembly,
  the body's `Evaluate` and body, each parameter's type, flags and name,
  then `Runtime`, `Architecture` and `Override`. Each value is judged for a
  throw and then for what the registration refuses, so the first certain
  rejection is the one MSBuild reports.
- A value MSBuild computes and the walk does not (`ReturnsValue`,
  `ReturnsBoolean`, an item list) is `Opaque`: a possible refusal,
  never a certain one.
- Parameters whose names fold to one are a `UsingTaskParameterCollision`
  (MSB1025), found in one pass.

Tests:
- The oracle's new `rejectionCode` op reports the error code MSBuild
  rejects with. `using_task_registration_diff` holds every certain
  rejection's cause to it (`code_of`), both hand-picked and generated.
- `the_first_refusal_in_msbuild_order_is_the_cause` pins both orders.
- New hand rows: a host-architecture `Evaluate`, `@(Flags)` and
  `@(Nothing)`. The collision test now checks its cause.
- The sweep grades every hostile value entry once before random draws,
  and its plain values include item lists.
- `deep_nesting`'s `a_wide_parameter_group_is_registered_in_one_pass`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…only certain ones

- The body is the last child if it is a `<Task>`, and the parameters the
  first if it is a `<ParameterGroup>`, as `ProjectUsingTaskElement` reads
  them. A body written before the parameters is neither, and nothing of
  either is registered.
- A step is reached for certain only past every earlier step the walk is
  certain MSBuild passes. That means a certain value the rule takes, or,
  for a name that must not be empty, literal text beside bare references.
  A refusal after a step MSBuild may stop at is possible, because the walk
  cannot name its cause.
- The factory check claims a refusal only over children the loader takes.
  A child a parse configuration may skip is a possible refusal.
- The loader keys a parameter group's names in a set.

Tests:
- `composite_sweep` generates whole `<UsingTask>`s: every attribute, the
  children in either order, parameters whose names fold to one, and each
  value drawn. A certain rejection's cause is held to MSBuild's error code,
  and an MSB1025 collision is graded as a rejection.
- The doubted source writes a second value, drawn independently, under its
  undecided gate. A rejection resting on it is counted as the #1051 gap
  and shown to rest there.
- Hand rows: both child orders, a parameter MSBuild may stop at before one
  it refuses, and an unrecognised child. Plus
  `a_child_a_parse_configuration_may_skip_needs_no_certain_factory`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… by written name; graded by place

- A UsingTask's steps are reached for certain only when no rejection was
  noted before the task. MSBuild may already have stopped at an earlier
  possible one, an earlier task's step included.
- The body, the parameter group and the parameters are matched by their
  names as written, prefix and all (`loader::qname`), as `ProjectParser`
  matches them.
- A name that must not be empty passes for certain on literal text alone,
  but only text no item list can take in: a first character that is not
  `@`, or a last one that is not `)`. `$(At)(Nothing)` with `At` holding
  `@` is `@(Nothing)`. One scan, with no copy per reference.
- A property function that returns a boolean the walk does not fold, and
  is the whole value, is `True` or `False` (`SomeBoolean`). `Required` and
  `Output` take either, and `Evaluate` passes but leaves the body's reach
  undecided.
- Repeated parameter names, both the loader's and the registration's
  case-folded ones, are found by sorting (`loader::first_repeat`). Its
  comparisons are counted.

Tests:
- The oracle's `rejectionCode` op reports where MSBuild's exception
  points. A certain rejection must contain that place, and where the place
  is an attribute, it must be the attribute the rejection names. This tells
  apart refusals that share MSB4022.
- `composite_sweep` draws one or two tasks per document, and its values
  include `$(At)(Nothing)`, `$(At)` and a boolean function.
- Hand rows: a task that may stop before a later refused one, the formed
  item list, and both boolean-function flags. The parse-configuration test
  adds a prefixed `ext:Task`.
- `deep_nesting`'s parameter-group test now counts name comparisons through
  `test_support::count_walk_costs` (at most 4·n·(log2 n + 1)), in place of
  a wall-clock ratio (#1108).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…jection

`tests/EndToEndBuildTests/MultithreadedTasks/Fixture.fsproj` registers
`<UsingTask AssemblyFile="$(ProbeAssembly)">`. Only the test's `run.fsx`
writes `ProbeAssembly`, so in the checked-out corpus the attribute expands
to empty. A full evaluation rejects that with MSB4022, design-time and
build alike: SDK 10's `dotnet msbuild -getProperty` does, and so does a
build with SDK 11.

SDK 11's `-getProperty` stops evaluating before the UsingTask pass
(`ProjectEvaluationStage`), so it reports values for the project anyway.
The walk now claims the full evaluation's rejection, and
`project_references` moves from match to decline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ues, across tasks

- `State::registrations_pass` says whether MSBuild certainly registered
  every UsingTask judged so far, and it carries into the next task. A
  doubted value the walk takes no longer lets a later task's refusal be
  named as MSBuild's first.
- A step passes for certain only on a value the walk holds for certain that
  the rule takes, or a boolean function on certain operands. The literal
  text fallback is gone: text beside a reference does not show that
  MSBuild expands the reference without throwing (an item transform a
  doubted name holds may throw).
- Whether the body is expanded is read from the value the `Evaluate` step
  holds for certain, so `false$(Missing)` skips the body as MSBuild does.
- The task name is shared (`Arc<str>`) across a task's refusals.
  `first_repeat` counts its equality scan too.

Tests:
- `INLINE`'s assembly is a literal, so a refusal in its children is
  MSBuild's first. A new row shows a toolset-path assembly leaving the
  refusal possible.
- New rows: an earlier task MSBuild may stop at, a name with literal text
  and a doubted transform, and a certainly false `Evaluate` before a
  refused parameter.
- The composite draws `$(F)`, `Prefix$(T)` and `false$(Missing)`. `F` and
  `T` hold values the walk doubts, and a rejection resting on those values
  is counted as #1051's gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n waits on earlier registrations

- `judge_using_task` tracks two things apart: whether MSBuild reaches the
  task (`entry`), and whether it certainly passes each step should it
  reach them (`ok`). A task whose condition is undecided but whose every
  step passes leaves `registrations_pass` set, because MSBuild reaches the
  next task whether it registered this one or skipped it.
- A UsingTask's condition is judged as reached only past every earlier
  registration, so an illegal condition after a task MSBuild may stop at
  is only possible.
- A refused value is shared (`Arc<str>`), since property reads clone the
  rejection.

Tests:
- Hand rows: a later task's illegal condition after a parameter type
  MSBuild may refuse, and a skippable valid task before a refused flag.
- The composite draws a condition for a quarter of its tasks: true, false,
  undecided, illegal, or throwing. A certain illegal-condition claim must
  point at `Condition`; its code is `condition_diff`'s to grade.
- A composite rejection excused as #1051's gap is graded again with `F`
  and `T` holding only the walk's values, which shows the doubted value
  caused it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uild's first error

Nothing reads which refusal MSBuild reports first. `ParsedProject::rejection`
holds the first construct in the walk's order, and the LSP renders a
construct's cause. So a certain registration rejection now claims only
that MSBuild rejects the project, and that the construct it names is one
MSBuild refuses.

Every registration step either passes or rejects the project, so a refusal
rejects it however MSBuild fares at the steps before. The reach and
registration-order machinery that tried to name MSBuild's first error is
deleted: `State::registrations_pass`, the per-step `ok` tracking, and the
condition's wait on earlier registrations. What stays serves the verdict:

- children read by position and by written name;
- the body skipped on an `Evaluate` held certainly false;
- a standalone boolean function read as `True` or `False`;
- the case-folded collision.

The LSP reads "which it refuses to register" (or "may refuse").

The differential grades the named construct alone
(`assert_msbuild_refuses_alone`). The construct must be in the document,
in the element the rejection spans. A `<UsingTask>` holding only it, after
the same writes, must be one MSBuild rejects, with the code it earns,
pointing at its attribute. The loader's refusals are still held to the
whole document's error, since MSBuild loads before it evaluates.
`the_first_refusal_in_msbuild_order_is_the_cause` is deleted, and rows
that were possible only for the sake of order now pin certain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nding)

- An expression the walk does not model is now an unknown value
  (`Opaque`), and so a possible refusal, rather than no site. This covers
  a padded reference: `$( Flag)` expands to empty in MSBuild. On the msbuild
  corpus and the SDK chain, nothing moves.
- A prefixed `ext:UsingTask` is none to the loader, so the walk registers
  nothing for it.
- Two parameters spelt alike are left to the loader (MSB4173). The
  registry collision is reserved for distinct spellings.
- A refused value is kept as a preview of at most 256 bytes.
- An attribute that no rule judges is not expanded a second time.
- The differential's isolation check replays the refused attribute as
  written in the element, not the walk's expansion of it.

The tests for the padded reference, `ext:UsingTask`, the exact duplicate
and the preview bound are not written yet; the review paused here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ostic

Each round-8 fix now has a test that fails without it:
- `$( Flag)` (a hand row, and `$( P)` in the composite): the walk misses
  the rejection if an unmodelled expression is treated as no site.
- `<ext:UsingTask>` beside a parse configuration
  (`a_child_a_parse_configuration_may_skip_needs_no_certain_factory`).
- Exact duplicate parameters (a hand row, and a second `A` in the
  composite's names). Every certain registration diagnostic, not just the
  project's first, is graded alone. An `<A /><A />` collision fails, since
  MSBuild refuses that pair with the loader's MSB4173, not MSB1025.
- `$(Dollar)(Bool)` (a hand row, and `$(D)(B)` in the composite): `alone`
  replays the attribute as written. Replaying the expansion evaluates.
- The preview bound: every registration diagnostic's value is at most 256
  bytes plus the ellipsis, which the hostile long values exceed.
- `attributes_no_rule_judges_are_expanded_once` counts the registration's
  expansions (`WalkCosts::registration_expansions`).

The whole-document error check for loader causes is gone. Under the
narrowed claim, a loader cause is one construct MSBuild refuses, not
necessarily the first it reports (MSB4035 comes before MSB4173). The loader
schema sweep grades the loader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `Evaluate` written empty reads as absent (`true`), so the body's throw
  is certain where it is reached.
- An attribute written empty, and a missing `TaskFactory` under children,
  are the loader's to refuse. The registration judges only an attribute
  written with text, so it no longer adds a second refusal of its own.
- The task name a refusal keeps is a bounded preview, like the value.
- The isolation check replays at the document's own path, so a value
  that reads the project's name or directory reads the same thing.

Each has a test that fails without its fix: hand rows for an empty
`Evaluate` before a throwing body, `TaskName=""`, a missing factory, a
1,000-character task name (and a bound on every diagnostic's task name),
and `$(MSBuildProjectName.TrimStart('Demo'))`.

Out of scope, filed as #1127: the shared expansion's `Trim*` trims scalars
where .NET trims UTF-16 code units.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A registry collision is claimed only between names the loader takes. A
  name it refuses (`A.b`, MSB5016) stops MSBuild before the registry.
- A collision's names are bounded previews shared as `Arc<str>`, like the
  task name and the value.
- Each attribute the registration reads is expanded once
  (`registration_expansion`), for its throws and its rules alike.
- The isolation check keeps the whole document, every write and item in
  it, and replaces its `<UsingTask>`s with the one construct. It reads a
  collision's names from the document, whole.

Each has a test that fails without its fix: hand rows for `<A.b /><a.b />`,
1,000-character names that fold to one, and `Required="$(R)true"` where the
document writes `R`; and `attributes_no_rule_judges_are_expanded_once` (5
attributes, 5 expansions).

Out of scope, filed as #1128: the walk follows `<ext:Import>` by local name,
which a parse configuration may have MSBuild skip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A possible registration refusal names the value as one the attribute
  may read or have, and says MSBuild would refuse it, not that it does.
  The walk's value may not be MSBuild's. Both LSP renderers.
- A body under an `Evaluate` the registration refuses is never expanded,
  since MSBuild stops at the flag, so its throw is not claimed.
- The isolation check replays a throw where it was: under the task's
  `Condition`, in the attribute or body that held it, with the body's
  `Evaluate`. It no longer replays it as a bare `TaskName`. A throw MSBuild
  never evaluates there now fails the check.
- Only the project's own `<UsingTask>` children are replaced in the
  isolated document; a parameter may be named `UsingTask`. Elements are
  told apart by where they stand.

Tests, each failing without its fix:
- the LSP renderers' possible-message tests;
- a hand row of a refused task beside a body whose `Evaluate` is false. A
  walk that judged the body is caught here and missed by the old replay;
- `Evaluate="System.String"` before a throwing body;
- a parameter named `UsingTask`, in a hand row and in the composite's
  names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A possible registration refusal now says only that Borzoi cannot
  confirm MSBuild registers the task, showing the value as Borzoi reads
  it. A possible refusal is one Borzoi cannot rule out, by an unknown
  value or an unknown rule (a parameter type outside the probed list), so
  it no longer says MSBuild would refuse anything. Both LSP renderers.
- The isolation check replays every certain refusal under the claimed
  task's `Condition`, as written, so MSBuild refuses it only where it
  reaches it.
- `composite_sweep` draws from the hostile value alphabet too, under a
  census of its own (`using_task_composite`, with its manifest and its
  `boundaries.tsv` row).

Tests, each failing without its fix: the LSP renderers' possible-message
tests, and a hand row of a refused task beside a task whose condition is
false. With a walk that ignores a false condition, the gated replay fails
the composite at the isolation check, which the ungated replay passed.

Out of scope, covered by #1060: a property the CLI injects
(`_MSBUILDTLENABLED`) is read as exactly unset. That is right against the
design-time evaluation this claim is graded against.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The isolation check adds the task's gate to every template except an
  illegal condition's, whose template carries it. It also refuses a
  malformed isolated document (MSB4025), rather than grading it.
- The composite's census counts a hostile dimension only where MSBuild
  registers it: an ungated task's attributes, its parameter group if
  first, its body if last. A draw under a condition, or in a child that
  is not registered, is not counted.

A test fails without the gate fix: the isolated documents of an illegal
condition's claim are malformed. The census change shows only as a
manifest that stays the same.

Out of scope, filed: #1130 (`LocalAppData` absent from the environment
is read as exactly unset) and #1131 (the item pass reads
`MSBuildAllProjects` without MSBuild's `SetAllProjectsProperty` write).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The isolation check now replays a task's children where the claimed
  task had them: a parameter group that was not first follows the body,
  and a body that was not last comes before an empty group. So MSBuild
  reads the claimed attribute in the replay only if it read it in the
  document.
- The composite's census credits a body's text only when the body has no
  `Evaluate`, since only then is the text certainly expanded.

New hand row: a body that is not the last child, with a refused flag,
beside a refused task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rejection

`registrations_reading_names_msbuild_defines_claim_no_certain_rejection`
holds four registrations to design-time MSBuild:
- a `TaskName` or `AssemblyFile` reading `MSBuildAllProjects`, which
  MSBuild rewrites before it registers (#1131), with and without a
  document's empty write;
- an `AssemblyFile` from a write gated on `LocalAppData`, which MSBuild
  seeds from the profile (#1130).

MSBuild evaluates each, and the walk must claim no certain rejection. The
registration judgement has no code of its own for either name. It declines
by the walk's reads of them alone, and the test fails with a certain
refusal if either fix is reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Round 15 of review: the composite census credited each draw that a task's
shape registers, before MSBuild evaluated the document. A document MSBuild
rejects may stop before a draw: at a parameter name its loader refuses, or
at an earlier task's refusal. Its draws need not have reached the
registration at all.

The census now credits only documents MSBuild evaluates, because those
registered every task. A rejected document's draws reach the registration
in isolation, in `registration_sweep`. At the old 600 cases, two owed
dimensions (`padded-option`, `long-value`) had been credited only through
rejected documents, and the honest census fails on them. The fixed seed now
runs 2000 cases (about 5 s), which reaches every owed dimension in a
document MSBuild evaluates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ses for each

Round 16 of review, which continues round 15's stream on what the hostile
censuses credit:
- The single-value sweep credited a draw the loader refused before
  registration, such as a `TaskName` written empty.
- The composite soak's census depended on its seed: a fresh seed could
  leave an owed dimension unreached while the walk agreed with MSBuild on
  every case.

Both sweeps now credit through one rule (`credit_registered`): a draw
counts only in a document MSBuild evaluates, where every task is
registered and each value read. A rejected document may have stopped
first, so it credits nothing, however it is graded.

Before its draws, each sweep now grades a witness (`credit_witnesses`) for a
plain value and for each alphabet entry. The witness is the entry's value as
the text of an inline task's body, which the registration expands and takes
whatever it holds. With the random cases set to 0, the witnesses alone reach
every owed dimension of both censuses, so no seed can fail a census on
coverage. The composite fixed seed goes back to 600 cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y were

Round 17 of review: the isolation replay of a `TaskFactory` refusal always
added `<Task>x</Task>`. MSBuild refuses `AssemblyTaskFactory` or
`TaskHostFactory` only under a child, so the replay supplied the very
precondition it was checking.
- `alone` now keeps a child exactly where the claimed task had one
  (`task_has_children`).
- `child_places` shares the lookup of the task's children
  (`task_children`).

`hand_picked_registrations` adds the row that tells the two apart: a
childless `TaskHostFactory` task, in a project another task rejects. With
the walk mutated to claim that factory refused, the row fails; with the
replay that always adds a child, the same mutation passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…census records only them

Rounds 15, 16 and 18 of review kept finding that the hostile census
credited sweep draws that need not have reached the registration's rules.
The census no longer credits sweep draws at all. What the claim's tests owe
the rules is now a table of must-commit points.

`each_rule_refuses_the_hostile_classes_it_refuses`:
- For each attribute the registration judges (`TaskName`, `TaskFactory`,
  `AssemblyFile`, `AssemblyName`, `Evaluate`, `Required`, `Output`,
  `ParameterType`), it takes each hostile class that attribute's rule
  refuses, plus a plain value. The classes are: empty and whitespace for
  the non-empty rules; every owed class for the boolean ones (probed).
- It puts the class's first alphabet entry in that attribute. An empty or
  blank value goes through a certain property, since one written empty is
  the loader's to refuse.
- It requires a certain refusal of that attribute by the walk.
- It requires MSBuild to refuse that attribute alone
  (`assert_msbuild_refuses_alone`, which now returns the replay), pointing
  at the attribute. For `TaskFactory`, MSB4067 points at the `<UsingTask>`
  instead.

Each rule mutated to take what it refuses fails the test:
- the boolean rule taking everything;
- the non-empty rule taking empty;
- the factory rule refusing nothing;
- `ParameterType`'s emptiness made unknown.

Removed:
- the crediting logic (`credit_registered`, `credit_witnesses`);
- the composite census, along with its dimension tracking (`DRAWN`), its
  `boundaries.tsv` entry and its manifest;
- the tally floors.

The `using_task_registration` census now records the table alone, and its
manifest is unchanged. The sweeps still grade every case through `grade`,
and only print their tallies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s it

Round 19 of review: the manifest's header still named
`registration_sweep_fixed_seed`, which no longer opens the census.
Regenerated with `each_rule_refuses_the_hostile_classes_it_refuses`, which
does. The entries do not move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Smaug123
Smaug123 force-pushed the issue-1099-using-task-registration branch from f56ca2a to 6406604 Compare November 25, 2026 17:17
@Smaug123
Smaug123 added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit e78d573 Nov 25, 2026
20 checks passed
@Smaug123
Smaug123 deleted the issue-1099-using-task-registration branch November 25, 2026 19:14
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.

msbuild: a UsingTask MSBuild refuses as it registers the task (an Evaluate, Required or ParameterType it cannot read) is no rejection

1 participant