+
    D#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^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIHt ^ RIHt ]P$                  ! 4       R,          R,          t]P$                  ! 4       R,          R,          R,          tR	t] R
2tRtRtRtRtRtRt]! R04      tR]P>                  ! R4      3R]P>                  ! R4      3R]P>                  ! R4      3R]P>                  ! R4      3R]P>                  ! R4      3R]P>                  ! R4      3R]P>                  ! R4      3R]P>                  ! R4      33t ]! R R!04      t!]P>                  ! R"4      t"^
t#R#t$R$t%R%t&R&t'R't(R(t)R)t*^Pt+^Qt,^Rt-^Tt.^t/^
t0^t1^t2^t3^t4]! ]/]0]1]2]3]404      t5]! R*R+7       ! R, R-4      4       t6 ! R. R/]74      t8R0 R1 lt9R2 R3 lt:R4 R5 lt;]3R6 R7 llt<]]33R8 R9 llt=]3R: R; llt>R< R= lt?RR> R? llt@R@ RA ltARB RC ltB]	P                  3RD RE lltDRF RG ltERH RI ltFRJ RK ltGRL RM ltH] ! RN RO4      4       tIRP RQ ltJRR RS ltKRT RU ltL]DR3RV RW lltMRX RY ltNRRZ R[ lltORtPR\ R] ltQR^ R_ ltRR` Ra ltSRb Rc ltTRd Re ltURf Rg ltVRRh Ri lltWRj Rk ltXRRl Rm lltYRn Ro ltZRp Rq lt[Rr Rs lt\]	P                  3Rt Ru llt]Rv Rw lt^RRx Ry llt_RRz R{ llt`R| R} ltaR~ R ltbR]	P                  /R R lltc]! R*R+7       ! R R4      4       td]	P                  3R R llteR R ltf]	P                  3R R lltgR R lthR R ltiR R ltj]	P                  3R R lltkR R ltl] R2tmRtn]	P                  3R R lltoR R ltpR R ltqR R ltrR R ltsR R lttR R ltuR R ltvR R ltwRtx^2ty]P>                  ! R4      tzR R lt{R]	P                  3R R llt|R R lt}]	P                  3R R llt~]	P                  3R R llt]	P                  3R R lltR R ltR R ltR R ltRR R llt] ! R R4      4       tR]	P                  /R R lltR]R]	P                  ]DR3R R lltR]R]	P                  ]DR3R R lltR]R]	P                  ]DR3R R lltR# )u  Run an agent CLI on a cluster node instead of the workstation.

Host choice is by measured load average penalised by this workstation's in-flight
placement claims: load average lags a freshly started run by tens of seconds, so probes
alone put every concurrent dispatch on the same node.

The checkout travels by `git push`, not by copying files: a commit snapshotting HEAD plus
every tracked change and untracked, non-ignored file is pushed (delta-only) to a bare
mirror on the node, then checked out into a real, working git repository at the node's
workspace — this holds for a linked worktree exactly as for a plain checkout, since `git
push` already resolves a linked worktree's gitdir locally. Results travel home the same
way: the node snapshots its post-run state, pushes it to the same bare mirror, and the
workstation fetches and applies it as an uncommitted change against the pushed commit — a
delta, never a tree copy. If the local checkout changed while the dispatch was running,
the result is left on a fetched ref rather than silently overwriting it.

This removes two limitations of an earlier tree-mirror transport: a node-side commit's
sha, parent, and message are no longer dropped — the underlying commit object crosses the
wire and is fetched home, even though it still surfaces as an uncommitted change by
design; and a linked worktree's gitdir no longer needs separate mirroring or remote
pointer rewriting, since only ordinary git objects and refs move. One limitation remains:
an out-of-tree `core.hooksPath` does not resolve on the node, so hooks do not run there.

A checkout with no `HEAD` yet (freshly `git init`ed, nothing committed) falls back to a
tree-copy transport, since there is nothing to push a delta against.

A caller that needs no repo files — a pure-inference research or review prompt — can set
`OD_DISPATCH_NO_WORKSPACE=1` to skip the transport entirely: the node gets an empty scratch
directory as its working directory, nothing is pushed, nothing is pulled back. Host
selection, placement claims, and containment recording are unchanged; only the transfer is
skipped. `-C`/`--cd` is refused in this mode — there is no mirrored checkout to point at.
)annotationsN)	dataclass)Pathz.claudezbuildbox-hosts.jsonbinzagent-sandboxcdx-offloadz/git-commonzsandbox/workspacesz/sandbox/workspacesz
agent-seattailscale_ipz%modules/harness/seat/credentials.jsonz!environment file (.env or .env.*)z(^|/)\.env(?:\..*)?$z1private key/certificate (*.pem/*.key/*.p12/*.pfx)z(?i)\.(?:pem|key|p12|pfx)$z7SSH private key (id_rsa*/id_ed25519*/id_ecdsa*/id_dsa*)z'(^|/)id_(?:rsa|ed25519|ecdsa|dsa)[^/]*$zsecret directory (.secrets/**)z(^|/)\.secrets(?:/|$)zsecret file (*.secret)z(?i)\.secret$zAWS credentialsz"(^|/)\.aws/(?:credentials|config)$zGCP credentialszV(?i)(^|/)(?:application_default_credentials\.json|service[-_]?account(?:[^/]*)\.json)$zSSH credential filez3(^|/)\.ssh/(?:id_[^/]+|[^/]+\.(?:pem|key|p12|pfx))$z.npmrcz.pypirczM(?im)(?:_auth(?:token)?|password|username|token|//[^\s=]+/:_authToken)\s*[=:]i  OD_PLACEMENT_CLAIM_DIROD_DISPATCH_NO_WORKSPACEOD_DISPATCH_K3Sz&.local/state/overdeck/placement-claimsz.claimg      ?T)frozenc                  6    ] tR t^ut$ R]R&   R]R&   R]R&   RtR# )	
Credentialstrruntime
str | Noneslugr   path N)__name__
__module____qualname____firstlineno____annotations____static_attributes__r       `/home/user/overdeck-private-tests/subrouter-s5-systray-latest/modules/systray/remote_dispatch.pyr   r   u   s    L

Jr   r   c                  8   a  ] tR t^|tRt]3R V 3R llltRtV ;t# )OffloadUnavailablez"No cluster node can take this run.c               $    V ^8  d   QhRRRRRR/# )   messager   codeintreturnNoner   )formats   "r   __annotate__OffloadUnavailable.__annotate__   s!       3 $ r   c                	2   < \         SV `  V4       W n        R # N)super__init__r!   )selfr    r!   	__class__s   &&&r   r+   OffloadUnavailable.__init__   s    !	r   r!   )	r   r   r   r   __doc__EXIT_NO_NODEr+   r   __classcell__)r-   s   @r   r   r   |   s    ,1=   r   r   c                   V ^8  d   QhRR/# r   r#   boolr   )r%   s   "r   r&   r&      s     ^ ^d ^r   c                     \         ;QJ d0    R \        R4      \        R4      3 4       F  '       g   K   R# 	  R# ! R \        R4      \        R4      3 4       4      # )u  Machine-local evidence, not env: an env marker is agent-settable. /proc/self/cgroup is
deliberately not consulted — measured inside a rootless podman container it names neither
libpod nor docker, so it would answer "not contained" and re-dispatch forever.c              3  @   "   T F  qP                  4       x  K  	  R # 5ir)   )exists).0probes   & r   	<genexpr>in_container.<locals>.<genexpr>   s     ]+\%||~~+\   z/run/.containerenvz/.dockerenvTF)anyr   r   r   r   in_containerr?      sM     3]D1E,F]H[+\]33]3]3]D1E,F]H[+\]]]r   c                   V ^8  d   QhRR/# r4   r   )r%   s   "r   r&   r&      s       r   c                      \        4       '       * # r)   )r?   r   r   r   should_offloadrB      s    ~r   c                   V ^8  d   QhRR/# r4   r   )r%   s   "r   r&   r&      s     2 2 2r   c                 Z    \        \        P                  P                  \        4      4      # r)   )r5   osenvirongetNO_WORKSPACE_ENVr   r   r   no_workspace_requestedrI      s    

/011r   c                    V ^8  d   QhRRRR/# )r   r   r   r#   dictr   )r%   s   "r   r&   r&      s        r   c                     \         P                  ! \        V 4      P                  R R7      4      #   \        \
        3 d   p\        RT  RT 2\        R7      ThRp?ii ; i)utf-8)encodingz buildbox registry unreadable at : r/   N)jsonloadsr   	read_textOSError
ValueErrorr   r1   )r   excs   & r   load_registryrV      s_    zz$t*...@AAZ   .tfBse<<
	s   .1 AAAc               $    V ^8  d   QhRRRRRR/# )r   registryrK   rolestuple[str, ...]r#   
