@@ -10,41 +10,12 @@
1010 ==
1111::
1212+$ pikes (map desk pike)
13−:: $jump: changes to update source change requests
1413::
15−+$ jump
16− $% [%all all=(map dock dock)] :: pending requests
17− [%add old=dock new=dock] :: new request
18− [%yea old=dock new=dock] :: approved
19− [%nay old=dock new=dock] :: denied
20− ==
2114:: $rung: reference to upstream commit
2215::
2316+$ rung [=aeon =weft]
24−:: #sync-record: source and destination of a kiln sync
25−::
26−+$ sync-record ::
27− $: syd=desk :: local desk
28− her=ship :: foreign ship
29− sud=desk :: foreign desk
30− ==
31−::
32−+$ sync-state ::
33− $: nun=@ta :: nonce
34− kid=(unit desk) :: has kids desk too?
35− let=@ud :: next revision
36− nit=(unit ?) :: automerge or default
37− hav=(unit @ud) :: update available
38− yea=? :: update approved
39− ==
40−::
41−+$ sync-update
42− $% [%new for=sync-record rev=@ud]
43− [%done for=sync-record rev=@ud]
44− [%drop for=sync-record rev=@ud]
45− [%pending pending=(set [for=sync-record rev=@ud])]
46− ==
4717::
18++$ sync-state [nun=@ta kid=(unit desk) let=@ud]
4819+$ sink (unit [her=@p sud=desk kid=(unit desk) let=@ud])
4920:: +truncate-hash: get last 5 digits of hash and convert to tape
5021::
@@ -59,7 +30,7 @@
5930 =/ ego (scot %p our)
6031 =/ wen (scot %da now)
6132 :* .^(rock:tire %cx /[ego]//[wen]/tire)
62− .^(cone %cx /[ego]//[wen]/domes)
33+ .^(=cone %cx /[ego]//[wen]/domes)
6334 .^((map desk [ship desk]) %gx /[ego]/hood/[wen]/kiln/sources/noun)
6435 .^ (map [desk ship desk] sync-state) %gx
6536 /[ego]/hood/[wen]/kiln/syncs/noun
@@ -72,73 +43,43 @@
7243 ^- tang
7344 =/ ego (scot %p our)
7445 =/ wen (scot %da now)
75− =+ prep=[tyr cone sor zyn]=(report-prep our now)
76− ?: =(%$ filt)
46+ =/ prep (report-prep our now)
47+ ?~ filt
7748 %- zing
78− %+ turn
79− ?^ desks
80− (flop desks)
81− %+ sort ~(tap in ~(key by tyr.prep))
82− |= [a=desk b=desk]
83− ?: |(=(a %kids) =(b %base)) &
84− ?: |(=(a %base) =(b %kids)) |
85− (aor b a)
49+ %+ turn (flop desks)
8650 |=(syd=@tas (report-vat prep our now syd verb))
87− =/ deks=(list [=desk =zest wic=(set weft)])
51+ =/ deks
8852 ?~ desks
89− %+ sort ~(tap by tyr.prep)
90− |= [[a=desk *] [b=desk *]]
91− ?: |(=(a %kids) =(b %base)) &
92− ?: |(=(a %base) =(b %kids)) |
93− (aor b a)
94− %+ murn (flop desks)
95− |= des=desk
96− ^- (unit [=desk =zest wic=(set weft)])
97− ?~ got=(~(get by tyr.prep) des)
98− ~
99− `[des u.got]
53+ %+ sort
54+ (sort ~(tap in -.prep) |=([[a=@ *] b=@ *] !(aor a b)))
55+ |=([[a=@ *] [b=@ *]] ?|(=(a %kids) =(b %base)))
56+ %+ skip ~(tap in -.prep)
57+ |=([syd=@tas *] =(~ (find ~[syd] desks)))
10058 ?: =(filt %blocking)
101− =/ base-weft=(unit weft)
102− %- ~(rep in wic:(~(got by tyr.prep) %base))
103− |= [=weft out=(unit weft)]
104− ?~ out
105− `weft
106− ?: (lth num.weft num.u.out)
107− out
108− `weft
109− ?~ base-weft ~['%base already up-to-date']
59+ =/ base-wic
60+ %+ sort ~(tap by wic:(~(got by -.prep) %base))
61+ |=([[* a=@ud] [* b=@ud]] (gth a b))
62+ ?~ base-wic ~[leaf+"%base already up-to-date"]
11063 =/ blockers=(list desk)
111− %+ sort
112− ^- (list desk)
113− %+ murn deks
114− |= [=desk =zest wic=(set weft)]
115− ^- (unit ^desk)
116− ?. =(%live zest)
117− ~
118− ?: (~(has in wic) u.base-weft)
119− ~
120− `desk
121− aor
122− ?~ blockers ~['No desks blocking upgrade']
64+ %+ turn
65+ %+ skip ~(tap in -.prep)
66+ |= [* [zest=@tas wic=(set weft)]]
67+ ?. =(zest %live) &
68+ (~(has in wic) i.base-wic)
69+ |=([syd=desk *] syd)
70+ ?~ blockers ~[leaf+"No desks blocking upgrade, run |bump to apply"]
71+ :- [%rose [" %" "To unblock upgrade run |suspend %" ""] blockers]
12372 %- zing
124− ^- (list tang)
125− :- :~ %+ rap 3
126− :~ 'These desks are blocking upgrade to [%zuse '
127− (scot %ud num.u.base-weft)
128− ']:'
129− == ==
130− %+ turn blockers
73+ %+ turn (flop blockers)
13174 |=(syd=desk (report-vat prep our now syd verb))
13275 ::
13376 %- zing
13477 %+ turn
13578 ?+ filt !!
79+ ::
13680 %exists
13781 %+ skip deks
138− |= [syd=desk *]
139− ?~ got=(~(get by cone.prep) our syd)
140− &
141− =(0 let.u.got)
82+ |=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0))
14283 ::
14384 %running
14485 %+ skim deks
@@ -149,152 +90,107 @@
14990 |= [syd=@tas [zest=@tas *]]
15091 ?| =(syd %kids)
15192 =(zest %live)
152− ?~ got=(~(get by cone.prep) our syd)
153− &
154− =(0 let.u.got)
93+ =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0)
15594 ==
15695 ::
15796 %exists-not
15897 %+ skim deks
159− |= [syd=desk *]
160− ?~ got=(~(get by cone.prep) our syd)
161− |
162− =(0 let.u.got)
98+ |=([syd=desk *] =(ud:.^(cass %cw /[ego]/[syd]/[wen]) 0))
16399 ==
164100 |=([syd=desk *] (report-vat prep our now syd verb))
165101:: +report-vat: report on a single desk installation
166102::
167103++ report-vat
168− |= $: $: tyr=rock:tire =cone sor=(map desk (pair ship desk))
104+ |= $: $: tyr=rock:tire =cone sor=(map desk [ship desk])
169105 zyn=(map [desk ship desk] sync-state)
170106 ==
171107 our=ship now=@da syd=desk verb=?
172108 ==
173− |^ ^- tang
109+ ^- tang
110+ =- :: hack to force wrapped rendering
111+ ::
112+ :: edg=6 empirically prevents dedent
113+ ::
114+ %+ roll
115+ (~(win re -) [0 6])
116+ |=([a=tape b=(list @t)] [(crip a) b])
117+ ::
118+ ^- tank
174119 =/ ego (scot %p our)
175120 =/ wen (scot %da now)
176− ?. ((sane %tas) syd)
177− ~[(cat 3 'insane desk: %' syd)]
178− ?. (~(has by cone) our syd)
179− ~[(cat 3 'desk does not yet exist: %' syd)]
180− =/ hash .^(@uv %cz /[ego]/[syd]/[wen])
121+ =+ .^(=cass %cw /[ego]/[syd]/[wen])
122+ ?: =(ud.cass 0)
123+ leaf+"desk does not yet exist: {<syd>}"
181124 ?: =(%kids syd)
182− ~[(cat 3 '%kids %cz hash: ' (scot %uv hash))]
183− =/ kel-path /[ego]/[syd]/[wen]/sys/kelvin
125+ =+ .^(hash=@uv %cz /[ego]/[syd]/[wen])
126+ leaf+"%kids %cz hash: {<hash>}"
127+ =/ kel-path
128+ /[ego]/[syd]/[wen]/sys/kelvin
184129 ?. .^(? %cu kel-path)
185− ~[(cat 3 'bad desk: %' syd)]
130+ leaf+"bad desk: {<syd>}"
186131 =+ .^(=waft %cx kel-path)
132+ :+ %rose ["" "{<syd>}" "::"]
187133 ^- tang
134+ =/ hash .^(@uv %cz /[ego]/[syd]/[wen])
188135 =/ =sink
189136 ?~ s=(~(get by sor) syd)
190137 ~
191138 ?~ z=(~(get by zyn) syd u.s)
192139 ~
193− `[p.u.s q.u.s [kid let]:u.z]
140+ `[-.u.s +.u.s +.u.z]
194141 =/ meb=(list @uv)
195− ?~ sink ~[hash]
196− %+ turn
197− .^ (list tako) %cs
198− /[ego]/[syd]/[wen]/base/(scot %p her.u.sink)/[sud.u.sink]
199− ==
200− |=(=tako .^(@uv %cs /[ego]/[syd]/[wen]/hash/(scot %uv tako)))
142+ ?~ sink [hash]~
143+ (mergebase-hashes our syd now her.u.sink sud.u.sink)
201144 =/ dek (~(got by tyr) syd)
202145 =/ sat
203146 ?- zest.dek
204− %live 'running'
205− %dead 'suspended'
206− %held 'suspended until next update'
147+ %live "running"
148+ %dead "suspended"
149+ %held "suspended until next update"
207150 ==
208− =/ kul=cord (print-wefts (waft-to-wefts waft))
209− =/ ese=cord
210− ?:(.^(? %cx /[ego]//[wen]/esse/[syd]) 'yes' 'no')
211− =/ pax=path /(scot %p our)/[syd]/(scot %da now)
151+ =/ kul=tape
152+ %+ roll
153+ %+ sort
154+ ~(tap in (waft-to-wefts:clay waft))
155+ |= [a=weft b=weft]
156+ ?: =(lal.a lal.b)
157+ (lte num.a num.b)
158+ (lte lal.a lal.b)
159+ |= [=weft =tape]
160+ (welp " {<[lal num]:weft>}" tape)
212161 ?. verb
213− :~ '::'
214− =+ .^(exist=? cu+(weld pax /desk/bill))
215− ?. exist ' /desk/bill: missing'
216− =+ .^(dudes=(list dude:gall) cx+(weld pax /desk/bill))
217− (cat 3 ' /desk/bill: ' (crip "{<dudes>}"))
218− (cat 3 ' pending updates: ' (print-wefts wic.dek))
219− (cat 3 ' source ship: ' ?~(sink '~' (scot %p her.u.sink)))
220− (cat 3 ' app status: ' sat)
221− (cat 3 ' essential desk: ' ese)
222− (cat 3 ' %cz hash ends in: ' (print-shorthash hash))
223− (cat 3 ' /sys/kelvin: ' (print-wefts (waft-to-wefts waft)))
224− (cat 3 '%' syd)
162+ =/ cut=(list tape) (turn meb truncate-hash)
163+ =/ len (lent cut)
164+ =/ base-hash
165+ ?: =(0 len) "~"
166+ ?: =(1 len) (head cut)
167+ "~[{`tape`(zing (join " " `(list tape)`cut))}]"
168+ :~ leaf/"/sys/kelvin: {kul}"
169+ leaf/"base hash ends in: {base-hash}"
170+ leaf/"%cz hash ends in: {(truncate-hash hash)}"
171+ leaf/"app status: {sat}"
172+ leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
225173 ==
226174 ::
227− =/ [on=(list @tas) of=(list @tas)]
228− =/ [on=(list @tas) of=(list @tas)]
229− %- ~(rep by ren:(~(got by cone) our syd))
230− |= [[=dude:gall is-on=?] on=(list @tas) of=(list @tas)]
231− ?: is-on
232− [[dude on] of]
233− [on [dude of]]
234− [(sort on aor) (sort of aor)]
235− :~ '::'
236− (cat 3 ' pending updates: ' (print-wefts wic.dek))
237− %^ cat 3 ' kids desk: ' ?~ sink '~'
238− ?~ kid.u.sink '~'
239− (cat 3 '%' u.kid.u.sink)
240− (cat 3 ' source aeon: ' ?~(sink '~' (scot %ud let.u.sink)))
241− (cat 3 ' source desk: ' ?~(sink '~' (cat 3 '%' sud.u.sink)))
242− (cat 3 ' source ship: ' ?~(sink '~' (scot %p her.u.sink)))
243− (cat 3 ' updates: ' ?~(sink 'local' 'remote'))
244− %^ cat 3 ' publishing ship: ' ?~ got=(get-publisher our syd now)
245− '~'
246− (scot %p u.got)
247− ::
248− (cat 3 ' force off: ' (print-agents of))
249− (cat 3 ' force on: ' (print-agents on))
250− (cat 3 ' app status: ' sat)
251− (cat 3 ' essential desk: ' ese)
252− ::
253− (cat 3 ' %cz hash: ' (scot %uv hash))
254− (cat 3 ' base hash: ' (print-mergebases meb))
255− (cat 3 ' /sys/kelvin: ' (print-wefts (waft-to-wefts waft)))
256− (cat 3 '%' syd)
175+ =/ [on=(list [@tas ?]) of=(list [@tas ?])]
176+ =/ =dome (~(got by cone) our syd)
177+ (skid ~(tap by ren.dome) |=([* ?] +<+))
178+ :~ leaf/"/sys/kelvin: {kul}"
179+ leaf/"base hash: {?.(=(1 (lent meb)) <meb> <(head meb)>)}"
180+ leaf/"%cz hash: {<hash>}"
181+ ::
182+ leaf/"app status: {sat}"
183+ leaf/"force on: {<(sort (turn on head) aor)>}"
184+ leaf/"force off: {<(sort (turn of head) aor)>}"
185+ ::
186+ leaf/"publishing ship: {?~(sink <~> <(get-publisher our syd now)>)}"
187+ leaf/"updates: {?~(sink "local" "remote")}"
188+ leaf/"source ship: {?~(sink <~> <her.u.sink>)}"
189+ leaf/"source desk: {?~(sink <~> <sud.u.sink>)}"
190+ leaf/"source aeon: {?~(sink <~> <let.u.sink>)}"
191+ leaf/"kids desk: {?~(sink <~> ?~(kid.u.sink <~> <u.kid.u.sink>))}"
192+ leaf/"pending updates: {<`(list [@tas @ud])`~(tap in wic.dek)>}"
257193 ==
258− ++ print-wefts
259− |= wefts=(set weft)
260− ^- @t
261− ?: =(~ wefts)
262− '~'
263− %+ roll (sort ~(tap in wefts) aor)
264− |= [=weft out=@t]
265− ?: =('' out)
266− (rap 3 '[%' lal.weft ' ' (scot %ud num.weft) ']' ~)
267− (rap 3 out ' [%' lal.weft ' ' (scot %ud num.weft) ']' ~)
268− ::
269− ++ print-shorthash
270− |= hash=@uv
271− ^- @t
272− (crip ((v-co:co 5) (end [0 25] hash)))
273− ::
274− ++ print-mergebases
275− |= hashes=(list @uv)
276− ^- @t
277− ?~ hashes
278− '~'
279− ?~ t.hashes
280− (scot %uv i.hashes)
281− %+ roll `(list @uv)`hashes
282− |= [hash=@uv out=@t]
283− ?: =('' out)
284− (print-shorthash hash)
285− (rap 3 out ' ' (print-shorthash hash) ~)
286− ::
287− ++ print-agents
288− |= agents=(list @tas)
289− ^- @t
290− ?~ agents
291− '~'
292− %+ roll `(list @tas)`agents
293− |= [agent=@tas out=@tas]
294− ?: =('' out)
295− (cat 3 '%' agent)
296− (rap 3 out ' %' agent ~)
297− --
298194:: +report-kids: non-vat cz hash report for kids desk
299195::
300196++ report-kids
@@ -304,9 +200,9 @@
304200 =/ ego (scot %p our)
305201 =/ wen (scot %da now)
306202 ?. (~(has in .^((set desk) %cd /[ego]//[wen])) syd)
307− 'no %kids desk'
203+ leaf/"no %kids desk"
308204 =+ .^(hash=@uv %cz /[ego]/[syd]/[wen])
309− (cat 3 '%kids %cz hash: ' (scot %uv hash))
205+ leaf/"%kids %cz hash: {<hash>}"
310206:: +read-bill-foreign: read /desk/bill from a foreign desk
311207::
312208++ read-bill-foreign
@@ -366,8 +262,8 @@
366262 =/ her (scot %p her)
367263 =/ ego (scot %p our)
368264 =/ wen (scot %da now)
369− %+ turn .^((list tako) %cs /[ego]/[syd]/[wen]/base/[her]/[sud])
370− |=(=tako .^(@uv %cs /[ego]/[syd]/[wen]/hash/(scot %uv tako)))
265+ %+ turn .^((list tako) %cs ~[ego syd wen %base her sud])
266+ |=(=tako .^(@uv %cs ~[ego syd wen %hash (scot %uv tako)]))
371267::
372268++ enjs
373269 =, enjs:format