Repository navigation
Skip API baseline edits that are not affected-test inputs - #12614
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Note
🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.
No blocking findings.
- The six
forceAllTestspaths match exactly the files read byAssertSourceCompatibilityTests(PublicAPI/{,net/,net10.0/}PublicAPI.{Shipped,Unshipped}.txt), and all six exist. - Per the PR description,
forceAllTeststakes precedence overignore, so the**/PublicAPI.*.txtignore doesn't hide these inputs. I didn't verify that precedence against the selection tool's source. - Scope note: the other PublicAPI folders (
net462,desktop,deployment) aren't read by that test, so ignoring them is consistent. - Scope note: the unchanged
MSTest.Analyzersand other projects also contain PublicAPI text files. They are ignored by the new globs, which is the intended behavior (text-only baselines). - Docs bullet in
docs/affected-test-selection.mdis consistent with the config.
Test-value evidence: configuration/docs-only change. I ran no selection comparison, so the precedence behavior is unexecuted evidence.
There was a problem hiding this comment.
🧪 Test quality review — PR #12614
Compared merge base be3cf477a83f9b94e416b0401163a48580e389aa with head 9a50ccc4469b807ffb65ffcbf03c89125f5261f3. Evidence applies to this head only.
Test-value evidence
| Contract | Evidence | Status |
|---|---|---|
global.json affected-test policy: ignore PublicAPI/InternalAPI text baselines, but forceAllTests for the six baselines read by AssertSourceCompatibilityTests |
AssertSourceCompatibilityTests.cs lines 1491-1500 read exactly those six paths, and all six exist in the repo. Static prediction: without the forceAllTests entries, ignore would skip that test when the files change. |
Static prediction. No paired execution records, and none are expected for a CI selection policy. |
docs/affected-test-selection.md |
Documentation only. | Not applicable |
No test files changed.
🧵 Parallel safety
NOT_APPLICABLE. No changed tests or parallelization configuration were in scope.
Per-test assessment
No test methods changed, so nothing was graded. Scope: Not applicable.
This advisory review is heuristic and non-blocking. Re-run the combined review with /review-tests, or only the parallel-safety specialist with /parallel-audit.
🤖 Automated content by GitHub Copilot. Generated by the Test Quality Review on PR (on open / sync) workflow. · copilot · auto (Claude Sonnet 5.5) · ~21 AIC · ⌖ ~2 AIC · ⊞ 8.5K
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the affected-test selection changes that exclude API baselines not used as test inputs.
No open issues 🎉
What changed in this PR
This PR narrows TestFx’s affected-test selection so API baseline edits that are not test inputs avoid unnecessary full test runs. Build-time API validation remains unchanged.
Changes:
- Ignore shipped and unshipped public and internal API baseline filenames during affected-test selection.
- Preserve full test execution for the six public baselines read by
AssertSourceCompatibilityTests. - Document the exceptions and the precedence of
forceAllTestsoverignore.
Confidence at a glance
🟡 Selection policy and documentation — execution evidence not independently verified
Test-value evidence: For revision 9a50ccc4469b807ffb65ffcbf03c89125f5261f3, the PR reports that all 154 non-exception baselines were ignored, each protected baseline triggered full execution, and an unrelated text change retained fallback behavior. The reported parent comparison ran one test instead of selecting none. These results were not independently reproduced during this review; hosted CI savings remain unmeasured.
| File | Description |
|---|---|
global.json |
Adds four baseline ignore patterns and six exact-path full-test exceptions. |
docs/affected-test-selection.md |
Explains baseline exclusions, acceptance-test exceptions, and unchanged build-time checks. |
Review effort: Balanced
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
9a50ccc4469b807ffb65ffcbf03c89125f5261f3↑ An unrelated text change still ran the module.
↓ No hosted skip-rate measurement yet.
↓ Other changed files or an unusable map can independently require full execution.
Pull request
Summary
Editing an API tracking file can trigger a full test run because the file has no source-to-test association. Ignore
PublicAPI.Shipped.txt,PublicAPI.Unshipped.txt,InternalAPI.Shipped.txt, andInternalAPI.Unshipped.txtduring affected-test selection, except for six files read by an acceptance test. Build-time API checks are unchanged.Design and decision record
AssertSourceCompatibilityTestsreads the shipped and unshipped public baselines insrc/MSTest/TestFramework/PublicAPIand itsnetandnet10.0subdirectories. Six exactforceAllTestsrules take precedence over the filename ignores, so edits to those inputs still run the guard. The CI selection policy documents the exception.Demonstration
The same edit to the 154 non-exception baselines produced these selector messages (module prefix omitted):
Validation and regression proof
pwsh -NoLogo -NoProfile -File .\eng\validate-affected-tests.ps1 -SelfTest -EnableAffectedTests true -EnableNonWindowsAffectedTests falsepassed (exit 0) at the PR head.For the selection checks, the same Release
FSharpPlaygroundhost (net10.0, one test) ran under SDK12.0.100-alpha.1.26570.125in isolated Git fixtures. Each fixture used its revision's change rules and fresh local map storage. With$rootset to the fixture directory and the pinned SDK onPATH, the commands were:Collection succeeded for both policies. Every apply command exited 0; the number of executed tests distinguished full fallback from an intentionally empty selection. No hosted CI savings are claimed.
Test-value evidence
be3cf477a83f9b94e416b0401163a48580e389aaFSharpPlayground.TestClass.Test1ran and passed.9a50ccc4469b807ffb65ffcbf03c89125f5261f3Other.Shipped.txt