To hear some hikers talk, there is a clear set of rules for thru-hiking. Many people treat these as canon. For instance, one supposed rule says you can't give yourself a trail name. It must be given to you by another hiker.
Some will have you believe a thru-hike must be walked end-to-end in one direction. Your hike doesn't count as a thru-hike if you flip-flop. Or they might claim a thru-hike must be completed within a calendar year.
Though some hikers take these rules as gospel, they are phony. They are no more true than the myth that waterproof shoes will keep your feet dry.
You can give yourself a trail name if you want to. (I did.) You can flip-flop and still call yourself a thru-hiker. (I did that on the AT, PCT, and CDT.)
The organizations that manage the trails, like the Appalachian Trail Conservancy, the Pacific Crest Trail Association, and the Continental Divide Trail Coalition, don't set rules like these. As long as you've hiked all of the miles, they will recognize your accomplishment.