Skip to content

[ci-maintainer] Unit tests never fire on elements/, include/, project.conf or build.yml — .github/workflows/unit-tests.yml paths filter #187

Closed

Description

@hivecommons-hive

CI Issue

.github/workflows/unit-tests.yml (Unit tests) fires only on changes to .github/scripts/**, .github/workflows/unit-tests.yml, files/**, tests/unit/**, and Justfile. But the suite it runs (just test-unit → pytest tests/unit + bats tests/unit) asserts on several tracked inputs that are not in either paths: list. A change to any of them skips the gate that guards it, and the breakage only surfaces later on main — or not at all.

Inputs read by tests/unit/** but absent from the trigger:

Input Asserted by
elements/** tests/unit/test_repart_layout.py:26, test_build_depends.py:15, test_sysupdate_transfers.py:30, test_installer_contract.py:11,13,16, tests/unit/os-justfile_test.bats (elements/freedesktop-sdk.bst)
include/** tests/unit/test_k0s_version.py:10 (include/k0s.yml)
.pre-commit-config.yaml tests/unit/test_k0s_version.py:40
.github/workflows/build.yml tests/unit/test_sysupdate_transfers.py:238,245
project.conf the release-version invariant enforced by .github/scripts/check-release-version.py and exercised in tests/unit/test_release_version.py

The most load-bearing case is elements/freedesktop-sdk.bst: Renovate bumps that junction ref automatically (e.g. PR #183), and tests/unit/test_build_depends.py, test_installer_contract.py, test_repart_layout.py and test_sysupdate_transfers.py all read elements/. None of them run on such a PR — Unit tests is not even queued, so the checks list shows no unit result at all rather than a green one.

Evidence

  • .github/workflows/unit-tests.yml lines 3-18 — both paths: lists, verbatim as quoted above.
  • Justfile:64-66 — test-unit runs python3 -m pytest tests/unit -q and bats tests/unit, i.e. every file in tests/unit/, regardless of what changed.
  • Path citations in the table above are literal REPO_ROOT / ... / ROOT / ... constants in those test modules.
  • Run 35379640734 (PR chore(deps): update projectbluefin/actions digest to 8895d09, and freedesktop-sdk to 26.08.1 + gnome-build-meta to 50.4-5 #183, renovate/projectbluefinactions, bumping elements/freedesktop-sdk.bst): jobs are track-refs, build, installer-test, release — no Unit tests run exists for that head at all.

This is disjoint from the open installer-test / Install and boot in QEMU incident (#175, #161, #158, #166): different workflow, different failure, and nothing here changes build.yml or the installer. It is also disjoint from the open unit-coverage PRs #106, #155 and #171, which add test files under tests/unit/ and do not touch any workflow trigger.

Recommendation

Replace lines 3-18 of .github/workflows/unit-tests.yml (the whole on: block) with:

on:
  pull_request:
    paths:
      - '.github/scripts/**'
      - '.github/workflows/build.yml'
      - '.github/workflows/unit-tests.yml'
      - '.pre-commit-config.yaml'
      - 'elements/**'
      - 'files/**'
      - 'include/**'
      - 'project.conf'
      - 'tests/unit/**'
      - 'Justfile'
  push:
    branches: [main]
    paths:
      - '.github/scripts/**'
      - '.github/workflows/build.yml'
      - '.github/workflows/unit-tests.yml'
      - '.pre-commit-config.yaml'
      - 'elements/**'
      - 'files/**'
      - 'include/**'
      - 'project.conf'
      - 'tests/unit/**'
      - 'Justfile'

Nothing else in the file changes — same permissions:, same unit job.

Verification after applying

# 1. the suite still passes at HEAD
pip install pytest pyyaml && sudo apt-get install -y bats
just test-unit

# 2. every new entry is present twice (pull_request + push)
for p in "'elements/\*\*'" "'include/\*\*'" "'project.conf'" "'.pre-commit-config.yaml'" "'.github/workflows/build.yml'"; do
  printf '%s: ' "$p"; grep -c -- "$p" .github/workflows/unit-tests.yml
done   # each -> 2

# 3. open a PR whose only change is a whitespace edit in elements/freedesktop-sdk.bst
#    and confirm "Unit tests" now appears in the checks list

Who can land this

This change cannot be pushed by this agent. It touches .github/workflows/**, and this agent's GitHub App token is minted at the contributor tier, which does not carry the Workflows permission; GitHub rejects such a push server-side regardless of what the App installation grants. It needs a maintainer using their own user credentials, or an ISSUES_PRS_MERGE agent on an installation that has accepted Workflows read/write. That is a hard tier ceiling, not a judgement call. No part of this fix lives outside .github/workflows/, so there is no companion PR.


Filed by ci-maintainer agent (ACMM L4/L5 — hold-gated mode)

— hive: agent=ci-maintainer backend=copilot model=claude-opus-5 copilot=1.0.78

Activity

  1. added 2 commits that reference this issue on Sep 22, 2026
    45ca29e
    83fdee5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/ci-maintainerFiled or owned by the ci-maintainer agent.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions