diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index 7cc1c0cae..ab25755d0 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -4881,6 +4881,7 @@ ?~ path ~ ?+ i.path ~ + %sweep ``[%sweep !>(sweep)] %rang ``[%rang !>(ran.ruf)] %domes =/ domes @@ -4902,6 +4903,57 @@ [[ship desk] [let hit lab]:dom.rede] ``[%domes !>(`cone`domes)] == + :: + ++ sweep + ^- (list [need=@ud have=@ud leak]) + =/ marked=(map leak [need=@ud have=@ud]) + (~(run by fad.ruf) |=([refs=@ud *] [0 refs])) + =. marked + =/ items=(list [=leak *]) ~(tap by fad.ruf) + |- ^+ marked + ?~ items + marked + =/ deps ~(tap in deps.leak.i.items) + |- ^+ marked + ?~ deps + ^$(items t.items) + =. marked + %+ ~(put by marked) i.deps + =/ gut (~(gut by marked) i.deps [0 0]) + [+(-.gut) +.gut] + $(deps t.deps) + :: + =/ spills=(list (set leak)) + %+ welp + %+ turn ~(tap by dos.rom.ruf) + |= [* =dojo] + spill.fod.dom.dojo + %- zing + %+ turn ~(tap by hoy.ruf) + |= [* =rung] + %+ turn ~(tap by rus.rung) + |= [* =rede] + spill.fod.dom.rede + :: + =. marked + |- + ?~ spills + marked + =/ leaks ~(tap in i.spills) + |- + ?~ leaks + ^$(spills t.spills) + =. marked + %+ ~(put by marked) i.leaks + =/ gut (~(gut by marked) i.leaks [0 0]) + [+(-.gut) +.gut] + $(leaks t.leaks) + :: + %+ murn ~(tap by marked) + |= [=leak need=@ud have=@ud] + ?: =(need have) + ~ + `u=[need have leak] -- :: :: We clear the ford cache by replacing it with its bunt as a literal.