ci(bindings): fail a PR that changes the ABI without bumping the bindings version#213
Merged
Conversation
…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
approved these changes
Jul 24, 2026
tangletools
left a comment
Contributor
There was a problem hiding this comment.
✅ 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the drift class that shipped a stale published crate and silently broke operators.
What went wrong (this is not hypothetical)
tnt-core-bindings 0.19.0was published to crates.io 2026-07-07.0.19.0kept 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. Nothing failed loudly — the live Tempo operator only worked because it consumed bindings through a[patch.crates-io]git pin that masked the staleness.0.19.1(chore(bindings): republish 0.19.1 with the deployed 0.19 ABI (0.19.0 was stale) #212). tnt-core CI had no check that would have caught it.The gate
Pure git, no build, runs in seconds: if a PR touches
bindings/abi/**orbindings/src/bindings/**, then theversionliteral inbindings/Cargo.tomlmust 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
Scope
One new workflow file. Deliberately does not regenerate bindings in CI to diff them:
gen-bindingsruns a fullforge build, and perfoundry.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.