Skip to content

PR CI never runs dotnet pack, so Dependabot auto-merged a Polyfill bump that broke releases in ~19 repos: package validation only runs in the post-merge Release step #41

Closed

Description

@matt-edmondson

What's wrong

In .github/workflows/dotnet.yml, the Analyze & Release job runs ktsubuild ci ... --no-release. Packing happens only in the Release step (ktsubuild release), and that step is gated on steps.pipeline.outputs.should_release == 'true', which is false on pull requests. Package validation (Microsoft.NET.ApiCompat.ValidatePackage.targets, which runs during dotnet pack) therefore never runs on a PR. A change that breaks dotnet pack shows green on its PR, and dependabot-merge.yml merges it automatically.

Concrete case: ScopedAction #83 (Polyfill 11.4.3 → 11.4.5)

  • The PR head's check runs were all green, including ci / .NET / Analyze & Release: success. github-actions[bot] merged it on 2026-10-14.
  • Every scheduled ci.yml run on main since then has failed. In run 41360243660 (2026-11-01), every step of Analyze & Release passes up to Release, which fails at Packing ScopedAction... with
    Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0015: Cannot change arguments of attribute 'System.Runtime.CompilerServices.NullableContextAttribute' ... between lib/net9.0 and lib/net10.0.

The same Polyfill bump was auto-merged the same way across the org, and each repo now has its own "no release since …, pack fails package validation" issue. At the time of writing these are open: DelegateTransform#90, ScopedAction#85, SingleAppInstance#207, Sorting#72, ImGuiCredentialPopups#210, NoSleep#37, CaseConverter#149, RoundTripStringJsonConverter#132, NJsonSchemaJsonConverter#111, Semantics#517, CodeBlocker#153, SvnToGit#151, Invoker#86, GitIntegration#281, RunCommand#126, Containers#123, DeepClone#118, FuzzySearch#128, IntervalAction#98. Most have been unreleasable for about three weeks.

Why it matters

  • Any dependency bump, SDK pin bump (update-sdks.yml), or TFM-list change that affects package validation lands on main unnoticed. Nobody finds out until the next release attempt, and by then the repo has stopped publishing.
  • Merged bug fixes don't reach NuGet. For example, Sorting's #70 ordering fix and RoundTripStringJsonConverter's #107 culture fix were never published.
  • The per-repo fix PRs (Regenerate CompatibilitySuppressions.xml …) are also only checked by PR CI that doesn't pack, so the PR can't show whether a regenerated suppression file actually makes pack pass.

Suggested fix

On pull_request events, have the Analyze & Release job pack without publishing. The simplest version is a step after Run KtsuBuild Pipeline, gated on github.event_name == 'pull_request' and on steps.pipeline.outputs.build_skipped != 'true', that runs the same pack ktsubuild release would run, with output to a temporary directory and no push. That could be dotnet pack -c Release -o "$env:RUNNER_TEMP/pack", or a KtsuBuild pack/--dry-run mode if one exists or is added. It has to run on the Windows runner with the same SDK the release uses, so the ApiCompat result matches what main will see.

Acceptance criteria

  • A PR whose change makes dotnet pack -c Release fail package validation shows a failed check. Re-running ScopedAction #83's head commit, or opening any PR in one of the repos above before its suppressions are fixed, would demonstrate this.
  • Because the auto-merge requires green checks, dependabot-merge.yml no longer merges such a PR.
  • No package is pushed and no tag is created from a PR run.

Activity

  1. added
    bug
    on Nov 2, 2026
  2. matt-edmondson commented on Nov 2, 2026

    @matt-edmondson
    ContributorAuthor

    Triage

    • Category: Improvement. This is a gap in the shared CI pipeline, not a defect in a library. PR runs never exercise dotnet pack, so they cannot catch package-validation failures.
    • Priority: High. Package validation now runs only in the post-merge Release step. Because of that, one Dependabot bump made about 19 repositories unreleasable, most of them for about three weeks, and merged fixes are not reaching NuGet. Without this check, any later dependency, SDK-pin or TFM change can do the same thing again.
    • Verified: In .github/workflows/dotnet.yml, Run KtsuBuild Pipeline calls ktsubuild ci ... --no-test --no-release (line ~617), and Release is gated on steps.pipeline.outputs.should_release == 'true' (line ~684). Nothing between those two steps packs on a pull_request event.
    • Suggested area / assignment: Shared pipeline (dotnet.yml / ci-shared.yml) in this repository. If you want a --dry-run or pack mode rather than a raw dotnet pack step, that part would land in KtsuBuild.
    • Duplicates: None found. The per-repo "pack fails package validation" issues listed in the body are symptoms of this root cause and are not duplicates.
    • Already in progress? No open PR addresses this pipeline gap. Per-repo symptom fixes are open, for example Suppress the Polyfill type-forward diffs that fail package validation [patch] GitIntegration#291 (Polyfill suppressions). As the issue notes, those PRs cannot show that pack passes until this lands.
    • Suggestion: Land the PR-time pack step before merging the per-repo CompatibilitySuppressions.xml fixes. Their PR checks would then actually prove the fix works.

    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions