-
Notifications
You must be signed in to change notification settings - Fork 7
ci: add required Rust/Tauri compile gate on pull requests #353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e424ef9
0c154be
8aacf76
3febf79
e76da88
9353b84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,60 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
|
|
||
| - **Required Rust/Tauri compile gate on pull requests** (`rust-check` job, | ||
| `.github/workflows/ci.yml`). Previously the only Rust CI was an advisory-only OSV vulnerability scan plus a full | ||
| installer build on tag-push/manual-dispatch only (`tauri-build.yml`) — native code could merge | ||
| without ever having compiled. The new job runs `cargo fmt --check` / `cargo check --locked` / | ||
| `cargo clippy --locked --all-targets -- -D warnings` / `cargo test --locked` on every PR that | ||
| touches `src-tauri/` (or the job's own definition in `ci.yml`); other PRs skip the cargo steps | ||
| via an in-job change-detection filter, so the job always runs (a valid `needs:` dependency for | ||
| `ci-success`) at negligible cost when nothing Rust-related changed. **Review-loop follow-up | ||
| fixes to the same change:** the crate was not actually `rustfmt`-compliant (no `rustfmt.toml`, | ||
| pre-existing 2-space indentation vs. the 4-space default) — the first real PR to touch | ||
| `src-tauri/` would have failed `cargo fmt --check` immediately; reformatted the whole crate to | ||
| the rustfmt default instead of pinning the check to non-standard style. The change-detector only | ||
| diffed `src-tauri/`, so edits to the Rust job's own logic in `ci.yml` — including this PR's | ||
| original commit — never actually exercised the cargo steps; now also diffs `ci.yml` itself. | ||
| `src-tauri/fuzz/` (a separate nested crate, `cargo-fuzz`) was never checked and its path | ||
| dependency on the parent crate was actually broken (`[dependencies.app_lib] path = ".."` with no | ||
| `package =` override — the parent package is named `worldscript-studio`, so cargo could never | ||
| resolve it); fixed the dependency declaration, generated and committed its `Cargo.lock`, and | ||
| added an explicit `cargo check` step for it. Added `if: always()` at the job level so it still | ||
| runs (and reports real Rust diagnostics) even when the unrelated `security` job fails, matching | ||
| the job's own "always runs" framing. `AGENTS.md` § Desktop Releases and `docs/TAURI-CI.md` still | ||
| said "no PR-CI gate for Rust" / "never compiles `src-tauri/`" — updated both to describe what | ||
| the new gate covers and when the full cross-platform `tauri-build.yml` dispatch remains | ||
| necessary (macOS/Windows-specific code, real installer signing). Removed several newly-added | ||
| inline YAML rationale comments that violated this repo's own "no inline comments in config | ||
| files, explain in the commit message" rule. **Third round of review-loop follow-up:** once the | ||
| fuzz crate's dependency was actually fixed and its `Cargo.lock` committed, the pre-existing | ||
| `security` job's `dependency-review-action` step started failing on `glib@0.18.5` | ||
| (`GHSA-wrw7-89jp-8q8g`) — a transitive dependency pulled in via the fuzz crate's path dependency | ||
| on the parent app. This is the same already-documented, already-accepted risk in | ||
| `src-tauri/osv-scanner.toml` (`RUSTSEC-2024-0429` — no fix available without a `webkit2gtk` 4.1+ | ||
| upgrade Tauri 2.x doesn't yet support); `dependency-review-action` doesn't read that file, so it | ||
| re-flagged the same risk fresh. Added a matching `allow-ghsas` entry so the two tools' accepted | ||
| lists agree instead of one silently re-litigating the other's documented exception. **Fourth | ||
| round of review-loop follow-up:** the fuzz-crate check only ran `cargo check`, not `cargo fmt | ||
| --check`/`cargo clippy` — added both (the crate wasn't actually formatted; fixed). The OSV | ||
| scanner's `scan-args` never listed `src-tauri/fuzz/Cargo.lock`, so vulnerabilities in the fuzz | ||
| dependency graph were invisible to the enforced security gate — added. `src-tauri/fuzz/Cargo.lock` | ||
| is format v4 (stabilized in Cargo 1.83), incompatible with the parent crate's declared 1.77.2 | ||
| MSRV; declared a separate `rust-version = "1.83"` for the fuzz crate (dev-only tooling, never | ||
| shipped) so an older toolchain fails with a clear error instead of a confusing lockfile-parse | ||
|
Comment on lines
+50
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The changelog says the fuzz crate now declares Useful? React with 👍 / 👎. |
||
| failure. `.github/dependabot.yml` only watched `/src-tauri`, so the fuzz crate's independent | ||
| dependency graph never got automated update PRs — added a second Cargo entry for | ||
| `/src-tauri/fuzz`. `Swatinem/rust-cache`'s `workspaces` only listed `src-tauri`, so every run | ||
| recompiled the fuzz crate's entire dependency tree (the whole Tauri stack, via its path | ||
| dependency on the parent) uncached — added `src-tauri/fuzz` to the cached workspaces and gave | ||
| the job a larger timeout margin. Separately, found (via the same review pass) and fixed a | ||
| real, unrelated functional gap: `src-tauri/capabilities/default.json`'s `http:default` allowlist | ||
| was missing `https://api.anthropic.com/*`, even though desktop is documented to call Anthropic | ||
| directly via native HTTP — the CSP already permitted the origin, but the Tauri HTTP-plugin | ||
| capability didn't, so every desktop Anthropic API call would have been denied. | ||
|
|
||
| ## [1.27.0] — 2026-08-13 | ||
|
|
||
| ### Added | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this required PR job makes
docs/FEATURE-PARITY.md:54incorrect: theenableRustComputerow still says native code is verified only throughtauri-build.ymland explicitly claims there is no PR-CI gate. Contributors auditing feature coverage will therefore miss this new validation path; update that matrix alongside the other CI documentation changed in this commit.Useful? React with 👍 / 👎.