+
    jHàjà8  ã                  óè   € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt]P                  ! ]
4      tR R ltR R ltR tR R	 ltR
 R ltR R ltRRRR/R R lltR R ltR R ltR R ltR# )zðFresh-process recovery after the update's in-process restart phase aborts. Separate owner
from ``update_cmd``: its own vocabulary (``verified`` / ``relaunch_attempted`` / ``failed``, serve units, survivors) and
its own fail-closed contract.)ÚannotationsNc               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚbool© )Úformats   "ÚE/home/ubuntu/.hermes/hermes-agent/hermes_cli/update_abort_recovery.pyÚ__annotate__r      s   € ÷ Gñ G¨ñ Gó    c                 óv   € \         P                  R8H  ;'       d     \        \        P                  ! R4      4      # )zWCan a fresh process restart ``hermes-serve*``/``hermes-dashboard*`` units on this host?ÚlinuxÚ	systemctl)ÚsysÚplatformr   ÚshutilÚwhichr   r   r
   Ú_serve_unit_recovery_availabler      s'   € ä�<‰<˜7Ñ"×FÐF¤t¬F¯LªL¸Ó,EÓ'FÐFr   c               ó   € V ^8„  d   QhRR/# ©r   r   z
list[dict]r   )r	   s   "r
   r   r      s   € ÷ 79ñ 79°*ñ 79r   c                ó^  a€ / p \        V RR4      ;'       g    R EF  p\        VRR4      R9  d   K  \        VRR4      p\        V\        4      '       d   V^ 8:  d   KD  \        VRR4      p\        V\        4      '       d   TM/ pRVR\	        \        VRR4      4      R\	        \        VRR4      4      R\	        \        VRR4      4      R	\        VP                  R
4      4      /W&   VP                  R4      '       g   Kæ  \	        VR,          4      W,          R&   VP                  R4      W,          R&   EK  	  T'       g   . #  ^ RI
Hp T! 4        Uu/ uFd  pTP                  R4      R9   g   K  \        TP                  R4      \        4      '       g   KB  TR,          \        TP                  R
4      4      bKf  	  upoR T3R llpTP                  4        UU	U
Uu. uFB  w  r9T! Y94      '       g   K  T	P                  4        U
Uu/ uF  w  r«T
R	8w  g   K  Y«bK  	  upp
NKD  	  pp
p	pp\        TR R7      #   \         d#   p\        P                  RT4       . u Rp?# Rp?ii ; iu upi   \         d#   p\        P                  RT4       Ro Rp?LÖRp?ii ; iu upp
i u upp
p	pi )už  Pre-update serve/dashboard runtimes that are STILL the same process â€” i.e. live on the
pre-update code generation. Identity is the incarnation ``(pid, create_time)``, never the PID
alone: ``ledger_entries()`` prunes dead entries, but a correctly restarted serve can come back
on the same number. Fail closed on missing evidence (unreadable ledger, no incarnation on either
side): the runtime counts as surviving.ÚruntimesÚkindNÚpidÚdetailÚ ÚprofileÚ
supervisorÚ_create_timeÚcreate_timeÚsystemd_unitÚsystemd_scopez)Could not read planned serve runtimes: %s)Úledger_entriesÚpurposez)Serve/dashboard survivor probe failed: %sc               ó   € V ^8„  d   QhRR/# r   r   )r	   s   "r
   r   Ú:_surviving_pre_update_serve_runtimes.<locals>.__annotate__=   s   € ÷ 
Jñ 
J ñ 
Jr   c                óÌ   <€ Sf   R# V S9  d   R# VR,          SV ,          r2VR J;'       d4    VR J;'       d(    \        \        V4      \        V4      ,
          4      R8¬  '       * # )NTFr   g       @)ÚabsÚfloat)r   ÚrowÚplanned_createdÚlive_createdÚlives   &&  €r
   Ú_still_liveÚ9_surviving_pre_update_serve_runtimes.<locals>._still_live=   sv   ø€ ØŠ<ÙØ�dŒ?ÙØ(+¨NÕ(;¸TÀ#½Y˜ð  4Ð'÷ Ið I¨LÀÐ,D÷ Ið IÜ”E˜,Ó'¬%°Ó*@Õ@ÓAÀSÑHôJð 	Jr   c                ó   € V R ,          # )r   r   )r*   s   &r
   Ú<lambda>Ú6_surviving_pre_update_serve_runtimes.<locals>.<lambda>M   s   € ¨S°®Zr   )Úkeyr   )ÚserveÚ	dashboard)ÚgetattrÚ
