From 857920a82b79e5b7d49483d4dece3712c7f3b0f5 Mon Sep 17 00:00:00 2001 From: sotashimozono Date: Wed, 19 Aug 2026 06:20:12 +0000 Subject: [PATCH] fix(ci): three uploads ignored the input that already gates their consumer (#78) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every artifact upload here is `continue-on-error: true` (#76/#77), so a full artifact quota no longer fails a green suite. What it still does is ATTEMPT six uploads per run, three of which are produced for consumers that may be switched off — and on an account at its quota that is six failed API calls a run and a log full of errors nobody can act on. Three inputs already exist and already gate the consuming side. None gated the producing side: `record-timings` gates the `timings` JOB (line 874) that consumes the history — but not the upload that produces it (331) `diagnose` gates every step that READS the records (681/685/851) — but not the per-shard upload (645) nor the merged one (840) So `diagnose: false` switched off the readers and left the writers running. This adds the missing three; `coverage` and `prebuild` already gated theirs. `always()` on the per-shard records is load-bearing and stays: a FAILED shard is exactly when its records are worth having. It becomes `always() && inputs.diagnose`, which keeps that and adds the switch. WITH THIS, `coverage: false, diagnose: false, record-timings: false` UPLOADS NOTHING, which is the point. Measured on FunctionMeasures with `coverage: false` alone, against an account whose artifact quota was FULL: `Shard labels` went green and all eight shards ran — where before every run died there with zero shards executed. A suite that creates no artifacts does not care that artifact storage is full. That is a stronger position than keeping storage below the limit, because it does not depend on anyone remembering to prune. Not the whole of #78 — coverage is still an artifact round-trip when it is on, and sending each shard to Codecov directly would remove that too. This is the part that needs no design decision. --- .github/workflows/sharded-tests.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sharded-tests.yml b/.github/workflows/sharded-tests.yml index 49f36bf..62e8a3a 100644 --- a/.github/workflows/sharded-tests.yml +++ b/.github/workflows/sharded-tests.yml @@ -327,7 +327,11 @@ jobs: # went red HERE — `Failed to CreateArtifact: Artifact storage quota has been hit` — before # a single test executed. A storage problem should cost the timing HISTORY, which is an # optimisation, not the TEST RESULT, which is the point of the run. + # GATED ON `record-timings`, which already gates the `timings` JOB that consumes this + # history. Producing an artifact no one is allowed to consume is work with no reader, and + # on an account at its artifact quota it is a failed API call on every run. - id: timings + if: ${{ inputs.record-timings }} uses: actions/upload-artifact@v7 continue-on-error: true with: @@ -639,8 +643,12 @@ jobs: # 12 counters and uploaded none. The records upload below already knew this. include-hidden-files: true + # `always()` is load-bearing and stays: a FAILED shard is exactly when its records are worth + # having. `diagnose` is added beside it because that input already gates every step that + # READS these records (lines 681/685/851) — without it here, the artifact is produced for a + # consumer that has been switched off. - name: Upload this shard's records and timings - if: always() + if: ${{ always() && inputs.diagnose }} continue-on-error: true uses: actions/upload-artifact@v7 with: @@ -835,7 +843,10 @@ jobs: MERGE echo "Merged $(wc -l < records.jsonl) unit records." + # Same as the per-shard records above: `diagnose` gates the step that builds this file + # (line 851), so it should gate the upload that publishes it. - name: Upload the merged records + if: ${{ inputs.diagnose }} continue-on-error: true uses: actions/upload-artifact@v7 with: