fix(ci): M8 audit CI/lean batch — CD merge, stacked-PR triggers, gitleaks/nightly, unused deps (#214) #221

Merged
amiryahaya merged 1 commit from fix/m8-ci-lean into main 2026-11-17 17:17:14 +01:00
Owner

CI/lean batch of FIX-ALL umbrella #215 (audit #214 findings). Closes out the last remediation PR.

Merged pipelines

  • cd.yml deleted; staging-deploy.yml is THE image build — tags :staging/:{sha}-staging for the deploy and :latest/:{sha} (cd.yml's consumers: compose default, prod pulls). Admin build unified on npm ci (was drifted npm install). cancel-in-progress: false — a cancelled deploy leaves staging half-updated; queue instead.

Stacked-PR triggers

  • pull_request no longer restricted to branches: [main] on api-ci/desktop-ci/admin-ci — PRs targeting feature branches (the #207 stacked pattern) get CI. Paths filters stay. No wedge risk: branch protection requires only Security CI / security-scan, which has no filters.
  • api-ci + staging-deploy paths now include .github/actions/kaz-setup/** (action changes re-fire CI).

Scanner fixes

  • security-ci: dropped fetch-depth: 0 — gitleaks runs --no-git (working-tree scan); full-history fetch bought nothing.
  • security-nightly: shared kaz-setup action (mirror-first fallback, #118 incident class) replaces the inline GitHub-only download; libkazsign guard kept.

API CI lean

  • The coverage gate IS the test run — it hard-fails on any failure and prints [FAIL] blocks; the separate plain suite step was double work (~4 min/PR).
  • NuGet cache (actions/cache@v4) in both jobs.
  • Postgres readiness window 60s→90s + log dump on failure (yesterday's #219 infra flake ran exactly this path).

Unused deps

  • coverlet.collector removed (gate uses standalone coverlet.console), once_cell removed (zero usages; transitive-only in lock).

Validated locally: YAML parse ×6, cargo check --workspace green, test project builds 0 errors.

CI/lean batch of FIX-ALL umbrella #215 (audit #214 findings). Closes out the last remediation PR. **Merged pipelines** - `cd.yml` deleted; `staging-deploy.yml` is THE image build — tags `:staging`/`:{sha}-staging` for the deploy **and** `:latest`/`:{sha}` (cd.yml's consumers: compose default, prod pulls). Admin build unified on `npm ci` (was drifted `npm install`). `cancel-in-progress: false` — a cancelled deploy leaves staging half-updated; queue instead. **Stacked-PR triggers** - `pull_request` no longer restricted to `branches: [main]` on api-ci/desktop-ci/admin-ci — PRs targeting feature branches (the #207 stacked pattern) get CI. Paths filters stay. No wedge risk: branch protection requires only `Security CI / security-scan`, which has no filters. - api-ci + staging-deploy paths now include `.github/actions/kaz-setup/**` (action changes re-fire CI). **Scanner fixes** - security-ci: dropped `fetch-depth: 0` — gitleaks runs `--no-git` (working-tree scan); full-history fetch bought nothing. - security-nightly: shared `kaz-setup` action (mirror-first fallback, #118 incident class) replaces the inline GitHub-only download; libkazsign guard kept. **API CI lean** - The coverage gate IS the test run — it hard-fails on any failure and prints [FAIL] blocks; the separate plain suite step was double work (~4 min/PR). - NuGet cache (`actions/cache@v4`) in both jobs. - Postgres readiness window 60s→90s + log dump on failure (yesterday's #219 infra flake ran exactly this path). **Unused deps** - `coverlet.collector` removed (gate uses standalone coverlet.console), `once_cell` removed (zero usages; transitive-only in lock). Validated locally: YAML parse ×6, `cargo check --workspace` green, test project builds 0 errors.
fix(ci): M8 audit CI/lean batch — CD merge, stacked-PR triggers, gitleaks/nightly, unused deps (#214)
All checks were successful
Admin CI / build-and-test (pull_request) Successful in 2m9s
API CI / migrations (pull_request) Successful in 3m15s
Desktop CI / lint-and-test (pull_request) Successful in 2m18s
Security CI / security-scan (pull_request) Successful in 2m47s
API CI / build-and-test (pull_request) Successful in 6m46s
27963a7bf2
- staging-deploy.yml absorbs cd.yml (deleted): two pipelines built the same
  Containerfile twice per push with drifted admin builds (npm ci vs npm
  install). One build now tags :staging/:{sha}-staging for the deploy AND
  :latest/:{sha} for the compose default + prod pulls. Admin build unified
  on npm ci. cancel-in-progress: false — a cancelled deploy leaves staging
  half-updated; queue instead.
- Stacked-PR triggers: drop branches:[main] from pull_request on api-ci/
  desktop-ci/admin-ci (PRs targeting a feature branch — the #207 pattern —
  now get CI; paths filters keep unrelated PRs quiet). Branch protection
  requires only security-scan, which has no filters — no wedge risk.
- kaz-setup paths gap: api-ci + staging-deploy now re-fire when the shared
  action changes.
- security-ci: drop fetch-depth:0 — gitleaks runs --no-git (working tree);
  the full-history fetch bought nothing.
- security-nightly: shared kaz-setup action (mirror-first fallback chain)
  replaces the inline GitHub-only download; libkazsign guard kept.
- api-ci lean: the coverage gate IS the test run (it hard-fails on test
  failures and prints [FAIL] blocks) — the separate plain suite run was
  double work (~4 min/PR). NuGet cache (actions/cache@v4) in both jobs.
- migrations leg: postgres readiness window 60s→90s + container-log dump
  on failure (2026-11-17 #219 infra flake ran exactly this path).
- Unused deps removed: coverlet.collector (gate uses standalone
  coverlet.console), once_cell (zero usages; remains transitive only).

Validated: YAML parse all 6 workflows, cargo check --workspace green,
test project builds 0 errors.
Sign in to join this conversation.
No description provided.