The set-matrix step wrote the npm workspace query result directly to $GITHUB_OUTPUT. If discovery ever produced [], the matrix would expand to zero check jobs, leaving the reusable workflow green without running any JS/TS checks. Now the step validates the result is a non-empty array before emitting it, and exits 1 with a GitHub annotation if it's empty or jq failed.