Skip to content

docs(ci): make the jq quality gate fail closed - #617

Merged
chrisknvidia merged 2 commits into
mainfrom
devin/1794792647-ci-quality-gate-fail-closed
Nov 16, 2026
Merged

chrisknvidia merged 2 commits into
mainfrom
devin/1794792647-ci-quality-gate-fail-closed

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

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 // 100 turned a report with no quality_summary into a score of 100, so the gate passed. echo '{}' | jq -e '([.quality_summary[]?.overall_score] | min // 100) >= 80' exits 0.
  • It read only reports/skillevaluator-output-*.json. The recipe validates the ./skills folder, which writes one report per skill under reports/<skill>/ and none at the top level, so ls found nothing.

The example now finds every skillevaluator-output-*.json under reports/ and fails when no report was written, a report file is empty, or any report has no quality score:

mapfile -t reports < <(find reports -name 'skillevaluator-output-*.json' -type f)
if [ "${#reports[@]}" -eq 0 ]; then
  echo "No SkillEvaluator JSON report under reports/" >&2
  exit 1
fi
jq -se --argjson n "${#reports[@]}" \
  'length == $n and all(.[]; [.quality_summary[]?.overall_score] | length > 0 and min >= 80)' "${reports[@]}"

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests (docs example only; checked by hand, see below)
  • Updated documentation for user-visible changes
  • Ran make lint
  • Ran make test (118 failed, 10 errors on this branch's main base 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 on main in 2 of 3 runs on its own. tests/test_oss_packaging.py and tests/reporting/test_reporters.py, which read this page, pass apart from the Harbor test that fails on main too.)
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

Gate checks with jq 1.6: no report, an empty file, {}, an empty quality_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 real skillevaluator validate ./skills --tiers 1 -r json -o reports run over two skills (79.5 and 82), the gate found both per-skill reports and failed at 80.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

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]>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

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]>
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.

1 participant