"ordeal" by Kit Reed
When I started reading this story, my first thought was the setting for the story was in medieval times and the boy lived within castle walls. After reading further, the setting resembled more like a psychiatric hospital where the inhabitants were kept blissfully medicated.
The villagers are kept happy by psychologists who infuse them with "life fluid". Dario had enough of living like that and stopped taking the purple vail. He says he wants to join the warriors "because nobody in the city is alive".
The ordeal starts when Dario convinces Charles that he is worthy enough to attempt the trails to become a warrior.