+
    jHàj%  ã                   óR   € R t ^ RIHt RtR tR tRRRR/R	 R
 lltRR/R R lltR# )z@Terminal bookkeeping phases shared by scheduler execution paths.)ÚOptionalzWAgent completed but produced empty response (model error, timeout, or misconfiguration)c                ó¨   € V P                   '       d@   \        T;'       g    R4      P                  4       '       g   RV n         \        V n        R# R# R# )z¹A "successful" run with a blank answer is a soft failure (never ``ok``): the ordinary tail and
receipt recovery both book it, so a recovered whitespace answer cannot turn the job green.Ú FN)ÚsuccessÚstrÚstripÚEMPTY_RESPONSE_ERRORÚerror)ÚdÚfinal_responses   &&Ú?/home/ubuntu/.hermes/hermes-agent/cron/scheduler_bookkeeping.pyÚfail_empty_responser      s=   € ð 	‡y‡y€yœ˜^×1Ð1¨rÓ2×8Ñ8×:Ò:ØˆŒ	Ü&ˆŽñ ;�yó    c                óü   € ^ RI Hp VP                  pV'       d    ^ RIHp V! V R,          RV/4       VP                  VR	R
R7       R#   \
         d'   pTP                  RT R,          TRR7        Rp?LBRp?ii ; i)zYShutdown already advanced this run; update a failed notice without spending another fire.©Ú	scheduler©Ú
update_jobÚidÚlast_delivery_errorz:Failed recording delivery_error for interrupted job %s: %sT)Úexc_infoNFz;Interrupted by gateway shutdown before terminal completion.©r   r	   )Úcronr   ÚloggerÚ	cron.jobsr   Ú	ExceptionÚdebugÚfinish_execution)ÚjobÚexecution_idÚdelivery_errorr   r   r   Úexcs   &&&    r   Úfinish_interrupted_runr"      s‚   € åØ×Ñ€Fßð	vÝ,Ù�s˜4•yÐ#8¸.Ð"IÔJð ×Ñ˜|°UØ%bð ö døô ô 	vØ�L‰LÐUÐWZÐ[_ÕW`ÐbeÐptˆL×uÑuûð	vús   œA
 Á
A;ÁA6Á6A;Údelivery_queuedNÚnotification_suppressedFc                ól   € V ^8„  d   QhR\         R\         R\        R\         R\         R\         R\        /# )é   Úshould_deliverÚunresolved_originÚnormalized_deliverÚincident_ackedr   r$   Úreturn)Úboolr   )Úformats   "r   Ú__annotate__r.      sH   € ÷ ñ Ü'+ðÜ@Dðäðä-1ðä<@ðô 48ðô 	ñ	r   c                 ó¼   € V '       d   R # V'       d   V'       d   R# V'       d   R# V'       d   V'       d   R# V'       d
   VR8w  d   R# V'       d   V'       g   R# R# )ÚfailedÚqueuedÚ
suppressedÚnot_configuredÚlocalÚ	deliveredÚsuppressed_acked© )r    r'   r(   r)   r*   r   r#   r$   s   $$$$$$$$r   Ú_classify_delivery_outcomer8      s<   € ÷
 ÙßŸ/ÙßÙß×+ÙßÐ,°Ô7ÙßŸgñ "Ùr   Ú	recoveredc                óR   € V ^8„  d   QhR\         \        ,          R\        R\        /# )r&   Ú
fire_ownerr   r+   )r   r   r,   )r-   s   "r   r.   r.   4   s+   € ÷ Mñ M¬´­ð MÄSð MÔaeñ Mr   c               óh  € ^ RI Hp V P                  pV P                  '       g5   VP	                  R4      '       d   ^ RIHp V! VR,          RR/4       RVR&   RV P                  /p^ RIH	p V! VR,          V4      p	VP	                  R4      '       g   W'R	&   V P                  '       g   VP                  R
R4      '       d   RVR&   ^ RIHp
 V
! V4      '       d   RVR&   VP                  RR4      pV P                  '       g*   V'       d"   W·R&   \        VP	                  R4      4      VR&   V P                  '       dA   V P                  '       g/   V P                  '       d   VP	                  R4      '       d   RVR&   Ve   WR&   V P                  '       d   RVR&   VP!                  VR,          4      ;'       g1    VP"                  ! VR,          V P                  V P$                  3/ VB pVe   V'       g   VP'                  VRRR7       R# \)        V P                  VP	                  R4      \        VP	                  R4      4      V P                  V P*                  VP-                  VP/                  WPP                  '       * R7      4      V P0                  V P                  R7      p^ RIHpHp VR8X  d   V! V4      ;'       g    RpVR$9   d.   V P                  '       g   VP9                  V P:                  4       ^ RIHp ^ R I H!pH"p V'       d   V! VVR,          R!7      MVP&                  pV! W P                  V P$                  VR"7      pV'       d!   Vf   V! V4      pVe   VR,          R%9  d   R# VP	                  R4      '       d   V! VR,          V4       V	PG                  RR#7       R# )&a  mark_job_run (owner-fenced) + execution ledger row for a run that reached delivery.

``d`` is the scheduler's ``_RunDelivery``. Store and ledger writers are read off the
``cron.scheduler`` facade, which is where tests and the receipt-recovery path patch them.r   Úlast_delivery_queuedr   r   Nr    )Újournal_pathÚno_agentr   Ú_model_unreachableFTÚmodel_unreachable)Úis_retry_runÚladder_rungÚ_quota_hold_secondsÚquota_hold_secondsÚ_scheduled_instantÚrecover_consumed_firer#   ÚstatusÚexpected_fire_ownerÚblocked_configz5Fire claim ownership lost before terminal completion.r   Ú$_notification_all_targets_suppressed)Úfor_failure)r    r#   r$   r'   r(   r)   r*   r   )Úsettle_quietlyÚsettled_outcomer1   )Úpartial)Úget_executionÚrecover_receipted_execution)Újob_id)r   r	   Údelivery_outcome)Ú
missing_ok)r5   r3   >   r0   Ú	completed)$r   r   r   r'   Úgetr   r   r    Úcron.scheduler_authorityr>   r   ÚpopÚcron.unreachable_retryrB   r,   rJ   Úself_removal_delivery_allowedÚmark_job_runr	   r   r8   r(   Ú_normalize_deliver_valueÚ_delivery_lane_valuer*   Úcron.delivery_outcomerM   rN   Ú_mark_incident_alertedÚfailure_incident_idÚ	functoolsrO   Úcron.executionsrP   rQ   Úunlink)r
   r;   r   r9   r   r   r   Úmark_kwargsr>   ÚjournalrB   Ú_hold_sÚmarkedrS   rM   rN   rO   rP   rQ   ÚfinishÚfinishedÚcurrents   &&&$                  r   Úfinish_completed_runrk   4   s*  € õ
 Ø
�%‰%€CØ××Ð §¡Ð(>× ?Ò ?Ý(Ù�3�t•9Ð5°tÐ<Ô=Ø&*ˆÐ"Ñ#Ø)¨1×+;Ñ+;Ð<€KÝ5Ù˜3˜t�9 lÓ3€GØ�7‰7�:×ÒØ&2�NÑ#Ø�9�9ˆ9˜Ÿ™Ð!5°u×=Ò=ð ,0ˆÐ'Ñ(Ý3Ù�C×Òà%)ˆ�MÑ"Ø�g‰gÐ+¨TÓ2€GØ�9�9ˆ9Ÿà,3Ð(Ñ)Ü/3°C·G±GÐ<PÓ4QÓ/RˆÐ+Ñ,Ø‡y‡y€y˜×)×)Ð)¨a×.>×.>Ð.>À3Ç7Á7ÐKa×CbÒCbØ 1ˆ�HÑØÒØ-7Ð)Ñ*Ø××ÐØ 0ˆ�HÑà×4Ñ4°S¸µYÓ?÷ 6ð 6À9×CYÒCYØˆD�	�1—9‘9˜aŸg™gñD6Ø)4ñD6€FàÒ§fØ×"Ñ"Ø %ØIð 	#ô 	Kñ Ü1Ø×'Ñ'ØŸ™Ð 6Ó7Ü $ S§W¡WÐ-SÓ%TÓ UØ×'Ñ'Ø×-Ñ-à$×=Ñ=Ø×*Ñ*¨3Ç	Á	¼MÐ*ÓJóLà×'Ñ'Ø—	‘	ôÐ÷ FØ˜8Ô#á*¨<Ó8×DÐD¸HÐØÐ:Ô:À1Ç9Ç9À9à×(Ñ(¨×)>Ñ)>Ô?Ý!ßJßGP‰WÐ0¸¸T½ÕCÐV_×VpÑVp€FÙØŸi™i¨q¯w©wÐIYô[€Hç�XÒ%Ù Ó-ˆð Ò 7¨8Õ#4Ð<SÔ#SÙØ
‡w�wÐ%×&Ò&á�s˜4•y ,Ô/Ø‡N�N˜d€NÔ#Ùr   )Ú__doc__Útypingr   r   r   r"   r8   rk   r7   r   r   Ú<module>rn      sK   ðÙ Få àpÐ ò'òdðð ðð ;@÷ð,MÐW\÷ Mñ Mr   