Skip to content

chore: add CI pipeline, Dependabot, and 100% coverage enforcement - #3

Merged
quiet-node merged 7 commits into
mainfrom
chore/ci-pipeline
Mar 31, 2026
Merged

chore: add CI pipeline, Dependabot, and 100% coverage enforcement#3
quiet-node merged 7 commits into
mainfrom
chore/ci-pipeline

Conversation

@quiet-node

@quiet-node quiet-node commented Mar 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds a composable GitHub Actions PR pipeline that fans out to 3 parallel jobs on every PR to `main`
  • Build validation (`macos-latest`): runs `bun validate-build` — lint, format check, typecheck, frontend + full Tauri app bundle build; hard-fails on high/critical dependency vulnerabilities via `bun audit`
  • Frontend tests (`ubuntu-latest`): runs `bun test:coverage` — Vitest with 100% line/function/branch/statement threshold enforced
  • Backend tests (`macos-latest`): runs `cargo +nightly llvm-cov` — 100% Rust line coverage enforced via `cargo-llvm-cov`; untestable platform code (CGEventTap, AX APIs, Tauri runtime wrappers) excluded via `#[cfg_attr(coverage_nightly, coverage(off))]`
  • Adds Dependabot watching `npm` (/), `cargo` (/src-tauri), and `github-actions` weekly — minor+patch grouped, major surfaced individually

Security

  • All GitHub Actions pinned to immutable commit SHAs (no floating tags)
  • `secrets: inherit` removed — none of the reusable workflows consume secrets
  • `bun audit` gates on high/critical severity; moderate dev-only transitive vulnerabilities that cannot be resolved without breaking API changes are surfaced but do not block
  • `picomatch` override forces patched version (≥4.0.4) — upstream `tinyglobby` was locked inside a vulnerable range

Test plan

  • Verify all 3 jobs appear and run in parallel in the Actions tab
  • Intentionally break formatting/lint/types — confirm build-validation fails
  • Intentionally drop frontend coverage below 100% — confirm frontend-tests fails
  • Intentionally drop Rust coverage below 100% — confirm backend-tests fails
  • Confirm Dependabot PRs appear on next weekly cycle

🤖 Generated with Claude Code

quiet-node and others added 7 commits March 31, 2026 14:09
Adds a composable GitHub Actions PR pipeline with three parallel jobs:
- Build validation (macos-latest): bun validate-build (lint, format, typecheck, full Tauri build)
- Frontend tests (ubuntu-latest): bun test:coverage (Vitest, 100% threshold)
- Backend tests (macos-latest): bun test:backend (cargo test)

Adds Dependabot watching npm (/), cargo (/src-tauri), and github-actions weekly.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
- Add #[cfg_attr(coverage_nightly, coverage(off))] to untestable runtime
  functions: CGEventTap setup, AX capture, Tauri command wrappers
- Add 5 new tests in commands.rs covering: invalid UTF-8 bytes in stream,
  mid-stream connection drop, whitespace-only lines, missing response field,
  and an empty-body 500 variant
- Add new_activator_is_inactive test in activator.rs
- Configure cargo-llvm-cov to exclude lib.rs and main.rs (Tauri runtime
  setup that requires a live app process) and enforce --fail-under-lines 100
- Register coverage cfgs in build.rs to suppress unexpected_cfg warnings
- Update pr-backend-tests CI job to install nightly toolchain and
  cargo-llvm-cov via taiki-e/install-action

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Security:
- Remove secrets: inherit — no workflow consumes any secrets
- Pin all GitHub Actions to immutable commit SHAs (checkout v4.3.1,
  setup-bun v2.2.0, taiki-e/install-action v2.9.4)
- Make bun audit a hard failure instead of a non-blocking warning

Reproducibility:
- Add rust-toolchain.toml pinning nightly-2026-03-30 so the coverage
  toolchain is explicit and stable rather than always-latest nightly
- Pin bun-version to 1.3.11 across all workflows

YAGNI / cleanup:
- Remove unused event_name input from all four workflow files
- Remove bun pm ls (Verify dependencies) step — frozen-lockfile already
  guarantees consistency
- Remove Setup Bun and Install dependencies steps from pr-backend-tests
  (cargo-llvm-cov does not require the frontend toolchain)
- Change fetch-depth: 0 to fetch-depth: 1 across all reusable workflows

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add overrides.picomatch >=4.0.4 to force the patched version;
  tinyglobby (used by vite, vitest, typescript-eslint) was locked to
  the vulnerable picomatch range and bun update alone did not resolve it
- brace-expansion is now resolved to 1.1.13 (minimatch@3 chain) and
  5.0.5 (minimatch@10 chain) — both patched — after bun update pulled
  in compatible versions for each slot
- Change audit step to fail on high/critical only; moderate dev-only
  transitive vulnerabilities that cannot be upgraded without breaking API
  changes (e.g. brace-expansion 1.x vs 5.x) should not permanently
  block CI, but high and critical always must

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hain.toml

rust-toolchain.toml at the repo root overrode ALL cargo commands
project-wide, causing the build validation job to pick up nightly
instead of the runner's stable Rust. Clippy is not installed for the
bare nightly toolchain, so lint:backend failed.

Remove rust-toolchain.toml and instead install nightly-2026-03-30
explicitly in the backend-tests workflow with the llvm-tools component.
Build validation now uses the pre-installed stable toolchain as intended.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@quiet-node quiet-node changed the title chore: add CI pipeline and Dependabot config chore: add CI pipeline, Dependabot, and 100% coverage enforcement Mar 31, 2026
@quiet-node
quiet-node merged commit 920eff0 into main Mar 31, 2026
3 checks passed
@quiet-node
quiet-node deleted the chore/ci-pipeline branch March 31, 2026 20:28
quiet-node added a commit that referenced this pull request Apr 10, 2026
* chore: add CI pipeline and Dependabot config

Adds a composable GitHub Actions PR pipeline with three parallel jobs:
- Build validation (macos-latest): bun validate-build (lint, format, typecheck, full Tauri build)
- Frontend tests (ubuntu-latest): bun test:coverage (Vitest, 100% threshold)
- Backend tests (macos-latest): bun test:backend (cargo test)

Adds Dependabot watching npm (/), cargo (/src-tauri), and github-actions weekly.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: update bun lockfile with test dependencies

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* test: enforce 100% Rust coverage via cargo-llvm-cov

- Add #[cfg_attr(coverage_nightly, coverage(off))] to untestable runtime
  functions: CGEventTap setup, AX capture, Tauri command wrappers
- Add 5 new tests in commands.rs covering: invalid UTF-8 bytes in stream,
  mid-stream connection drop, whitespace-only lines, missing response field,
  and an empty-body 500 variant
- Add new_activator_is_inactive test in activator.rs
- Configure cargo-llvm-cov to exclude lib.rs and main.rs (Tauri runtime
  setup that requires a live app process) and enforce --fail-under-lines 100
- Register coverage cfgs in build.rs to suppress unexpected_cfg warnings
- Update pr-backend-tests CI job to install nightly toolchain and
  cargo-llvm-cov via taiki-e/install-action

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: formatted codebase

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: address code review findings on CI workflows

Security:
- Remove secrets: inherit — no workflow consumes any secrets
- Pin all GitHub Actions to immutable commit SHAs (checkout v4.3.1,
  setup-bun v2.2.0, taiki-e/install-action v2.9.4)
- Make bun audit a hard failure instead of a non-blocking warning

Reproducibility:
- Add rust-toolchain.toml pinning nightly-2026-03-30 so the coverage
  toolchain is explicit and stable rather than always-latest nightly
- Pin bun-version to 1.3.11 across all workflows

YAGNI / cleanup:
- Remove unused event_name input from all four workflow files
- Remove bun pm ls (Verify dependencies) step — frozen-lockfile already
  guarantees consistency
- Remove Setup Bun and Install dependencies steps from pr-backend-tests
  (cargo-llvm-cov does not require the frontend toolchain)
- Change fetch-depth: 0 to fetch-depth: 1 across all reusable workflows

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: resolve security vulnerabilities and harden audit gate

