Skip to content

Fix the consumer smoke test when given a pre-built feed - #11

Merged
CaffeinatedCoder merged 1 commit into
mainfrom
fix/smoke-test-source-mapping
Aug 15, 2026
Merged

CaffeinatedCoder merged 1 commit into
mainfrom
fix/smoke-test-source-mapping

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

The v5.0.3 release run failed at the consumer smoke test. Nothing was published — Publish was skipped and the gate never opened.

Cause

dotnet add package --source <feed> restricts the entire restore to that source, transitive dependencies included, so Npgsql.EntityFrameworkCore.PostgreSQL and Microsoft.EntityFrameworkCore.Abstractions failed with NU1101.

It passed on PRs by accident. When the script packs its own feed, that pack restores the solution's dependencies into the same private NUGET_PACKAGES folder, so the transitive packages were already cached when the consumer restored. The release workflow passes a pre-built feed, skips the pack, and loses the crutch. The PR job structurally could not have caught this.

Fix

packageSourceMapping — EFCore.ComplexIndexes* from the local feed only, everything else from nuget.org. Source ordering would not be enough: these versions also exist on nuget.org, and a published package satisfying the restore would mean testing something unrelated to the working tree.

Also removed the blanket >/dev/null. The NU1101 was invisible in CI behind a bare exit code 1; output is now captured and printed on failure.

Verification

  • Pre-built feed mode (the release path): passes
  • Self-packing mode (the PR path): passes
  • Sabotage check re-run after the refactor: both index assertions fail, exit 1

Re-releasing

v5.0.3 needs to be deleted and re-pushed onto the commit that contains this fix.

The release workflow passes its pack output as the feed, and the restore failed
there with NU1101 on Npgsql.EntityFrameworkCore.PostgreSQL and EF Core Abstractions.

`dotnet add package --source <feed>` restricts the whole restore to that source,
transitive dependencies included. It only ever worked on PRs by accident: when the
script packs, that pack restores the solution's dependencies into the same private
NUGET_PACKAGES folder, so the transitive packages were already present by the time
the consumer restored. Passing in a feed skips the pack and the crutch with it —
which is why the PR job could not have caught this and the release job did.

Replaced with packageSourceMapping, which expresses the actual requirement rather
than approximating it: EFCore.ComplexIndexes* resolves from the local feed and
nowhere else, everything else from nuget.org. Ordering alone would not do, because
these versions also exist on nuget.org and a published package satisfying the
restore means testing something unrelated to the working tree.

Also stop swallowing the output of every step: the NU1101 was invisible in CI behind
a bare "exit code 1". Output is captured and printed only on failure.

Verified in both modes, and the sabotage check still fails as it should.

Co-Authored-By: Claude Opus 5 <[email protected]>
@CaffeinatedCoder
CaffeinatedCoder merged commit c472a25 into main Aug 15, 2026
6 checks passed
@CaffeinatedCoder
CaffeinatedCoder deleted the fix/smoke-test-source-mapping branch August 15, 2026 14:31
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