
    jD                        d Z ddlmZ ddlmZ dZdZdZdZdZ	d	Z
d
ZdZdZ eeeeee	h      Z ee
eeeh      Zeez  Z ed       G d d             Zedededede	de
dedededi	ZddZy)u  anu_v3.runtime_next_action_resolver — classification → next_action recommendation.

task-2553+31 ANU_RUNTIME_RECONCILE_CHECKPOINT leaf module (구현목표 16).

CRITICAL design boundary (§10 / regression 15): next_action is a
*recommendation only*. This resolver NEVER executes merge / cron / dispatch /
closeout. It maps a classification to a recommended action string + a blocking
flag + a one-line rationale. Execution authority stays with the chair / ANU.
    )annotations)	dataclassNO_CRON_TASK_DONERESULT_READY_NO_NORMAL_CALLBACKNORMAL_COLLECTOR_COMPLETEDDUPLICATE_CALLBACK_IGNOREDTRACK_MISMATCHRUNNINGWAIT_FOR_RESULTFALLBACK_PENDINGSTALE_OR_BOT_STUCK_CANDIDATET)frozenc                  V    e Zd ZU ded<   ded<   ded<   ded<   ded<   dZded	<   dd
Zy)
NextActionstrclassificationrecommendationboolblockingterminal	rationaleCHAIR_OR_ANUexecution_authorityc                    | j                   | j                  | j                  | j                  | j                  | j
                  ddS )NF)r   r   r   r   r   r   is_execution)r   r   r   r   r   r   )selfs    :/home/jay/workspace/anu_v3/runtime_next_action_resolver.pyto_jsonzNextAction.to_json5   s?    "11"11#'#;#;!
 	
    N)returndict)__name__
__module____qualname____annotations__r   r    r   r   r   r   ,   s-    NNN--	
r   r   ),PROPOSE_BATCH_ACCEPT_RECONCILE_READ_COMPLETEFu   NO-CRON task: result.json + .done present, dispatch ok, no normal callback, no fallback armed. Self-completion observed by read alone (dogfooding, §15). Recommend batch_state ACCEPT proposal — no cron, no merge, no write by checkpoint.)"RECOMMEND_COLLECTOR_RECONCILE_READFu   Result complete but normal-collector cron self-registration was missed. NOT a task failure — recovery == read-only reconcile of result/.done (NO-CRON, 9-R.1). Non-blocking; fallback (if pending) will dedupe.)RECOMMEND_LOOP_ADVANCEFu~   Primary path intact: normal collector executed. Recommend loop / next-phase advance. Callback primary path NOT disabled (§2).)RECOMMEND_NO_OP_DEDUPFu   Fallback fired after result already ready / collected. Benign dedup — recommend no-op. Fallback safety path NOT disabled (§2); pending fallback never force-deleted (§9).)'RECOMMEND_HOLD_FOR_CHAIR_TRACK_MISMATCHTu   4-tuple binding mismatch (task_id / dispatch_cron_id / collector / fallback). Callback 4-tuple contamination — §12 HOLD_FOR_CHAIR candidate. Quarantine recommended; checkpoint performs zero remediation (read-only).)RECOMMEND_CONTINUE_WAITTuj   Dispatch ok, result not yet present, not stale. In-flight — recommend continue waiting (no re-dispatch).)r,   Tz^Dispatch ok, awaiting result, not stale. Recommend continue waiting (no re-dispatch, no cron).)&RECOMMEND_CONTINUE_WAIT_FALLBACK_ARMEDTu   Result not yet present; fallback safety net armed/pending. Recommend continue waiting — safety path intact, never force deleted (§9).)$RECOMMEND_STALE_REVIEW_NO_REDISPATCHTu   Result missing past stale threshold (or dispatch not ok). Bot may be stuck. Recommend human/ANU review — checkpoint does NOT re-dispatch / re-arm cron (§9/§10).c                x    | t         vrt        | dddd      S t        |    \  }}}t        | ||| t        v |      S )z?Map a classification to a recommendation (recommendation only)./RECOMMEND_HOLD_FOR_CHAIR_UNKNOWN_CLASSIFICATIONTFuy   Classification outside enumerated taxonomy — §3 '그 외 분류 0' → HOLD_FOR_CHAIR candidate. No checkpoint action.)r   r   r   r   r   )ALL_CLASSIFICATIONSr   _TABLETERMINAL)r   recr   r   s       r   resolver5      s^    00)LP	
 		
  &n5C9%8+ r   N)r   r   r    r   )__doc__
__future__r   dataclassesr   r   r   r   r   r	   r
   r   r   r   	frozensetr3   NONTERMINALr1   r   r2   r5   r&   r   r   <module>r;      s   # ! ( "C 9 9 ! #% = #   	  ,  $
 
 
,   $ &  !  !         ! #s@
Fr   