list[dict]r   )r%   s   "r   r&   r&      s"      d ? [e r   c           	     B   V P                  R. 4       Uu. uFQ  pVP                  R4      R8X  g   K  \        V4      \        VP                  R4      ;'       g    . 4      8:  g   KO  VNKS  	  ppV'       g%   \        RRP                  V4       R2\        R7      hV# u upi )	zReachable hosts carrying every role in `roles`. A host in any other state is never
contacted, and one without the sandbox image provisioned is never a candidate: an
unprovisioned node fails with command-not-found, and no failure returns the run here.hostsstate	reachablerY   zno reachable host with roles z, z in the registryr/   )rG   setr   joinr1   )rX   rY   hostr]   s   &&  r   candidate_hostsrc      s     LL"--D88G+ 	03E
c$((7BSBYBYWY>Z0Z 	- 
 
  +DIIe,<+==MN
 	
 Ls   B&BB&Bc               $    V ^8  d   QhRRRRRR/# )r   rb   rK   doorr   r#   r   )r%   s   "r   r&   r&      s!      T   r   c                    V P                  R 4      ;'       g    / P                  V4      pV'       d   VP                  R4      '       g'   \        V P                  R4       RV R2\        R7      hV# )accessrb   namez: no usable z access doorr/   )rG   r   r1   )rb   re   rg   s   && r   
access_forri      sd    hhx &&B++D1FF++ xx TF,?l
 	
 Mr   c               $    V ^8  d   QhRRRRRR/# )r   rb   rK   rg   r#   r   r   )r%   s   "r   r&   r&      s!     . .T .4 .C .r   c                F    V P                  R 4      ;'       g
    VR,          # )rh   rb   rG   )rb   rg   s   &&r   
_host_namerm      s    88F--vf~-r   c               $    V ^8  d   QhRRRRRR/# )r   rg   rK   extrarZ   r#   	list[str]r   )r%   s   "r   r&   r&      s!      T / 9 r   c           
        RRRRRRRRR\          2.	pV P                  R4      '       d0   VR	\        P                  P	                  V R,          4      .,          pV P                  R
4      '       d   VR\        V R
,          4      .,          pV\        V4      ,          pVP                  V P                  RR4       RV R,           24       V# )zN`-F /dev/null` keeps a sandboxed or agent-poisoned ssh_config out of the path.sshz-Fz	/dev/nullz-ozBatchMode=yesz StrictHostKeyChecking=accept-newzConnectTimeout=identity_filez-iport-puser@rb   )PROBE_TIMEOUT_SECrG   rE   r   
expanduserr   listappend)rg   ro   argvs   && r   ssh_argvr}      s     	*
+,-
D zz/""rww))&*ABCCzz&s6&>*++DKDKK6::ff-.av/?@AKr   c                    V ^8  d   QhRRRR/# )r   rg   rK   r#   r   r   )r%   s   "r   r&   r&      s     - - - -r   c                F    \         P                  ! \        V 4      R R 4      # )N)shlexra   r}   rg   s   &r   rsync_shellr      s    ::hv&s+,,r   c                    V ^8  d   QhRRRR/# )r   stdoutr   r#   float | Noner   )r%   s   "r   r&   r&      s      # , r   c                ~     \        V P                  4       ^ ,          4      #   \        \        \        3 d     R# i ; i)    N)floatsplitAttributeError
IndexErrorrT   )r   s   &r   parse_loadavgr      s6    V\\^A&''J
3 s   " <<c                    V ^8  d   QhRRRR/# )r   rg   rK   r#   r   r   )r%   s   "r   r&   r&      s     & &t &L &r   c                     V! . \        V 4      OR NRR\        R7      pTP
                  ^ 8w  d   R# \        TP                  4      #   \        \        P                  3 d     R# i ; i)zcat /proc/loadavgTcapture_outputtexttimeoutN)r}   rx   rS   
subprocessSubprocessError
returncoder   r   )rg   rundones   && r   
probe_loadr      sl    4hv4 34%	
 !%%	 Z//0 s   A A&%A&c                   V ^8  d   QhRR/# )r   r#   r   r   )r%   s   "r   r&   r&      s     3 34 3r   c                     \         P                  P                  \        4      p V '       d   \	        V 4      P                  4       # \        P                  ! 4       \        ,          # r)   )rE   rF   rG   CLAIM_DIR_ENVr   ry   homeDEFAULT_CLAIM_DIR_RELPATH)overrides    r   	claim_dirr      s<    zz~~m,HH~((**99;222r   c                    V ^8  d   QhRRRR/# )r   valuer   r#   r   )r%   s   "r   r&   r&      s     ? ? ? ?r   c                F    \         P                  ! R RV 4      ;'       g    R# )z[^A-Za-z0-9._-]_unnamed)resub)r   s   &r   _claim_tokenr      s    66$c51>>Y>r   c                    V ^8  d   QhRRRR/# )r   pidr"   r#   r   r   )r%   s   "r   r&   r&      s     	 	c 	j 	r   c                     \        RV  R24      P                  RRR7      p YP                  R4      ^,           R P	                  4       ^,          #   \         d     R# i ; i  \
        \        3 d     R# i ; i)zWField 22 of /proc/<pid>/stat, read after the last ')' so a spaced comm cannot shift it./proc/z/statrM   replacerN   errorsN))r   rR   rS   rindexr   rT   r   )r   stats   & r   _process_start_ticksr      s    fSE'(22GI2VKK$q(*+113B77   
# s"    A .A$ A! A!$A98A9c               $    V ^8  d   QhRRRRRR/# )r   r   r"   start_ticksr   r#   r5   r   )r%   s   "r   r&   r&     s!     ) ) )# )$ )r   c                n    \        V 4      pVe   VR8w  d   W!8H  # \        RV  24      P                  4       # )zVLiveness by process identity, never by elapsed time: a killed dispatch frees its host.0r   )r   r   r8   )r   r   currents   && r   _owner_is_liver     s<    "3'G{c1%%&&&((r   c                  <    ] tR tRt$ RtR]R&   R]R&   R R ltR	tR
# )PlacementClaimi	  zWOne in-flight dispatch, recorded so a concurrent selection can see it before load does.r   	host_namer   r   c                   V ^8  d   QhRR/# r   r#   r$   r   )r%   s   "r   r&   PlacementClaim.__annotate__  s       r   c                	`     V P                   P                  4        R #   \         d     R # i ; ir)   )r   unlinkrS   r,   s   &r   releasePlacementClaim.release  s)    	II 		s    --r   N)r   r   r   r   r0   r   r   r   r   r   r   r   r   	  s    aN
J r   r   c                    V ^8  d   QhRRRR/# )r   rh   r   r#   ztuple[str, int, str] | Noner   )r%   s   "r   r&   r&     s     
 
s 
: 
r   c                    V P                  \        4      '       g   R # V R \        \        4      )  P                  R^4      p\        V4      ^8w  d   R # Vw  r#rE V\	        V4      V3#   \
         d     R # i ; i)N__)endswithCLAIM_SUFFIXlenrsplitr"   rT   )rh   partsrb   r   r   _uniques   &     r   _parse_claimr     sv    ==&&%C%%&--dA6E
5zQ&+#D{SX{** s   A' 'A65A6c                    V ^8  d   QhRRRR/# )r   	directoryr   r#   zdict[str, int]r   )r%   s   "r   r&   r&   $  s       . r   c                X   / p \        V P                  4       4      pT Fb  p\        TP                  4      pTf   K  Tw  rVp\        Yg4      '       d   TP                  T^ 4      ^,           Y&   KQ   TP                  4        Kd  	  T#   \         d    Tu # i ; i  \         d     K  i ; i)zLIn-flight claims per host token, unlinking any whose owning process is gone.)rz   iterdirrS   r   rh   r   rG   r   )r   countsentriesentryparsedrb   r   r   s   &       r   live_claim_countsr   $  s    Fy((*+ ejj)>!';#++!::dA.2FL	LLN  M    		s#   B 1BBBB)(B)c               $    V ^8  d   QhRRRRRR/# )r   r   r   r   r   r#   PlacementClaim | Noner   )r%   s   "r   r&   r&   :  s"     : :S :T :6K :r   c                    \         P                  ! 4       p\        V 4       RT R\        V4      ;'       g    R R\        P
                  ! 4       P                   \         2pW,          p VP                  RRR7       \         P                  ! \         P                  ! V\         P                  \         P                  ,          \         P                  ,          R4      4       \        YR7      #   \         d     R# i ; i)zSAtomic O_EXCL create of a uniquely named empty file. None means bookkeeping is off.r   r   T)parentsexist_oki  N)r   r   )rE   getpidr   r   uuiduuid4hexr   mkdircloseopenO_CREATO_EXCLO_WRONLYrS   r   )r   r   r   rh   r   s   &&   r   acquire_claimr   :  s    
))+C	"
#2cU"-A#-F-M-M#,N
TZZ\|n	. 	 Dt4
rzzBII5CUKL I99  s   +A7C. .C=<C=c               $    V ^8  d   QhRRRRRR/# )r   r]   r[   claimsPath | Noner#   z(tuple[dict, dict, PlacementClaim | None]r   )r%   s   "r   r&   r&   J  s$     ;4 ;4;41<;4-;4r   c                   Vf   \        4       M
\        V4      p. p. pV  FS  p \        V4      pT! T4      p	T	f&   TP	                  TP                  R4       R24       K@  TP	                  YgT	34       KU  	  V'       g+   \        RP                  V4      ;'       g    R\        R7      hRp
Rp^ p\        ^\        V4      ,          ^,           4       EFI  p\        V4      pV
e;   \        V
P                  4      p\        ^ VP                  V^ 4      ^,
          4      W&   \        V4       UUUU	u. uFA  w  pw  rgp	V	\         VP                  \        \#        Wg4      4      ^ 4      ,          ,           V3NKC  	  ppppp	\%        R V 4       4      pV UUu. uF  w  ppVVR,           8:  g   K  VNK  	  ppp\&        P(                  ! V4      pVe
   VV9   d    MJV
e   V
P+                  4        Rp
RpWL,          w  rgp\-        \#        Wg4      V4      pVf   WgR3u # TTrEKL  	  Vf   TMTpVV,          ^ ,          VV,          ^,          V
3#   \         d'   pTP	                  \        T4      4        Rp?EKT  Rp?ii ; iu up	pppi u uppi )	ao  Least-loaded reachable node, penalised by this workstation's in-flight claims.

Load average lags a newly started run, so probes alone stack concurrent dispatches on
one node. The claim held by every live dispatch is what fans them out; equal scores are
broken at random so simultaneous callers do not walk the same branch. The returned
claim is live until released.
Nrh   z": unreachable or load probe failedz; zno candidate node answeredr/   c              3  *   "   T F	  w  rVx  K  	  R # 5ir)   r   )r9   score_indexs   &  r   r;   select_host.<locals>.<genexpr>v  s     ;F=5Fs   g&.>)r   r   ri   r   r{   r   rG   ra   r1   ranger   r   r   r   max	enumerateCLAIM_LOAD_PENALTYrm   minrandomchoicer   r   )r]   r:   r   r   probedfailuresrb   rg   rU   loadheld
held_index
best_indexr   r   tokenindexscored
best_scorer   tied_loadclaims   &&&                    r   select_hostr  J  sm     &~	4<I-/FH	%F V}<OOtxx/00RSTtT*+   IIh??#?l
 	
 #'D!JJ1s6{?Q&'"9- 0E6::eQ#7!#;<FM 09/@

 0A++d )FJJ|JtD\7]_`,aaa 0A 	 
 ;F;;
*0O&,%EZ$=N4N&O]]4(
!jD&8LLNDJ$0ej6	B=%% *j3 (4 %,J*E%=VE]1-t33W " 	OOCH%	*
 Ps*   I.AI<J)JI9I44I9c                    V ^8  d   QhRRRR/# )r   cwdr   r#   r   r   )r%   s   "r   r&   r&     s     A Ad A{ Ar   c                     \         P                  ! RR\        V 4      RR.RR\        R7      pTP                  P                  4       pTP                  ^ 8X  d   T'       d   \        T4      # R#   \        \         P
                  3 d     R# i ; i)zDThe checkout containing `cwd`, or None when `cwd` is not inside one./usr/bin/git-C	rev-parsez--show-toplevelTr   N)
r   r   r   rx   rS   r   r   stripr   r   )r  r   roots   &  r   git_toplevelr    s    ~~T3s8[:KL%	
 ;;DA-$4:@D@ Z//0 s   ,A. .BBc                    V ^8  d   QhRRRR/# )r   r  r   r#   r   r   )r%   s   "r   r&   r&     s     $ $; $$ $r   c                t    V f   \         P                  ! 4       M
\        V 4      p \        V 4      ;'       g    T # r)   )r   r  r  )r  s   &r   	repo_rootr    s*    $((*cC###r   c                    V ^8  d   QhRRRR/# )r   forwarded_argvrp   r#   ztuple[int, int, str] | Noner   )r%   s   "r   r&   r&     s       /J r   c                h   Rp^ pV\        V 4      8  d   W,          pVR8X  d    V# V\        9   d5   V^,           \        V 4      8  d   V^W^,           ,          3pV^,          pKa  \         F7  pVP                  V R24      '       g   K  V^V\        V4      ^,           R 3pK9  	  V^,          pK  V# )zU(index, span, value) of the effective workdir flag; last occurrence wins, as in clap.N--=)r   WORKDIR_FLAGS
startswith)r  foundiargflags   &    r   find_workdirr    s    E	A
c.!
!$; L -1us>**A~!e45FA!D~~aj))As3t9q=?34 " 	
QLr   c               (    V ^8  d   QhRRRRRRRR/# )r   r  rp   r  ztuple[int, int, str]r   r   r#   r   )r%   s   "r   r&   r&     s1     T TI T6J TSV T[d Tr   c                l    Vw  r4pV^8X  d   \         ^ ,          V.MRV 2.p. V RV OVOWV,           R O# )r   z--cd=N)r  )r  r  r   r   spanr   replacements   &&&    r   rewrite_workdirr!    sP    NE/3qy=#U+ug>OKS^FU#SkSN4<>4RSSr   c                    V ^8  d   QhRRRR/# r   r  r   r#   r   r   )r%   s   "r   r&   r&     s     # #T #c #r   c                6   \         P                  ! \        V 4      P                  R4      4      P	                  4       R,          p\
        P                  ! RRV P                  P                  4       4      P                  R4      ;'       g    RpVR,           RV 2# )a(  Stable per-source-path identity: two worktrees never share a remote mirror.
sandbox-run enforces ^[a-z0-9][a-z0-9._-]{0,63}$, so the name part is folded to
that alphabet (a capital letter in the checkout dir killed the whole dispatch);
identity still comes from the digest of the unmodified path.rM   N   Nz[^a-z0-9._-]-z._-repo:N0   N)
hashlibsha256r   encode	hexdigestr   r   rh   lowerlstrip)r  digestrh   s   &  r   
sandbox_idr1    st    
 ^^CI,,W56@@B3GF66/3		(9:AA%HRRFD3i[&""r   c                    V ^8  d   QhRRRR/# r#  r   )r%   s   "r   r&   r&     s     8 8 8# 8r   c                *    \          R \        V 4       2# /)NODE_WORKSPACES_ROOTr1  r  s   &r   remote_rel_dirr8    s    "#1Z%5$677r   c                    V ^8  d   QhRRRR/# r#  r   )r%   s   "r   r&   r&     s     ) )T )c )r   c                    \        V 4       R2# )u  The `--id` a no-workspace dispatch gives agent-sandbox — distinct from `sandbox_id`
for the same `root` so the container's workspace (which agent-sandbox derives from
`--id`, not from `rel_dir`) can never collide with — and never run inside — a real
mirror's workspace.z-scratch)r1  r7  s   &r   scratch_sandbox_idr;    s    
 x((r   c                    V ^8  d   QhRRRR/# r#  r   )r%   s   "r   r&   r&     s     @ @T @c @r   c                *    \          R \        V 4       2# r4  )r6  r;  r7  s   &r   remote_scratch_dirr>    s    "#1%7%=$>??r   c               (    V ^8  d   QhRRRRRRRR/# )r   r  r   r   	namespacer   r#   r   )r%   s   "r   r&   r&     s(     1 1 1D 1S 1# 1r   c                    \         P                  ! V  RVP                  4        2P                  R4      4      P	                  4       R,          p\
         RV RV 2# )z;A host-local mirror location for data outside the checkout.:rM   :N   Nr5  )r*  r+  resolver,  r-  REMOTE_ROOT)r  r   r@  r0  s   &&& r   extra_rel_dirrF    sS    ^^tfAdlln%56==gFGQQSTWXF]!I;ax00r   c                    V ^8  d   QhRRRR/# r#  r   )r%   s   "r   r&   r&     s     = =d =s =r   c                *    \          R \        V 4       2# r4  )CONTAINER_WORKSPACES_ROOTr1  r7  s   &r   container_workspacerJ    s    '(*T*:);<<r   c                    V ^8  d   QhRRRR/# )r   exclude_gitr5   r#   rp   r   )r%   s   "r   r&   r&     s      t 	 r   c                l    V '       d   . \         OR N5M\         p. ROp. R V 4       OR V 4       ORNRN# )/.gitc              3  :   "   T F  pR V3 F  q"x  K  	  K  	  R# 5i	--excludeNr   r9   rh   r  s   &  r   r;    _exclude_args.<locals>.<genexpr>  s     	?%$K+>C#+>#%   c              3  :   "   T F  pR V3 F  q"x  K  	  K  	  R# 5irP  r   rR  s   &  r   r;   rS    s     	F,$;2E3#2E#,rT  z--filterz:- .gitignore)z/.envz/.env.*z.envz.env.*z*.pemz*.keyz*.p12z*.pfxzid_rsa*zid_ed25519*z	id_ecdsa*zid_dsa*z.secretsz*.secretz.awsz.sshz$application_default_credentials.jsonz*service-account*.jsonz*service_account*.json)SYNC_EXCLUDES)rL  namessecret_ruless   &  r   _exclude_argsrY    sU    )4%m%W%-EL	?%	?	F,	F 	 		 r   c                    V ^8  d   QhRRRR/# )r   r  r   r#   dict[str, str]r   )r%   s   "r   r&   r&     s      D ^ r   c                   / p V P                  R4      pV EF  pVP                  V 4      P                  4       pVR8X  g#   VP                  R4      '       g   V\        9   d   KN  VP                  4       '       g   VP                  4       '       g   K|  \         F#  w  rVVP                  V4      '       g   K  WQV&    K  	  VP                  \        9   g   K  VP                  RRR7      p\        P                  V4      '       g   K  RVP                   2W&   EK  	  V#   \         d   p\        RT  R	T 2\        R
7      ThRp?ii ; i)zSecret-shaped workspace files mapped to the rule that denied dispatch.

Traversal errors abort the dispatch: an unreadable tree cannot be certified clean.
The one repository-owned credential manifest is data, not a live credential.
*.gitz.git/rM   r   r   zauthenticated zcould not inspect z for secret files: r/   N)rglobrelative_toas_posixr  SECRET_ALLOWLISTis_file
is_symlinkSECRET_PATH_PATTERNSsearchrh   AUTH_CONFIG_NAMESrR   AUTH_CONFIG_RErS   r   EXIT_MIRROR)	r  excludedpathsr   rellabelpatterncontentrU   s	   &        r   secret_exclusionsrp    s     "H

3D""4(113Cf}w 7 73BR;R<<>>$//*;*;"6>>#&&$)SM #7
 99 11"nnginPG%,,W55*8(D & O	    &9#?k
	s<   AD "D ;D !D 7D +D D E*EEc                    V ^8  d   QhRRRR/# )r   rj  r[  r#   r$   r   )r%   s   "r   r&   r&     s     f fN ft fr   c                    \        V P                  4       4       F(  w  r\        R V: RV R2\        P                  R7       K*  	  R# )z)cdx offload: excluded secret-shaped file z
 (matched r   )fileN)sorteditemsprintsysstderr)rj  r   rules   &  r   log_secret_exclusionsrz    s<    X^^-.
9$D6QRSZ]ZdZde /r   c               $    V ^8  d   QhRRRRRR/# )r   r  r   selectedbytesr#   r   )r%   s   "r   r&   r&     s!     7 7 7 7% 7r   c                B   \        V 4      p\        V4       V'       g   V# V'       d!   VP                  R 4      P                  R 4      M. pV Uu. uF  qDP	                  RR4      V9  g   K  VNK  	  ppR P                  V4      V'       d	   R ,           # R,           # u upi )    rM   surrogateescaper   )rp  rz  rstripr   decodera   )r  r|  rj  rk  r   kepts   &&    r   filtered_mirror_filesr    s     &H(#3;HOOE"((/E"^UTkk';L&MU]&]DDUD^::du66#66 _s   B,Bc                    V ^8  d   QhRRRR/# )r   r  r   r#   r}  r   )r%   s   "r   r&   r&   !  s     1 14 1 1r   c                    V! RR\        V 4      RRR.R\        R7      pTP                  ^ 8w  dE   \        TP                  ;'       g    R4      P                  4       p\        RT  R	T 2\        R
7      h\        TP                  \         4      '       d   TP                  P                  4       MTP                  p\        Y4      #   \        \        P                  3 d   p\        RT  R	T 2\        R
7      ThRp?ii ; i)zTracked files, NUL-delimited for rsync.

The regular rsync pass carries untracked, non-ignored files. This pass exists
only to restore tracked paths excluded by nested ignore rules.
r  r	  zls-files--cachedz-zTr   r   z%could not determine mirror files for rO   r/   N )r   rx   rS   r   r   r   ri  r   rx  r  
isinstancer   r,  r  )r  r   r   rU   detailr|  s   &&    r   git_mirror_filesr  !  s    	T3t9j*dK%
 !T[[&&B'--/ 3D6F8D;
 	
 (2$++s'C'Ct{{!!#H 00 Z//0  3D6C5A
	s   C C>!C99C>c               $    V ^8  d   QhRRRRRR/# )r   sourcer   destinationr#   rp   r   )r%   s   "r   r&   r&   :  s!     
 
c 
 
	 
r   c                    RRRRRV V.# )zGSync Git-selected paths only; stdin is the NUL-delimited Git file list.rsync-azz--from0z--files-from=-z--delete-missing-argsr   )r  r  s   &&r   tracked_sync_argvr  :  s#     	 r   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r   rg   rK   r  r   rel_dirr   rL  r5   r#   rp   r   )r%   s   "r   r&   r&   G  0      d $  4 T] r   c                    \        V4      p\        V4       . RO\        V4      OR V 4       ORN\        V 4      NV R2NV P	                  RR4       RV R,           RV R2N# )	r  c              3  @   "   T F  pR RV 23 F  q"x  K  	  K  	  R# 5irQ  r5  Nr   r9   r   r  s   &  r   r;   push_argv.<locals>.<genexpr>O  $     	H(${avJ.Gs#.G#(r=   -er5  rv   rw   rb   rB  r  r  --deleterp  rz  rY  r   rG   rg   r  r  rL  rj  s   &&&& r   	push_argvr  G  s     &H(#
 
{	#	

 
I(	H
 	
 	F
 &

 ::ff%
&av'7q	C
 
r   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r  r   )r%   s   "r   r&   r&   W  r  r   c                    \        V4      p\        V4       . RO\        V4      OR V 4       ORN\        V 4      NV P	                  RR4       RV R,           RV R2NV R2N# )	r  c              3  @   "   T F  pR RV 23 F  q"x  K  	  K  	  R# 5ir  r   r  s   &  r   r;   pull_argv.<locals>.<genexpr>_  r  r=   r  rv   rw   rb   rB  r5  r  r  r  s   &&&& r   	pull_argvr  W  s     &H(#
 
{	#	

 
I(	H
 	
 	F
 ::ff%
&av'7q	C
 &

 
r   c               (    V ^8  d   QhRRRRRRRR/# 	r   rg   rK   r  r   r  r   r#   rp   r   )r%   s   "r   r&   r&   g  (     ? ?d ?$ ? ? ?r   c           	         \        V R 2V P                  RR4       RV R,           RV R 24      p. VRR ORN\        V 4      NVRR O# )r5  rv   rw   rb   rB  Nr  r  rG   r   rg   r  r  argss   &&& r   push_tracked_argvr  g  sh    &
vzz&&12!F6N3C1WIQOD ?T#2Y>>k&1>DI>>r   c               (    V ^8  d   QhRRRRRRRR/# r  r   )r%   s   "r   r&   r&   n  r  r   c                    \        V P                  R R 4       RV R,           RV R2V R24      p. VRR ORN\        V 4      NVRR O# )rv   rw   rb   rB  r5  Nr  r  r  r  s   &&& r   pull_tracked_argvr  n  sh    ::ff%
&av'7q	CvQZD ?T#2Y>>k&1>DI>>r   r   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   rg   rK   	local_dirr   r  r   pullr5   r#   r   r   )r%   s   "r   r&   r&   u  s0     
 
4 
D 
3 
 
*4
r   c               T   V'       d   \        WV4      M\        WV4      p V! VRR\        R7      pTP                  '       d+   RT'       d   RMR RTP                  P                  4        2# R#   \        \        P
                  3 d   pRT'       d   RMR RT 2u Rp?# Rp?ii ; i)zERound-trip an out-of-tree directory with the normal mirror transport.Tr   zextra mirror r  push	 failed: N)	r  r  SYNC_TIMEOUT_SECrS   r   r   r   rx  r  )rg   r  r  r  r   r|   r   rU   s   &&&$$   r   sync_extra_dirr  u  s     599V0i[b>cDJ44AQR v6:)DKKDUDUDWCXYY	 Z//0 Jv6:)C5IIJs   A0 0B'B"B'"B'c                  D    ] tR tRt$ RtR]R&   R]R&   R]R&   R]R&   R	tR
# )	GitMirrori  zEWhere a linked worktree's git plumbing lives locally and on the node.r   git_dir
common_dirr   remote_commonremote_git_dirr   N)r   r   r   r   r0   r   r   r   r   r   r  r    s    OMr   r  c                    V ^8  d   QhRRRR/# )r   r  r   r#   ztuple[Path, Path] | Noner   )r%   s   "r   r&   r&     s     / /4 /0H /r   c                    V! RR\        V 4      RRR.RR\        R7      pTP
                  ^ 8w  d   R# TP                  P                  4       p\        T4      ^8w  g;   T^ ,          P                  4       '       d   T^,          P                  4       '       g   R# \        T^ ,          P                  4       4      p\        T^,          P                  4       4      pTP                  4       '       g   \        T 4      T,          pTP                  4       TP                  4       3#   \        \        P                  3 d     R# i ; i)	zS(gitdir, common dir) for `root`, both absolute. None when `root` is not a checkout.r  r	  r
  z--absolute-git-dir--git-common-dirTr   N)r   rx   rS   r   r   r   r   
splitlinesr   r  r   is_absoluterD  )r  r   r   linesr  commons   &&    r   git_dirsr    s    T3t9k;OQcd%	
 !KK""$E
5zQeAhnn..eAhnn6F6F58>>#$G%(.."#Fdf$??fnn... Z//0 s   D" "E Ec                    V ^8  d   QhRRRR/# r   r  r   r#   r   r   )r%   s   "r   r&   r&     s     8 8$ 83 8r   c                    \         P                  ! \        V 4      P                  R4      4      P	                  4       R,          pV P
                  P                  ;'       g    V P                  p\         RV RV 2# )zROne mirror per repository: every worktree of a repo shares these objects and refs.rM   r%  r5  r'  )r*  r+  r   r,  r-  parentrh   REMOTE_GIT_COMMON_ROOT)r  r0  rm  s   &  r   remote_git_commonr    sb    ^^C
O227;<FFHMF""55jooE$%QugQvh77r   c                    V ^8  d   QhRRRR/# )r   r  r   r#   zGitMirror | Noner   )r%   s   "r   r&   r&     s      T 2B r   c                    \        WR7      pVf   R# Vw  r4W48X  d   R# \        V4      p\        VVVV RVP                   2R7      # )zPNone for a plain checkout, whose `.git` directory rides along in the tree rsync.r   Nz/worktrees/)r  r  r  r  )r  r  r  rh   )r  r   dirsr  r  r  s   &&    r   
git_mirrorr    sW    D"D|G%j1M#'GLL>B	 r   c               $    V ^8  d   QhRRRRRR/# r   rg   rK   mirrorr  r#   rp   r   )r%   s   "r   r&   r&     s!       y Y r   c                    RRRRR\        V 4      VP                   R2V P                  RR4       RV R	,           R
VP                   R2.# )zMNo --delete: a concurrent dispatch's remote commit must not lose its objects.r  r  rQ  z
/worktreesr  r5  rv   rw   rb   rB  )r   r  rG   r  rg   r  s   &&r   git_common_push_argvr    sd     	F
Q::ff%
&av'7q9M9M8NaP	 	r   c               $    V ^8  d   QhRRRRRR/# r  r   )r%   s   "r   r&   r&     s!     	 	d 	I 	) 	r   c                    R RRR\        V 4      VP                   R2V P                  RR4       RV R,           RVP                   R2.# )	r  r  r  r  r5  rv   rw   rb   rB  )r   r  rG   r  r  s   &&r   git_dir_push_argvr    s]    F>>
!::ff%
&av'7q9N9N8OqQ r   c               (    V ^8  d   QhRRRRRRRR/# )r   r  r   container_dirr  r  r#   r   )r%   s   "r   r&   r&     s)     , , ,S ,) ,PS ,r   c           	         R\         P                  ! V 4       R\         P                  ! VP                  4       R\         P                  ! VR,           4       R2pR\         P                  ! V4       2# )a7  $HOME is resolved on the node: the rsync targets are relative to the remote home. The
gitdir the worktree points at is mounted into the container at its node-absolute path, so
that pointer is valid on both sides; the worktree itself is not, so its back-pointer names
the container path, where git actually runs.zset -eu
d="$HOME"/z
g="$HOME"/z6
printf "gitdir: %s\n" "$g" > "$d/.git"
printf "%s\n" rN  zh > "$g/gitdir"
printf "%s\n" "../.." > "$g/commondir"
git -C "$d" rev-parse --show-toplevel > /dev/null
	bash -lc )r   quoter  )r  r  r  inners   &&& r   git_pointer_commandr    sr    	[[)* +[[!6!678 9++mg&=>? @>		> 
 u{{5)*++r   c               0    V ^8  d   QhRRRRRRRRRRR	R
/# )r   rg   rK   r   r   r  r  r  r  r#   r   r   )r%   s   "r   r&   r&     sD        	
  r   c           
     8   R\         P                  ! VP                  VP                  .4       2pR. \	        V 4      OVN\
        3R\        W4      \        3R\        W4      \        3R. \	        V 4      O\        W#V4      N\
        3.pV FP  w  rp
 V! V	RRV
R7      pTP                  ^ 8w  g   K&  \        TRT R	TP                  P!                  4        24      u # 	  R
#   \        \        P                  3 d   p\        TRT R	T 24      u R
p?u # R
p?ii ; i)zMake git work in the node's mirror. Returns a warning on failure, and never raises:
a run with no git is still useful, a run refused over git is not.	mkdir -p zmirror directorieszobjects and refszworktree gitdirzgitdir pointersTr   z
mirroring r  N)r   ra   r  r  r}   rx   r  r  r  r  rS   r   r   git_warning_textr   rx  r  )rg   r   r  r  r  r   mkdir_commandstepswhatr|   r   r   rU   s   &&&&&&       r   prepare_remote_gitr    s/     

F,@,@&BWBW+X YZ[M	A&!1A=ACTU	1&ACST	-f=?OPThvT 3GF ST	
		/E  %G	RtDtWMD ??a#ID64;;K\K\K^J_/`aa  % 	 334 	R#ID63%/PQQ	Rs   C  D;DDDc               $    V ^8  d   QhRRRRRR/# )r   r   r   r  r#   r   )r%   s   "r   r&   r&     s!       S S r   c                    R V  RV R2# )z'!!! GIT IS NOT USABLE IN THE MIRROR ON rO   u   . The run continues, but git status/add/commit/log and anything shelling out to git WILL FAIL on the node — do not expect to commit there.r   )r   r  s   &&r   r  r    s!    
1)Bvh GC 	Cr   z/reposzrefs/cdxc                    V ^8  d   QhRRRR/# )r   r  r   r#   r   r   )r%   s   "r   r&   r&     s       k r   c                x    V! RR\        V 4      RR.RR\        R7      pTP
                  ^ 8w  d   R# TP                  P                  4       pT'       g   R# \        T4      pTP                  4       '       g   \        T 4      T,          pTP                  4       #   \        \        P                  3 d     R# i ; i)zJAbsolute git common dir for `root`, or None when `root` is not a checkout.r  r	  r
  r  Tr   N)r   rx   rS   r   r   r   r   r  r   r  rD  )r  r   r   dir_strr  s   &&   r   git_common_dirr    s    T3t9k;MN%	
 !kk!G']Fdf$>> Z//0 s   B B98B9c                    V ^8  d   QhRRRR/# r  r   )r%   s   "r   r&   r&   '  s       # r   c                    V P                   R8X  d   V P                  P                   MV P                   p\        P                  ! \	        V 4      P                  R4      4      P                  4       R,          pV RV 2# )zCOne bare mirror per repository: every worktree of a repo shares it.r^  rM   r%  r'  )rh   r  r*  r+  r   r,  r-  )r  rh   r0  s   &  r   repo_keyr  '  s`    %/__%>:!!JOOD^^C
O227;<FFHMFV1VHr   c                    V ^8  d   QhRRRR/# )r   keyr   r#   r   )r%   s   "r   r&   r&   .  s     / / / /r   c                    \          R V  R2# )r5  r^  )REMOTE_GIT_BARE_ROOT)r  s   &r   remote_bare_dirr  .  s    "#1SE..r   c               $    V ^8  d   QhRRRRRR/# )r   rg   rK   bare_absr   r#   r   )r%   s   "r   r&   r&   2  s&     T T T T Tr   c                    V P                  R 4      pV'       d   RV 2MRpRV P                  RR4       RV R,           V V 2# )rt   rB  r  zssh://rv   rw   rb   rl   )rg   r  rt   suffixs   &&  r   bare_ssh_urlr   2  sK    ::fDqZRFFJJvv./q0@
SSr   c                    V ^8  d   QhRRRR/# )r   rg   rK   r#   r[  r   )r%   s   "r   r&   r&   8  s     B B B Br   c                @    / \         P                  CR\        V 4      /C# )zV`git push`/`fetch` need their own transport string, not the mirror's `-e` rsync shell.GIT_SSH_COMMAND)rE   rF   r   r   s   &r   git_ssh_envr  8  s    AbjjA+[-@AAr   c                    V ^8  d   QhRRRR/# )r   bare_relr   r#   r   )r%   s   "r   r&   r&   =  s     
, 
, 
, 
,r   c                    R \         P                  ! \        4       R\         P                  ! \         R24       R\         P                  ! V 4       R2pR\         P                  ! V4       2# )zset -eu
mkdir -p "$HOME"/z
exec 9>"$HOME"/z/.lockz
flock -w 600 9
b="$HOME"/z^
[ -d "$b/objects" ] || git init -q --bare "$b"
git -C "$b" config receive.shallowUpdate true
r  )r   r  r  )r  r  s   & r   bare_mirror_ensure_scriptr  =  sq    	!KK(<=> ?++)=(>f&EFG H[[*+ ,:		: 
 u{{5)*++r   c                   V ^8  d   QhRR/# )r   r#   r   r   )r%   s   "r   r&   r&   J  s     4 4 4r   c                     \        \        P                  ! 4       4       R\        P                  ! 4       P                   2# )zUnique per invocation, collision-impossible across concurrent sessions on any
buildbox, and self-describing an age for `gc_dispatch_refs` without fetching objects.r'  )r"   timer   r   r   r   r   r   new_dispatch_idr  J  s.     $))+q!1!1 233r   c               $    V ^8  d   QhRRRRRR/# )r   sbox_idr   dispatch_idr#   r   )r%   s   "r   r&   r&   P  s!     ; ;# ;C ;C ;r   c                     \          RV  RV R2# )zOne inbox ref per dispatch, not per sandbox: a stale or racing tip from another
session can never block this push, since nothing else ever targets this exact ref.r5  z/inPUSH_REF_PREFIX)r  r  s   &&r   dispatch_refr  P  s     ay+c::r   c                    V ^8  d   QhRRRR/# )r   r  r   r#   r   )r%   s   "r   r&   r&   V  s     . . . .r   c                    \          R V  R2# )r5  z/outr  )r  s   &r   
result_refr  V  s    ay--r   z^(\d+)-[0-9a-f]{32}$c               $    V ^8  d   QhRRRRRR/# )r   refr   nowr   r#   r   r   )r%   s   "r   r&   r&   _  s!     
% 
%s 
% 
%< 
%r   c                    V P                  R^4      p\        V4      ^8w  g   VR,          R8w  d   R# \        P                  VR,          4      pV'       g   R# V\	        VP                  ^4      4      ,
          # )u   Age of a `dispatch_ref`'s embedded epoch, read from the ref name alone — no fetch.
None for anything not shaped like `.../<epoch>-<uuid4hex>/in`: an unrecognized ref (a
future naming change, a hand-pushed one) is left alone rather than guessed at.r5  inNr   r  )r   r   _DISPATCH_ID_REmatchr"   group)r  r  r   r  s   &&  r   _dispatch_ref_age_secr  _  s_     JJsAE
5zQ%)t+!!%),EU[[^$$$r   zthe nodec               4    V ^8  d   QhRRRRRRRRRRR	RR
R/# )r   r  r   urlr   r  keep_refenvr[  r   r#   r   r   )r%   s   "r   r&   r&   l  sN     6 6
6	6 6 	6
 
6 6 6r   c                $    V! RR\        V 4      RV\         RV R2.VRR\        R7      pTP                  ^ 8w  d   RT R	2# \        P                  ! 4       p. p	TP                  P                  4        Fu  p
T
P                  ^R
7      p\        T4      ^8w  d   K'  T^,          P                  4       pY8X  d   KF  \        Y4      pTf   KW  T\        8  g   Kd  T	P                  T4       Kw  	  T	'       g   R# T	R\          p	 T! RR\        T 4      RRRT.R T	 4       OTRR\"        R7      pTP                  ^ 8w  d   RT R	2# R#   \        \        P
                  3 d
    RT R	2u # i ; i  \        \        P
                  3 d
    RT R	2u # i ; i)a  Best-effort cleanup of this sandbox's dispatch refs older than `DISPATCH_REF_TTL_SEC`,
run once after a successful push. Never raises and never fails the dispatch: a listing or
delete failure just means the next dispatch's GC gets another chance. Returns a plain,
owner-safe warning string (no internal names, no URLs) to surface non-fatally on
failure, None when there was nothing to report.r  r	  z	ls-remoter5  z/*/inTr#  r   r   r   z0old dispatch records could not be cleaned up on z; the run is unaffected.)maxsplitNr  -q--no-verifyc              3  ,   "   T F
  pR V 2x  K  	  R# 5i)rB  Nr   )r9   r  s   & r   r;   #gc_dispatch_refs.<locals>.<genexpr>  s     *ES3%yEs   )r   r  rx   rS   r   r   r   r  r   r  r   r   r  r  DISPATCH_REF_TTL_SECr{   DISPATCH_REF_GC_MAX_DELETEr  )r  r!  r  r"  r#  r   r   listedr  stalelinefieldsr  agedeleteds   &&&&&&&        r   gc_dispatch_refsr3  l  s   	fT3t9k3?BSSTU\T]]b@cd%
 AA)Ldee
))+CE((*Q'v;!Qioo?#C-?s&::LL + --.E
fT3t9fdM3 ,*E*,$
 QA)LdeeA Z//0 fA)Ldeef8 Z//0 fA)Ldeefs#   *E *E+ !E('E(+!FFc               (    V ^8  d   QhRRRRRRRR/# )	r   cmdrp   stepr   r  r   r#   zsubprocess.CompletedProcessr   )r%   s   "r   r&   r&     s/     _ _) _3 _d _Fa _r   c                     V! V 3RRRR/VB #   \         \        P                  3 d    p\        T RT RT 2\        R7      ThRp?ii ; i)u   Every local git probe/snapshot call goes through this: an `OSError` or timeout is a
transport failure, converted to the same `OffloadUnavailable` the rest of the module
raises on one — never a raw exception leaking out of `open_session`/`pull_back`.r   Tr   z on r  r/   N)rS   r   r   r   ri  )r5  r6  r  r   kwargsrU   s   &&&&, r   _run_gitr9    s`    _3AtA$A&AAZ//0 _ D6dV9SE!BU[^^_s    A	AA	c               $    V ^8  d   QhRRRRRR/# )r   r  r   
commit_ishr   r#   r   r   )r%   s   "r   r&   r&     s&     A A$ AC A
 Ar   c                    \        R R\        V 4      RV R2.RW\        R7      pVP                  ^ 8X  d   VP                  P                  4       # R# )r  r	  r
  z^{tree}r   N)r9  r   rx   r   r   r  )r  r;  r   r   s   &&& r   tree_ofr>    sR    	s4y+*Y7OPT(9D #'//Q"64;;@D@r   c                    V ^8  d   QhRRRR/# )r   r  r   r#   ztuple[str, bool]r   )r%   s   "r   r&   r&     s     6 6 66F 6r   c           
        \        RR\        V 4      RR.RW\        R7      pVP                  ^ 8w  d0   \	        RV  RVP
                  P                  4        2\        R7      h\        V 4      p\        V4       VP                  P                  4       '       g%   V'       g   \        V R	VR
7      pT;'       g    RR3# \        \        P                  ! 4       4      R\        P                   ! 4        R\"        P$                  ! 4       P&                   2,          p/ \        P(                  CR\        V4      /Cp RRR\        V 4      RR	.3RRR\        V 4      RRR.33 F[  w  rx\        WWV\*        R7      p	V	P                  ^ 8w  g   K+  \	        RV  RV RV	P
                  P                  4        2\        R7      h	  V'       dh   \        RR\        V 4      RRRRR.VORWV\*        R7      p
V
P                  ^ 8w  d0   \	        RV  RV
P
                  P                  4        2\        R7      h\        RR\        V 4      R.RWV\        R7      pVP                  ^ 8w  d0   \	        RV  R VP
                  P                  4        2\        R7      hVP                  P                  4       R!3 VP-                  4        #   \.         d     # i ; i   TP-                  4        i   \.         d     i i ; i; i)"z(tree sha, is_dirty) for `root`'s current state, never touching HEAD or the real
index: a throwaway `GIT_INDEX_FILE` does the read-tree/add/write-tree dance.r  r	  statusz--porcelainr=  z*could not read the working tree status of rO   r/   HEADr  r  Fzcdx-offload-index-r'  GIT_INDEX_FILEz	read-treeaddz-Az--ignore-errorsr#  r   snapshotting z failed at rmr'  r  z--ignore-unmatchr  zsecret filterzsecret filtering r  z
write-treez failed at write-tree: T)r9  r   rx   r   r   rx  r  ri  rp  rz  r   r>  r   tempfile
gettempdirrE   r   r   r   r   rF   r  r   rS   )r  r   dirtyrj  	head_tree
index_pathr#  r6  r5  r   removedtrees   &&          r   _snapshot_treerO    s    	s4y(MB$%6E 1 8bASASAU@VW
 	
 !&H(#<<D&c2	B%%h))+,1CBIIK=PQRVR\R\R^RbRbQc/ddJ
;RZZ
;)3z?
;C">4TKPQ^T3t9eTCTUV
ID CtcCSTD!#(#D6TF"T[[=N=N=P<QR$ 
 s4y$jJ\^bnemn=MG !!Q&('vYw~~7K7K7M6NOVa  T3t9l;$6G
 ??a$v%<T[[=N=N=P<QR   {{  "D(	 			 		sP   7AK	 ;K	 C#K	 'J88KK	K-KK-K*'K-)K**K-c                    V ^8  d   QhRRRR/# )r   r  r   r#   r   r   )r%   s   "r   r&   r&     s     ! !$ !z !r   c                   \        RR\        V 4      RRR.RW\        R7      pVP                  ^ 8w  d   R# VP                  P                  4       p\        WR7      w  rEV'       g   V# / \        P                  CR	R
RRRR
RR/Cp\        RR\        V 4      RVRVRR.	RWV\        R7      pVP                  ^ 8w  d0   \        RV  RVP                  P                  4        2\        R7      hVP                  P                  4       # )uM  The commit fully representing `root`'s current state — HEAD plus every tracked
modification and untracked, non-ignored file — as one object `git push` can send as a
delta. None when `root` has no HEAD yet (a freshly `git init`ed checkout): the caller
falls back to the tree-copy transport, since there is nothing to push against.r  r	  r
  z--verifyrB  r=  Nr  GIT_AUTHOR_NAMEr   GIT_AUTHOR_EMAILzcdx-offload@localGIT_COMMITTER_NAMEGIT_COMMITTER_EMAILzcommit-treeru   z-mzcdx-offload snapshotrE  rF  z failed at commit-tree: r/   )r9  r   rx   r   r   r  rO  rE   rF   r   rx  ri  )r  r   headhead_sharN  rJ  id_envcommits   &&      r   snapshot_commitrZ    s   
 	s4y+z6JT(9D !{{  "H /KD
**=/m2F 	s4y-tXtUkltf6GF A D6!9&--:M:M:O9PQ
 	
 ==  r   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r   r  r   r!  r   shar  r#   rp   r   )r%   s   "r   r&   r&     s6     _ _4 _c _ _# _) _r   c           
     0    R R\        V 4      RRRW RV 2.# )r  r	  r  r'  r(  rB  )r   )r  r!  r\  r  s   &&&&r   push_commit_argvr^    s)    D#d)VT=#QVVWX[W\~^^r   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )r   r  r   r  r  r\  r#   r   )r%   s   "r   r&   r&     s/     , ,C ,3 ,S ,s ,s ,r   c                8   RP                  R \         4       4      pR\        P                  ! V 4       R\        P                  ! V4       R\        P                  ! RV R24       R\        P                  ! V4       R	V R
2pR\        P                  ! V4       2# )u  Materialize `sha` as a real, working checkout at `rel_dir`, sourcing objects from the
bare mirror by alternates — the fetch itself moves only the one ref, never a tree copy.
`clean` is scoped to `SYNC_EXCLUDES` so a reused workspace's installed deps survive the
checkout; a bare `clean -ffd` would force every dispatch into a cold install. The lock
serializes against a concurrent result-snapshot (`remote_result_script`) on the same
workspace. c              3  T   "   T F  pR \         P                  ! V4       2x  K   	  R# 5i)z-e Nr   r  )r9   rh   s   & r   r;   )remote_checkout_script.<locals>.<genexpr>  s!     Lmd#ekk$/01ms   &(set -eu
w="$HOME"/
b=aC  
mkdir -p "$w/.git"
exec 9>"$w/.git/cdx-offload.lock"
flock -w 600 9
[ -e "$w/.git/HEAD" ] || git init -q "$w"
git -C "$w" remote add origin "$b" 2>/dev/null || git -C "$w" remote set-url origin "$b"
mkdir -p "$w/.git/objects/info"
printf "%s\n" "$b/objects" > "$w/.git/objects/info/alternates"
git -C "$w" fetch -q origin +z:refs/cdx/inz
git -C "$w" checkout -qf z
git -C "$w" clean -qffd 
r  )ra   rV  r   r  )r  r  r  r\  excludesr  s   &&&&  r   remote_checkout_scriptrj    s     xxLmLLH	[[)* +[["# $' (-{{Qse<3H'I&J K$$)KK$4#5 6##+*B	0 
$ u{{5)*++r   c               (    V ^8  d   QhRRRRRRRR/# )r   r  r   r  r  r#   r   )r%   s   "r   r&   r&   3  s(     , ,# , ,3 ,3 ,r   c                    R\         P                  ! V 4       R\         P                  ! V4       RV R2pR\         P                  ! V4       2# )u  Snapshot the node's post-run state the same way `snapshot_commit` does locally, push
it to the bare mirror under `ref`, and print its sha — the delta the workstation fetches
back. Shares `remote_checkout_script`'s lock so the two never race on one workspace.re  rf  a  
exec 9>"$w/.git/cdx-offload.lock"
flock -w 600 9
cd "$w"
idx="$w/.git/cdx-offload-result-index"
export GIT_INDEX_FILE="$idx"
git read-tree HEAD
git add -A --ignore-errors
tree=$(git write-tree)
rm -f "$idx"
base=$(git rev-parse HEAD)
if [ "$tree" = "$(git rev-parse HEAD^{tree})" ]; then
  sha="$base"
else
  sha=$(GIT_AUTHOR_NAME=cdx-offload GIT_AUTHOR_EMAIL=cdx-offload@local GIT_COMMITTER_NAME=cdx-offload GIT_COMMITTER_EMAIL=cdx-offload@local git commit-tree "$tree" -p "$base" -m "cdx-offload result")
fi
git push -q --force "$b" "$sha:z"
printf "%s\n" "$sha"
r  rc  )r  r  r  r  s   &&& r   remote_result_scriptrm  3  s^    
	[[)* +[["# $** +. /"/	" 
6 u{{5)*++r   c               <    V ^8  d   QhRRRRRRRRRRR	R
RR
RRRR/	# )r   r   r   
credentialr   	exec_namer  rp   r1  
git_commonr   r  egress_hostsrZ   r#   r   )r%   s   "r   r&   r&   U  sb     5 555 5 	5
 5 5 5 "5 5r   c                    \        \        4      RV RVRVP                  .pV'       d   VP                  RV.4       V'       d   VP                  RV.4       V F  p	VP                  RV	.4       K  	  . VORNVNVO# )a   `--git-common`/`--git-dir` each independently bind-mount their node-absolute path at
the same path inside the container (agent-sandbox's own contract). A linked worktree's
dispatch needs both; the git-push transport's bare mirror needs only `--git-common`.z--hostz--idz	--runtimez--git-commonz	--git-dirz--egress-hostr  )r   AGENT_SANDBOX_BINr   extend)
r   ro  rp  r  r1  rq  r  rr  r|   allowed_hosts
   &&&&&&&&  r   launcher_argvrw  U  s     	D ^Z01['*+$_l34 %4T4444^44r   c                  f   ] tR tRt$ R]R&   R]R&   R]R&   R]R&   R	]R
&   RtR]R&   RtR]R&   R*tR]R&   RtR]R&   Rt	R]R&   Rt
R]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R &   RtR]R!&   RtR]R"&   R# R$ lt]P*                  3R% R& llt]P*                  3R' R( lltR)tR# )+Sessionit  r   r   rK   rg   r   r  r  rp   r|   r  	node_home	workspacerZ   mountsNCredential | Nonero  r   git_warningFr5   rL  r   r}  mirror_filesr   r  r1  no_workspacegit_pushr  bare_urlpre_shac                   V ^8  d   QhRR/# r   r   )r%   s   "r   r&   Session.__annotate__  s       r   c                h    V P                   e$   V P                   P                  4        RV n         R# R# )zMDrop the placement claim so the node stops looking busy to the next dispatch.N)r  r   r   s   &r   r   Session.release  s(    ::!JJ DJ "r   c                   V ^8  d   QhRR/# r   r#   r   r   )r%   s   "r   r&   r    s      z r   c           	        V P                   '       d   R# V P                  '       d   V P                  VR7      #  V! \        V P                  V P
                  V P                  4      V P                  R\        R7      pVP                  ^ 8w  d+   RV P                   RVP                  P                  4        2# V! \        V P                  V P
                  V P                  V P                  R7      RR\        R7      pTP                  ^ 8w  d+   RT P                   RTP                  P                  4        2# R#   \        \         P"                  3 d   pRT P                   RT 2u Rp?# Rp?ii ; i)	zLBring the node's post-run state home. Returns an error string, never raises.Nr  Tinputr   r   zresult sync from r  rL  r   )r  r  _pull_back_gitr  rg   r  r  r  r  r   r   rx  r  r  rL  rS   r   r   )r,   r   trackedr   rU   s   &&   r   	pull_backSession.pull_back  s<   ===&&3&//	F!$++tyy$,,G''#(	G !!Q&*4>>*:)GNNDXDXDZC[\\$++tyy$,,DL\L\]#(	D ??a&t~~&6i@Q@Q@S?TUU	 334 	F&t~~&6iuEE	Fs%   A=D: 8AD: :E1E,&E1,E1c                   V ^8  d   QhRR/# r  r   )r%   s   "r   r&   r    s     
 
J 
r   c           
        V P                   e   V P                  e   V P                  f   Q h\        V P                  ;'       g    R4      p\        V P                  V P                   V4      p V! . \        V P                  4      OVNRR\        R7      pTP                  ^ 8w  d+   RT P                   RTP                  P!                  4        2# TP"                  P%                  4        Uu. uF*  qfP!                  4       '       g   K  TP!                  4       NK,  	  ppT'       g   RT P                   R2# TR	,          p\'        T P(                  T P                  T P                  T P                  T P                  T P                  ;'       g    RTR7      #   \        \        P                  3 d   pRT P                   RT 2u Rp?# Rp?ii ; iu upi )
u  Snapshot the node, push the result to the bare mirror, fetch it home (delta
only), and apply it as an uncommitted change against the local `pre_sha`. Refuses —
never overwrites — if the local checkout moved since the push; the result stays
safe on the fetched ref either way.Nr  Tr   zresult snapshot on r  z produced no commit)r  rg   r   r  r  sandboxr   r   )r  r  r  r  r1  rm  r  r}   rg   r  rS   r   r   r   r   rx  r  r   r  pull_back_git_deltar  )	r,   r   r  scriptgotrU   r/  
node_linesnode_shas	   &&       r   r  Session._pull_back_git  s   
 }}(T]]-F4<<Kccc..B/%dllDMM3G	H0(4;;'00DZjC
 >>Q((8	#**BRBRBTAUVV/2zz/D/D/FW/Ft**,ldjjl/F
W((88KLLb>";;nn]]LLOO))r
 	
 334 	H((8	#GG	H Xs*   .'F ,GGG2G	G	G)r  r   )r   r   r   r   r   rz  r{  r|  ro  r~  rL  r  r  r1  r  r  r  r  r  r   r   r   r  r  r   r   r   r   ry  ry  t  s    NL
JL
OIsIs FO $(J!("K"KL%#'E '!J
!L$HdHjHjGZ 'NN 6 ", 
 
r   ry  c               4    V ^8  d   QhRRRRRRRRRRR	RR
R/# )r   r  r   rg   rK   r   r   r  r  r  r#   r   r   )r%   s   "r   r&   r&     sP     5 5
5 5 	5
 5 5 5 5r   c                   \        V4      pRV 2p T! RR\        V 4      RRVRV RV 2.V'       d   \        V4      MRR	R	\        R
7      p	T	P                  ^ 8w  d!   RT RT	P                  P                  4        2#  \        YR7      w  r\        YTR7      pY8w  d   RT  RT RT R2#  T! RR\        T 4      RRYH.R	\        R7      pTP                  ^ 8w  d!   RT RTP                  P                  4        2# T! RR\        T 4      RRR.TP                  R	\        R7      pTP                  ^ 8w  d!   RT RTP                  P                  4        2# R#   \        \
        P                  3 d   p
RT RT
 2u Rp
?
# Rp
?
ii ; i  \         d   p
RT  RT
 2u Rp
?
# Rp
?
ii ; i  \        \
        P                  3 d   p
RT RT
 2u Rp
?
# Rp
?
ii ; i)zOFetch a dispatched result and apply its delta with Session's refusal semantics.zrefs/cdx-fetch/r  r	  fetchr'  rg  rB  NTr%  zresult fetch from r  r  zchecking the local checkout of zlocal checkout z changed during the u8    dispatch; not overwriting it — the result is safe at z in this repositorydiffz--binaryr  zpreparing the z result failed: applyr'  r  zapplying the )r  r   r  r  rS   r   r   r   rx  r  rO  r>  r   r   )r  rg   r   r  r  r  r   r  	fetch_reffetchedrU   current_treer   expected_treedeltaapplieds   $$$$$$$         r   r  r    s$    W
C!'+I	>T3t9gtX3%qQZP[G\]'-F#4$
 Q#I;i8L8L8N7OPPF(737 $dV#7	{ C<<E;FY[	
@T3t9fj'U$

 q #I;.>u||?Q?Q?S>TUUT3t9gz3G,,t=M
 Qyk)9'..:N:N:P9QRR= Z//0 >#I;iu==>  F0iuEEF& Z//0 @yk)9#??@s`   :E >F ,AF' ;)F' F2E?9F?FF$FF$F$'GG	GGc               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# r   rp  r   r  rp   r  r   registry_pathr   ro  r}  r   r#   ry  r   )r%   s   "r   r&   r&     sW     m mmm 
m 	m
 "m m mr   c           
         \        WW#WEWg4      # )zQThe incumbent podman dispatcher. Keep this body stable: flag-off is its contract.)_open_session_impl)rp  r  r  r  ro  r   r:   r   s   &&&&&&&&r   _open_podman_sessionr    s     iZ^cllr   c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# r  r   )r%   s   "r   r&   r&     sW     o ooo 
o 	o
 "o o or   c                   a aaaaaaa \         P                  P                  \        4      R 8X  d(   ^ RIpVP                  S SSSSSVVVV VVVV3R lR7      # \        S SSSSSSS4      # )1Nc            
     (   < \        SSSSSSSS 4      # r)   )r  )r   ro  r  rp  r  r:   r  r   s   r   <lambda>open_session.<locals>.<lambda>$  s    1>3z3PUW]r   )rp  r  r  r  ro  r   fallback)rE   rF   rG   K3S_DISPATCH_ENVk3s_dispatchopen_sessionr  )	rp  r  r  r  ro  r   r:   r   r  s	   ffffffff r   r  r    sp     
zz~~&'3.(()'!  ) 

 
	
  	>3z[^`egmnnr   c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# r  r   )r%   s   "r   r&   r&   +  sW     T TTT 
T 	T
 "T T Tr   c                   Vf   \        RV  2\        R7      hVP                  P                  4       '       d6   \        P
                  ! VP                  \        P                  4      '       gB   \        VP                   RVP                  ;'       g    R RVP                   2\        R7      h\        4       p\        V4      p	V	e9   V'       d1   \        \        ^ ,           RV	^,           R\         R2\        R7      hV	e   Vf   \        P                  ! 4       M
\        V4      p
\        V	^,          4      P!                  4       pVP#                  4       '       d   TMW,          P%                  4       pVP'                  4       '       g*   \        \        ^ ,           RV	^,           R	2\        R7      h\)        V4      f*   \        \        ^ ,           RV	^,           R
2\        R7      hTp\+        V4      p\-        \/        V4      WgR7      w  rp\1        \3        VP5                  R. 4       Uu0 uFt  p\7        VP5                  R4      ;'       g    / P5                  \8        4      ;p\:        4      '       g   KI  VP5                  R4      '       g   Kb  \=        VR,          4      kKv  	  up4      4      p\?        W4      p \A        V4      pR pR pR pR pRpV'       d   Rp\C        V4      pR pV.pMV	eA    XPE                  V4      p\I        T4      pT\        R4      8w  d   T RT 2p\K        YT4      p\M        V4      p\O        VVR7      pVf   R M\Q        VVR7      pVR J;'       d    VR JpV'       d   RpR pV\R        .pM@\U        VVR7      p\W        VVR7      pV.pVe    VVPX                  VPZ                  .,          p V! . \]        V4      OR\^        P`                  ! V4       R2NRR\b        R7      p T Pj                  ^ 8w  d/   \        T RT Pl                  Po                  4        2\        R7      hT Pp                  Ps                  4        U"u. uF+  p"T"Po                  4       '       g   K  T"Po                  4       NK-  	  p#p"T#'       g   \        T R2\        R7      hT#R7,          Pu                  R4      p$T$Pw                  R4      '       g   \        T RT#R7,           2\        R7      hT$ RT 2p%Te#   T$ RTPX                   2T$ RTPZ                   23MR8p&T'       d   R p'EMT'       Ed   \y        T4      p(\{        4       p)\}        T4      p*\        T*4      p+T$ RT+ 2p\        TT4      pT3p& T! . \]        T4      O\        T+4      NRR\b        R7      p,T,Pj                  ^ 8w  d/   \        T RT,Pl                  Po                  4        2\        R7      h\        T(T)4      p- T! \        TTTT-4      \        T4      RR\        R7      p.T.Pj                  ^ 8w  d/   \        T RT.Pl                  Po                  4        2\        R7      h\        TTT(T-\        T4      TTR7      p' T! . \]        T4      O\        TTT-T4      NRR\        R7      p/T/Pj                  ^ 8w  d/   \        T R T/Pl                  Po                  4        2\        R7      hM T! \        TTT4      TR\        R!7      p0T0Pj                  ^ 8w  d/   \        T R"T0Pl                  Po                  4        2\        R7      hT! \        TTTTR JR#7      RR\        R7      p.T.Pj                  ^ 8w  d/   \        T R"T.Pl                  Po                  4        2\        R7      hTf   R M\        TTT\I        T4      TTR7      p' T'       d   \        T4      M
\y        T4      p1\        T&4      ^8  d
   T&^ ,          MR p2\        T&4      ^8  d
   T&^,          MR p3\        R8/ R$TbRTbR%TbR&TbR'T1bR(T$bR)T%bR*T&bR+TbR,\        TTT TT1T2T3TR-7      bR.T'bR/TR JbR0TbR1TbR2TbR3TbR4TbR5TbR6Tb # u upi   \F         d.    \        \        ^ ,           RT	^,           RT 2\        R7      R hi ; i  \d        \f        Ph                  3 d   p!\        T RT! 2\        R7      T!hR p!?!ii ; iu up"i   \d        \f        Ph                  3 d   p!\        T RT! 2\        R7      T!hR p!?!ii ; i  \d        \f        Ph                  3 d   p!\        T RT! 2\        R7      T!hR p!?!ii ; i  \d        \f        Ph                  3 d   p!\        T R T! 2\        R7      T!hR p!?!ii ; i  \d        \f        Ph                  3 d   p!\        T R"T! 2\        R7      T!hR p!?!ii ; i  \         d    Te   TP                  4        h i ; i)9Nzno credential resolved for r/   z credential for z<no account>z is not a readable file: ra  z is not supported with z-=1: there is no mirrored checkout to point atz is not a directoryzD is not inside a git checkout, so there is no bounded tree to mirror)r:   r   r]   rg   rb   Fr   z( resolves outside the mirrored checkout .r5  r  r  z && printf '%s\n' "$HOME"Tr   z: could not prepare mirror: z3: node home is missing from prepare-mirror responsez: node home is not absolute: z%: could not prepare the bare mirror: r%  z: git push failed: )r   r   z: remote checkout failed: r  z: mirror push failed: r  r   r  r  r1  rz  r{  r|  ro  r|   )r   ro  rp  r  r1  rq  r  rr  r~  rL  r  r  r  r  r  r  r  r   r   )Qr   EXIT_CREDENTIALr   rc  rE   rg   R_OKr   r   rI   r  r  rH   ri  r   r  ry   r  rD  is_dirr  rV   r  rc   tuplert  rG   r  DOORrK   r   rm   r  r>  r`  rT   rJ  r!  r8  r  rZ  r  r  r  r  r  r}   r   ra   rx   rS   r   r   r   rx  r  r   r  r  r  r1  r  r  r  r   r  r  r^  r  r  r3  rj  r  r  r  BaseExceptionr   r;  r   ry  rw  )4rp  r  r  r  ro  r   r:   r   r  workdirbase	requestedrX   rb   rg   r  itemre   mirror_hostsrh   r  	commondirr  r  r  r  r  r  r  remote_dirsinside	containermaderU   r/  r  rz  r{  r|  r~  sboxr  r  r  ensurein_refpushedcheckoutr  effective_sandbox_idgit_common_mountgit_dir_mounts4   &&&&&&&&                                            r   r  r  +  s
     ))5O
 	
 ??""$$BIIjoorww,O,O !!""2:??3T3Tn2U V''1&79 
 	

 *+L>*G| Q '!*-DEUDV W8 8
 	

  [txxzd3i$//1	"+"7"7"9"9Yt?OXXZ	!!$ #$Agaj\1DEK  	"*$ #$Agaj\ 2, ,  
 ]+H%oh&?u\D%LL"-!-D 2 8 8b==dCCtdK 	PTPXPXY_P` 	DL-!  L
 d#D~~!%	"##L(.GF")K" &2248F 05	T#Y&#,+Qvh 7I!0)!T$T*G&t5I'/d_Ts5SG ,DD1DH"&(<=  0#>#Dc2&i%F$8$8&:O:O#PPK	f%

; 788TU  $)D ??a$&4T[[5F5F5H4IJ   +/++*@*@*BS*B$djjl*BS$&KL   "I$$S)	##C(($&5eBi[A   !k7),	 ! +Qv3345+Qv4456
  	 KXd#D)+K9%C&s+H#AhZ0H#FH5H
 [F
Lhv&L(A((KL#'-	   A%(fA&--BUBUBWAXY$  "$4F	g$T8WfE#F+#',   A%(f/0C0C0E/FGk  +hfk&.ATWZK!&).w&'R $(, ""a'(f6x7L7L7N6OPWb  (
%fdG<&#',	 %%*,& 6w~~7K7K7M6NOVa  fdGtAST#',	   A%(f26==3F3F3H2IJ$  > 'D'+>t+DfRU  8D-d3TXIY$'K1$4vay$!$V!1F1ItM   	
 (     !)+'!%	
(  )* $&+, "-. /0 "12 34 56 78 9 S!. "  ,(+,Agaj\9a&"(  	  L 334 	$&4SE:	 TV Z778 (fA#Gk$ Z778 g(D61DSE)JQ\]cffg& Z778 (f6se<;4 Z778 (f23%8{"  MMOs)  /!a$a:aa 4f< 5a A#f< *f< 7Af< 5b :Af< c2cB f< 'f< +f< 4Af< 6&c Af< (&d Af< ))e ?f< A9f Af< 8bf< c0ccf< d/ddf< e)e  ef< e?#e::e??f< f9f44f99f< <!g)
z
.worktreesz.tmpjail-worknode_modulesdistbuildz.nextz.turboz.cachez.venvtarget)r   r)   )r	  z--cd)zpi-state)Fi:	 )NNr   )r0   
__future__r   r*  rP   rE   r   r   r   r   rw  rH  r  r   dataclassesr   pathlibr   r   REGISTRY_PATHrt  rE  r  r6  rI  	SEAT_ROLESANDBOX_ROLEr  rV  	frozensetrb  compilere  rg  rh  rx   r  r   rH   r  r   r   r   r1   r  ri  EXIT_UNCONTAINABLERC_HOSTRC_CREDENTIAL_STAGINGRC_PREFLIGHTRC_SYSTEMD_RUNRC_RECURSIONRC_GIT_MOUNTLAUNCHER_FAILURE_CODESr   RuntimeErrorr   r?   rB   rI   rV   rc   ri   rm   r}   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r!  r1  r8  r;  r>  rF  rJ  rY  rp  rz  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r+  r,  r  r  r3  r9  r>  rO  rZ  r^  rj  rm  rw  ry  r  r  r  r  r   r   r   <module>r     s  B #   	  	   
    ! 		i'*??IIK)+e3oE '=4  , 1 	 EFG ("**5L*MN8"**Eb:cd>

Ku@vw%rzz2J'KLrzz*:;<

#HIJ

#|}~BJJ']^_	  x34 T   (- $ D   
  "#\><Q]^ 
 $   ^2  -  ?H=V " (, .,- ", &3?	) 
 
 

,:" (t;4|A$ (T#8)@1=&>f
7 &0^^ 12
  ??
!~~
 $   (^^ /.8  *~~ "	,. 	> &f-  $.>> ,/TB

,4;. %  **45
%&  6r_ .8^^ A $.>> 6r %/NN !D_,:,D5> R
 R
 R
j5 	5v '$(
m" '$(
o< '$(
T Tr   