
    
j	                        d Z ddlmZ ddlZddlZddlZddlZddlmZ  ee	      j                         j                  Z ed      Zedz  edz  edz  ed	z  fZd
ZddZddZedk(  r e e             y)zBIndependent arm-only verification; never writes profile authority.    )annotationsN)Pathz)/home/cube/.hermes/profiles/dualcoachtestzcustomers/registry.jsonz:data/onboarding/telegram-customer-bootstrap-v1/ledger.jsonzadata/customers/task26_live_2e_r2_20260815_8527916639/nutrition-onboarding/transient/workflow.jsonz:data/onboarding/telegram-publication-outbox-v1/ledger.json@30bcd6633875050aa4f56f49a8bb26cd616ffa2409fc04caef523a8a62d5d1ccc                d    t        j                  | j                               j                         S )N)hashlibsha256
read_bytes	hexdigest)paths    ^.omo/evidence/task26/task26-continuous-lifecycle-observer-st_01a007da-v1/independent_verify.pydigestr      s!    >>$//+,6688    c                 2   t         D  ci c]  } t        |       t        |        }} t        dz  }|j	                         rt        d|       t        j                  t        j                  t        t        dz        ddt        t              dt        |      gddd      }t        j                  |j                        }t         D  ci c]  } t        |       t        |        }} ||k7  rt        d	      |j                  d
      dk7  rt        d      |j                  di       j                  d      t        k7  rt        d      ddd|t        |      t        |d   d}t        dz  }|j!                  d      }	 t        j"                  ||dd       |j%                  d       |j'                          |j)                          |j+                  d       t-        t        j.                  |d             yc c} w c c} w # |j)                          w xY w)Nzindependent-arm-only.jsonz'refusing to replace append-only proof: zcontinuous_lifecycle.pyzarm-onlyz	--profilez--readyT)checkcapture_outputtextz3live authority changed during arm-only verificationstatusREADY_CONTINUOUS_LIFECYCLEz!arm-only did not return readinessbindings	successorzsuccessor binding mismatchz0task26-continuous-lifecycle-independent-proof-v1PASS_INDEPENDENT_ARM_ONLYinitial_handoff)schemar   authority_unchangedauthority_sha256arm_only_sha256r   r   zindependent-proof.jsonx),:)	sort_keys
separators
i  )r    r   )AUTHORITIESstrr   ROOTexistsRuntimeError
subprocessrunsys
executablePROFILEjsonloadsstdoutgetEXPECTED_SUCCESSORopendumpwriteflushclosechmodprintdumps)	r   beforearmresultdocumentafterprooftargetfds	            r   mainrB      s   2=>+$c$i%+F>
,
,C
zz|DSEJKK^^NN001LH	
 F zz&--(H1<=SYt$E=PQQ||H!==>??||J#''48JJ788D-#!!#;'#$56E ,,F	S	B		%t
C





LL	$**Ud
+,[ ?& >. 	
s   G:	G?>:H H__main__)r   r   returnr$   )rD   int)__doc__
__future__r   r   r-   r(   r*   pathlibr   __file__resolveparentr%   r,   r#   r1   r   rB   __name__
SystemExit r   r   <module>rO      s    H "    
 H~&&
:
;''JJijJJ X 9.b z
TV
 r   