Skip to content

ci(bindings): fail a PR that changes the ABI without bumping the bindings version#213

Merged
drewstone merged 1 commit into
mainfrom
ci/bindings-publish-guard
Jul 24, 2026
Merged

ci(bindings): fail a PR that changes the ABI without bumping the bindings version#213
drewstone merged 1 commit into
mainfrom
ci/bindings-publish-guard

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Closes the drift class that shipped a stale published crate and silently broke operators.

What went wrong (this is not hypothetical)

The gate

Pure git, no build, runs in seconds: if a PR touches bindings/abi/** or bindings/src/bindings/**, then the version literal in bindings/Cargo.toml must differ from the base commit's. It compares the literal on both sides, so an unrelated edit to that file can't satisfy the gate.

Validated against real history

PR ABI changed? version bumped? gate
#209 (payments) yes no fires — the actual bug
#211 (MSRV only) no n/a N/A — correctly silent

Scope

One new workflow file. Deliberately does not regenerate bindings in CI to diff them: gen-bindings runs a full forge build, and per foundry.yml's header the cold via-IR compile OOM-kills a stock runner. This guard is the cheap, precise half; a regeneration-diff job needs a larger runner and is a separate follow-up.

…ings version

The drift this prevents actually shipped: tnt-core-bindings 0.19.0 was published
2026-07-07, then #209 regenerated the ABI on 2026-07-09 under the SAME version.
crates.io versions are immutable, so the published crate kept an ABI ~900 lines
out of date from the deployed contract. blueprint-sdk and every operator built
from it linked selectors that don't exist on-chain, and nothing failed loudly —
the live operator only worked because a git patch masked the staleness (fixed by
republishing as 0.19.1 in #212).

The gate is pure git (no build, <5s): if a PR touches bindings/abi/** or
bindings/src/bindings/**, the version literal in bindings/Cargo.toml must differ
from the base. Validated against real history — fires on #209, N/A on #211.

@tangletools tangletools 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.

✅ Auto-approved drewstone PR — c020ffb8

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-07-24T23:49:15Z

@drewstone
drewstone merged commit f173dce into main Jul 24, 2026
2 checks passed
@drewstone
drewstone deleted the ci/bindings-publish-guard branch July 24, 2026 23:52
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