Skip to content

chore(ci): optimize CI caching, concurrency, and Tauri security - #937

Merged
H-Chris233 merged 3 commits into
Open-Less:betafrom
lispking:chore/ci-optimizations
Aug 10, 2026
Merged

chore(ci): optimize CI caching, concurrency, and Tauri security#937
H-Chris233 merged 3 commits into
Open-Less:betafrom
lispking:chore/ci-optimizations

Conversation

@lispking

@lispking lispking commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Address CI/CD efficiency, release-safety, dependency-metadata, and Tauri API-surface gaps identified during project optimization analysis. The changes reduce repeated PR work, prevent stale tag builds from publishing release artifacts, tighten the Tauri frontend API surface, and eliminate unnecessary submodule fetches on non-macOS jobs.

CI workflow improvements:

  • Add Swatinem/rust-cache@v2 to both ci.yml jobs (android-check and cross-platform), matching the cache already used by release-tauri.yml. This reuses dependency build artifacts between runs; the actual time saved depends on cache warmth and dependency changes.
  • Add concurrency groups to all three workflows. Superseded pull-request runs are cancelled. Re-pushing the same release tag cancels the older run so only the latest commit can publish. Manual workflow_dispatch runs use run_id-based groups and remain isolated from one another.
  • Unify Node.js on version 22 across ci.yml, release-tauri.yml, and android-apk.yml.

Submodule and Tauri hardening:

  • Fetch the vendor/qwen-asr submodule only for macOS jobs. Its build inputs are guarded by macOS cfgs; Linux, Windows, and Android builds do not require the checkout.
  • Set withGlobalTauri to false in tauri.conf.json. The application frontend continues to use @tauri-apps/api imports. The Windows lifecycle E2E now invokes through window.TAURI_INTERNALS.invoke, so the regression tooling remains functional without exposing the global Tauri API bundle.

Dependency hygiene:

  • Move @types/dompurify from dependencies to devDependencies and synchronize package-lock.json, including the development-only flags for its transitive type dependency. This keeps runtime dependency metadata and lockfile-based audit/SBOM output accurate.

Regression coverage:

  • Add contract tests for package.json/package-lock.json root dependency parity, the disabled global Tauri API plus E2E IPC bridge, and the intended PR/tag/manual workflow concurrency policies.

Address multiple CI/CD efficiency and security gaps identified during
project optimization analysis. The changes reduce PR build times,
prevent wasteful concurrent runs, tighten the Tauri security boundary,
and eliminate unnecessary submodule fetches on non-macOS jobs.

CI workflow improvements:
- Add swatinem/rust-cache@v2 to both ci.yml jobs (android-check and
  cross-platform), matching the caching already present in
  release-tauri.yml. This converts PR Rust compilation from full
  rebuilds to incremental builds, saving an estimated 60-80% of
  compile time per run.
- Add concurrency groups to all three workflows. PR pushes cancel
  superseded runs to free concurrency slots; tag pushes and manual
  dispatches are isolated by run_id to avoid mutually canceling
  release builds. Previously, rapid PR pushes triggered redundant
  parallel CI runs with no cancellation.
- Unify Node version to 22 across release-tauri.yml and
  android-apk.yml, which were previously pinned to 20. This ensures
  consistent build environments across all workflows.

Submodule and security hardening:
- Conditionally fetch the vendor/qwen-asr submodule only on macOS
  jobs across all three workflows. The submodule is compiled
  exclusively by build.rs on macOS (build_qwen_asr_macos); Linux,
  Windows, and Android builds never reference it. Removing the
  unconditional recursive checkout eliminates a network fetch and
  a submodule-availability failure point on every non-macOS job.
- Set withGlobalTauri to false in tauri.conf.json. The frontend
  exclusively uses @tauri-apps/api imports and never references the
  window.__TAURI__ global, so disabling it removes an unnecessary
  XSS attack surface without functional impact.

Dependency hygiene:
- Move @types/dompurify from dependencies to devDependencies in
  package.json. Type declaration packages are build-time only and
  should not ship in the production bundle.
@lispking lispking changed the title ci: optimize CI caching, concurrency, and Tauri security chore(ci): optimize CI caching, concurrency, and Tauri security Aug 9, 2026
@H-Chris233 H-Chris233 self-assigned this Aug 10, 2026
@H-Chris233
H-Chris233 merged commit c84bfb9 into Open-Less:beta Aug 10, 2026
4 checks passed
@lispking
lispking deleted the chore/ci-optimizations branch August 10, 2026 15:08
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