- Add overrides.picomatch >=4.0.4 to force the patched version;
  tinyglobby (used by vite, vitest, typescript-eslint) was locked to
  the vulnerable picomatch range and bun update alone did not resolve it
- brace-expansion is now resolved to 1.1.13 (minimatch@3 chain) and
  5.0.5 (minimatch@10 chain) — both patched — after bun update pulled
  in compatible versions for each slot
- Change audit step to fail on high/critical only; moderate dev-only
  transitive vulnerabilities that cannot be upgraded without breaking API
  changes (e.g. brace-expansion 1.x vs 5.x) should not permanently
  block CI, but high and critical always must

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: scope nightly Rust to backend-tests only, remove root rust-toolchain.toml

rust-toolchain.toml at the repo root overrode ALL cargo commands
project-wide, causing the build validation job to pick up nightly
instead of the runner's stable Rust. Clippy is not installed for the
bare nightly toolchain, so lint:backend failed.

Remove rust-toolchain.toml and instead install nightly-2026-03-30
explicitly in the backend-tests workflow with the llvm-tools component.
Build validation now uses the pre-installed stable toolchain as intended.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
quiet-node added a commit that referenced this pull request Apr 10, 2026
* chore: add CI pipeline and Dependabot config

Adds a composable GitHub Actions PR pipeline with three parallel jobs:
- Build validation (macos-latest): bun validate-build (lint, format, typecheck, full Tauri build)
- Frontend tests (ubuntu-latest): bun test:coverage (Vitest, 100% threshold)
- Backend tests (macos-latest): bun test:backend (cargo test)

Adds Dependabot watching npm (/), cargo (/src-tauri), and github-actions weekly.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: update bun lockfile with test dependencies

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* test: enforce 100% Rust coverage via cargo-llvm-cov

- Add #[cfg_attr(coverage_nightly, coverage(off))] to untestable runtime
  functions: CGEventTap setup, AX capture, Tauri command wrappers
- Add 5 new tests in commands.rs covering: invalid UTF-8 bytes in stream,
  mid-stream connection drop, whitespace-only lines, missing response field,
  and an empty-body 500 variant
- Add new_activator_is_inactive test in activator.rs
- Configure cargo-llvm-cov to exclude lib.rs and main.rs (Tauri runtime
  setup that requires a live app process) and enforce --fail-under-lines 100
- Register coverage cfgs in build.rs to suppress unexpected_cfg warnings
- Update pr-backend-tests CI job to install nightly toolchain and
  cargo-llvm-cov via taiki-e/install-action

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: formatted codebase

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: address code review findings on CI workflows

Security:
- Remove secrets: inherit — no workflow consumes any secrets
- Pin all GitHub Actions to immutable commit SHAs (checkout v4.3.1,
  setup-bun v2.2.0, taiki-e/install-action v2.9.4)
- Make bun audit a hard failure instead of a non-blocking warning

Reproducibility:
- Add rust-toolchain.toml pinning nightly-2026-03-30 so the coverage
  toolchain is explicit and stable rather than always-latest nightly
- Pin bun-version to 1.3.11 across all workflows

YAGNI / cleanup:
- Remove unused event_name input from all four workflow files
- Remove bun pm ls (Verify dependencies) step — frozen-lockfile already
  guarantees consistency
- Remove Setup Bun and Install dependencies steps from pr-backend-tests
  (cargo-llvm-cov does not require the frontend toolchain)
- Change fetch-depth: 0 to fetch-depth: 1 across all reusable workflows

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: resolve security vulnerabilities and harden audit gate

- Add overrides.picomatch >=4.0.4 to force the patched version;
  tinyglobby (used by vite, vitest, typescript-eslint) was locked to
  the vulnerable picomatch range and bun update alone did not resolve it
- brace-expansion is now resolved to 1.1.13 (minimatch@3 chain) and
  5.0.5 (minimatch@10 chain) — both patched — after bun update pulled
  in compatible versions for each slot
- Change audit step to fail on high/critical only; moderate dev-only
  transitive vulnerabilities that cannot be upgraded without breaking API
  changes (e.g. brace-expansion 1.x vs 5.x) should not permanently
  block CI, but high and critical always must

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: scope nightly Rust to backend-tests only, remove root rust-toolchain.toml

