fix(ci): types drift gate fails closed on a git error and sees untracked files whatever the git config

The ci.yml step assigns git status to a variable before testing it (a git
failure now fails the step, as scripts/check-all.sh already did); both gates
pass --untracked-files=all; the rust-check.sh comment names the real gate.
This commit is contained in:
bchanot committed 2026-10-13 10:09:15 +02:00
1 parent 073b25e52b
commit 496f54990a
4 files changed
+10 -7

No files matched your search

+3 -1
View File
@@ -29,7 +29,9 @@ jobs:
- name: fmt, clippy, tests, ts-rs export, cargo-deny (licenses, bans, sources)
run: bash docker/rust-run.sh bash scripts/rust-check.sh
- name: Committed TypeScript types match the Rust contracts (no modified or new file)
run: test -z "$(git status --porcelain -- packages/core-wasm/types)" || { git status --porcelain -- packages/core-wasm/types; exit 1; }
run: |
drift="$(git status --porcelain --untracked-files=all -- packages/core-wasm/types)"
if [ -n "$drift" ]; then echo "$drift"; exit 1; fi
- name: Browser module builds (size printed; the budget is asserted by the vitest proofs)
run: bash docker/rust-run.sh bash scripts/wasm-build.sh
+3 -2
View File
@@ -211,8 +211,9 @@ pnpm check:all # scripts/check-all.sh, stops at the first failure
```
Stages, in order: `scripts/rust-check.sh` (native), the ts-rs types drift
(`git status --porcelain -- packages/core-wasm/types` must be empty: a
modified or a new type file both fail), `cargo deny check advisories`
(`git status --porcelain --untracked-files=all -- packages/core-wasm/types`
must be empty: a modified or a new type file both fail, whatever the git
configuration), `cargo deny check advisories`
(warn-only: out of the blocking path by design, review VIII.3, but printed
here because no nightly job runs yet; needs the network), `scripts/wasm-build.sh`
(native), `pnpm check` (typecheck, tests including the `core-wasm` proofs on
+1 -1
View File
@@ -16,7 +16,7 @@ stage() {
stage "rust: fmt, clippy, tests, ts-rs export, cargo-deny (native toolchain)"
bash scripts/rust-check.sh
stage "rust: committed TypeScript types match the Rust contracts (no modified or new file)"
drift="$(git status --porcelain -- packages/core-wasm/types)"
drift="$(git status --porcelain --untracked-files=all -- packages/core-wasm/types)"
if [ -n "$drift" ]; then
echo "packages/core-wasm/types differs from the committed types:" >&2
echo "$drift" >&2
+3 -3
View File
@@ -16,8 +16,8 @@ cargo fmt --all --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked
# Exports the TypeScript types of the contracts (ts-rs) into packages/core-wasm/types.
# `git diff --exit-code -- packages/core-wasm/types` must stay empty afterwards
# (scripts/check-all.sh, .gitea/workflows/ci.yml): the committed types never drift from
# the Rust structs.
# `git status --porcelain --untracked-files=all -- packages/core-wasm/types` must stay
# empty afterwards (scripts/check-all.sh, .gitea/workflows/ci.yml): the committed types
# never drift from the Rust structs, and a new type file counts as drift.
cargo test -p faunosteo-core --features ts --locked
cargo deny check licenses bans sources