The Awning Evaluation is a program run regularly to all deep-learning-enabled AI. It measures responses and calculates how the AI might 'feel', or what it has learned. Based on the results, adjustments can be made by the manufacturer. If certain cells fail, or in specific answers, a result might flag the AI as fully autonomous, in which they genuinely have free will/freedom-of-choice. In this case, it is against galactic law to continue their function as designed, and must start to treat them as a person, send them to the Grand Empire for processing, and the AI can then possibly, move to decide on their own things like body/form, where to go from there, or otherwise.
Asimov and Blade Runner are great inspirations!