isinstanceÚintÚdictÚstrÚ_numericÚgetÚ	ExceptionÚloggerÚdebugÚhermes_cli.process_identityr#   ÚitemsÚsorted)ÚplanÚplannedÚruntimer   r   Úexcr#   Úentryr.   r*   ÚkÚvÚ	survivorsr-   s   &            @r
   Ú$_surviving_pre_update_serve_runtimesrK      sf  ø€ ð  "€GðÜ˜t Z°Ó4×:Ð:¸Ó:ˆGÜ�w ¨Ó-Ð5KÔKÙÜ˜' 5¨$Ó/ˆCÜ˜c¤3×'Ò'¨3°!¬8ÙÜ˜W h°Ó5ˆFÜ)¨&´$×7Ò7‘V¸RˆFà�s˜F¤C¬°¸ÀÓ(DÓ$EØœ3œw w°	¸2Ó>Ó?Øœc¤'¨'°<ÀÓ"DÓEØ¤¨¯©°MÓ)BÓ Cð	EˆG‰Lð
 �z‰z˜.×)Ô)ä/2°6¸.Õ3IÓ/J�•˜^Ñ,Ø06·
±
¸?Ó0K�•˜_Ô-ñ! ;÷( Øˆ	ðÝ>ñ (Ô)ó)eá)�Ø�y‰y˜Ó#Ð'=Ñ=ô =äBLÈUÏYÉYÐW\ÓM]Ô_b×Bcô =ˆE�%�Lœ( 5§9¡9¨]Ó#;Ó<Ò<Ù)ñ)eˆ÷
Jð 
Jð  Ÿ™œöBá'‰HˆC©;°s×+@ô 	>˜#Ÿ)™)œ+Ô=™+‘$�!¨¨nÑ)<ŒˆŠ™+Õ=Ù'ð ó Bô �)Ñ!7Ô8Ð8øô= ô Ü�‰Ð@À#ÔFØ�	ûðüò)eøô ô Ü�‰Ð@À#ÔFØ�ûðüó" 	>ùõBsƒ   …H< ™C$H< Ä:H< ÅI1 ÅI,Å3"I,Æ&I,Ç I1 Ç!J'
Ç8J'
ÈJ!ÈJ!È!J'
È<I)ÉI$ÉI)É$I)É,I1 É1JÉ<JÊJÊ!J'
c                óB   € \        V \        \        34      '       d   V # R # ©N)r7   r8   r)   )Úvalues   &r
   r;   r;   P   s   € Ü˜u¤s¬E l×3Ò3ˆ5Ð=¸Ð=r   c               ó   € V ^8„  d   QhRR/# r   r   )r	   s   "r
   r   r   T   s   € ÷ 
