Skip to content

build: enable PackageValidation ABI gate (#125) - #225

Merged
Chris-Wolfgang merged 4 commits into
vNextfrom
ci/api-compat
Jul 24, 2026
Merged

build: enable PackageValidation ABI gate (#125)#225
Chris-Wolfgang merged 4 commits into
vNextfrom
ci/api-compat

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Enables the SDK's built-in PackageValidation (which wraps Microsoft.DotNet.ApiCompat) on both packable projects, baseline 0.10.0 (last published NuGet version).

How it satisfies #125

The AC asks for an api-compat release step that validates ABI against the previous NuGet version. PackageValidation does exactly this, at pack time — so release.yaml (which packs) gets the gate automatically, on every pack, with no bespoke workflow step:

  • Downloads the 0.10.0 baseline, diffs the current build's ABI.
  • Fails the pack if a non-major bump introduces a binary/behavioural break (default-value change, nullability flip, dropped TFM) that the PublicAPI.Shipped.txt diff misses.
  • Intentional MAJOR-bump breaks get recorded in a generated CompatibilitySuppressions.xml.
  • Baseline stays at last-published; bump only after a release is live (else dotnet pack fails NU1102).

Verified

Both projects pack clean against the 0.10.0 baseline locally (no CP0xxx breaks). Matches the fleet-canonical setup (ETL-FixedWidth, D20-Dice).

Closes #125 when the vNext cycle merges to main.

🤖 Generated with Claude Code

Enables SDK PackageValidation on both packable projects with baseline 0.10.0
(the last published NuGet version). At pack time it downloads the baseline and
validates the current build's ABI, failing the pack (and thus release.yaml) if
a non-major bump introduces a binary/behavioural break the PublicAPI.Shipped.txt
diff doesn't catch. Verified: both projects pack clean against the 0.10.0
baseline. Matches the fleet-canonical approach (ETL-FixedWidth, D20-Dice).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 01:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Chris-Wolfgang and others added 3 commits July 22, 2026 15:00
The actions-audit (#143) was failing every open PR on findings that aren't
actionable:

- actionlint tripped on info-level shellcheck nits (SC2012 'use find not ls',
  SC2035 'use ./*glob*') in the canonical pr.yaml. Set SHELLCHECK_OPTS to
  --severity=warning so it gates on warning+ (real issues), not style nits.
- zizmor flagged error[dangerous-triggers] on pr.yaml's pull_request_target.
  That is the intentional *gated* pattern (runs from trusted main, checks out PR
  refs, re-fetches config from main). Added a documented dangerous-triggers
  ignore for pr.yaml to .zizmor.yml and wired --config .zizmor.yml into the
  zizmor step (it is not auto-discovered).
- Enabling the config also activates the existing unpinned-uses:hash-pin policy,
  which then flagged pr.yaml's three remaining tag-pinned actions
  (checkout@v7, setup-dotnet@v5, upload-sarif@v4). SHA-pinned them to the repo
  canonical commits (also fixing a real SHA-pin-convention gap).

Verified locally: zizmor --config at high severity reports no findings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses the zizmor 'mismatched version comment' finding on #234: the pin
e0647621 is a real codeql-action commit (v4.37.2) but not the one the v4 tag
points to, so the hash-pin comment-match check flags it. Re-pin every
codeql-action reference (init / analyze / upload-sarif across pr, codeql,
actions-audit, scorecard, semgrep) to e4fba868 — the actual commit v4 resolves
to (verified via the GitHub tags API) — so each # v4 comment now matches.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants