
    n8	jA                    |    U d Z ddlmZ ddlmZ dZded<    eh d      Zded	<   d
dddZ	ded<   ddZ
ddZddZy)u  Subject state enum SOT + visual descriptor lookup (Area #2 Q2 + Q6).

closed-world enum only — LLM producer (shot_staging v13) emit subject_state,
consumer = enum check via is_immobilized_state / get_visual_descriptor.
regex / substring / NL fallback 금지 (Gate 1).

is_immobilized_state silent False (consumer side fail-fast = schema validation).
validate_subject_state = defense in depth (fixture / corrupt CP / migration tool).
    )annotations)AppError)aliveunconsciousdeadseverely_injuredztuple[str, ...]SUBJECT_STATES>   r   r   r   zfrozenset[str]IMMOBILIZED_STATESz\lying motionless, pale/ashen skin, eyes fully closed, slack facial muscles, no signs of lifezsvisible bruises and cuts, bloodied areas on face or clothing, pained or grimacing expression, disheveled appearancezIeyes closed, slack facial features, limp posture, head tilted to one side)r   r   r   zdict[str, str]SUBJECT_STATE_VISUAL_DESCRIPTORc                    | t         v S )N)r
   states    L/Users/manta/Documents/Projects/TheRoad-I1/backend/app/core/subject_state.pyis_immobilized_stater      s    &&&    c                D    | t         vrt        d| d| dt                y )Nz*step.contract_violation.subject_state.enumz: invalid subject_state=z, expected one of )r	   r   )r   wheres     r   validate_subject_stater      s6    N"8g-eY6HHXY
 	
 #r   c           
         | t         vr.t        dd| dt        t         j                                d      t         |    S )NzCstep.contract_violation.subject_state.visual_descriptor_not_definedzsubject_state=z" has no visual descriptor (valid: ))r   r   sortedkeysr   s    r   get_visual_descriptorr   %   sL    33QUI%GOnOsOsOuHvGwwxy
 	
 +511r   N)r   strreturnbool)r   r   r   r   r   None)r   r   r   r   )__doc__
__future__r   app.core.errorsr   r	   __annotations__	frozensetr
   r   r   r   r    r   r   <module>r$      s]    # $ #W V%./Z%[ N [ k N^3  '
2r   