
    j                    d    d Z ddlmZ ddlZddlmZ ddlmZ dZ	dZ
ddZdd	Zdd
ZddZddZy)uR  anu_v3.runtime_reconcile_checkpoint_recovery_layer — ADDITIVE-ONLY sidecar.

task-2553+32 §5 / §4.7 / §6.7 / §6.13 / §6.14.

The +31 anu_v3.runtime_reconcile_checkpoint module is FROZEN (§8 "+31 산출물
원본 수정" 금지). This sidecar is an ADDITIVE patch — it imports the original
READ-ONLY and asserts, in code, that the checkpoint is a RECOVERY layer that
NEVER replaces the normal completion callback primary path nor discards the
fallback safety path. Zero byte of the +31 original is mutated.

NO-CRON note (9-R.1): zero cron register/remove. Pure assertion/declaration.
    )annotationsN)List)runtime_reconcile_checkpointz5anu_v3.runtime_reconcile_checkpoint_recovery_layer.v1)z	read-onlyzdetection onlyzpreserved, NOT replacedc                     t        j                  t              xs ddz   t        j                  xs dz   } | j	                         t        fdt        D              S )u   §6.7 — the +31 original already states recovery-only in its docstring.

    We assert it (read-only) rather than editing the frozen original.
     
c              3  B   K   | ]  }|j                         v   y w)N)lower).0plows     I/home/jay/workspace/anu_v3/runtime_reconcile_checkpoint_recovery_layer.py	<genexpr>zAcheckpoint_original_declares_recovery_boundary.<locals>.<genexpr>+   s     DAqwwyCDs   )inspectgetdoc_ckpt__doc__r
   all_RECOVERY_BOUNDARY_PHRASES)docr   s    @r   .checkpoint_original_declares_recovery_boundaryr   $   sH    
 >>% &B$
.%--2E2
FC
))+CD)CDDD    c                      y)uH   §6.13 — checkpoint NEVER claims to replace the callback primary path.F r   r   r   )checkpoint_replaces_callback_primary_pathr   .       r   c                      y)u>   §6.14 — checkpoint NEVER discards the fallback safety path.Fr   r   r   r   (checkpoint_discards_fallback_safety_pathr   3   r   r   c                     g } t               s| j                  d       t               r| j                  d       t               r| j                  d       | S )uC   Return violation reasons (empty == compliant). §6.7/§6.13/§6.14.ul   +31 checkpoint original no longer self-declares its read-only recovery boundary (docstring drift) — §6.7.u@   checkpoint claims callback-primary replacement -> FAIL (§6.13).u:   checkpoint discards fallback safety path -> FAIL (§6.14).)r   appendr   r   )reasonss    r   )assert_checkpoint_is_recovery_not_primaryr"   8   sK    G9;=	
 12YZ/1STNr   c            	          t         ddddddddS )Nz1anu_v3.runtime_reconcile_checkpoint (+31, frozen)RECOVERY_LAYERz4executor normal completion callback -> ANU collectorzfallback/dead-man callbackFu    NONE (additive sidecar, §5/§8))schemacheckpoint_moduleroleprimary_pathsafety_pathreplaces_primarydiscards_fallbackmutation_of_plus31_original)SIDECAR_SCHEMAr   r   r   recovery_layer_contractr.   G   s$     P N3!"'I	 	r   )returnbool)r/   z	List[str])r/   dict)r   
__future__r   r   typingr   anu_v3r   r   r-   r   r   r   r   r"   r.   r   r   r   <module>r5      s?    #   8H E


r   