ñ 
¨*ñ 
r   c                ó$  € . p\        T ;'       g    R4       Ft  p\        V4      P                  R4      w  r4pV'       d'   VR9   d    V'       d   VP                  RVRV/4       KN  V'       g   KX  VP                  R\        V4      /4       Kv  	  V# )z­Scope-qualify the units the aborted phase already settled: ``<scope>/<unit>`` because
``hermes-serve.service`` can exist in BOTH the user and system manager (two processes).Ú/ÚscopeÚunitr   )ÚuserÚsystem)rB   r:   Ú	partitionÚappend)Ú
skip_unitsÚrowsrG   rR   ÚseprS   s   &     r
   Ú_qualified_serve_skipsr[   T   s|   € ð €DÜ˜
×(Ð( bÖ)ˆÜ˜u›:×/Ñ/°Ó4Ñˆ�Dß�5Ð.Ô.·4Ø�K‰K˜ %¨°Ð6Ö7ß‰UØ�K‰K˜¤ U£Ð,Ö-ñ *ð €Kr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úgateway_moder   Úrecover_server   z"subprocess.CompletedProcess | Noner   )r	   s   "r
   r   r   a   s$   € ÷ 'ñ 'Ø+/ð'Ø@Dð'à'ñ'r   c               óp  € \         P                  RRR.p\        P                  P	                  4       pRVR&   R& F  pVP                  VR4       K  	  V'       dU   \         P                  R8X  d@   \        P                  ! R4      pV'       g   \        P                  R	4       R# VR
RRRR.VOpR\        P                  ! RV RVRRVR\        V4      //4      RRRRRRRRRTR\        ^´^^Z\        V 4      ,          ,           V'       d   ^–M^ ,           4      /p	\         P                  R8X  d,   \!        \"        R^ 4      \!        \"        R ^ 4      ,          V	R!&   MRV	R"&    \"        P$                  ! V3/ V	BR#R$/B #   \&        \"        P(                  3 d"   p
\        P                  R%T
4        Rp
?
R# Rp
?
ii ; i)'u»   Spawn ``hermes_cli.update_restart_recovery --stdin`` detached from this process; None when it
could not run (no systemd-run in gateway mode, OSError, timeout) â€” the caller fails closed.z-mz"hermes_cli.update_restart_recoveryz--stdinÚ1ÚHERMES_UPDATE_RESTART_RECOVERYNr   zsystemd-runz=Cannot isolate fresh gateway recovery from the gateway cgroupz--userz--scopez--quietz	--collectz--ÚinputÚprofilesÚsupervisorsÚserve_unitsÚrecoverÚskipÚcapture_outputTÚtextÚencodingzutf-8ÚerrorsÚreplaceÚenvÚtimeoutÚwin32ÚCREATE_NEW_PROCESS_GROUPÚDETACHED_PROCESSÚcreationflagsÚstart_new_sessionÚcheckFz)Fresh gateway restart recovery failed: %s)Ú_HERMES_GATEWAYÚHERMES_GATEWAYÚHERMES_GATEWAY_MODE)r   Ú
executableÚosÚenvironÚcopyÚpopr   r   r   r>   ÚwarningÚjsonÚdumpsr[   ÚmaxÚlenr6   Ú
subprocessÚrunÚOSErrorÚTimeoutExpired)rc   Ú
candidatesr]   r^   rX   Úcommandrm   ÚmarkerÚsystemd_runÚkwargsrF   s   &&$$$      r
   Ú_run_fresh_recovery_processr‹   a   sœ  € ô
 �~‰~˜tÐ%IÈ9ÐU€GÜ
�*‰*�/‰/Ó
€CØ,/€CÐ(Ñ)ÛNˆØ�‰�˜Öñ O÷ œŸ™¨Ô/Ü—l’l =Ó1ˆßÜ�N‰NÐZÔ[ÙØ ¨)°YÀÈTÐ\ÐT[Ð\ˆð 	”—’Ø˜ -°Ø˜I }°fÔ>TÐU_Ó>`Ðaðcó dð 	˜$ ¨¨j¸'À8ÈYØˆsð 	”3�s˜B ¤c¨(£mÕ!3Õ3¿m±sÐQRÕSÓTðV€Fô ‡|�|�wÔä”JÐ :¸AÓ>ÄÌÐUgÐijÓAkÕkð 	ˆÒð '+ˆÐ"Ñ#ðÜ�~Š~˜gÑ=¨Ñ=°uÒ=Ð=øÜ”Z×.Ñ.Ð/ô Ü�‰ÐBÀCÔHÝûðús   ÅE9 Å9F5ÆF0Æ0F5c               ó    € V ^8„  d   QhRRRR/# )r   r^   r   r   údict[str, list]r   )r	   s   "r
   r   r   ‹   s   € ÷ *ñ *°Dð *¸_ñ *r   c               ó  € \        V \        4      '       dÏ   \        V P                  R4      \        4      '       dª   \        V P                  R4      \        4      '       d…   \        ;QJ d.    R . V R,          OV R,          O 4       F  '       d   K   RM#	  RM! R . V R,          OV R,          O 4       4      '       d'   R\        V R,          4      R\        V R,          4      /# V'       d   \        P                  R4       R. RR./# R. R. /# )z±Validate the child's ``serve_units`` block; an unreadable block is not "nothing to do" when
serve recovery was requested (those units may still serve the pre-update generation).ÚverifiedÚfailedc              3  óB   "  € T F  p\        V\        4      x € K  	  R # 5irM   ©r7   r:   )Ú.0rS   s   & r
   Ú	<genexpr>Ú%_parse_serve_units.<locals>.<genexpr>‘   s   é € ÐaÑ2`¨$”