rust-toolchain.toml at the repo root overrode ALL cargo commands
project-wide, causing the build validation job to pick up nightly
instead of the runner's stable Rust. Clippy is not installed for the
bare nightly toolchain, so lint:backend failed.

Remove rust-toolchain.toml and instead install nightly-2026-03-30
explicitly in the backend-tests workflow with the llvm-tools component.
Build validation now uses the pre-installed stable toolchain as intended.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
quiet-node added a commit that referenced this pull request Apr 11, 2026
* chore: add CI pipeline and Dependabot config

Adds a composable GitHub Actions PR pipeline with three parallel jobs:
- Build validation (macos-latest): bun validate-build (lint, format, typecheck, full Tauri build)
- Frontend tests (ubuntu-latest): bun test:coverage (Vitest, 100% threshold)
- Backend tests (macos-latest): bun test:backend (cargo test)

Adds Dependabot watching npm (/), cargo (/src-tauri), and github-actions weekly.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: update bun lockfile with test dependencies

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* test: enforce 100% Rust coverage via cargo-llvm-cov

- Add #[cfg_attr(coverage_nightly, coverage(off))] to untestable runtime
  functions: CGEventTap setup, AX capture, Tauri command wrappers
- Add 5 new tests in commands.rs covering: invalid UTF-8 bytes in stream,
  mid-stream connection drop, whitespace-only lines, missing response field,
  and an empty-body 500 variant
- Add new_activator_is_inactive test in activator.rs
- Configure cargo-llvm-cov to exclude lib.rs and main.rs (Tauri runtime
  setup that requires a live app process) and enforce --fail-under-lines 100
- Register coverage cfgs in build.rs to suppress unexpected_cfg warnings
- Update pr-backend-tests CI job to install nightly toolchain and
  cargo-llvm-cov via taiki-e/install-action

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: formatted codebase

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* chore: address code review findings on CI workflows

Security:
- Remove secrets: inherit — no workflow consumes any secrets
- Pin all GitHub Actions to immutable commit SHAs (checkout v4.3.1,
  setup-bun v2.2.0, taiki-e/install-action v2.9.4)
- Make bun audit a hard failure instead of a non-blocking warning

Reproducibility:
- Add rust-toolchain.toml pinning nightly-2026-03-30 so the coverage
  toolchain is explicit and stable rather than always-latest nightly
- Pin bun-version to 1.3.11 across all workflows

YAGNI / cleanup:
- Remove unused event_name input from all four workflow files
- Remove bun pm ls (Verify dependencies) step — frozen-lockfile already
  guarantees consistency
- Remove Setup Bun and Install dependencies steps from pr-backend-tests
  (cargo-llvm-cov does not require the frontend toolchain)
- Change fetch-depth: 0 to fetch-depth: 1 across all reusable workflows

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: resolve security vulnerabilities and harden audit gate

- Add overrides.picomatch >=4.0.4 to force the patched version;
  tinyglobby (used by vite, vitest, typescript-eslint) was locked to
  the vulnerable picomatch range and bun update alone did not resolve it
- brace-expansion is now resolved to 1.1.13 (minimatch@3 chain) and
  5.0.5 (minimatch@10 chain) — both patched — after bun update pulled
  in compatible versions for each slot
- Change audit step to fail on high/critical only; moderate dev-only
  transitive vulnerabilities that cannot be upgraded without breaking API
  changes (e.g. brace-expansion 1.x vs 5.x) should not permanently
  block CI, but high and critical always must

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

* fix: scope nightly Rust to backend-tests only, remove root rust-toolchain.toml

rust-toolchain.toml at the repo root overrode ALL cargo commands
project-wide, causing the build validation job to pick up nightly
instead of the runner's stable Rust. Clippy is not installed for the
bare nightly toolchain, so lint:backend failed.

Remove rust-toolchain.toml and instead install nightly-2026-03-30
explicitly in the backend-tests workflow with the llvm-tools component.
Build validation now uses the pre-installed stable toolchain as intended.

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>

---------

Signed-off-by: Logan Nguyen <lg.131.dev@gmail.com>
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.

1 participant