Repository navigation
fix(ci-compliance): survive a dataset file the engine throws on, and say so on a skip - #33
Merged
Merged
Conversation
IsValidDataset opens the file with an unguarded StreamReader before it parses anything, so an exception does not need a malformed dataset to reach it. There was no catch around the per-file work, so the exception escaped Main and killed the process before OutputEmitter ran: no annotation, no coverage line, no name for the file that caused it, and the findings already gathered for every other file in the run were lost. Same shape as the ComplianceRunner catch, with the failure annotation moved to Compliance.Shared so one reword cannot land in one runner and not the other. The run still fails on accounting.Failed, so this states the abort rather than making the check more permissive.
… for A self-skip is correct behaviour: the check reads only the files a pull request changed, so no dataset files changed means nothing to examine. The result did not say so. Every step after the diff is skipped, the runner never runs, and its coverage line is the only thing that reports what was examined, so the job summary was empty and a green with nothing to check read the same as a green that checked everything. Adds a summary line naming the pathspec that was searched, because the one way a skip is wrong is the pathspec missing a file that did change. compute-changed-files gains a reason output so the line can tell an empty diff from a run that was never a pull request, which the count alone collapses.
sakanni
marked this pull request as ready for review
October 18, 2026 17:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues addressed by this PR
Closes #32
DatasetComplianceRunnergets the per-file catchComplianceRunnergot in #28. A file the engine throws on is counted as failed, annotated by name, and the run carries on and fails on the failure count, instead of the exception escapingMainand killing the process before any output is written.The failure annotation moved from
ComplianceRunnerintoCompliance.Sharedso one reword cannot land in one runner and not the other. No wording change.Second commit is the skip half: a compliance job that self-skips now writes a job summary line naming the pathspec it searched.
compute-changed-filesgains areasonoutput so that line can tell an empty diff from a run that was never a pull request. Additive, and no behaviour change for its other consumers.Test files
Two end-to-end tests in
DatasetComplianceRunnerE2ETestshold a dataset file open with no sharing, which is what reaches the throw, and assert the run fails, names the file, keeps the coverage line, and still reports the other file's finding. Four hermetic tests pin the shared annotation's wording and level. Six Pester assertions cover the skip summary and thereasonoutput at both ends.Existing tests are unmodified. Reverting the runner change fails the two new end-to-end tests and nothing else.
Changelog
A dataset file the compliance check cannot read no longer discards every other file's findings in the same run, and a skipped compliance check now says what it looked for.