You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix quarantine eligibility for conditional shared test sources - #70098
Associated issue: #70094. Separate from the test quarantine in #70095.
Problem
The quarantine collector selects the first textual namespace in shared sources such as IIS Common.FunctionalTests/HttpsTests.cs. Nested conditional namespaces therefore hide the IIS identity and associate the IISExpress identity with a shared directory that has no project file, rejecting collected failure evidence as source-missing or project-history-incomplete.
Changes
Resolve conditional shared sources per actual consuming project using literal DefineConstants and exact Compile Include/Exclude/Remove membership. Mask inactive branches without changing source offsets.
Apply the same context to historical source, assembly, identity, and quarantine transitions. Include all consuming-project changes, including multiline symbol-only edits, as history candidates.
Preserve fail-closed handling for unsupported ownership, ambiguous history, renames, and project moves. Scope Compile exclusions to their own Include rather than unrelated shared-source items.
Regression fixture fails against the original collector with source-missing; corrected collector passes the complete eligibility suite.
Actual IIS and IISExpress test identities both resolve exactly to HttpsTests.cs and their respective consuming csproj directories.
All 21 unquarantine tests, pull-request output validator fixtures, JavaScript issue-handler fixtures, and five workflow-policy tests pass.
Two review agents reached consensus after correcting their findings and verifying focused regressions.
Ran gh aw compile test-quarantine and strict no-emit validation successfully. Regeneration produces no lockfile diff; the generated lockfile was not manually edited.
This is deliberately not a full MSBuild evaluator. Existing conservative history exclusions remain, and the live scheduled workflow was not dispatched.
Attribute linked test sources to actual consuming projects using literal project constants and Compile membership. Apply matching contexts to current and historical quarantine scans, including project-only symbol changes, while preserving conservative ownership and rename checks.
Co-authored-by: Copilot <[email protected]>
Updates the quarantine eligibility collector to resolve conditional shared test sources in each consuming project’s context, addressing the IIS/IISExpress resolution problem in #70094. The actual test quarantine remains separate in #70095.
Changes:
Adds project-aware source resolution using literal symbols and Compile membership, with inactive branches masked without shifting offsets.
Extends historical scans to shared sources and project-only changes.
Adds regression fixtures and documents supported behavior and conservative limitations.
Normalize wildcard history scopes, match exact declared types, apply consuming-project context to assembly quarantines, and skip proven non-members while retaining unresolved ownership as ambiguous. Validate shared removals by physical attribute locations and require receipts for every affected identity; retain the single-target addition policy.
Co-authored-by: Copilot <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Shared-source quarantine removals can pass validation without eligibility evidence for every consuming project or freshness checks covering subsequent linked-source changes.
This treats every Compile Remove as a permanent veto, although MSBuild evaluates items in document order. A literal removal of ../Shared/AssemblyInfo.cs followed by a literal include of that same file compiles it, but this function returns False. Both current and historical assembly scans then omit its active quarantine and can classify an already-quarantined test as a new candidate. Preserve Include/Remove ordering when determining membership, or return unknown for unsupported re-inclusion sequences rather than treating them as proven exclusions.
Check linked source scopes for stale evidence, track individual quarantine annotation locations, and preserve Compile item evaluation order and uncertainty.
Co-authored-by: Copilot <[email protected]>
Also addressed the review-body finding about Compile item ordering in f2fe384. Literal Include/Remove operations are now evaluated in document order: a later Include restores membership after Remove, while unresolved conditional operations preserve uncertainty. Literal conditional paths remain in history-search scopes so an unresolved linked assembly annotation cannot silently disappear from the analysis. Regression cases cover Remove→Include, Include→Remove, conditional-only re-inclusion, and definite re-inclusion after a conditional removal, checking both current and historical assembly quarantine state.
Validation passed: full eligibility collector and PR-output validator suites, all 21 unquarantine tests, workflow policy and JavaScript handler tests, and gh aw compile test-quarantine --strict. The compiler-generated lockfile remains unchanged.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Shared-source quarantine removals can collapse or omit consuming projects, allowing annotations to be removed without checking every affected project's quarantine history and eligibility.
For a known literal consumer with unsupported DefineConstants, such as a conditional assignment, this drops the conditional-namespace source unless it contains an assembly quarantine. If another consumer resolves successfully, removing a common method quarantine requires only that consumer's receipt, even though the omitted project also compiles the file and loses the annotation. Track unresolved consumers through source indexing and reject shared-source edits until every affected consumer's eligibility can be checked.
Preserve consuming projects for shared assembly quarantine targets
When two projects link the same unconditionally quarantined AssemblyInfo.cs, the index now records both consumers, but current_quarantine_targets, collect_requarantine_history, and downstream target keys omit the consuming project and collapse them into one target. Removing that shared attribute can therefore unquarantine both assemblies while checking history and Part 2 eligibility for only one. Preserve the consuming project throughout logical targets and receipts, deduplicating only the physical edit, or reject multi-consumer assembly removals until those checks are supported.
Retain unresolved consuming projects, fail closed on shared assembly or duplicate-identity removals, and invalidate stale evidence when project changes introduce another consumer.
Co-authored-by: Copilot <[email protected]>
Unresolved consumers: source indexing now retains known/potential literal consumers even when conditional constants or membership cannot be resolved. Their paths are marked unproven in history and Part 2 collection, and the output validator independently rejects edits to them—even if supplied receipts claim eligibility.
Collapsed assembly consumers: chose the conservative rejection option. Shared assembly annotations, and shared method/type/data targets with identical logical identities in multiple projects, cannot authorize automatic edits until receipts can distinguish every consumer. Proven distinct-identity shared removals and assembly annotations active in only one consumer remain supported.
Reproduced the previously accepted unsafe removals, added regression/positive-control cases, and also blocked consumers introduced after evidence collection. Full collector, validator, 22 Part 2, five policy, and JavaScript handler tests pass. Real IIS/IISExpress resolution remains exact. Regenerated with gh aw compile test-quarantine --strict; no lockfile change.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because shared-consumer discovery can silently omit affected projects, making eligibility-receipt coverage unreliable for shared-attribute removals.
No docs needed: the PR is internal CI/test-quarantine automation with no signals of user-facing change.
Documentation surfaces considered
Conceptual article: Not required — Changes only touch repository automation scripts under .github/workflows/scripts/test-quarantine; no user-facing behavior.
Migration guidance: Not required — No upgrade action for users.
Breaking change: Not required — No public API or behavior change; internal CI tooling.
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
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.
Associated issue: #70094. Separate from the test quarantine in #70095.
Problem
The quarantine collector selects the first textual namespace in shared sources such as IIS Common.FunctionalTests/HttpsTests.cs. Nested conditional namespaces therefore hide the IIS identity and associate the IISExpress identity with a shared directory that has no project file, rejecting collected failure evidence as source-missing or project-history-incomplete.
Changes
Validation
This is deliberately not a full MSBuild evaluator. Existing conservative history exclusions remain, and the live scheduled workflow was not dispatched.