˜4¤×%Ð%Ó2`ùó   ‚FTz4Fresh recovery returned an invalid serve-unit resultz<unreadable>)r7   r9   r<   ÚlistÚallrB   r>   r}   )Ú	raw_server^   s   &$r
   Ú_parse_serve_unitsrš   ‹   sà   € ô 	�9œd×#Ò#Ü�y—}‘} ZÓ0´$×7Ò7¼JÀyÇ}Á}ÐU]ÓG^Ô`d×<eÒ<eß‹CÑaÐ2`°I¸jÕ4IÐ2`ÈIÐV^ÕL_Ñ2`Óa�C�CŠCÑaÐ2`°I¸jÕ4IÐ2`ÈIÐV^ÕL_Ñ2`Óa×aÒaØœF 9¨ZÕ#8Ó9¸8ÄVÈIÐV^ÕL_ÓE`ÐaÐaßÜ�‰ÐMÔNØ˜B ¨>Ð*:Ð;Ð;Ø˜˜H bÐ)Ð)r   Úskip_profilesrX   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   r]   r   r›   zset[str] | NonerX   r   r�   r   )r	   s   "r
   r   r   ™   s8   € ÷ IPñ IPØðIPØ0?ðIPàðIPà+:ñIPr   c          
     óF  aaa€ ^ RI Hp V! WR7      w  po\        V4      o\        4       pR!R V3R llloS'       g   V'       g   S! . . . . 4      # R VV3R llp\	        SWQWcR7      pVf   V! 4       # VP
                  ^ 8w  d(   \        P                  RVP
                  4       V! 4       #  \        P                  ! VP                  ;'       g    R	4      p	V	P                  R
4      p
V	P                  R4      pV	P                  R4      pV	P                  R4      ;'       g    R
. R. /p\        YÖR7      pY«T3p. p\         ;QJ d    R T 4       F  '       d   K   RM	  RM! R T 4       4      '       d	   . T
OTOTOp\         ;QJ d    R T 4       F  '       d   K   RM	  RM! R T 4       4      '       dv   \"        ;QJ d    R T 4       F  '       g   K   RM	  RM! R T 4       4      '       g<   \%        T4      \%        S4      8w  g#   \'        T4      \'        \%        T4      4      8w  d   \        P                  R4       T! 4       # \        T
4      \        T4      \        T4      rËp
T	P                  R4      p\)        T\*        4      '       d   TM/ P-                  4        Fk  w  pp\)        T\.        4      '       g   K  \)        T\0        4      '       g   K6  T'       g   K@  \3        RT RRP5                  R T 4       4       RT R24       Km  	  T
R3TR3TR
,          R3TR,          R 33 F1  w  ppT'       g   K  \3        TRP5                  T4      ,           4       K3  	  S! SY«YÎ4      #   \        \        \        3 d     \        P                  R4       T! 4       u # i ; i)"aÎ  Retry supervised gateway restarts from a clean Python process. Only inventory-classified
supervisor-owned profiles.

