Skip to content

Add FileAssert validation for Tool package size and contents#51

Merged
Malcolmnixon merged 2 commits into
mainfrom
feature/package-size-fileassert-gate
Jul 21, 2026
Merged

Add FileAssert validation for Tool package size and contents#51
Malcolmnixon merged 2 commits into
mainfrom
feature/package-size-fileassert-gate

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This pull request adds automated validation for the contents and size of the NuGet package produced by the build, ensuring that the package remains within its size budget and does not accidentally include debug symbol files that previously caused excessive bloat. The changes introduce new FileAssert tests and integrate them into the build workflow.

Package validation enhancements:

  • .fileassert.yaml: Added a new package test group with tests to ensure the NuGet package stays under 70 MiB, contains required files (main assembly and README.md), and does not include unwanted .pdb files in native runtime assets. This guards against past regressions where debug symbols caused the package to balloon in size.

Build workflow integration:

  • .github/workflows/build.yaml: Added a step to run the new FileAssert package validation tests as part of the build pipeline, providing early detection of packaging issues.

Malcolm Nixon and others added 2 commits July 21, 2026 12:07
Adds a new [package]-tagged FileAssert test group (.fileassert.yaml) that
validates every packed .nupkg (Core, Language, Stdlib, Tool) right after
dotnet pack in build.yaml's per-OS build job:

- Size budgets: Tool nupkg must stay under 70 MiB (regression guard for the
  historical 435 MB native-asset bloat); Core/Language/Stdlib under 5 MiB.
- Content assertions: expected DLLs and README present in each package; Tool
  package additionally asserts exactly 8 native runtime assets (the curated
  RID allowlist) and zero stray .pdb files under runtimes/**, guarding the
  TrimPublishedNativeAssets fix.

Updates ROADMAP.md's Package validation gate entry to reflect that content
assertions are now automated; only the tool and library-consumer smoke tests
remain open.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Per feedback, the FileAssert package tests were massively overscoped: they
froze the exact set of native runtime assets (count: 8) and asserted every
transitive dependency DLL and multi-TFM lib path for all four packages. That
locks in incidental implementation details this early-stage project will
keep changing, for no real regression-guard benefit.

Scoped down to just the two checks with a genuine historical justification:
- Tool nupkg max-size 70 MiB (the package previously bloated to ~435 MB).
- Tool package contains its main assembly + README, and has no stray .pdb
  files under the native runtimes folder (the actual cause of that bloat).

No checks are applied to Core/Language/Stdlib packages or their multi-TFM
layout - those never had a size problem and this project's packaging is
still evolving.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Malcolmnixon
Malcolmnixon merged commit 778a741 into main Jul 21, 2026
17 of 23 checks passed
@Malcolmnixon
Malcolmnixon deleted the feature/package-size-fileassert-gate branch July 21, 2026 16:57
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.

1 participant