Repository navigation
docs(ci): make the jq quality gate fail closed - #617
Merged
Merged
Conversation
The CI guide's gate passed when a report had no quality score, because min // 100 turned an empty list into 100. It also read only a top-level report, which a folder target does not write. Check every report under reports/ and fail when a report has no score or none was written. Signed-off-by: Christopher Kevin <[email protected]>
chrisknvidia
requested review from
mosheabr,
rmalani-nv and
rng1995
as code owners
November 16, 2026 01:33
jq -s reads a zero-byte file as no document, so all() was true. Require one parsed document per report file. Signed-off-by: Christopher Kevin <[email protected]>
chrisknvidia
deleted the
devin/1794792647-ci-quality-gate-fail-closed
branch
November 16, 2026 07:39
This was referenced Nov 16, 2026
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.
Summary
Part of #603 (point 1). The quality gate in the CI guide's "Gate on quality score with jq" example failed open and missed folder reports:
min // 100turned a report with noquality_summaryinto a score of 100, so the gate passed.echo '{}' | jq -e '([.quality_summary[]?.overall_score] | min // 100) >= 80'exits 0.reports/skillevaluator-output-*.json. The recipe validates the./skillsfolder, which writes one report per skill underreports/<skill>/and none at the top level, solsfound nothing.The example now finds every
skillevaluator-output-*.jsonunderreports/and fails when no report was written, a report file is empty, or any report has no quality score:Verification
make lintmake test(118 failed, 10 errors on this branch'smainbase on this machine, all Harbor, git and timing tests. This branch adds one,test_directory_mutation_after_scandir_snapshot_fails_closed, a timing test that also fails onmainin 2 of 3 runs on its own.tests/test_oss_packaging.pyandtests/reporting/test_reporters.py, which read this page, pass apart from the Harbor test that fails onmaintoo.)make buildGate checks with jq 1.6: no report, an empty file,
{}, an emptyquality_summary, a score of 79.5, and a folder with one skill at 70, an empty file or no score all exit 1, and a truncated file exits 4; a score of 85 and a folder at 90 and 81 exit 0. On a realskillevaluator validate ./skills --tiers 1 -r json -o reportsrun over two skills (79.5 and 82), the gate found both per-skill reports and failed at 80.Release Impact
CHANGELOG.md