From 386a2979976b7874310579555377ac06629ab214 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Sun, 19 Jul 2026 22:09:10 -0400 Subject: [PATCH] ci: concurrency (cancel superseded) + promote typecheck/eslint/prettier gates Reviewed by 2 agents + a focused deploy-script review (all SHIP). - Add top-level `concurrency: cancel-in-progress`. A superseded lotus push cancels its in-flight run, freeing the shared act_runner (web CI otherwise queues behind long Tauri desktop builds); since `trigger-desktop` is `needs: build`, only the newest commit kicks a desktop build. - Promote typecheck / eslint / prettier from `continue-on-error` to hard gates (tree held clean: tsc 0, eslint 0 errors, prettier formatted). eslint gates on errors only; existing no-explicit-any warnings stay informational. - Mark the bundle-size report informational (audit already is). Cancelling superseded runs is deploy-safe only because lotus_deploy.sh now re-resolves origin/lotus each poll iteration (companion change in the matrix repo); the comment documents the coupling. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/ci.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 15e3e4a38..729856587 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -6,6 +6,18 @@ on: pull_request: branches: [lotus] +# Only the newest commit per ref needs to build: a superseded push cancels its +# in-flight run. This keeps the shared act_runner free (web CI otherwise queues +# behind long Tauri desktop builds) and — since `trigger-desktop` is `needs: +# build` — means only the latest lotus commit ever kicks a desktop build, +# instead of one per rapid push. Cancelling a superseded run is deploy-safe +# ONLY because lotus_deploy.sh re-resolves origin/lotus each poll iteration and +# retargets its CI gate to HEAD — otherwise a run cancelled mid-poll would +# strand the newest commit undeployed. Keep those two in sync. +concurrency: + group: ci-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: name: Build & Quality Checks @@ -53,26 +65,32 @@ jobs: - name: Unit tests run: npm test - # ── Quality checks (informational — pre-existing issues exist) ─────── + # ── Quality gates (hard — a failure fails the job and blocks deploy) ── + # The tree is held clean (typecheck 0, eslint 0 errors, prettier + # formatted), so these gate real regressions instead of relying on local + # runs. NOTE: an upstream-stable merge (the lotus-build.sh path) could + # introduce upstream type/lint/format issues; that path deploys without + # CI, but a subsequent normal push would surface the failure here — fix + # forward (or briefly re-soften a gate) rather than let it deploy broken. + # eslint gates on errors only (existing `no-explicit-any` warnings stay + # informational — `check:eslint` has no --max-warnings). - name: TypeScript run: npm run typecheck - continue-on-error: true - name: ESLint run: npm run check:eslint - continue-on-error: true - name: Prettier run: npm run check:prettier - continue-on-error: true - # ── Security ───────────────────────────────────────────────────────── + # ── Security (informational — findings shouldn't block a deploy) ───── - name: Audit (high/critical) run: npm audit --audit-level=high --omit=dev continue-on-error: true - # ── Bundle size report ─────────────────────────────────────────────── + # ── Bundle size report (informational — never blocks a deploy) ─────── - name: Report bundle sizes + continue-on-error: true run: | echo "### Bundle sizes" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY