From 2691d02d28fb5e3f01de5ecde6169bc290e0e7d1 Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Tue, 4 Apr 2023 14:44:36 +0200 Subject: [PATCH] spider: check thread cards to track remote scries --- pkg/arvo/app/spider.hoon | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkg/arvo/app/spider.hoon b/pkg/arvo/app/spider.hoon index 4958d1fcd..fd46d9e28 100644 --- a/pkg/arvo/app/spider.hoon +++ b/pkg/arvo/app/spider.hoon @@ -367,12 +367,6 @@ =/ pax=path ~| no-file-for-thread+file.p.source (need (get-fit:clay beak %ted file.p.source)) - :: ad-hoc to work only with the -keen/-pine threads -- pine uses keen - :: XX TODO: expand to any thread that performs a remote scry request? how? - :: - =? scries.state ?=(?([%ted %keen *] [%ted %pine *]) pax) - =+ !<([~ =ship =path] vase.p.source) - (~(put by scries.state) new-tid ship path) :_ state :_ ~ :+ %pass /build/[new-tid] @@ -459,9 +453,14 @@ == =. running.state (~(put of running.state) yarn eval-form) =/ =tid (yarn-to-tid yarn) - =. cards.r - %+ turn cards.r - |= =card + =^ new-cards state + ^- [(list card) _state] + %+ roll cards.r + |= [=card cards=(list card) s=_state] + :_ =? scries.s ?=([%pass ^ %arvo %a ?(%pine %keen) @ *] card) + (~(put by scries.s) tid &6.card +>+>+>.card) + s + :_ cards ^- ^card ?+ card card [%pass * *] [%pass [%thread tid p.card] q.card] @@ -472,7 +471,7 @@ ^- ^path [%thread tid path] == - =. cards (weld cards cards.r) + =. cards (weld cards (flop new-cards)) =^ final-cards=(list card) state ?- -.eval-result.r %next `state