From 4dbdc799b936fd7b781d9e5a62009824f33ac78b Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Wed, 13 Mar 2024 14:03:01 -0400 Subject: [PATCH] clay: respect %rein for desks without a bill --- pkg/arvo/sys/vane/clay.hoon | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/pkg/arvo/sys/vane/clay.hoon b/pkg/arvo/sys/vane/clay.hoon index df4457570a..d878d82d90 100644 --- a/pkg/arvo/sys/vane/clay.hoon +++ b/pkg/arvo/sys/vane/clay.hoon @@ -4648,10 +4648,12 @@ $(desks t.desks) =^ res den (aver:den ~ %x da+now /desk/bill) =. ruf +:abet:den - ?. ?=([~ ~ *] res) + =/ bill + ?. ?=([~ ~ *] res) *bill + ~|([%building-bill i.desks] !<(bill q.u.u.res)) + ?~ rid=(override bill ren.dom.den) + %- (trace 2 |.("{} has no dudes")) $(desks t.desks) - =/ bill ~| [%building-bill i.desks] !<(bill q.u.u.res) - =/ rid (override bill ren.dom.den) %- %+ trace 2 |. "{} has bill {} and rein {}, so {}" =^ sats ..abet $(desks t.desks) @@ -4674,22 +4676,9 @@ :: +override: apply rein to bill :: ++ override - |= [duz=bill ren=(map dude:gall ?)] - ^- bill - =. duz - %+ skip duz - |= =dude:gall - =(`| (~(get by ren) dude)) - :: - =/ dus (sy duz) - =. duz - %+ weld duz - %+ murn ~(tap by ren) - |= [=dude:gall on=?] - ?: &(?=(%& on) !(~(has in dus) dude)) - `u=dude - ~ - duz + |= [duz=bill ren=(map dude:gall ?)] ^- bill + =/ out=bill (skip duz ~(has by ren)) + (~(rep by ren) |=([[d=dude:gall r=?] =_out] ?.(r out [d out]))) :: +apply-precedence: resolve conflicts between $bill's :: :: policy is to crash if multiple desks are trying to run the same