Skip to content

Move to Nullean.Snapshots 0.15.0 so a partial run no longer fails unit-test - #4872

Merged
Mpdreamz merged 1 commit into
mainfrom
fix/orphans-skip-unrun-projects
Nov 16, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
fix/orphans-skip-unrun-projects

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

unit-test no longer fails because a test project's last run was partial: a stale manifest from a local Journeys run or a filtered run is skipped, not reported as orphaned snapshots.

Affects: Automation

Prompt summary: A stale Journeys manifest in .artifacts/.snapshots/received/ makes unit-test fail the orphaned-snapshot check, and the message suggests deleting valid snapshots. Fix it in Nullean.Snapshots, not in the build.

Why

snap orphans reads one run manifest per project. A run that does not run every test, such as a filtered run or a Journeys run that skips journeys, wrote a manifest naming only the snapshots it touched. unit-test then reported every other snapshot of that project as an orphan and told the reader to delete them.

What

Moves every Nullean.Snapshots.* package, Nullean.HttpFileParser and the snap tool to 0.15.0, which fixes this where it starts:

  • A test process started with --treenode-filter, --filter-uid or --filter, or one that skips a journey or .http file, marks its manifest partial.
  • snap orphans skips a partial project with a note, and ignores verified files written after the run started.

The build target is unchanged: it still runs dotnet snap orphans after the tests. The snapshots PRs are nullean/snapshots#107 and #108.

Verify

# a filtered run is partial and no longer yields orphans: exits 0
dotnet test --project tests/Navigation.Tests --treenode-filter "/*/*/DocsBarRenderingTests/*"
dotnet snap orphans

# the whole suite passes the check
./build.sh unit-test

# a verified file no test uses still fails the run
mkdir -p tests/Navigation.Tests/.snapshots/Planted
echo planted > tests/Navigation.Tests/.snapshots/Planted/Orphan.verified.txt
touch -t 202611010000 tests/Navigation.Tests/.snapshots/Planted/Orphan.verified.txt
./build.sh unit-test --single-target
rm -r tests/Navigation.Tests/.snapshots/Planted

🤖 Generated with Claude Code

@Mpdreamz
Mpdreamz requested a review from a team as a code owner November 16, 2026 14:09
@Mpdreamz
Mpdreamz requested a review from akira28 November 16, 2026 14:09
@Mpdreamz Mpdreamz added the bug label Nov 16, 2026
Comment thread build/Targets.fs Resolved
Comment thread build/Targets.fs Resolved
@github-actions

Copy link
Copy Markdown
Contributor

@Mpdreamz
Mpdreamz force-pushed the fix/orphans-skip-unrun-projects branch from a1cfc9d to 3942b15 Compare November 16, 2026 15:42
<!-- The solution's release build skips build.fsproj (the running build is its release output), so the project is not a ProjectReference:
it is built in Debug here and referenced by path to test SnapOrphans. -->
<Target Name="BuildTheBuildProject" BeforeTargets="ResolveAssemblyReferences">
<MSBuild Projects="$(MSBuildThisFileDirectory)..\..\build\build.fsproj" Properties="Configuration=Debug" Targets="Build">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: P3 (Low)

This invokes Build for a dependency that is absent from the test project's restore graph. On a clean checkout, running this test project directly restores its declared project references but not build/build.fsproj, so the nested build fails with NETSDK1004 instead of running the tests. Include the dependency in restore or explicitly restore it before building, without requiring a prior solution/build-script run.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

…t-test

0.15.0 marks a filtered or skipping test run as partial in its manifest, and `snap orphans` skips such a project instead of listing its untouched snapshots. A stale manifest from a local Journeys or filtered run therefore no longer fails the orphan check of `unit-test`.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz force-pushed the fix/orphans-skip-unrun-projects branch from 3942b15 to 6e94fa9 Compare November 16, 2026 18:04
@Mpdreamz Mpdreamz changed the title Check orphaned snapshots only for projects the test run covered Move to Nullean.Snapshots 0.15.0 so a partial run no longer fails unit-test Nov 16, 2026
@Mpdreamz
Mpdreamz enabled auto-merge (squash) November 16, 2026 18:17
@Mpdreamz
Mpdreamz disabled auto-merge November 16, 2026 18:18
@Mpdreamz
Mpdreamz merged commit a7ad194 into main Nov 16, 2026
44 checks passed
@Mpdreamz
Mpdreamz deleted the fix/orphans-skip-unrun-projects branch November 16, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant