From a4a44f1e21005ddb6d485782bec21dab936cfa97 Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Fri, 22 May 2020 14:32:32 -0700 Subject: [PATCH] kiln: cleanup --- bin/solid.pill | 4 ++-- pkg/arvo/gen/spider/kill.hoon | 2 +- pkg/arvo/gen/trouble.hoon | 8 +++++++- pkg/arvo/lib/hood/kiln.hoon | 29 +++++++++++++++++------------ pkg/arvo/sys/vane/ames.hoon | 4 ++-- pkg/arvo/sys/vane/clay.hoon | 19 +++++++++++++++++-- pkg/arvo/sys/vane/gall.hoon | 1 - pkg/arvo/ted/read.hoon | 8 +++----- 8 files changed, 49 insertions(+), 26 deletions(-) diff --git a/bin/solid.pill b/bin/solid.pill index 5f852ceae..f41ec49d6 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4bd63360c1b2fab69a35f71d360db6b9c71a796965d1826f919cf271e990bad2 -size 15816973 +oid sha256:a571650a0bec9d9368c7290a245cec1546fdd73bcf3982a73f6f6e6e6d5cee55 +size 15819552 diff --git a/pkg/arvo/gen/spider/kill.hoon b/pkg/arvo/gen/spider/kill.hoon index 6f691bb7e..7505d9cc3 100644 --- a/pkg/arvo/gen/spider/kill.hoon +++ b/pkg/arvo/gen/spider/kill.hoon @@ -1,3 +1,3 @@ :- %say -|= [^ ~ ~] +|= * [%spider-kill ~] diff --git a/pkg/arvo/gen/trouble.hoon b/pkg/arvo/gen/trouble.hoon index 4d9ca4630..58df96e1e 100644 --- a/pkg/arvo/gen/trouble.hoon +++ b/pkg/arvo/gen/trouble.hoon @@ -7,8 +7,9 @@ :- %noun =< :~ - [%kids-hash .^(@uv %cz (pathify ~.kids ~))] + [%base-hash base-hash] [%home-hash .^(@uv %cz (pathify ~.home ~))] + [%kids-hash .^(@uv %cz (pathify ~.kids ~))] :: (info %our our) (info %sponsor sponsor) @@ -40,4 +41,9 @@ life=lyfe rift=ryft == +:: +++ base-hash + =/ parent (scot %p (sein:title our now our)) + =+ .^(=cass:clay %cs /[parent]/kids/1/late/foo) + .^(@uv %cz /[parent]/kids/(scot %ud ud.cass)) -- diff --git a/pkg/arvo/lib/hood/kiln.hoon b/pkg/arvo/lib/hood/kiln.hoon index b10c302a6..9c287616c 100644 --- a/pkg/arvo/lib/hood/kiln.hoon +++ b/pkg/arvo/lib/hood/kiln.hoon @@ -165,6 +165,19 @@ ~ [>p.u.error< q.u.error] :: + :: If destination desk doesn't exist, need a %init merge. If this is + :: its first revision, it probably doesn't have a mergebase yet, so + :: use %that. + :: + ++ get-germ + |= =desk + =+ .^(=cass:clay %cw /(scot %p our)/home/(scot %da now)) + ?- ud.cass + %0 %init + %1 %that + * %mate + == + :: ++ poke |= arg=(unit [=ship =desk]) abet:(poke-internal arg) @@ -221,11 +234,7 @@ (poke-internal `[ship desk]:u.ota) =? aeon.u.ota ?=($w p.p.u.p.sign-arvo) ud:;;(cass:clay q.q.r.u.p.sign-arvo) - =/ =germ - =+ .^(=cass:clay %cw /(scot %p our)/home/(scot %da now)) - ?: =(0 ud.cass) - %init - ?:((gth 2 ud.cass) %that %mate) + =/ =germ (get-germ %home) =. ..abet (render-ket "beginning OTA to %home" ~) %: emit %pass (make-wire /merge-home) %arvo %c @@ -249,15 +258,11 @@ =. aeon.u.ota +(aeon.u.ota) %: emit %pass (make-wire /sync) %arvo %c - %warp ship.u.ota desk.u.ota `[%sing %y ud+aeon.u.ota /] + %warp ship.u.ota desk.u.ota `[%sing %z ud+aeon.u.ota /] == =. ..abet (render-ket "OTA to %home succeeded" ~) =. ..abet (render-ket "beginning OTA to %kids" ~) - =/ =germ - =+ .^(=cass:clay %cw /(scot %p our)/kids/(scot %da now)) - ?: =(0 ud.cass) - %init - ?:((gth 2 ud.cass) %that %mate) + =/ =germ (get-germ %kids) %: emit %pass (make-wire /merge-kids) %arvo %c %merg %kids ship.u.ota desk.u.ota ud+aeon.u.ota germ @@ -281,7 +286,7 @@ =. aeon.u.ota +(aeon.u.ota) %: emit %pass (make-wire /sync) %arvo %c - %warp ship.u.ota desk.u.ota `[%sing %y ud+aeon.u.ota /] + %warp ship.u.ota desk.u.ota `[%sing %z ud+aeon.u.ota /] == -- :: diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index 1684062b6..ee5038d33 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -3274,7 +3274,7 @@ |= [=message-num =message-blob] ^- (list static-fragment) :: - =/ fragments=(list fragment) (rip 13 message-blob) + =/ fragments=(list fragment) (rip 23 message-blob) =/ num-fragments=fragment-num (lent fragments) =| counter=@ :: @@ -3299,7 +3299,7 @@ $(index +(index), sorted [(~(got by fragments) index) sorted]) :: %- cue - %+ can 13 + %+ can 23 %+ turn (flop sorted) |=(a=@ [1 a]) :: +bind-duct: find or make new $bone for .duct in .ossuary diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index e8bdedb0f..e026456f5 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -2502,7 +2502,7 @@ $t ~| %requesting-foreign-directory-is-vaporware !! $u ~| %prolly-poor-idea-to-get-rang-over-network !! $v ~| %weird-shouldnt-get-v-request-from-network !! - $z ~| %its-prolly-not-reasonable-to-request-ankh !! + $z `(validate-z r.rand) $w `(validate-w r.rand) $x (validate-x [p.p q.p q r]:rand) $y `[p.r.rand !>(;;(arch q.r.rand))] @@ -2535,6 +2535,15 @@ %- (slog >%validate-x-failed< p.vale-result) ~ `-.p.vale-result + :: + :: Make sure the incoming data is a %z response + :: + ++ validate-z + |= =page + ^- cage + ?> ?=(%uvi p.page) + :- p.page + !>(;;(@uvI q.page)) -- :: :: A full foreign update. Validate and apply to our local cache of @@ -3283,7 +3292,7 @@ ++ read-s |= [yon=aeon pax=path] ^- (unit (unit cage)) - ?. ?=([?(%yaki %blob %hash %cage %open) * ~] pax) + ?. ?=([?(%yaki %blob %hash %cage %open %late) * ~] pax) `~ ?- i.pax %yaki @@ -3318,6 +3327,12 @@ :: %open ``open+!>(prelude:(ford:fusion ank.dom ~ ~ lat.ran fod.dom)) + :: + %late + :^ ~ ~ %cass + ?~ let.dom + !>([0 *@da]) + !>([let.dom t:(~(got by hut.ran) (~(got by hit.dom) let.dom))]) == :: +read-t: produce the list of paths within a yaki with :pax as prefix :: diff --git a/pkg/arvo/sys/vane/gall.hoon b/pkg/arvo/sys/vane/gall.hoon index 7522ba964..023af2576 100644 --- a/pkg/arvo/sys/vane/gall.hoon +++ b/pkg/arvo/sys/vane/gall.hoon @@ -1,7 +1,6 @@ :: :: %gall, agent execution !? 163 :: - :::: |= pit=vase =, gall diff --git a/pkg/arvo/ted/read.hoon b/pkg/arvo/ted/read.hoon index 346b495fe..12816e985 100644 --- a/pkg/arvo/ted/read.hoon +++ b/pkg/arvo/ted/read.hoon @@ -7,14 +7,12 @@ ^- form:m :: Parse arguments as ship, desk, and path :: -=+ !<([=target=path ~] arg) +=+ !<([=care:clay =ship =desk =case =target=path ~] arg) :: Read the file, possibly asyncrhonously :: ;< =bowl:spider bind:m get-bowl:strandio ;< =riot:clay bind:m - (warp:strandio our.bowl %home ~ %sing %a [%da now.bowl] target-path) + (warp:strandio ship desk ~ %sing care case target-path) ?~ riot - ~& %nothing (pure:m !>("nothing")) -%- (slog leaf+"got writ" (sell !<(vase q.r.u.riot)) ~) -(pure:m !<(vase q.r.u.riot)) +(pure:m q.r.u.riot)