Skip to content

CI reports success when tests silently skip #122

Closed

Description

@zhollis21

Problem

ci-build-and-preview.yml parses the skipped count into the job summary table but never acts on it:

# Pass/fail is keyed off the test runner's exit code, not our ability to parse
# its output — a runner output format change should never fail CI on its own.
if [ "$PROJ_EXIT" -eq 0 ]; then ICON="✅"; else ICON="❌"; OVERALL_EXIT=1; fi

A run where 190 of 644 tests skipped is a green ✅ with a number in a column nobody reads.

This already happened

IconGlyphReferenceTests (#117) resolves the icon package version by reading the app csproj, and
skips gracefully when the package cannot be located — deliberately, so a fresh machine or an
unrestored version bump does not fail red. When #62 moved the app project from
src/AniSprinkles.csproj to src/AniSprinkles/AniSprinkles.csproj, that lookup silently missed and
all 190 glyph cases turned into skips. Locally the count went Passed: 644 → Passed: 413, Skipped: 190, which is only obvious if you happen to be watching the number.

It was caught by eye. CI would have reported ✅.

That is the precise hole #117 was written to close — a check that quietly stops checking — so it is
worth closing one level up rather than only in that test.

Proposal

Fail the job when skips appear, with an explicit opt-out:

  • If S is parsed and greater than an allowed threshold (default 0), set OVERALL_EXIT=1 and
    emit ::error:: naming the project and count.
  • Keep the existing "unparseable output must never fail CI on its own" rule — only act when
    PARSED=1, so a runner format change still cannot break the build.
  • If a genuinely environment-dependent skip is ever wanted, the threshold is a single number to
    raise with a comment saying why.

Alongside it, a minimum test count. The same incident dropped the total by 231, and a
stale-assembly run during this work reported Total: 557 against a 644-test suite. Both are
invisible today. Agreed during planning to do this as a single floor on the summed Total across
projects, checked after the per-project loop, rather than a per-project mapping — there is only one
test project today and the sum is what the incident moved. Baseline measured 2026-08-23:
806 passed, 0 skipped, so the floor starts at 800.

One parsing gotcha for the skip check: in the new-runner branch S falls back to the literal ?
(ci-build-and-preview.yml:111) while PARSED is still set to 1, so the comparison needs a
numeric guard before it. The VSTest branch defaults to 0 instead — the two are not symmetric.

Acceptance

  • A run with any skipped test fails, naming the project and the count.
  • Deliberately skipping a test (Assert.Skip) fails CI until the threshold is raised with a reason.
  • A run whose summed test total falls below the floor fails, naming the total and the floor.
  • Unparseable runner output still cannot fail the job on its own.

Related

Activity

  1. added
    p3-medium
    Tech Debt
    on Aug 22, 2026
  2. zhollis21 commented on Aug 23, 2026

    @zhollis21
    OwnerAuthor

    Verification notes (checked against origin/main @ 57d4506):

    • Confirmed as written. .github/workflows/ci-build-and-preview.yml:127 keys the icon and
      OVERALL_EXIT off PROJ_EXIT alone; S is parsed at :111 / :117 and only ever printed.
    • Gotcha for the threshold: in the new-runner branch S falls back to the literal ?
      (:111, S="${S:-?}") while PARSED is still set to 1 (:113). A bare
      [ "$S" -gt "$MAX" ] would error on that input, so the check needs a numeric guard
      ([[ "$S" =~ ^[0-9]+$ ]]) before comparing. The VSTest branch defaults to 0 instead (:117),
      so the two branches are not symmetric.
    • The specific Add a test that validates x:Static icon glyph references in XAML #117 regression is already fixed: ResolvePackageVersion now scans every csproj
      under src/ rather than naming one path
      (tests/AniSprinkles.UnitTests/IconGlyphReferenceTests.cs:256). The graceful Assert.SkipWhen
      at :152 remains, which is what keeps this issue live.
    • Current suite size for a floor, if one is wanted: 374 [Fact]/[Theory] attributes across
      tests/AniSprinkles.UnitTests/ (attribute count, not expanded [InlineData] cases).
    • Test-project discovery is a find over the repo (:81), so any threshold needs to be
      per-project or a single global value, not a hardcoded project name.
  3. zhollis21 commented on Aug 23, 2026

    @zhollis21
    OwnerAuthor

    Updated during planning: the minimum test count moved from "worth considering" to agreed scope, as a single floor on the summed Total across projects rather than per-project. Floor starts at 800 against a measured baseline of 806 passed / 0 skipped. Also recorded the S numeric-guard gotcha in the proposal, since it is easy to write the threshold check without it and get a shell error instead of a clean failure.

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

    Tech Debtp3-medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions