Affected tests: follow NuGet package references; narrow Directory.Packages.props changes - #49
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- An unreadable or unexpectedly shaped project.assets.json is 'unknown', not 'uses no packages', so it blocks Directory.Packages.props narrowing. - git show output is decoded as UTF-8 (non-ASCII props no longer defeat narrowing); BOM trimmed. - Note distinguishes 'used, but no runnable test project reaches it'. - Reading Directory.Packages.props: UnauthorizedAccessException falls back. - Documentation extensions are ignored only outside every project folder: test data inside a project (TestData/expected.txt) now selects its tests. - Doc comments and README wording match the behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- .md files never count as changes; other documentation extensions count only inside a project that isn't at the solution root (a root-level project owns every file by folder). - Tests: root README.md, a .md inside a project, and docs/*.png under a root-level project all run nothing. - Doc comments and notes say 'not restored or unreadable'; BOM literal written as an escape; PackageChangeImpact.UsingProjects documented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes known gap 3 of the roadmap:
dotnet_test_affected's project fallback now follows NuGet package references, not justProjectReferences.Behavior
Package edges (only add, never remove): a solution project's package id comes from a literal
<PackageId>, the nearestDirectory.Build.props, or its assembly name. When a test project's restoredobj/project.assets.jsonreferences that id, it now counts as depending on that project. Test projects that were never restored are named in the note.Narrowing for
Directory.Packages.props: the tool runs only the test projects that use the packages whose version changed. Every condition must hold, otherwise it runs the whole solution and the note says why:Versionattributes changed (comments and whitespace aside);Packages used only by source projects, such as analyzers with
PrivateAssets=all, are traced through the project graph. Helper projects with no tests are never selected.Also fixed (a bug since 0.3.3): a changed
.txtor image inside a project folder, such asTestData/expected.txt, used to be ignored and run nothing. It now runs that project's tests..mdfiles, docs outside every project, and a solution-root project owningdocs/don't count.Review
Three Opus rounds.
Tests
172 in the solution; Testing.Tests went from 32 to 62. Every review scenario was written as a test and shown failing on the pre-fix code first.
Benchmark gate
The gate FAILED by its own rule. This is why it's not a regression.
maxSelectionSeconds: 120, then compared selected test names on commits that completed in both runs.8ba491d7(RandomUtil.cs) gave 121 tests onmainand 118 here. In fresh sessions,maingives 118 every time too. It's a bug inmain: seeding from one TFM variant of a file with#ifbranches. It's fixed in its own PR (fix/tfm-variant-seeding), which should merge first.FindAsync. Selection timing is unchanged (median 0.8 s vs 0.7 s).🤖 Generated with Claude Code