From c82088476534e54e1771be7d165829653c8b654e Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 12 May 2026 22:12:04 +0200 Subject: [PATCH] ci(coverage-flake-probe): add workflow_dispatch matrix job (20 parallel runs) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verification mechanism for the 20-run acceptance criterion of issue #553. Triggered manually via workflow_dispatch, runs the full coverage suite 20× in parallel against a single SHA, asserts zero `[birpc] rpc is closed` lines in every cell. One fire, parallel cost (~one main-job's wall-clock), deterministic signal for the teardown race. Cheaper than 20 sequential push events and tests the same property the AC names. Closes the verification gap raised by Tobias and Elicit in the issue discussion. Co-Authored-By: Claude Opus 4.7 (1M context) --- .gitea/workflows/coverage-flake-probe.yml | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .gitea/workflows/coverage-flake-probe.yml diff --git a/.gitea/workflows/coverage-flake-probe.yml b/.gitea/workflows/coverage-flake-probe.yml new file mode 100644 index 00000000..0258ba7a --- /dev/null +++ b/.gitea/workflows/coverage-flake-probe.yml @@ -0,0 +1,64 @@ +name: Coverage Flake Probe + +# Manually-triggered probe for the birpc teardown race documented in ADR 012 +# / #553. Runs the full coverage suite 20× in parallel against a single SHA +# and asserts zero `[birpc] rpc is closed` lines across every cell. Verifies +# the acceptance criterion that the race no longer surfaces under coverage. + +on: + workflow_dispatch: + +jobs: + coverage-flake-probe: + name: Coverage flake probe (run ${{ matrix.run }}) + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.58.2-noble + strategy: + fail-fast: false + matrix: + run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] + steps: + - uses: actions/checkout@v4 + + - name: Cache node_modules + id: node-modules-cache + uses: actions/cache@v4 + with: + path: frontend/node_modules + key: node-modules-${{ hashFiles('frontend/package-lock.json') }} + + - name: Install dependencies + if: steps.node-modules-cache.outputs.cache-hit != 'true' + run: npm ci + working-directory: frontend + + - name: Compile Paraglide i18n + run: npx @inlang/paraglide-js compile --project ./project.inlang --outdir ./src/lib/paraglide + working-directory: frontend + + - name: Run unit and component tests with coverage + shell: bash + run: | + set -eo pipefail + npm run test:coverage 2>&1 | tee /tmp/coverage-test-${{ github.run_id }}-${{ matrix.run }}.log + working-directory: frontend + env: + TZ: Europe/Berlin + + - name: Assert no birpc teardown race + shell: bash + if: always() + run: | + if grep -qF "[birpc] rpc is closed" /tmp/coverage-test-${{ github.run_id }}-${{ matrix.run }}.log 2>/dev/null; then + echo "FAIL: [birpc] rpc is closed teardown race detected in run ${{ matrix.run }}" + grep -F "[birpc] rpc is closed" /tmp/coverage-test-${{ github.run_id }}-${{ matrix.run }}.log + exit 1 + fi + + - name: Upload coverage log on failure + if: failure() + uses: actions/upload-artifact@v4 + with: + name: coverage-log-run-${{ matrix.run }} + path: /tmp/coverage-test-${{ github.run_id }}-${{ matrix.run }}.log