Skip to content

Say so when an absent input narrows a check to nothing - #31

Merged
sakanni merged 1 commit into
developfrom
CI_Toolkit-#30-FailOpenGuards
Oct 16, 2026
Merged

sakanni merged 1 commit into
developfrom
CI_Toolkit-#30-FailOpenGuards

Conversation

@sakanni

@sakanni sakanni commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Issues addressed by this PR

Closes #30

Four places where an input going missing narrowed what a check examined and the narrowed result was still reported as a pass. Each now says which of the two happened, following the pattern ci-versioning already uses for its subject assembly list.

ci-dataset-tests warns when the changed-file count and the list file disagree instead of skipping every fixture silently. resolve-dependencies separates an absent _shas.txt, which means the step that creates it never ran, from an empty one, which means no dependency was declared. prepare-runner fails when its source tree is empty, because hashing nothing yields a constant and the cache key stops telling runner versions apart. The three dotnet sln list call sites check the exit code, because a failed enumeration and a solution with no projects both clear the non-SDK gate once stderr is discarded.

ci-dataset-tests warns and the other three fail, because only the first leaves a usable run.

Test files

13 new Pester cases in .github/scripts/tests/fail-open-guards.Tests.ps1, asserting each guard exists, carries the right severity and runs before the thing it protects. No existing test is modified. The .NET suites are untouched by this change and still pass: 100, 70, 75 and 135.

Changelog

  • Checks that cannot examine their input now say so rather than reporting success

Additional comments

The guards are structural rather than behavioural: the failure paths need a broken dotnet or a step that did not run, so the tests buy regression cover rather than proof. None of the four is live or gating today, since no ci- context is required anywhere yet.

Four places where an input going missing narrowed what a check examined and
the narrowed result was still reported as a pass.

ci-dataset-tests warns when the changed-file count and the list file disagree,
rather than skipping every fixture silently. resolve-dependencies separates an
absent _shas.txt, which means the step that creates it never ran, from an empty
one, which means no dependency was declared; both used to produce an empty cache
key, and an empty key skips the restore and the build alike. prepare-runner
fails when its source tree is empty, because hashing nothing yields a constant
and the cache key stops discriminating between runner versions. The three
dotnet sln list call sites check the exit code, because a failed enumeration and
a solution with no projects both clear the non-SDK gate once stderr is discarded.
@sakanni
sakanni marked this pull request as ready for review October 16, 2026 10:34
@sakanni
sakanni merged commit 53e9d3f into develop Oct 16, 2026
3 checks passed
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.

Four checks can examine nothing and still report success

1 participant