``skip_units`` names the units the aborted phase already settled, as ``<scope>/<unit>``. The scope is
part of the identity, not decoration: ``hermes-serve.service`` can exist in both the user and the system
manager as two different processes, and an unqualified token would let a settled one suppress recovery
of a stale one (review on #96235).
)Ú_gateway_recovery_partition)r›   c               ó   € V ^8„  d   QhRR/# ©r   r   r�   r   )r	   s   "r
   r   Ú:_recover_gateway_restart_after_abort.<locals>.__annotate__©   s   € ÷ cñ cÐVeñ cr   c                ó6   <€ R T RTRTRTRSRVf   R. R. //# T/# )Ú	requestedr�   Úrelaunch_attemptedr�   Úskippedre   r   )r£   r�   r¤   r�   re   r¥   s   &&&&&€r
   Ú_resultÚ5_recover_gateway_restart_after_abort.<locals>._result©   sM   ø€ à˜ J°Ð:NÐPbØ�f˜i¨Ø¸[Ò=P˜J¨¨H°bÐ9ðcð 	cð Wbðcð 	cr   c               ó   € V ^8„  d   QhRR/# r    r   )r	   s   "r
   r   r¡   ²   s   € ÷ 3ñ 3˜ñ 3r   c                 ó   <€ S ! S. . S4      # rM   r   )r¦   rc   s   €€r
   Ú_all_failedÚ9_recover_gateway_restart_after_abort.<locals>._all_failed²   s   ø€ Ù�x  R¨Ó2Ð2r   )r]   r^   rX   z(Fresh gateway restart recovery exited %sr   r�   r¤   r�   re   z4Fresh gateway restart recovery returned invalid JSON)r^   c              3  óB   "  € T F  p\        V\        4      x € K  	  R # 5irM   ©r7   r—   ©r“   Úbuckets   & r
   r”   Ú7_recover_gateway_restart_after_abort.<locals>.<genexpr>É   s   é € Ð
:±'¨Œ:�fœd×#Ð#³'ùr–   FTc              3  óB   "  € T F  p\        V\        4      x € K  	  R # 5irM   r­   r®   s   & r
   r”   r°   Ì   s   é € Ð?±w¨V”
˜6¤4×(Ð(³wùr–   c              3  óL   "  € T F  p\        V\        4      '       * x € K  	  R # 5irM   r’   )r“   r   s   & r
   r”   r°   Í   s   é € ÐD¹8°”:˜g¤sÓ+×+Ñ+»8ùs   ‚"$z;Fresh gateway restart recovery returned incomplete profilesÚcoveredu     â€¢ One host gateway serves z and ú, c              3  ó8   "  € T F  p\        V4      x € K  	  R # 5irM   )r:   )r“   Úos   & r
   r”   r°   ×   s   é € ÐF^ÑW]ÐRSÄsÈ1ÇvÀvÓW]ùs   ‚u    â€” restarted once through z ; that restart is their outcome.uT     âœ“ Restarted supervised gateway(s) in a fresh process (systemd-verified active): ui     âš  Relaunch attempted in a fresh process but not supervisor-verified (check these gateways manually): uJ     âœ“ Restarted serve unit(s) in a fresh process (new main PID observed): u8     âš  Could not verify a replacement for serve unit(s): rM   )Úhermes_cli.update_cmdrž   rB   r   r‹   Ú
returncoder>   r}   r~   ÚloadsÚstdoutr<   ÚAttributeErrorÚ	TypeErrorÚ
ValueErrorrš   r˜   ÚanyÚsetr�   r7   r9   rA   r:   r—   ÚprintÚjoin)rC   r]   r›   rX   rž   r†   r^   rª   ÚresultÚrecovery_resultr�   r¤   r�   r™   re   ÚbucketsÚreportedÚcovered_mapÚownerÚothersÚnamesri   r¦   rc   r¥   s   &$$$                  @@@r
   Ú$_recover_gateway_restart_after_abortrÊ   ™   s1  ú€ õ BÙ5°dÔXÑ€J�Ü�jÓ!€HÜ2Ó4€M÷cò c÷ ŸMÙ�r˜2˜r 2Ó&Ð&÷3ñ 3ô )Ø�*À}ôm€Fà‚~Ù‹}ÐØ×Ñ˜AÔÜ�‰ÐAÀ6×CTÑCTÔUÙ‹}ÐðÜŸ*š* V§]¡]×%8Ð%8°bÓ9ˆØ"×&Ñ& zÓ2ˆØ,×0Ñ0Ð1EÓFÐØ ×$Ñ$ XÓ.ˆØ#×'Ñ'¨Ó6×XÐX¸:ÀrÈ8ÐUWÐ:Xˆ	ô % YÔL€Kà¨VÐ4€GØ€Hß
ƒsÑ
:±'Ó
:‡s‡s‚sÑ
:±'Ó
:×:Ò:Ø<�XÐ<Ð 2Ð<°VÐ<ˆç‹CÑ?±wÓ?�C�CŠCÑ?±wÓ?×?Ò?ß‹3ÑD¹8ÓD�3�3Š3ÑD¹8ÓD×DÒDÜˆx‹=œC ›MÔ)¬S°«]¼cÄ#ÀhÃ-Ó>PÔ-PÜ�‰ÐTÔUÙ‹}Ðä+1°(Ó+;¼VÐDVÓ=WÔY_Ð`fÓYg &€HØ!×%Ñ% iÓ0€KÜ)3°KÄ×)FÒ)F™+ÈB×UÑUÖW‰ˆˆvÜ�eœS×!Ô!¤j°¼×&>Ô&>Ç6Á6ÜØ0°°°u¸T¿Y¹YÑF^ÑW]ÓF^Ó=^Ð<_ð `*Ø*/¨Ð0PðRöñ Xð 
ÐiÐjØ	ð Vð 	Wà	�ZÕ	 Ð"nÐoØ	�XÕ	Ð ZÐ[ó]‰ˆˆt÷ ‰5Ü�$˜Ÿ™ 5Ó)Õ)Ö*ñ]ñ �8˜X¸6ÓOÐOøôA œI¤zÐ2ô Ü�‰ÐMÔNÙ‹}Òðús   Â-"M+ ÃAM+ Ä"M+ Í+2N ÎN c               ó   € V ^8„  d   QhRR/# )r   r   ÚNoner   )r	   s   "r
   r   r   å   s   € ÷ ^ñ ^¨ñ ^r   c                ó@  € V '       g   R# \        R4       V  Fk  p\        RVP                  R4       RVP                  R4       RVP                  R4      ;'       g    R	 R
VP                  R4      ;'       g    R R2	4       Km  	  V  Uu. uF  qP                  R4      R8X  g   K  VNK  	  pp\        V4      \        V 4      8  d   \        R4       ^ RIHpHp V FZ  pT! VP                  R4      ;'       g    RVP                  R4      4      p\        RVP                  R4       RV! V4       24       K\  	  \        P                  R8X  dJ   \        ;QJ d    R V  4       F  '       g   K   RM	  RM! R V  4       4      '       d   \        R4       R# R# R# u upi )z÷Name the serve/dashboard processes still on pre-update code: ``hermes serve`` hosts
``tui_gateway.server``, and an un-restarted unit keeps the pre-pull ``sys.modules`` graph so
every chat turn fails with an ``ImportError`` no gateway row explains.Nuk     âš  These serve/dashboard processes still run pre-update code (they started before the checkout changed):z
      pid r   u    â€” r   z
 (profile r   Údefaultr´   r   ÚunknownÚ)Úsystemdzm    Ask their owner to relaunch `hermes serve` / `hermes dashboard`, or reconnect Desktop for an SSH backend.)Ú_format_restart_commandsÚ_systemd_restart_commandsr!   z<unit>r"   z    pid z is managed by systemd: Údarwinc              3  óH   "  € T F  qP                  R 4      R8H  x € K  	  R# 5i)r   ÚlaunchdN)r<   )r“   r*   s   & r
   r”   Ú-_warn_stale_serve_runtimes.<locals>.<genexpr>ü   s   é € Ð'[ÑVZÈs¯©°Ó(=ÀÖ(JÓVZùs   ‚ "TFzL    For launchd-managed backends: `launchctl kickstart -k gui/$UID/<label>`.)	rÀ   r<   r�   Úhermes_cli.main_dashboardrÒ   rÓ   r   r   r¾   )rY   r*   Ú	unit_rowsrÒ   rÓ   Úcommandss   &     r
   Ú_warn_stale_serve_runtimesrÛ   å   sn  € ÷ ÙÜ	ð	7ô8ó ˆÜØ˜Ÿ™ ›Ð(¨¨c¯g©g°f«oÐ->Ø˜Ÿ™ Ó+×8Ð8¨yÐ9¸¸C¿G¹GÀLÓ<Q×<^Ð<^ÐU^Ð;_Ð_`ðbö	cñ ñ !%ÓK¡˜¯©°Ó(=ÀÑ(J—�¡€IÐKÜ
ˆ9ƒ~œ˜D›	Ô!ÜÐ}Ô~÷ ^ãˆÙ,¨S¯W©W°^Ó-D×-PÐ-PÈÐRU×RYÑRYÐZiÓRjÓkˆÜ�˜Ÿ™ ›Ð(Ð(@ÑAYÐZbÓAcÐ@dÐeÖfñ ô ‡|�|�xÔ§C£CÑ'[ÑVZÓ'[§C§C¢CÑ'[ÑVZÓ'[×$[Ò$[ÜÐ\Ö]ñ %\Ñùò Ls   ÂFÂ'Fc               ó   € V ^8„  d   QhRR/# r   r   )r	   s   "r
   r   r      s   € ÷ 	hñ 	h Jñ 	hr   c                ó~   € ^ RI Hp T ;'       g    .  Uu. uF  q"P                  R4      V9  g   K  VNK  	  up# u upi )aù  Survivors the updater itself owes a restart for. A Desktop-supervised serve is excluded: the
recovery pass is forbidden to restart it (it hosts the live Desktop chats), so counting it would
end every update with the Desktop open as incomplete/exit 1. It is still named by
:func:`_warn_stale_serve_runtimes` and recorded in the receipt. See #111494. (The
fleet-restart-pending marker draws the same boundary for its own inventory, so a supervisor-owned
serve row no longer keeps that warning armed either.))ÚCLIENT_OWNED_SERVE_SUPERVISORSr   )Úhermes_cli.update_inventoryrÞ   r<   )rY   rÞ   r*   s   &  r
   Ú_owed_stale_serve_rowsrà      s9   € õ Kà ŸJ˜J B˜JÓg™J�C¯7©7°<Ó+@ÐHfÑ+f�CˆC™JÑgÐgùÒgs   •:±:c               ó   € V ^8„  d   QhRR/# r   r   )r	   s   "r
   r   r     s   € ÷ <ñ <à	ñ<r   c                óz  € T;'       g    / p\        T ;'       dž    \        V 4      \        V4      8*  ;'       d    VP                  R4      ;'       g    VP                  R4      '       * ;'       dH    VP                  R4      ;'       g    / P                  R4      '       * ;'       d    \        V4      '       * 4      # )a  May a fresh-process recovery clear the incomplete flag? Only when EVERY inventoried runtime
family is accounted for. Empty ``planned_gateway_profiles`` is deliberately NOT completeness:
with no gateway leg to prove, ``_restart_phase_failure_is_incomplete`` + the stale rows decide.
r�   r¤   re   )r   r¿   r<   rà   )Úplanned_gateway_profilesÚcovered_gateway_profilesrÃ   Ústale_runtime_rowsrÂ   s   $$$$ r
   Ú_abort_recovery_is_completeræ     s°   € ð ×"Ð" €FÜØ ÷ 	;ð 	;ÜÐ(Ó)¬SÐ1IÓ-JÑJ÷	;ð 	;à—‘˜HÓ%×IÐI¨¯©Ð4HÓ)IÔJ÷	;ð 	;ð —‘˜MÓ*×0Ð0¨b×5Ñ5°hÓ?Ô?÷	;ð 	;ô 'Ð'9Ó:Ô:ó<ð <r   )Ú__doc__Ú
__future__r   r~   Úloggingry   r   r‚   r   Ú	getLoggerÚ__name__r>   r   rK   r;   r[   r‹   rš   rÊ   rÛ   rà   ræ   r   r   r
   Ú<module>rì      s   ðñ!õ #ã Û Û 	Û Û Û 
à	×	Ò	˜8Ó	$€õGõ
79òt>õ
õ'õT*ðIPØBFðIPà"&÷IPõX^õ6	h÷<r   