Skip to content

fix(ci): fail Test Summary when a needed job is cancelled - #1375

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1371-summary-cancelled-gate
Aug 7, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1371-summary-cancelled-gate

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Test Summary is the only required status check on dev. Its summary job
runs with if: always() and flagged each of its eight needs: jobs only on
result == "failure". A cancelled job — job timeout, concurrency cancel,
runner eviction, a manual "Cancel workflow" — produced no verdict at all, yet
the aggregate printed "All executed test suites passed" and exited 0. A pull
request whose CI never finished was therefore mergeable.

Type of Change

  • fix -- Bug fix

Changes Made

  • .github/workflows/ci.yml — each of build-image, test-image,
    test-integration, project-checks, commit-checks, python-security,
    security-scan, dependency-review now sets FAILED=true on cancelled as
    well as failure. The per-job echo/FAILED=true idiom is unchanged; only
    the condition and the message ("failed or was cancelled") move.
  • The comment above the block records the rationale, including why skipped
    stays tolerated.
  • tests/test_workflow_summary_gate.py — new workflow-shape test (committed RED
    first): every needed job must trip the gate on failure and cancelled,
    and none may trip on skipped.

Why skipped is deliberately still tolerated

workflow_dispatch takes a test-suite input (all / image / integration /
project) that every job is gated on, so a deliberate subset run legitimately
skips the rest; commit-checks and dependency-review are pull-request only.
Failing on skipped would break both. The same tolerance is pinned for the
scaffold copy by
tests/test_workflow_private_repo_guard.py::test_summary_needs_dependency_review_with_skip_tolerance.

This PR touches only devkit's own ci.yml, which is not manifest-synced to
assets/workspace/, so consumers are unaffected and no scaffold drift is
introduced.

Changelog Entry

### Fixed

- **A cancelled CI job no longer leaves `Test Summary` green** ([#1371](https://github.com/vig-os/devkit/issues/1371))
  - `Test Summary` is the only required status check on `dev`, and it flagged a
    needed job only on `result == "failure"`. A job that was **cancelled** — job
    timeout, concurrency cancel, runner eviction, a manual "Cancel workflow" —
    produced no verdict at all, yet the aggregate printed "All executed test
    suites passed" and exited 0, so a pull request whose CI never finished was
    mergeable.
  - All eight needed jobs now trip the gate on `cancelled` as well as `failure`.
    `skipped` stays tolerated by design: `workflow_dispatch` takes a
    `test-suite` subset input that every job is gated on, and
    `commit-checks`/`dependency-review` are pull-request only.

Testing

  • Tests pass locally
  • Manual testing performed (describe below)

Manual Testing Details

  • uv run pytest tests/test_workflow_summary_gate.py — RED (8 failed, 17
    passed) before the workflow change, GREEN (25 passed) after.
  • prek run --all-files — green (actionlint and yamllint included).

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • I have updated CHANGELOG.md in the [Unreleased] section
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes

Refs: #1371

@c-vigo
c-vigo merged commit 51f92a6 into dev Aug 7, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1371-summary-cancelled-gate branch August 7, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant