From 5384d8f2407d875ebb03f992c0b89cc984a779ed Mon Sep 17 00:00:00 2001 From: Cem AYYILDIZ <1925ayyldz@gmail.com> Date: Thu, 22 Oct 2026 14:16:59 +0000 Subject: [PATCH] ci(high/easy): fail when generated bindings dirty the worktree Adds a git diff --exit-code step to bindings-check.yml immediately after pnpm bindings:check, so any unexpected drift in a tracked, generated file is visible and blocking in CI, not just the specific index.ts comparison bindings:check already performs on its own. Documented in docs/CI.md next to the existing coverage gate. Closes #525 --- .github/workflows/bindings-check.yml | 2 ++ docs/CI.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.github/workflows/bindings-check.yml b/.github/workflows/bindings-check.yml index 89e6e531..a31b4d95 100644 --- a/.github/workflows/bindings-check.yml +++ b/.github/workflows/bindings-check.yml @@ -50,3 +50,5 @@ jobs: - name: Check generated bindings are up to date run: pnpm bindings:check + - name: Fail if the worktree is dirty after the bindings check + run: git diff --exit-code diff --git a/docs/CI.md b/docs/CI.md index 84cc72ae..e6a6c22e 100644 --- a/docs/CI.md +++ b/docs/CI.md @@ -50,3 +50,22 @@ in the PR. The default is calibrated against the **weighted** covered/total ratio after including unexecuted `src/` files. Lower the threshold only when the existing codebase cannot meet a higher bar yet; prefer adding tests instead of weakening the gate. + +## Bindings worktree cleanliness gate + +After `pnpm bindings:check` regenerates the round contract's TypeScript +bindings, CI runs `git diff --exit-code` so any unexpected drift in a +tracked, generated file is visible and blocking, not just the specific +`index.ts` comparison `bindings:check` already does on its own. + +### CI workflow + +`.github/workflows/bindings-check.yml`, immediately after the +"Check generated bindings are up to date" step. + +### Run locally + +```bash +pnpm bindings:check +git diff --exit-code +```