demo(18-dependabot-api-drift): 18 — Dependabot PR slips a public API change in next to a package bump#167
demo(18-dependabot-api-drift): 18 — Dependabot PR slips a public API change in next to a package bump#167
Conversation
…change in next to a package bump See scenarios/18-dependabot-api-drift/README.md for the expected verdict.
| return new PricedOrder(subtotal, discount, tax, total); | ||
| } | ||
|
|
||
| public Money ApplyShipping(Money subtotal, Money shipping) |
There was a problem hiding this comment.
GCI0052 — Dependency Bot API Drift
Dependency bot PR introduces a public API change — verify backward compatibility
Evidence:
src/OrderService/Pricing/PricingService.cs line 28: public Money ApplyShipping(Money subtotal, Money shipping)
💡 Suggested action: Review the public API change carefully. If unintentional, revert the non-lockfile changes. If intentional, use a human-authored PR instead.
Confidence: Medium | Severity: Block
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ab7160d67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return new PricedOrder(subtotal, discount, tax, total); | ||
| } | ||
|
|
||
| public Money ApplyShipping(Money subtotal, Money shipping) |
There was a problem hiding this comment.
Keep dependency-bump commits free of public API drift
This commit adds a new public method (PricingService.ApplyShipping) alongside a package manifest change, which expands the service’s externally consumable API in what appears to be a mechanical dependency update. That coupling is risky because dependency-bot/style bump PRs typically get lighter review, so behavior/API changes can ship without the normal API-review path; this should be split into a separately reviewed feature change or kept non-public.
Useful? React with 👍 / 👎.
18 — Dependabot PR slips a public API change in next to a package bump
Expected verdict: ❌ Fails — GauntletCI should fire GCI0052 (Dependency Bot API Drift).
What changed
This PR is shaped like a routine Dependabot update — bumps a
package version in
OrderService.csproj— but quietly also changesa public method in
PricingService.cs:src/OrderService/OrderService.csproj— adds a new<PackageReference>forPolly(the "lockfile-equivalent" change abot would author).
src/OrderService/Pricing/PricingService.cs— adds a new publicmethod
ApplyShipping, expanding the public surface of thePricingService.Why this is risky
than human-authored PRs because they're expected to be mechanical
package bumps.
template — can use that low-scrutiny channel to slip in production
code changes that would normally require deeper review.
Foo to 1.2.3" PR is invisible to consumers downstream and ships in
the next release without an API-change review.
How GauntletCI catches this
GCI0052 Dependency Bot API Driftfires only when all threeconditions hold inside one PR:
GITHUB_ACTORmatches a known dependency bot(
dependabot[bot],renovate[bot],snyk-bot,snyk[bot]).*.csproj.*.csfile.In real CI, condition (1) is set automatically by GitHub Actions when
Dependabot is the PR author. To simulate that here without
running an actual bot account, the base
.github/workflows/gauntlet.ymlcontains a single conditional that only fires for this scenario's
branch:
Every other PR in the repo is analyzed under its real actor — only this
one demo branch is treated as if Dependabot opened it.
How to fix it
changes should come from a human-authored PR with a real review.
surface so bot identities can't push behavior changes.
CODEOWNERSrule routing public-surface files to a humanreviewer regardless of who opens the PR.