Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3119,7 +3119,35 @@ jobs:
# ratchet, so this gate is closable by a human via a normal pull request —
# it is deliberately not an unclosable gate.
update-baseline:
if: ${{ inputs.enable-coverage-guard && github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development') }}
# ⚠️ `!cancelled() && needs.phpunit.result == 'success'` is load-bearing, and
# its absence deleted this job on every run where PHP Quality was red.
#
# A job condition with no status function is implicitly wrapped in
# `success()`, and that success() is not satisfied by this job's DECLARED
# dependency alone — a failure anywhere in the `needs` closure removes the
# job. `phpunit` sits behind `needs: [php-quality, security]` and survives a
# red php-quality only because its own `if` carries `!cancelled()`. This job
# had no such escape, so a failing PHPMD — a GRANDPARENT it does not depend
# on — silently deleted the coverage ratchet while `phpunit` itself was
# green.
#
# Measured on procest's own history (push runs on development):
#
# run 30896879219 php-quality FAIL phpunit success -> CBC skipped
# run 30895657851 php-quality FAIL phpunit success -> CBC skipped
# run 30887852492 php-quality FAIL phpunit success -> CBC skipped
# run 30882883115 php-quality FAIL phpunit success -> CBC skipped
# run 30876345083 php-quality FAIL phpunit failure -> CBC skipped
#
# Five consecutive runs in which the ratchet reported nothing at all, and
# nothing said so: a skipped job is not a red. Reproduced on doriath twice
# today (run 30925445843 and its re-run) — `steps: []`, started_at ==
# completed_at, the shape of a job that never existed.
#
# Being explicit also makes the intent legible: this job needs a SUCCESSFUL
# phpunit, because it downloads that job's coverage artifact. It has no
# opinion about PHPMD.
if: ${{ inputs.enable-coverage-guard && github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/development') && !cancelled() && needs.phpunit.result == 'success' }}
runs-on: ubuntu-latest
name: "Coverage Baseline Check"
needs: phpunit
Expand Down Expand Up @@ -3166,6 +3194,30 @@ jobs:
with:
name: coverage-baseline
path: .coverage-baseline
# ⚠️ REQUIRED, and its absence made this an unclosable gate.
#
# `.coverage-baseline` is a DOTFILE. actions/upload-artifact@v4
# excludes hidden files by default (`include-hidden-files: false`),
# and when the glob then matches nothing it does not fail — it prints
#
# ##[warning]No files were found with the provided path:
# .coverage-baseline. No artifacts will be uploaded.
#
# and the step still succeeds. So the artifact has NEVER existed,
# while the error message immediately above it says:
#
# Commit the recomputed value (attached as the 'coverage-baseline'
# artifact of this run) in a pull request.
#
# The gate therefore told you to close it using a file it had just
# silently declined to produce. Reproduced on docudesk
# (run 30925609908): the preceding `git --no-pager diff --
# .coverage-baseline` prints the changed file, proving it is on disk,
# and the upload immediately after reports it as not found.
#
# This is the same shape as the swallowed `git push` this job was
# rewritten to remove — a failure that reads as work having been done.
include-hidden-files: true
retention-days: 7

# ── Hydra mechanical gates ──────────────────────
Expand Down