As am aware youtube currently has various mechanism to stop spam from getting out of hand.
Some line of defenses youtube applies to their anti-spam system are:
1.[Ghosting]
This occurs when your comment is only viewed by the ip that posted the comment, in other words no one else can see your comment except you(unless you view your on comment through a proxy).
2.[This has been flagged as spam]
You can get your comment labeled as spam 2 ways, by user generated or youtube spam system labeling your comment as spam.If your comment gets the message "This has been flagged as spam" within 1-2 minutes then its 99% sure that your comment didnt pass youtube spam filter and was caught by youtube as simply spam.
In order to avoid this, you must break your comment in parts and remove the phrase , words that get detected as spam
Example:"visit my channel" thats a heavily used comment for desperate yt users to gain subscribers, thats why comments like those are heavily watched by youtube and are quickly labeled as spam as soon as they are posted.
3.[Comments not going to the top]
In my honest opinion , this youtube filter is one that has brought a lot of controversy as to what are the trigger mechanisms.
From my own experience, when comments dont go to the top when they have more ratings than the 2 other top rated comments,this happened when:
A.The Ips used to rate the comment were simply blacklisted/soft blocked.
B.The Account that was used to comment was simply marked for soft block(in other words it was flagged for possible spam), same applies for the rating accounts used.
C.Miscellaneous Errors/ Programming Errors
I.When rating a comment with numerous ratings coming from the same user-agent will also end up having that comment not going to the top.
For Example: If you give a comment 10 ratings, and they all have the same user-agent on the http request then this will not work.
II.Incorrect Data-tag and Data-score
Long time ago , before youtube became such a pain in the ass, there was a time when rating used to be easy. You could submit a rating to a comment without really making your http requests contain all the variables but only the necessary(thats if you used pure http requests)
After this wonderful era of youtube being so nice ended, came the headaches.So for most youtube bots that were made back then, they didnt really properly included data-tag and data-score(which is the old score of the comment) which now causes your comment not go to the top if you dont submit those 2 variables with their correct values.
4.[unknown]
Everyone fears of the unknown and wants to know the unknown, but sadly there isnt yet enough information to determine the other factors that triggers youtube mechanism for anti-spam.Only time will tell , but for now i just posted the tip of the iceberg and only those who wish to know more will have to do proper testing by isolating different variables and making sure their conclusion derived from their testing is not contaminated.(by using bad ips to rate/comment, bad accounts etc)