2021-07-20 18:00:07 +03:00
|
|
|
/- *hood
|
2016-12-07 06:13:33 +03:00
|
|
|
=, clay
|
2016-12-02 02:59:17 +03:00
|
|
|
=, space:userlib
|
|
|
|
=, format
|
2021-07-18 21:21:54 +03:00
|
|
|
=* dude dude:gall
|
2020-06-17 09:36:09 +03:00
|
|
|
|%
|
2021-09-16 19:25:02 +03:00
|
|
|
+$ state state-7
|
|
|
|
+$ state-7 [%7 pith-7]
|
2021-09-07 07:37:36 +03:00
|
|
|
+$ state-6 [%6 pith-6]
|
2021-09-06 17:27:17 +03:00
|
|
|
+$ state-5 [%5 pith-5]
|
2021-08-20 01:57:31 +03:00
|
|
|
+$ state-4 [%4 pith-4]
|
2021-07-16 05:25:03 +03:00
|
|
|
+$ state-3 [%3 pith-3]
|
2021-07-09 02:25:18 +03:00
|
|
|
+$ state-2 [%2 pith-2]
|
2021-07-01 04:03:47 +03:00
|
|
|
+$ state-1 [%1 pith-1]
|
|
|
|
+$ state-0 [%0 pith-0]
|
2020-06-17 09:36:09 +03:00
|
|
|
+$ any-state
|
2021-08-11 19:23:36 +03:00
|
|
|
$~ *state
|
2021-09-16 19:25:02 +03:00
|
|
|
$% state-7
|
|
|
|
state-6
|
2021-09-07 07:37:36 +03:00
|
|
|
state-5
|
2021-09-06 17:27:17 +03:00
|
|
|
state-4
|
2021-08-20 01:57:31 +03:00
|
|
|
state-3
|
2021-07-16 05:25:03 +03:00
|
|
|
state-2
|
2021-07-01 04:03:47 +03:00
|
|
|
state-1
|
|
|
|
state-0
|
2020-06-17 09:36:09 +03:00
|
|
|
==
|
2021-09-07 07:37:36 +03:00
|
|
|
::
|
2021-09-16 19:25:02 +03:00
|
|
|
+$ pith-7
|
2021-09-07 07:37:36 +03:00
|
|
|
$: wef=(unit weft)
|
|
|
|
rem=(map desk per-desk) ::
|
|
|
|
syn=(map kiln-sync let=@ud) ::
|
|
|
|
ark=(map desk arak) ::
|
|
|
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
|
|
|
:: map desk to the currently ongoing fuse request
|
|
|
|
:: and the latest version numbers for beaks to
|
|
|
|
fus=(map desk per-fuse)
|
|
|
|
:: used for fuses - every time we get a fuse we
|
|
|
|
:: bump this. used when calculating hashes to
|
|
|
|
:: ensure they're unique even when the same
|
|
|
|
:: request is made multiple times.
|
|
|
|
hxs=(map desk @ud)
|
|
|
|
== ::
|
|
|
|
::
|
2021-09-16 19:25:02 +03:00
|
|
|
+$ pith-6
|
|
|
|
$: wef=(unit weft)
|
|
|
|
rem=(map desk per-desk) ::
|
|
|
|
syn=(map kiln-sync let=@ud) ::
|
|
|
|
ark=(map desk arak-6) ::
|
|
|
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
|
|
|
:: map desk to the currently ongoing fuse request
|
|
|
|
:: and the latest version numbers for beaks to
|
|
|
|
fus=(map desk per-fuse)
|
|
|
|
:: used for fuses - every time we get a fuse we
|
|
|
|
:: bump this. used when calculating hashes to
|
|
|
|
:: ensure they're unique even when the same
|
|
|
|
:: request is made multiple times.
|
|
|
|
hxs=(map desk @ud)
|
|
|
|
== ::
|
|
|
|
::
|
|
|
|
+$ arak-6 [rail=rail-6 next=(list rung) =rein]
|
|
|
|
+$ rail-6 [paused=? =ship =desk =aeon]
|
|
|
|
::
|
2021-09-06 17:27:17 +03:00
|
|
|
+$ pith-5
|
2021-07-01 04:03:47 +03:00
|
|
|
$: rem=(map desk per-desk) ::
|
|
|
|
syn=(map kiln-sync let=@ud) ::
|
2021-09-16 19:25:02 +03:00
|
|
|
ark=(map desk arak-6) ::
|
2021-07-01 04:03:47 +03:00
|
|
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
2021-05-24 01:43:41 +03:00
|
|
|
:: map desk to the currently ongoing fuse request
|
|
|
|
:: and the latest version numbers for beaks to
|
|
|
|
fus=(map desk per-fuse)
|
|
|
|
:: used for fuses - every time we get a fuse we
|
|
|
|
:: bump this. used when calculating hashes to
|
|
|
|
:: ensure they're unique even when the same
|
|
|
|
:: request is made multiple times.
|
|
|
|
hxs=(map desk @ud)
|
2021-07-01 04:03:47 +03:00
|
|
|
== ::
|
2021-09-06 17:27:17 +03:00
|
|
|
::
|
|
|
|
+$ pith-4 ::
|
|
|
|
$: rem=(map desk per-desk) ::
|
|
|
|
syn=(map kiln-sync let=@ud) ::
|
|
|
|
ark=(map desk arak-4) ::
|
|
|
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
|
|
|
:: map desk to the currently ongoing fuse request
|
|
|
|
:: and the latest version numbers for beaks to
|
|
|
|
fus=(map desk per-fuse)
|
|
|
|
:: used for fuses - every time we get a fuse we
|
|
|
|
:: bump this. used when calculating hashes to
|
|
|
|
:: ensure they're unique even when the same
|
|
|
|
:: request is made multiple times.
|
|
|
|
hxs=(map desk @ud)
|
|
|
|
== ::
|
|
|
|
+$ arak-4
|
|
|
|
$: =ship
|
|
|
|
=desk
|
|
|
|
=aeon
|
|
|
|
next=(list rung)
|
|
|
|
=rein
|
|
|
|
==
|
2021-08-20 01:57:31 +03:00
|
|
|
+$ pith-3 ::
|
|
|
|
$: rem=(map desk per-desk) ::
|
|
|
|
syn=(map kiln-sync let=@ud) ::
|
|
|
|
ark=(map desk arak-3) ::
|
|
|
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
|
|
|
:: map desk to the currently ongoing fuse request
|
|
|
|
:: and the latest version numbers for beaks to
|
|
|
|
fus=(map desk per-fuse)
|
|
|
|
:: used for fuses - every time we get a fuse we
|
|
|
|
:: bump this. used when calculating hashes to
|
|
|
|
:: ensure they're unique even when the same
|
|
|
|
:: request is made multiple times.
|
|
|
|
hxs=(map desk @ud)
|
|
|
|
==
|
|
|
|
+$ arak-3
|
|
|
|
$: =ship
|
|
|
|
=desk
|
|
|
|
=aeon
|
2021-09-06 17:27:17 +03:00
|
|
|
next=(list rung)
|
2021-08-20 01:57:31 +03:00
|
|
|
rein=rein-3
|
|
|
|
==
|
|
|
|
+$ rein-3
|
|
|
|
$: add=(set dude)
|
|
|
|
sub=(set dude)
|
|
|
|
==
|
|
|
|
::
|
2021-07-16 05:25:03 +03:00
|
|
|
+$ pith-2 ::
|
|
|
|
$: rem=(map desk per-desk) ::
|
|
|
|
syn=(map kiln-sync let=@ud) ::
|
|
|
|
ota=(unit [=ship =desk =aeon]) ::
|
|
|
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
2021-08-11 19:23:36 +03:00
|
|
|
fus=(map desk per-fuse)
|
|
|
|
hxs=(map desk @ud)
|
2021-07-16 05:25:03 +03:00
|
|
|
== ::
|
2020-06-17 09:36:09 +03:00
|
|
|
+$ pith-1 ::
|
|
|
|
$: rem=(map desk per-desk) ::
|
|
|
|
syn=(map kiln-sync let=@ud) ::
|
|
|
|
ota=(unit [=ship =desk =aeon]) ::
|
|
|
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
|
|
|
== ::
|
|
|
|
+$ pith-0 ::
|
|
|
|
$: rem=(map desk per-desk) ::
|
|
|
|
syn=(map kiln-sync let=@ud) ::
|
|
|
|
autoload-on=? ::
|
|
|
|
cur-hoon=@uvI ::
|
|
|
|
cur-arvo=@uvI ::
|
|
|
|
cur-zuse=@uvI ::
|
|
|
|
cur-vanes=(map @tas @uvI) ::
|
|
|
|
commit-timer=[way=wire nex=@da tim=@dr mon=term] ::
|
|
|
|
==
|
|
|
|
+$ per-desk :: per-desk state
|
|
|
|
$: auto=? :: escalate on failure
|
2020-08-28 10:24:25 +03:00
|
|
|
gem=?(%this %that germ) :: strategy
|
2020-06-17 09:36:09 +03:00
|
|
|
her=@p :: from ship
|
|
|
|
sud=@tas :: from desk
|
|
|
|
cas=case :: at case
|
|
|
|
==
|
2021-05-24 01:43:41 +03:00
|
|
|
+$ per-fuse :: per fuse state
|
|
|
|
:: map [ship desk] to latest version number we
|
|
|
|
:: have for them. used for things we're %trak-ing
|
|
|
|
:: our invariant here is to store the latest version
|
|
|
|
:: number we've heard of.
|
|
|
|
$: mox=(map [ship desk] let=@ud)
|
|
|
|
:: relevant parts of originating request
|
|
|
|
kf=kiln-fuse-data
|
|
|
|
==
|
2020-06-17 09:36:09 +03:00
|
|
|
+$ kiln-commit term ::
|
|
|
|
+$ kiln-mount ::
|
|
|
|
$: pax=path ::
|
|
|
|
pot=term ::
|
|
|
|
==
|
|
|
|
+$ kiln-unmount $@(term [knot path]) ::
|
|
|
|
+$ kiln-sync ::
|
2021-08-03 00:52:46 +03:00
|
|
|
$: syd=desk :: local desk
|
|
|
|
her=ship :: foreign ship
|
|
|
|
sud=desk :: foreign desk
|
2020-06-17 09:36:09 +03:00
|
|
|
==
|
|
|
|
+$ kiln-unsync ::
|
2021-08-03 00:52:46 +03:00
|
|
|
$: syd=desk :: local desk
|
|
|
|
her=ship :: foreign ship
|
|
|
|
sud=desk :: foreign desk
|
2020-06-17 09:36:09 +03:00
|
|
|
==
|
|
|
|
+$ kiln-merge ::
|
2020-08-28 10:24:25 +03:00
|
|
|
$@ ~
|
2020-06-17 09:36:09 +03:00
|
|
|
$: syd=desk ::
|
|
|
|
ali=ship ::
|
|
|
|
sud=desk ::
|
|
|
|
cas=case ::
|
2020-08-28 10:24:25 +03:00
|
|
|
gim=?(%auto germ) ::
|
2020-06-17 09:36:09 +03:00
|
|
|
==
|
2021-05-24 01:43:41 +03:00
|
|
|
+$ fuse-source [who=ship des=desk ver=$@(%trak case)]
|
|
|
|
:: actual poke
|
2021-04-20 06:46:46 +03:00
|
|
|
+$ kiln-fuse
|
2021-05-02 06:04:19 +03:00
|
|
|
$@ ~
|
2021-04-20 06:46:46 +03:00
|
|
|
$: syd=desk
|
2021-05-24 01:43:41 +03:00
|
|
|
$@ ~ :: signifies clearing the fuse
|
|
|
|
$: overwrite=flag :: force overwrite previous fuse
|
|
|
|
bas=fuse-source
|
|
|
|
con=(list [fuse-source germ])
|
|
|
|
==
|
2021-04-20 06:46:46 +03:00
|
|
|
==
|
2021-05-24 01:43:41 +03:00
|
|
|
:: state tracked by kiln
|
|
|
|
+$ kiln-fuse-data
|
|
|
|
$: syd=desk
|
|
|
|
bas=fuse-source
|
|
|
|
con=(list [fuse-source germ])
|
2021-08-03 00:52:46 +03:00
|
|
|
==
|
2021-06-06 19:43:26 +03:00
|
|
|
:: Request to list current fuses. ~ means "list all"
|
|
|
|
::
|
|
|
|
+$ kiln-fuse-list (unit desk)
|
2020-06-17 09:36:09 +03:00
|
|
|
--
|
2021-08-18 01:16:48 +03:00
|
|
|
|= [bowl:gall state]
|
2015-09-02 01:20:17 +03:00
|
|
|
?> =(src our)
|
2021-07-09 02:25:18 +03:00
|
|
|
=| moz=(list card:agent:gall)
|
|
|
|
|%
|
|
|
|
++ kiln .
|
2015-12-09 04:54:26 +03:00
|
|
|
++ abet :: resolve
|
2020-06-17 09:36:09 +03:00
|
|
|
[(flop moz) `state`+<+.$]
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2019-11-14 21:39:50 +03:00
|
|
|
++ emit
|
2019-11-19 07:36:21 +03:00
|
|
|
|= card:agent:gall
|
2019-11-14 21:39:50 +03:00
|
|
|
%_(+> moz [+< moz])
|
|
|
|
::
|
|
|
|
++ emil :: return cards
|
2019-11-19 07:36:21 +03:00
|
|
|
|= (list card:agent:gall)
|
2015-09-02 01:20:17 +03:00
|
|
|
^+ +>
|
|
|
|
?~(+< +> $(+< t.+<, +> (emit i.+<)))
|
2021-09-26 08:07:23 +03:00
|
|
|
:: +fmt: format string for slogging
|
|
|
|
::
|
|
|
|
++ fmt
|
|
|
|
|= mes=tape
|
|
|
|
[%0 %leaf (weld "kiln: " mes)]
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
|
|
|
++ render
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [mez=tape sud=desk who=ship syd=desk]
|
2020-05-20 11:36:16 +03:00
|
|
|
:^ %palm [" " ~ ~ ~] leaf+(weld "kiln: " mez)
|
2015-12-21 00:16:39 +03:00
|
|
|
~[leaf+"from {<sud>}" leaf+"on {<who>}" leaf+"to {<syd>}"]
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2021-07-16 05:25:03 +03:00
|
|
|
++ on-init
|
|
|
|
=< abet
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "boot")
|
2021-09-26 07:20:37 +03:00
|
|
|
::
|
|
|
|
=+ .^(desks=(set desk) %cd /(scot %p our)//(scot %da now))
|
2021-09-16 00:46:56 +03:00
|
|
|
=. desks (~(del in desks) %base)
|
|
|
|
=. desks (~(del in desks) %kids)
|
2021-09-26 07:20:37 +03:00
|
|
|
::
|
|
|
|
=/ sop=ship (sein:title our now our)
|
2021-09-16 00:46:56 +03:00
|
|
|
:: set up base desk
|
|
|
|
::
|
2021-09-26 07:20:37 +03:00
|
|
|
=. ..on-init abet:(install-local:vats %base)
|
|
|
|
=? ..on-init ?=(?(%earl %duke %king) (clan:title our))
|
|
|
|
abet:(install:vats %base sop %kids)
|
2021-09-27 21:50:58 +03:00
|
|
|
::
|
|
|
|
:: watch for gall reloading
|
|
|
|
=. ..on-init abet:gall-lyv:vats
|
2021-09-28 15:22:37 +03:00
|
|
|
:: install other desks and make them public
|
2021-09-16 00:46:56 +03:00
|
|
|
::
|
|
|
|
=/ dez=(list desk) ~(tap in desks)
|
2021-09-26 07:20:37 +03:00
|
|
|
|- ^+ ..on-init
|
2021-09-16 00:46:56 +03:00
|
|
|
?~ dez ..on-init
|
|
|
|
=. ..on-init
|
2021-09-16 19:25:02 +03:00
|
|
|
abet:(install-local:vats i.dez)
|
2021-09-28 15:22:37 +03:00
|
|
|
=. ..on-init
|
|
|
|
%- emit
|
|
|
|
:^ %pass /kiln/permission %arvo
|
|
|
|
[%c %perm i.dez / %r `[%black ~]]
|
2021-09-16 00:46:56 +03:00
|
|
|
=? ..on-init !=(sop our)
|
|
|
|
abet:(install:vats i.dez sop i.dez)
|
|
|
|
$(dez t.dez)
|
2021-07-16 05:25:03 +03:00
|
|
|
::
|
2020-06-10 02:21:30 +03:00
|
|
|
++ on-load
|
2021-08-11 19:23:36 +03:00
|
|
|
=> |%
|
|
|
|
+$ ota [syd=desk her=ship sud=desk]
|
|
|
|
--
|
|
|
|
=| old-ota=(unit ota)
|
2020-07-18 02:58:28 +03:00
|
|
|
|= [hood-version=@ud old=any-state]
|
2021-09-22 23:34:20 +03:00
|
|
|
=/ old-version -.old
|
|
|
|
=* state +<+.$.abet
|
|
|
|
::
|
2021-08-11 19:23:36 +03:00
|
|
|
=? old-ota ?=(%0 -.old)
|
|
|
|
=/ syncs=(list [ota =aeon]) ~(tap by syn.old)
|
|
|
|
|- ^- (unit ota)
|
|
|
|
?~ syncs
|
|
|
|
~
|
|
|
|
?: &(=([%base %kids] [syd sud]:i.syncs) !=(our her.i.syncs))
|
|
|
|
`[syd her sud]:i.syncs
|
|
|
|
$(syncs t.syncs)
|
|
|
|
::
|
|
|
|
=? old ?=(%0 -.old)
|
|
|
|
=? syn.old ?=(^ old-ota) (~(del by syn.old) u.old-ota)
|
|
|
|
[%3 [rem syn ark=~ commit-timer fus=~ hxs=~]:old]
|
2020-06-10 02:21:30 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
=? old ?=(%1 -.old)
|
|
|
|
:* %2
|
|
|
|
rem.old
|
|
|
|
syn.old
|
|
|
|
ota.old
|
2021-07-16 05:25:03 +03:00
|
|
|
commit-timer.old
|
2021-08-11 19:23:36 +03:00
|
|
|
fus=~
|
|
|
|
hxs=~
|
2021-07-16 05:25:03 +03:00
|
|
|
==
|
2021-08-11 19:23:36 +03:00
|
|
|
::
|
|
|
|
=? old-ota ?=(%2 -.old)
|
|
|
|
?~ ota.old ~
|
|
|
|
`[%base ship desk]:u.ota.old
|
2020-06-10 02:21:30 +03:00
|
|
|
::
|
2021-07-16 05:25:03 +03:00
|
|
|
=? old ?=(%2 -.old)
|
|
|
|
:* %3
|
|
|
|
rem.old
|
|
|
|
syn.old
|
2021-07-01 04:03:47 +03:00
|
|
|
ark=~
|
|
|
|
commit-timer.old
|
2021-08-11 19:23:36 +03:00
|
|
|
fus.old
|
|
|
|
hxs.old
|
2021-07-01 04:03:47 +03:00
|
|
|
==
|
|
|
|
::
|
2021-09-06 17:27:17 +03:00
|
|
|
=? old ?=(%3 -.old)
|
|
|
|
:- %4
|
|
|
|
+.old(ark (~(run by ark.old) |=(a=arak-3 a(rein [liv=& rein.a]))))
|
|
|
|
::
|
|
|
|
=? old ?=(%4 -.old)
|
|
|
|
:- %5
|
|
|
|
=- +.old(ark -)
|
|
|
|
%- ~(run by ark.old)
|
|
|
|
|= a=arak-4
|
2021-09-16 19:25:02 +03:00
|
|
|
^- arak-6
|
2021-09-06 17:27:17 +03:00
|
|
|
[[paused=| ship desk aeon] next rein]:a
|
2021-09-16 19:25:02 +03:00
|
|
|
::
|
2021-09-07 07:37:36 +03:00
|
|
|
=? old ?=(%5 -.old)
|
|
|
|
[%6 ~ +.old]
|
2021-09-06 17:27:17 +03:00
|
|
|
::
|
2021-09-16 19:25:02 +03:00
|
|
|
=? old ?=(%6 -.old)
|
|
|
|
:- %7
|
|
|
|
=- +.old(ark -)
|
|
|
|
%- ~(run by ark.old)
|
|
|
|
|= a=arak-6
|
|
|
|
^- arak
|
|
|
|
:_ rein.a
|
|
|
|
^- (unit rail)
|
|
|
|
`[paused.rail ship.rail desk.rail aeon.rail next]:a
|
|
|
|
::
|
|
|
|
?> ?=(%7 -.old)
|
2021-09-22 23:34:20 +03:00
|
|
|
=. state old
|
|
|
|
::
|
2021-09-24 01:07:13 +03:00
|
|
|
=? kiln (lth old-version %7)
|
|
|
|
abet:(install:vats %base our %base)
|
2021-09-07 07:37:36 +03:00
|
|
|
=? kiln ?=(^ old-ota)
|
|
|
|
abet:(install:vats %base [her sud]:u.old-ota)
|
2021-09-27 21:50:58 +03:00
|
|
|
=? kiln (lth old-version %7)
|
|
|
|
abet:gall-lyv:vats
|
|
|
|
=? kiln ?=(^ wef)
|
|
|
|
:: $% is a hack to workaround an initialization bug
|
2021-09-27 14:05:57 +03:00
|
|
|
=/ except=(set desk) (sy %base %kids ~)
|
2021-09-27 21:50:58 +03:00
|
|
|
(bump:vats u.wef except force=%.n)
|
2021-09-07 07:37:36 +03:00
|
|
|
=. wef ~
|
2021-09-22 23:34:20 +03:00
|
|
|
abet:kiln
|
2020-06-10 02:21:30 +03:00
|
|
|
::
|
2020-07-01 02:10:12 +03:00
|
|
|
++ on-peek
|
|
|
|
|= =path
|
|
|
|
^- (unit (unit cage))
|
2020-12-04 11:37:28 +03:00
|
|
|
?+ path [~ ~]
|
2021-08-24 07:09:12 +03:00
|
|
|
[%x %kiln %lag ~] ``loob+!>(.^(? //(scot %p our)//(scot %da now)/zen/lag))
|
|
|
|
::
|
2021-08-23 04:44:24 +03:00
|
|
|
[%x %kiln %vat @ ~]
|
|
|
|
=* loc i.t.t.t.path
|
|
|
|
=/ ego (scot %p our)
|
|
|
|
=/ wen (scot %da now)
|
|
|
|
=/ rak=(unit arak) (~(get by ark) loc)
|
|
|
|
?~ rak [~ ~]
|
|
|
|
=/ hog .^(@uv cz+~[ego loc wen])
|
|
|
|
=/ cas .^(cass cw+~[ego loc wen])
|
2021-07-20 18:00:07 +03:00
|
|
|
:^ ~ ~ %noun
|
2021-08-23 04:44:24 +03:00
|
|
|
!> ^- vat
|
|
|
|
[loc hog cas u.rak]
|
2021-08-24 07:09:12 +03:00
|
|
|
::
|
2021-08-23 04:44:24 +03:00
|
|
|
[%x %kiln %vats ~]
|
|
|
|
:^ ~ ~ %kiln-vats
|
|
|
|
!> ^- (list vat)
|
2021-07-20 18:00:07 +03:00
|
|
|
=/ ego (scot %p our)
|
|
|
|
=/ wen (scot %da now)
|
|
|
|
%+ turn ~(tap by ark)
|
|
|
|
|= [loc=desk rak=arak]
|
|
|
|
=/ hog .^(@uv cz+~[ego loc wen])
|
|
|
|
=/ cas .^(cass cw+~[ego loc wen])
|
|
|
|
[loc hog cas rak]
|
|
|
|
::
|
2021-07-15 09:51:03 +03:00
|
|
|
[%x %kiln %ark ~] ``noun+!>(ark)
|
2020-12-04 11:37:28 +03:00
|
|
|
[%x %kiln %our ~] ``noun+!>(our)
|
|
|
|
[%x %kiln %base-hash ~]
|
2021-07-23 14:07:58 +03:00
|
|
|
=/ ver (mergebase-hashes our %base now (~(got by ark) %base))
|
2020-12-04 11:37:28 +03:00
|
|
|
``noun+!>(?~(ver 0v0 i.ver))
|
2020-12-02 09:27:52 +03:00
|
|
|
==
|
2020-07-01 02:10:12 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ vats
|
|
|
|
|_ [loc=desk rak=arak]
|
2021-09-16 19:25:02 +03:00
|
|
|
++ ral (need rail.rak)
|
2021-07-09 02:25:18 +03:00
|
|
|
++ vats .
|
2021-09-27 14:05:57 +03:00
|
|
|
++ abet
|
|
|
|
~| [%uninitialized-desk loc]
|
|
|
|
?< =(%$ loc)
|
|
|
|
kiln(ark (~(put by ark) loc rak))
|
2021-07-01 04:03:47 +03:00
|
|
|
++ abed
|
|
|
|
|= lac=desk
|
|
|
|
~_ leaf/"kiln: {<lac>} not installed"
|
2021-07-09 02:25:18 +03:00
|
|
|
vats(loc lac, rak (~(got by ark) lac))
|
2021-07-01 04:03:47 +03:00
|
|
|
::
|
2021-09-26 08:07:23 +03:00
|
|
|
++ here ?~ rail.rak "{<loc>} (local)"
|
2021-09-21 20:05:41 +03:00
|
|
|
"{<loc>} from {<[ship desk]:ral>}"
|
2021-07-01 04:03:47 +03:00
|
|
|
++ make-wire |=(step=@tas /kiln/vats/[loc]/[step])
|
|
|
|
++ from-wire
|
|
|
|
|= =wire
|
2021-07-16 19:01:55 +03:00
|
|
|
~| wire
|
|
|
|
?> ?=([@ @ *] wire)
|
|
|
|
(abed i.wire)
|
2021-07-07 21:11:40 +03:00
|
|
|
::
|
2021-07-09 02:25:18 +03:00
|
|
|
++ emit |=(card:agent:gall vats(kiln (^emit +<)))
|
|
|
|
++ emil |=((list card:agent:gall) vats(kiln (^emil +<)))
|
2021-08-03 00:52:46 +03:00
|
|
|
++ give
|
|
|
|
|%
|
2021-09-28 05:50:32 +03:00
|
|
|
++ snap [%give %fact ~[/kiln/vats] %kiln-vats-snap-0 !>(ark)]
|
|
|
|
++ diff |=(d=^diff [%give %fact ~[/kiln/vats] %kiln-vats-diff-0 !>(d)])
|
2021-08-03 00:52:46 +03:00
|
|
|
--
|
2021-07-07 21:11:40 +03:00
|
|
|
++ pass
|
|
|
|
|%
|
2021-08-27 18:06:53 +03:00
|
|
|
++ pyre |=(=tang [%pass /kiln/vats %pyre tang])
|
2021-07-07 21:11:40 +03:00
|
|
|
++ find (warp %find [%sing %y ud+1 /])
|
2021-07-19 14:02:02 +03:00
|
|
|
++ sync-da (warp %sync [%sing %w da+now /])
|
2021-09-16 19:25:02 +03:00
|
|
|
++ sync-ud (warp %sync [%sing %w ud+aeon:ral /])
|
|
|
|
++ download (warp %download [%sing %v ud+aeon:ral /])
|
2021-09-27 21:50:58 +03:00
|
|
|
++ gall-lyv
|
|
|
|
=/ paths=(set [care:clay path])
|
|
|
|
%- sy
|
|
|
|
:~ [%z /sys/hoon/hoon]
|
|
|
|
[%z /sys/arvo/hoon]
|
|
|
|
[%z /sys/lull/hoon]
|
|
|
|
[%z /sys/zuse/hoon]
|
|
|
|
[%z /sys/vane/gall/hoon]
|
|
|
|
==
|
|
|
|
%+ clay-card %gall-lyv
|
|
|
|
[%warp our %base ~ %mult da+now paths]
|
|
|
|
::
|
2021-09-06 17:27:17 +03:00
|
|
|
++ warp
|
|
|
|
|= [s=term r=rave]
|
2021-09-16 19:25:02 +03:00
|
|
|
(clay-card s %warp ship:ral desk:ral `r)
|
2021-07-09 18:56:52 +03:00
|
|
|
++ merge-main
|
2021-07-07 21:11:40 +03:00
|
|
|
=/ germ (get-germ loc)
|
2021-09-16 19:25:02 +03:00
|
|
|
=/ =aeon (dec aeon:ral)
|
2021-09-06 17:27:17 +03:00
|
|
|
%+ clay-card %merge-main
|
2021-09-16 19:25:02 +03:00
|
|
|
[%merg loc ship:ral desk:ral ud+aeon germ]
|
2021-07-09 18:56:52 +03:00
|
|
|
++ merge-kids
|
|
|
|
=/ germ (get-germ %kids)
|
2021-09-16 19:25:02 +03:00
|
|
|
=/ =aeon (dec aeon:ral)
|
2021-09-06 17:27:17 +03:00
|
|
|
%+ clay-card %merge-kids
|
2021-09-16 19:25:02 +03:00
|
|
|
[%merg %kids ship:ral desk:ral ud+aeon germ]
|
2021-09-15 22:57:08 +03:00
|
|
|
++ listen
|
|
|
|
(clay-card %listen %warp our loc `[%next %z da+now /])
|
2021-07-07 21:11:40 +03:00
|
|
|
++ clay-card
|
|
|
|
|= [step=@tas =task:clay]
|
|
|
|
^- card:agent:gall
|
|
|
|
[%pass (make-wire step) %arvo %c task]
|
2021-07-19 16:58:18 +03:00
|
|
|
++ start-dude
|
|
|
|
|= =dude
|
2021-09-27 00:03:26 +03:00
|
|
|
^- card:agent:gall
|
|
|
|
[%pass /kiln/vats/[loc]/jolt/[dude] %arvo %g %jolt loc dude]
|
2021-07-19 16:58:18 +03:00
|
|
|
++ stop-dude
|
|
|
|
|= =dude
|
2021-09-27 00:03:26 +03:00
|
|
|
^- card:agent:gall
|
|
|
|
[%pass /kiln/vats/[loc]/uninstall %arvo %g %idle dude]
|
2021-07-07 21:11:40 +03:00
|
|
|
--
|
2021-07-03 00:41:21 +03:00
|
|
|
:: +uninstall: stop tracking apps on desk, and suspend apps
|
2021-07-01 04:03:47 +03:00
|
|
|
::
|
2021-07-03 00:41:21 +03:00
|
|
|
++ uninstall
|
2021-07-01 04:03:47 +03:00
|
|
|
|= lac=desk
|
2021-07-09 02:25:18 +03:00
|
|
|
^+ kiln
|
2021-08-03 00:52:46 +03:00
|
|
|
?: =(%base lac)
|
2021-08-27 17:38:30 +03:00
|
|
|
=- (^emit (pyre:pass leaf/- ~))
|
|
|
|
"kiln: |uninstall: %base cannot be uninstalled"
|
2021-07-18 21:21:54 +03:00
|
|
|
?. (~(has by ark) lac)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "|uninstall: {<lac>} not installed, ignoring")
|
2021-07-18 21:21:54 +03:00
|
|
|
kiln
|
2021-07-09 02:25:18 +03:00
|
|
|
=. vats (abed lac)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "uninstalling {here}")
|
2021-08-20 01:57:31 +03:00
|
|
|
=. vats stop-agents
|
2021-07-09 02:25:18 +03:00
|
|
|
kiln(ark (~(del by ark) lac))
|
2021-07-03 00:41:21 +03:00
|
|
|
:: +install: set up desk sync to .lac to install all apps from [her rem]
|
2021-07-01 04:03:47 +03:00
|
|
|
::
|
|
|
|
++ install
|
|
|
|
|= [lac=desk her=ship rem=desk]
|
2021-07-09 02:25:18 +03:00
|
|
|
^+ vats
|
2021-09-27 14:05:57 +03:00
|
|
|
=. loc lac
|
2021-09-16 19:25:02 +03:00
|
|
|
?: =([her rem] [our lac])
|
|
|
|
(install-local lac)
|
2021-07-02 02:10:03 +03:00
|
|
|
=/ got (~(get by ark) lac)
|
|
|
|
?: =(`[her rem] got)
|
2021-09-27 14:05:57 +03:00
|
|
|
=. rak (need got)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "already tracking {here:(abed lac)}, ignoring")
|
2021-07-09 02:25:18 +03:00
|
|
|
vats
|
2021-09-27 14:05:57 +03:00
|
|
|
=. rak [`[paused=| her rem *aeon next=~] rein:(fall got *arak)]
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "beginning install into {here}")
|
2021-09-16 19:25:02 +03:00
|
|
|
(emil find:pass listen:pass ~)
|
|
|
|
:: +install-local: install from a local desk, with no remote
|
|
|
|
::
|
|
|
|
++ install-local
|
|
|
|
|= lac=desk
|
|
|
|
^+ vats
|
2021-09-27 14:05:57 +03:00
|
|
|
=. loc lac
|
2021-09-27 00:03:26 +03:00
|
|
|
?: (~(has by ark) lac)
|
2021-09-27 14:05:57 +03:00
|
|
|
=. rak (~(got by ark) lac)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "already tracking {here:(abed lac)}, ignoring")
|
2021-09-16 19:25:02 +03:00
|
|
|
vats
|
2021-09-27 14:05:57 +03:00
|
|
|
=. rak [~ *rein]
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "local install {here}")
|
2021-09-27 00:03:26 +03:00
|
|
|
=. vats update-running-dudes
|
2021-09-16 19:25:02 +03:00
|
|
|
=. vats (emit listen:pass)
|
2021-09-25 17:26:04 +03:00
|
|
|
::NOTE for foreign desks, the download triggers a "real" commit, because
|
|
|
|
:: we actually download the data. for local desks we do not download
|
|
|
|
:: any data, it's already there, so we emit a commit "manually".
|
|
|
|
=. vats (emit (diff:give %commit lac rak))
|
2021-09-16 19:25:02 +03:00
|
|
|
vats
|
2021-07-03 00:41:21 +03:00
|
|
|
:: +reset: resync after failure
|
|
|
|
::
|
2021-09-16 19:25:02 +03:00
|
|
|
:: TODO: instead of jumping all the way back to find:pass,
|
|
|
|
:: which will end up skipping all the way until the latest
|
|
|
|
:: remote commit, increment the aeon so we skip only the problematic
|
|
|
|
:: commit and try the commit immediately after it.
|
|
|
|
::
|
2021-07-03 00:41:21 +03:00
|
|
|
++ reset
|
2021-07-09 02:25:18 +03:00
|
|
|
^+ vats
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "resetting tracking for {here}")
|
2021-09-13 11:24:03 +03:00
|
|
|
=/ cad (diff:give %reset loc rak)
|
2021-09-16 19:25:02 +03:00
|
|
|
=/ rel ral
|
|
|
|
=. rail.rak `rel(aeon 0, next ~)
|
2021-09-13 11:24:03 +03:00
|
|
|
(emil find:pass cad ~)
|
2021-09-06 17:27:17 +03:00
|
|
|
:: +pause: stop syncing from upstream
|
|
|
|
::
|
|
|
|
++ pause
|
|
|
|
|= lac=desk
|
|
|
|
^+ vats
|
2021-09-22 06:20:05 +03:00
|
|
|
=. vats (abed lac)
|
2021-09-16 19:25:02 +03:00
|
|
|
?. is-tracking
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "{<lac>} already paused, ignoring")
|
2021-09-16 19:25:02 +03:00
|
|
|
vats
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "{<lac>} pausing updates")
|
2021-09-16 19:25:02 +03:00
|
|
|
=/ rel ral
|
|
|
|
=. rail.rak `rel(paused &, aeon 0)
|
|
|
|
vats
|
2021-09-27 21:50:58 +03:00
|
|
|
::
|
|
|
|
:: +gall-lyv: watch gall source for reloading
|
|
|
|
++ gall-lyv
|
|
|
|
=. vats (abed %base)
|
|
|
|
(emit gall-lyv:pass)
|
2021-09-16 19:25:02 +03:00
|
|
|
:: +remove-upstream: stop listening to an upstream for changes
|
|
|
|
::
|
|
|
|
++ remove-upstream
|
|
|
|
|= lac=desk
|
|
|
|
^+ vats
|
|
|
|
=. vats (abed lac)
|
|
|
|
=. rail.rak ~
|
2021-09-06 17:27:17 +03:00
|
|
|
vats
|
|
|
|
:: +resume: restart tracking from upstream
|
|
|
|
::
|
2021-09-09 21:31:44 +03:00
|
|
|
:: TODO: check whether kelvin is legit
|
|
|
|
::
|
2021-09-06 17:27:17 +03:00
|
|
|
++ resume
|
|
|
|
|= lac=desk
|
|
|
|
^+ vats
|
|
|
|
=. vats (abed lac)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog. %- fmt
|
2021-09-16 19:25:02 +03:00
|
|
|
?. paused:ral
|
2021-09-26 08:07:23 +03:00
|
|
|
"{<lac>} already tracking, ignoring"
|
|
|
|
"{<lac>} resuming updates"
|
2021-09-21 05:49:04 +03:00
|
|
|
=/ rel ral
|
|
|
|
=. rail.rak `rel(paused |)
|
2021-09-06 17:27:17 +03:00
|
|
|
reset
|
2021-08-20 01:57:31 +03:00
|
|
|
:: +suspend: shut down all agents, keep syncing
|
|
|
|
::
|
|
|
|
++ suspend
|
|
|
|
|= lac=desk
|
|
|
|
^+ vats
|
|
|
|
=/ got (~(get by ark) lac)
|
|
|
|
?: =(%base lac)
|
2021-08-27 17:38:30 +03:00
|
|
|
=- (emit (pyre:pass leaf/- ~))
|
|
|
|
"kiln: suspend: %base cannot be suspended"
|
2021-08-20 01:57:31 +03:00
|
|
|
?. (~(has by ark) lac)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "suspend: {<lac>} not installed, ignoring")
|
2021-08-20 01:57:31 +03:00
|
|
|
vats
|
|
|
|
=. vats (abed lac)
|
|
|
|
=. liv.rein.rak |
|
|
|
|
=. vats stop-agents
|
|
|
|
(emit (diff:give %suspend loc rak))
|
|
|
|
:: +revive: restart agents on a suspended desk
|
|
|
|
::
|
|
|
|
++ revive
|
|
|
|
|= lac=desk
|
|
|
|
^+ vats
|
|
|
|
=. vats (abed lac)
|
|
|
|
=. liv.rein.rak &
|
2021-09-27 00:03:26 +03:00
|
|
|
=. vats update-running-dudes
|
2021-08-20 01:57:31 +03:00
|
|
|
(emit (diff:give %revive loc rak))
|
2021-08-20 10:41:16 +03:00
|
|
|
:: +set-rein: adjust which agents are forced on or off
|
|
|
|
::
|
|
|
|
++ set-rein
|
|
|
|
|= [lac=desk new=rein]
|
|
|
|
^+ vats
|
|
|
|
=. vats (abed lac)
|
|
|
|
=^ old rein.rak [rein.rak new]
|
|
|
|
?+ [liv.old liv.new] !!
|
|
|
|
[%| %|] vats
|
|
|
|
[%| %&] (revive lac)
|
|
|
|
[%& %|] (suspend lac)
|
2021-09-27 00:03:26 +03:00
|
|
|
[%& %&] update-running-dudes
|
2021-08-20 10:41:16 +03:00
|
|
|
==
|
2021-09-01 03:00:40 +03:00
|
|
|
:: +bump: try to apply kernel kelvin upgrade
|
2021-07-03 00:41:21 +03:00
|
|
|
::
|
2021-09-01 02:43:25 +03:00
|
|
|
:: Apply merges to revive faded agents on all desks.
|
|
|
|
:: If .force, suspends stale agents. Else, any stale desk
|
|
|
|
:: will cause a crash.
|
2021-07-03 00:41:21 +03:00
|
|
|
::
|
|
|
|
++ bump
|
2021-09-01 03:00:40 +03:00
|
|
|
|= [kel=weft except=(set desk) force=?]
|
2021-07-09 02:25:18 +03:00
|
|
|
^+ kiln
|
2021-09-01 03:00:40 +03:00
|
|
|
=/ ded (find-blocked kel except)
|
2021-09-01 02:43:25 +03:00
|
|
|
?: force
|
|
|
|
=. kiln (suspend-many ded)
|
2021-09-07 07:37:36 +03:00
|
|
|
(bump-many kel (all-desks-but (~(uni in except) ded)))
|
2021-08-27 17:38:30 +03:00
|
|
|
?: =(~ ded)
|
2021-09-01 03:00:40 +03:00
|
|
|
(bump-many kel (all-desks-but except))
|
2021-08-27 17:38:30 +03:00
|
|
|
=- (^emit (pyre:pass leaf/- ~))
|
|
|
|
"kiln: desks blocked upgrade to {<zuse/zuse>}: {<ded>}"
|
2021-09-01 02:43:25 +03:00
|
|
|
::
|
|
|
|
++ all-desks-but |=(not=(set desk) (~(dif in ~(key by ark)) not))
|
|
|
|
::
|
|
|
|
++ find-blocked
|
2021-09-01 03:00:40 +03:00
|
|
|
|= [kel=weft except=(set desk)]
|
2021-09-01 02:43:25 +03:00
|
|
|
^- (set desk)
|
2021-09-01 03:00:40 +03:00
|
|
|
(~(dif in (get-blockers kel)) (~(put in except) %base))
|
2021-09-01 02:43:25 +03:00
|
|
|
::
|
|
|
|
++ suspend-many
|
|
|
|
|= dead=(set desk)
|
|
|
|
^+ kiln
|
|
|
|
=/ ded ~(tap in dead)
|
|
|
|
|- ^+ kiln
|
|
|
|
?~ ded kiln
|
|
|
|
$(ded t.ded, kiln abet:(suspend i.ded))
|
|
|
|
::
|
|
|
|
++ bump-many
|
|
|
|
|= [kel=weft live=(set desk)]
|
|
|
|
^+ kiln
|
2021-09-09 21:31:44 +03:00
|
|
|
:: ensure %base is always reloaded first
|
2021-09-09 21:32:29 +03:00
|
|
|
::
|
2021-09-09 21:31:44 +03:00
|
|
|
=/ liv
|
|
|
|
%+ sort ~(tap in live)
|
|
|
|
|= [a=desk b=desk]
|
|
|
|
^- ?
|
|
|
|
?: =(%base a) &
|
|
|
|
?: =(%base b) |
|
|
|
|
(lte `@`a `@`b)
|
|
|
|
::
|
2021-09-01 02:43:25 +03:00
|
|
|
|- ^+ kiln
|
|
|
|
?~ liv kiln
|
|
|
|
$(liv t.liv, kiln (bump-one kel i.liv))
|
|
|
|
::
|
|
|
|
++ bump-one
|
|
|
|
|= [kel=weft =desk]
|
|
|
|
^+ kiln
|
2021-09-26 22:32:27 +03:00
|
|
|
~> %slog.(fmt "bump {<desk>} to {<[lal num]:kel>}")
|
2021-09-01 02:43:25 +03:00
|
|
|
=< abet ^+ vats
|
|
|
|
=. vats (abed desk)
|
|
|
|
?: =([~ kel] (read-kelvin-local our desk now))
|
2021-09-26 22:32:27 +03:00
|
|
|
~> %slog.(fmt "{here} already at {<[lal num]:kel>}")
|
2021-09-27 00:03:26 +03:00
|
|
|
update-running-dudes
|
2021-09-16 19:25:02 +03:00
|
|
|
=^ tem rail.rak (crank-next %| kel)
|
2021-09-01 02:43:25 +03:00
|
|
|
?^ tem
|
2021-08-27 17:38:30 +03:00
|
|
|
(emit merge-main:pass)
|
2021-09-01 02:43:25 +03:00
|
|
|
=- (emit (pyre:pass leaf/- ~))
|
2021-09-26 22:32:27 +03:00
|
|
|
"kiln: {here} killed upgrade to {<[lal num]:kel>}"
|
2021-08-20 01:57:31 +03:00
|
|
|
:: +stop-agents: internal helper to suspend agents on .loc
|
|
|
|
::
|
|
|
|
:: Will not shut down %hood or %dojo.
|
|
|
|
::
|
|
|
|
++ stop-agents
|
|
|
|
^+ vats
|
|
|
|
=/ ded (get-apps-live our loc now)
|
|
|
|
=. ded (skip ded |=(d=dude ?=(?(%hood %dojo) d)))
|
|
|
|
(stop-dudes ded)
|
2021-07-01 04:03:47 +03:00
|
|
|
::
|
|
|
|
++ take
|
|
|
|
|= [=wire syn=sign-arvo]
|
2021-07-20 18:00:07 +03:00
|
|
|
^+ kiln
|
2021-07-16 19:01:55 +03:00
|
|
|
?> ?=([@ @ *] wire)
|
|
|
|
?: ?=(%jolt i.t.wire)
|
|
|
|
(take-onto wire syn)
|
2021-09-27 00:03:26 +03:00
|
|
|
?: ?=(%listen i.t.wire)
|
2021-09-28 02:34:15 +03:00
|
|
|
(take-listen wire syn)
|
2021-07-20 18:00:07 +03:00
|
|
|
=< abet
|
2021-07-09 02:25:18 +03:00
|
|
|
=. vats (from-wire wire)
|
2021-07-16 19:01:55 +03:00
|
|
|
?+ i.t.wire
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "vats-bad-take {<wire>}")
|
2021-07-09 02:25:18 +03:00
|
|
|
vats
|
2021-07-09 18:56:52 +03:00
|
|
|
%find (take-find syn)
|
|
|
|
%sync (take-sync syn)
|
|
|
|
%download (take-download syn)
|
|
|
|
%merge-main (take-merge-main syn)
|
|
|
|
%merge-kids (take-merge-kids syn)
|
2021-09-27 21:50:58 +03:00
|
|
|
%gall-lyv (take-gall-lyv syn)
|
2021-07-01 04:03:47 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ take-find
|
|
|
|
|= syn=sign-arvo
|
2021-07-15 09:51:03 +03:00
|
|
|
^+ vats
|
2021-07-01 04:03:47 +03:00
|
|
|
?> ?=(%writ +<.syn)
|
2021-09-16 19:25:02 +03:00
|
|
|
?. is-tracking
|
2021-09-06 17:27:17 +03:00
|
|
|
vats
|
2021-07-13 17:35:15 +03:00
|
|
|
?~ p.syn
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "cancelled (1) install into {here}, aborting")
|
2021-07-13 17:35:15 +03:00
|
|
|
vats(ark (~(del by ark) loc))
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "activated install into {here}")
|
2021-07-19 14:02:02 +03:00
|
|
|
(emit sync-da:pass)
|
2021-07-01 04:03:47 +03:00
|
|
|
::
|
|
|
|
++ take-sync
|
|
|
|
|= syn=sign-arvo
|
2021-07-15 09:51:03 +03:00
|
|
|
^+ vats
|
2021-07-01 04:03:47 +03:00
|
|
|
?> ?=(%writ +<.syn)
|
2021-09-16 19:25:02 +03:00
|
|
|
=* rit u.p.syn
|
|
|
|
?. is-tracking
|
2021-09-06 17:27:17 +03:00
|
|
|
vats
|
2021-07-01 04:03:47 +03:00
|
|
|
?~ p.syn
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "cancelled (1) install into {here}, retrying")
|
2021-07-03 00:41:21 +03:00
|
|
|
reset
|
2021-09-16 19:25:02 +03:00
|
|
|
=? rail.rak ?=(%w p.p.rit) `%*(. ral aeon ud:;;(cass:clay q.q.r.rit))
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "downloading update for {here}")
|
2021-07-03 00:41:21 +03:00
|
|
|
(emit download:pass)
|
2021-07-01 04:03:47 +03:00
|
|
|
::
|
|
|
|
++ take-download
|
|
|
|
|= syn=sign-arvo
|
2021-07-15 09:51:03 +03:00
|
|
|
^+ vats
|
2021-07-01 04:03:47 +03:00
|
|
|
?> ?=(%writ +<.syn)
|
2021-09-16 19:25:02 +03:00
|
|
|
?. is-tracking
|
2021-09-06 17:27:17 +03:00
|
|
|
vats
|
2021-07-01 04:03:47 +03:00
|
|
|
?~ p.syn
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "cancelled (2) install into {here}, retrying")
|
2021-07-03 00:41:21 +03:00
|
|
|
reset
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "finished downloading update for {here}")
|
2021-09-27 21:50:58 +03:00
|
|
|
?. (get-remote-diff our loc now [ship desk aeon]:ral)
|
|
|
|
~> %slog.(fmt "remote is identical to {here}, skipping")
|
|
|
|
=. rail.rak `%*(. ral aeon +(aeon:ral))
|
2021-09-28 23:56:35 +03:00
|
|
|
=. vats update-running-dudes
|
2021-09-28 22:43:25 +03:00
|
|
|
(emil sync-ud:pass (diff:give %commit loc rak) ~)
|
2021-07-10 15:56:08 +03:00
|
|
|
=/ old-weft `weft`[%zuse zuse]
|
2021-09-27 07:08:11 +03:00
|
|
|
=/ new-weft
|
|
|
|
?: =(our ship:ral)
|
|
|
|
(need (read-kelvin-local our desk:ral now)) :: TODO error handling
|
|
|
|
(read-kelvin-foreign [ship desk aeon]:ral)
|
2021-09-28 04:47:42 +03:00
|
|
|
:: don't try to read from the local desk's bill file if
|
|
|
|
:: there are no commits to the local desk (aeon 0)
|
|
|
|
::
|
|
|
|
=/ yon =<(ud .^(cass cw+/(scot %p our)/[loc]/(scot %da now)))
|
|
|
|
=? vats &(liv.rein.rak !=(0 yon))
|
2021-09-27 00:03:26 +03:00
|
|
|
%- stop-dudes
|
|
|
|
=< idle
|
2021-09-27 23:57:38 +03:00
|
|
|
(adjust-dudes [our loc now] rein.rak)
|
2021-09-16 19:25:02 +03:00
|
|
|
=. rail.rak `%*(. ral aeon +(aeon:ral))
|
2021-09-07 21:57:55 +03:00
|
|
|
|^ ^+ vats
|
|
|
|
?: =(%base loc)
|
|
|
|
do-base
|
|
|
|
?: (gth num.new-weft num.old-weft)
|
|
|
|
kelvin-retreat
|
|
|
|
?: =(num.new-weft num.old-weft)
|
|
|
|
kelvin-same
|
|
|
|
kelvin-advance
|
2021-07-09 08:08:33 +03:00
|
|
|
::
|
2021-09-07 21:57:55 +03:00
|
|
|
++ kelvin-retreat
|
|
|
|
^+ vats
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "cannot install {here}, old kelvin {<new-weft>}")
|
|
|
|
~> %slog.(fmt "will retry at foreign kelvin {<old-weft>}")
|
2021-09-07 21:57:55 +03:00
|
|
|
=/ =diff [%block loc rak new-weft blockers=(sy %base ~)]
|
|
|
|
(emil sync-ud:pass (diff:give diff) ~)
|
|
|
|
::
|
|
|
|
++ kelvin-advance
|
|
|
|
^+ vats
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "future version {<new-weft>}, enqueueing")
|
2021-09-07 21:57:55 +03:00
|
|
|
:: retry upgrade if not blocked anymore
|
2021-09-16 19:25:02 +03:00
|
|
|
=. rail.rak `%*(. ral next (snoc next:ral [(dec aeon:ral) new-weft]))
|
2021-09-07 21:57:55 +03:00
|
|
|
=. ark (~(put by ark) loc rak)
|
|
|
|
=/ =diff [%block loc rak new-weft blockers=(sy %base ~)]
|
|
|
|
=. vats (emil sync-ud:pass (diff:give diff) ~)
|
2021-09-16 19:25:02 +03:00
|
|
|
=/ base=arak (~(got by ark) %base)
|
|
|
|
?~ rail.base
|
|
|
|
vats
|
|
|
|
=/ rel u.rail.base
|
|
|
|
?. &(?=(^ next.rel) =(~ (get-blockers weft.i.next.rel)))
|
2021-09-07 07:37:36 +03:00
|
|
|
vats
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "unblocked system update, updating")
|
2021-09-16 19:25:02 +03:00
|
|
|
=. kiln (bump-one weft.i.next.rel %base)
|
2021-09-07 21:57:55 +03:00
|
|
|
vats
|
|
|
|
::
|
|
|
|
++ kelvin-same
|
|
|
|
^+ vats
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "merging into {here}")
|
2021-09-16 19:25:02 +03:00
|
|
|
=. rail.rak +:(crank-next %& (dec aeon:ral))
|
2021-07-19 14:02:02 +03:00
|
|
|
(emil ~[merge-main sync-ud]:pass)
|
2021-07-09 08:08:33 +03:00
|
|
|
::
|
2021-09-07 21:57:55 +03:00
|
|
|
++ do-base
|
|
|
|
^+ vats
|
|
|
|
=/ blockers
|
|
|
|
?: =(new-weft old-weft)
|
|
|
|
~
|
|
|
|
(get-blockers new-weft)
|
|
|
|
::
|
|
|
|
?. =(~ blockers)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "OTA blocked on {<blockers>}")
|
2021-09-26 07:20:37 +03:00
|
|
|
=. rail.rak
|
|
|
|
`%*(. ral next (snoc next:ral [(dec aeon:ral) new-weft]))
|
2021-09-07 21:57:55 +03:00
|
|
|
=/ =diff [%block loc rak new-weft blockers]
|
|
|
|
(emil sync-ud:pass (diff:give diff) ~)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "applying OTA to {here}, kelvin: {<new-weft>}")
|
2021-09-16 19:25:02 +03:00
|
|
|
=. rail.rak +:(crank-next %& (dec aeon:ral))
|
2021-09-07 21:57:55 +03:00
|
|
|
=. wef
|
|
|
|
?: =(old-weft new-weft) ~
|
|
|
|
`new-weft
|
|
|
|
(emil ~[merge-main sync-ud]:pass)
|
|
|
|
--
|
2021-07-01 04:03:47 +03:00
|
|
|
::
|
2021-09-15 22:57:08 +03:00
|
|
|
++ take-listen
|
2021-09-27 00:03:26 +03:00
|
|
|
|= [=wire syn=sign-arvo]
|
2021-09-28 02:34:15 +03:00
|
|
|
^+ kiln
|
2021-09-15 22:57:08 +03:00
|
|
|
?> ?=([@ %writ ~ *] syn)
|
2021-09-27 00:03:26 +03:00
|
|
|
=/ lac=desk (head wire)
|
|
|
|
:: ignore spurious updates from clay on desks we've uninstalled
|
|
|
|
::
|
|
|
|
?. (~(has by ark) lac)
|
2021-09-28 02:34:15 +03:00
|
|
|
kiln
|
|
|
|
=. kiln
|
|
|
|
=< abet
|
|
|
|
=. vats (from-wire wire)
|
|
|
|
~> %slog.(fmt "commit detected at {here}")
|
|
|
|
=. vats (emil listen:pass (diff:give %commit loc rak) ~)
|
|
|
|
?. liv.rein.rak
|
|
|
|
~> %slog.(fmt "{<loc>} not running")
|
|
|
|
vats
|
|
|
|
update-running-dudes
|
|
|
|
?. =(%base lac)
|
|
|
|
kiln
|
2021-09-26 07:20:37 +03:00
|
|
|
=/ kel=[@tas @ud]
|
|
|
|
?~ rail.rak zuse/zuse
|
|
|
|
?~ next.u.rail.rak zuse/zuse
|
|
|
|
weft.i.next.u.rail.rak
|
2021-09-28 02:34:15 +03:00
|
|
|
(bump-many kel (all-desks-but (sy %base ~)))
|
2021-09-15 22:57:08 +03:00
|
|
|
::
|
2021-07-09 18:56:52 +03:00
|
|
|
++ take-merge-main
|
2021-07-01 04:03:47 +03:00
|
|
|
|= syn=sign-arvo
|
2021-07-15 09:51:03 +03:00
|
|
|
^+ vats
|
2021-07-01 04:03:47 +03:00
|
|
|
?> ?=(%mere +<.syn)
|
|
|
|
?: ?=([%| %ali-unavailable *] p.syn)
|
2021-07-07 21:11:40 +03:00
|
|
|
=+ "kiln: merge into {here} failed, maybe because sunk; restarting"
|
|
|
|
%- (slog leaf/- p.p.syn)
|
2021-08-03 00:52:46 +03:00
|
|
|
=. vats (emit (diff:give %merge-sunk loc rak p.p.syn))
|
2021-07-03 00:41:21 +03:00
|
|
|
reset
|
2021-07-01 04:03:47 +03:00
|
|
|
?: ?=(%| -.p.syn)
|
2021-07-07 21:11:40 +03:00
|
|
|
=+ "kiln: merge into {here} failed, waiting for next revision"
|
|
|
|
%- (slog leaf/- p.p.syn)
|
2021-08-03 00:52:46 +03:00
|
|
|
=. vats (emit (diff:give %merge-fail loc rak p.p.syn))
|
2021-07-09 02:25:18 +03:00
|
|
|
vats
|
2021-09-27 23:57:38 +03:00
|
|
|
~> %slog.(fmt "merge into {<loc>} succeeded")
|
2021-09-26 08:07:45 +03:00
|
|
|
?. =(%base loc)
|
|
|
|
vats
|
2021-09-27 21:50:58 +03:00
|
|
|
~> %slog.(fmt "merging %base into %kids at {<kel>}")
|
2021-09-26 07:20:37 +03:00
|
|
|
(emit merge-kids:pass)
|
2021-07-09 18:56:52 +03:00
|
|
|
::
|
|
|
|
++ take-merge-kids
|
|
|
|
|= syn=sign-arvo
|
2021-07-15 09:51:03 +03:00
|
|
|
^+ vats
|
2021-07-09 18:56:52 +03:00
|
|
|
?> ?=(%mere +<.syn)
|
|
|
|
?: ?=([%| %ali-unavailable *] p.syn)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "OTA to %kids failed, maybe peer sunk; restarting")
|
2021-08-03 00:52:46 +03:00
|
|
|
=. vats (emit (diff:give %merge-sunk %kids rak p.p.syn))
|
2021-07-09 18:56:52 +03:00
|
|
|
reset
|
2021-08-03 00:52:46 +03:00
|
|
|
?- -.p.syn
|
2021-09-26 08:07:23 +03:00
|
|
|
%& ~> %slog.(fmt "OTA to %kids succeeded")
|
2021-09-16 19:25:02 +03:00
|
|
|
(emit (diff:give %commit %kids rak))
|
2021-09-26 08:07:23 +03:00
|
|
|
%| ~> %slog.(fmt "OTA to %kids failed {<p.p.syn>}")
|
2021-08-03 00:52:46 +03:00
|
|
|
(emit (diff:give %merge-fail %kids rak p.p.syn))
|
|
|
|
==
|
2021-07-15 09:51:03 +03:00
|
|
|
::
|
2021-09-27 21:50:58 +03:00
|
|
|
++ take-gall-lyv
|
|
|
|
|= syn=sign-arvo
|
|
|
|
^+ vats
|
|
|
|
=. vats gall-lyv
|
|
|
|
=/ vets ~(tap in ~(key by ark))
|
|
|
|
|-
|
|
|
|
?~ vets vats
|
|
|
|
=. vats (abed i.vets)
|
|
|
|
=. vats update-running-dudes
|
|
|
|
$(vets t.vets)
|
|
|
|
::
|
2021-07-15 09:51:03 +03:00
|
|
|
++ take-onto
|
2021-07-16 19:01:55 +03:00
|
|
|
|= [=wire syn=sign-arvo]
|
2021-07-20 18:00:07 +03:00
|
|
|
^+ kiln
|
2021-07-16 05:25:03 +03:00
|
|
|
=/ onto ?>(?=([%gall %onto *] syn) p.syn)
|
2021-07-15 09:51:03 +03:00
|
|
|
?- -.onto
|
2021-07-20 18:00:07 +03:00
|
|
|
%& kiln
|
|
|
|
%| (mean >p.onto< p.onto)
|
2021-07-15 09:51:03 +03:00
|
|
|
==
|
2021-07-19 16:58:18 +03:00
|
|
|
::
|
2021-09-27 00:03:26 +03:00
|
|
|
++ update-running-dudes
|
2021-09-26 07:20:37 +03:00
|
|
|
^+ vats
|
2021-09-27 00:03:26 +03:00
|
|
|
=/ local [our loc now]
|
2021-09-27 23:57:38 +03:00
|
|
|
=/ dif (adjust-dudes local rein.rak)
|
2021-09-27 00:03:26 +03:00
|
|
|
=. vats (start-dudes jolt.dif)
|
|
|
|
=. vats (stop-dudes idle.dif)
|
2021-07-23 14:07:58 +03:00
|
|
|
vats
|
|
|
|
::
|
|
|
|
++ start-dudes
|
|
|
|
|= daz=(list dude)
|
2021-09-27 00:03:26 +03:00
|
|
|
(emil (turn daz start-dude:pass))
|
2021-07-23 14:07:58 +03:00
|
|
|
::
|
|
|
|
++ stop-dudes
|
|
|
|
|= daz=(list dude)
|
2021-09-27 00:03:26 +03:00
|
|
|
(emil (turn daz stop-dude:pass))
|
2021-09-16 19:25:02 +03:00
|
|
|
:: +crank-next: pop stale items from .next until one matches
|
2021-08-20 10:41:16 +03:00
|
|
|
::
|
|
|
|
++ crank-next
|
2021-09-01 02:43:25 +03:00
|
|
|
|= new=(each aeon weft)
|
2021-09-16 19:25:02 +03:00
|
|
|
^+ [match=*(unit rung) rail.rak]
|
|
|
|
?~ rail.rak !!
|
|
|
|
=/ rog next.u.rail.rak
|
|
|
|
=- [match `u.rail.rak(next next)]
|
|
|
|
|- ^- [match=(unit rung) next=(list rung)]
|
|
|
|
?~ rog [~ next.u.rail.rak]
|
2021-09-01 02:43:25 +03:00
|
|
|
?: ?- -.new
|
|
|
|
%& =(p.new aeon.i.rog)
|
|
|
|
%| =(p.new weft.i.rog)
|
|
|
|
==
|
|
|
|
[`i.rog t.rog]
|
2021-08-20 10:41:16 +03:00
|
|
|
$(rog t.rog)
|
2021-09-16 19:25:02 +03:00
|
|
|
::
|
|
|
|
++ is-tracking
|
|
|
|
^- ?
|
|
|
|
?~ rail.rak |
|
|
|
|
!paused.u.rail.rak
|
2021-07-01 04:03:47 +03:00
|
|
|
--
|
2021-07-07 22:17:03 +03:00
|
|
|
:: +get-blockers: find desks that would block a kernel update
|
2021-07-03 00:41:21 +03:00
|
|
|
::
|
2021-07-07 22:17:03 +03:00
|
|
|
++ get-blockers
|
|
|
|
|= kel=weft
|
|
|
|
^- (set desk)
|
|
|
|
%- ~(gas in *(set desk))
|
|
|
|
%+ murn ~(tap by ark)
|
|
|
|
|= [=desk =arak]
|
2021-08-20 10:41:16 +03:00
|
|
|
?: =(%base desk)
|
|
|
|
~
|
2021-08-20 01:57:31 +03:00
|
|
|
?. liv.rein.arak
|
2021-07-20 18:00:07 +03:00
|
|
|
~
|
2021-09-26 07:20:37 +03:00
|
|
|
?: =(`kel (read-kelvin-local our desk now))
|
|
|
|
~
|
2021-09-16 19:25:02 +03:00
|
|
|
?~ rail.arak
|
|
|
|
`desk
|
|
|
|
?: (lien next.u.rail.arak |=([* k=weft] =(k kel)))
|
2021-07-07 22:17:03 +03:00
|
|
|
~
|
|
|
|
`desk
|
2021-07-01 04:03:47 +03:00
|
|
|
:: +get-germ: select merge strategy into local desk
|
|
|
|
::
|
|
|
|
:: 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 %take-that.
|
|
|
|
::
|
|
|
|
++ get-germ
|
|
|
|
|= =desk
|
|
|
|
=+ .^(=cass:clay %cw /(scot %p our)/[desk]/(scot %da now))
|
|
|
|
?- ud.cass
|
|
|
|
%0 %init
|
2021-07-18 21:21:54 +03:00
|
|
|
* %take-that
|
|
|
|
::%1 %take-that
|
|
|
|
::* %mate
|
2021-07-01 04:03:47 +03:00
|
|
|
==
|
2021-07-10 15:56:08 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke
|
|
|
|
|= [=mark =vase]
|
|
|
|
?+ mark ~|([%poke-kiln-bad-mark mark] !!)
|
|
|
|
%kiln-autocommit =;(f (f !<(_+<.f vase)) poke-autocommit)
|
2021-08-03 00:52:46 +03:00
|
|
|
%kiln-bump =;(f (f !<(_+<.f vase)) poke-bump)
|
2021-07-01 04:03:47 +03:00
|
|
|
%kiln-cancel =;(f (f !<(_+<.f vase)) poke-cancel)
|
|
|
|
%kiln-cancel-autocommit =;(f (f !<(_+<.f vase)) poke-cancel-autocommit)
|
|
|
|
%kiln-commit =;(f (f !<(_+<.f vase)) poke-commit)
|
|
|
|
%kiln-fuse =;(f (f !<(_+<.f vase)) poke-fuse)
|
2021-08-11 19:23:36 +03:00
|
|
|
%kiln-fuse-list =;(f (f !<(_+<.f vase)) poke-fuse-list)
|
2021-07-01 04:03:47 +03:00
|
|
|
%kiln-gall-sear =;(f (f !<(_+<.f vase)) poke-gall-sear)
|
|
|
|
%kiln-info =;(f (f !<(_+<.f vase)) poke-info)
|
|
|
|
%kiln-install =;(f (f !<(_+<.f vase)) poke-install)
|
|
|
|
%kiln-label =;(f (f !<(_+<.f vase)) poke-label)
|
|
|
|
%kiln-merge =;(f (f !<(_+<.f vase)) poke-merge)
|
|
|
|
%kiln-mount =;(f (f !<(_+<.f vase)) poke-mount)
|
2021-07-21 12:00:11 +03:00
|
|
|
%kiln-nuke =;(f (f !<(_+<.f vase)) poke-nuke)
|
2021-09-06 17:27:17 +03:00
|
|
|
%kiln-pause =;(f (f !<(_+<.f vase)) poke-pause)
|
2021-07-01 04:03:47 +03:00
|
|
|
%kiln-permission =;(f (f !<(_+<.f vase)) poke-permission)
|
2021-09-06 17:27:17 +03:00
|
|
|
%kiln-resume =;(f (f !<(_+<.f vase)) poke-resume)
|
2021-08-20 01:57:31 +03:00
|
|
|
%kiln-revive =;(f (f !<(_+<.f vase)) poke-revive)
|
2021-08-20 10:41:16 +03:00
|
|
|
%kiln-rein =;(f (f !<(_+<.f vase)) poke-rein)
|
2021-07-01 04:03:47 +03:00
|
|
|
%kiln-rm =;(f (f !<(_+<.f vase)) poke-rm)
|
|
|
|
%kiln-schedule =;(f (f !<(_+<.f vase)) poke-schedule)
|
2021-09-06 17:27:17 +03:00
|
|
|
%kiln-suspend =;(f (f !<(_+<.f vase)) poke-suspend)
|
2021-07-01 04:03:47 +03:00
|
|
|
%kiln-sync =;(f (f !<(_+<.f vase)) poke-sync)
|
|
|
|
%kiln-syncs =;(f (f !<(_+<.f vase)) poke-syncs)
|
|
|
|
%kiln-track =;(f (f !<(_+<.f vase)) poke-track)
|
|
|
|
%kiln-uninstall =;(f (f !<(_+<.f vase)) poke-uninstall)
|
|
|
|
%kiln-unmount =;(f (f !<(_+<.f vase)) poke-unmount)
|
|
|
|
%kiln-unsync =;(f (f !<(_+<.f vase)) poke-unsync)
|
|
|
|
==
|
2016-02-26 02:19:44 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-autocommit
|
|
|
|
|= [mon=kiln-commit auto=?]
|
|
|
|
=< abet
|
|
|
|
=. +>.$ (emit %pass /commit %arvo %c [%dirk mon])
|
|
|
|
?. auto
|
|
|
|
+>.$
|
|
|
|
=/ recur ~s1
|
|
|
|
=. commit-timer
|
|
|
|
[/kiln/autocommit (add now recur) recur mon]
|
|
|
|
(emit %pass way.commit-timer %arvo %b [%wait nex.commit-timer])
|
2020-07-23 02:27:02 +03:00
|
|
|
::
|
2021-08-03 00:52:46 +03:00
|
|
|
++ poke-bump
|
2021-09-01 02:43:25 +03:00
|
|
|
|= [except=(set desk) force=?]
|
2021-09-07 07:37:36 +03:00
|
|
|
=/ =arak
|
|
|
|
(~(got by ark) %base)
|
|
|
|
=/ kel=weft
|
2021-09-16 19:25:02 +03:00
|
|
|
?~ rail.arak zuse+zuse
|
|
|
|
?~ next.u.rail.arak zuse+zuse
|
|
|
|
weft.i.next.u.rail.arak
|
2021-09-01 03:00:40 +03:00
|
|
|
abet:(bump:vats kel except force)
|
2021-08-03 00:52:46 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-cancel
|
|
|
|
|= a=@tas
|
|
|
|
abet:(emit %pass /cancel %arvo %c [%drop a])
|
2020-07-23 02:27:02 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-cancel-autocommit
|
2018-03-19 07:18:20 +03:00
|
|
|
|= ~
|
2021-07-01 04:03:47 +03:00
|
|
|
abet:(emit %pass way.commit-timer %arvo %b [%rest nex.commit-timer])
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-commit
|
|
|
|
|= [mon=kiln-commit auto=?]
|
|
|
|
=< abet
|
|
|
|
=. +>.$ (emit %pass /commit %arvo %c [%dirk mon])
|
|
|
|
?. auto
|
|
|
|
+>.$
|
|
|
|
=/ recur ~s1
|
|
|
|
=. commit-timer
|
|
|
|
[/kiln/autocommit (add now recur) recur mon]
|
2021-07-09 02:25:18 +03:00
|
|
|
(emit %pass way.commit-timer %arvo %b [%wait nex.commit-timer])
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2021-06-06 19:43:26 +03:00
|
|
|
++ poke-fuse-list
|
|
|
|
=>
|
|
|
|
|%
|
|
|
|
++ format-fuse
|
2021-06-08 03:23:00 +03:00
|
|
|
|= [into=desk pf=per-fuse]
|
|
|
|
^- tank
|
|
|
|
=/ sources=tape
|
|
|
|
%+ reel
|
|
|
|
con.kf.pf
|
|
|
|
|= [[fs=fuse-source g=germ] acc=tape]
|
|
|
|
^- tape
|
2021-08-11 19:23:36 +03:00
|
|
|
:(weld " [" (format-fuse-source fs) " " <g> "]" acc)
|
2021-06-08 03:23:00 +03:00
|
|
|
:- %leaf
|
|
|
|
;: weld
|
|
|
|
"|fuse {<into>} "
|
|
|
|
(format-fuse-source bas.kf.pf)
|
|
|
|
sources
|
|
|
|
==
|
|
|
|
:: +format-fuse-source: fuse source -> beak -> path
|
|
|
|
::
|
|
|
|
++ format-fuse-source
|
|
|
|
|= fs=fuse-source
|
|
|
|
^- tape
|
|
|
|
=/ bec=beak [who.fs des.fs ?:(?=([%trak] ver.fs) [%tas %track] ver.fs)]
|
|
|
|
<(en-beam [bec /])>
|
2021-06-06 19:43:26 +03:00
|
|
|
--
|
|
|
|
|= k=kiln-fuse-list
|
|
|
|
^+ abet
|
|
|
|
%. abet
|
|
|
|
?~ k
|
|
|
|
?~ fus
|
|
|
|
(slog [leaf+"no ongoing fuses" ~])
|
|
|
|
%- slog
|
|
|
|
%+ roll
|
|
|
|
~(tap by `(map desk per-fuse)`fus)
|
|
|
|
|= [[syd=desk pf=per-fuse] acc=tang]
|
|
|
|
^- tang
|
2021-06-08 03:23:00 +03:00
|
|
|
[(format-fuse syd pf) acc]
|
2021-06-06 19:43:26 +03:00
|
|
|
=/ pfu=(unit per-fuse) (~(get by fus) u.k)
|
|
|
|
?~ pfu
|
|
|
|
(slog [leaf+"no ongoing fuse for {<u.k>}" ~])
|
2021-06-08 03:23:00 +03:00
|
|
|
(slog [(format-fuse u.k u.pfu) ~])
|
2021-06-06 19:43:26 +03:00
|
|
|
::
|
2021-04-20 06:46:46 +03:00
|
|
|
++ poke-fuse
|
|
|
|
|= k=kiln-fuse
|
2021-05-02 06:04:19 +03:00
|
|
|
?~ k abet
|
2021-05-24 01:43:41 +03:00
|
|
|
=/ payload +.k
|
|
|
|
?~ payload
|
|
|
|
:: cancelling an ongoing fuse
|
|
|
|
%- (slog [leaf+"cancelling fuse into {<syd.k>}" ~])
|
2021-05-25 03:09:18 +03:00
|
|
|
=/ f (fuzz syd.k now)
|
|
|
|
?~ f
|
|
|
|
abet
|
|
|
|
abet:abet:delete:u.f
|
2021-05-24 01:43:41 +03:00
|
|
|
?: &(!overwrite.payload (~(has by fus) syd.k))
|
|
|
|
((slog [leaf+"existing fuse into {<syd.k>} - need =overwrite &" ~]) abet)
|
|
|
|
=. fus (~(put by fus) syd.k [~ [syd.k bas.payload con.payload]])
|
|
|
|
=/ old-cnt=@ud (~(gut by hxs) syd.k 0)
|
|
|
|
=. hxs (~(put by hxs) syd.k +(old-cnt))
|
2021-05-25 03:09:18 +03:00
|
|
|
=/ f (fuzz syd.k now)
|
|
|
|
?~ f
|
|
|
|
abet
|
|
|
|
abet:abet:fuse:u.f
|
2021-04-20 06:46:46 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-gall-sear
|
|
|
|
|= =ship
|
|
|
|
abet:(emit %pass /kiln %arvo %g %sear ship)
|
|
|
|
::
|
2016-05-07 02:21:29 +03:00
|
|
|
++ poke-info
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [mez=tape tor=(unit toro)]
|
2016-07-20 01:21:21 +03:00
|
|
|
?~ tor
|
|
|
|
abet:(spam leaf+mez ~)
|
2019-11-14 21:39:50 +03:00
|
|
|
abet:(emit:(spam leaf+mez ~) %pass /kiln %arvo %c [%info u.tor])
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-install
|
|
|
|
|= [loc=desk her=ship rem=desk]
|
|
|
|
abet:abet:(install:vats +<)
|
|
|
|
::
|
|
|
|
++ poke-label
|
|
|
|
|= [syd=desk lab=@tas]
|
|
|
|
=+ pax=/(scot %p our)/[syd]/[lab]
|
|
|
|
(poke-info "labeled {(spud pax)}" `[syd %| lab])
|
|
|
|
::
|
|
|
|
++ poke-merge
|
|
|
|
|= kiln-merge
|
|
|
|
?~ +< abet
|
|
|
|
abet:abet:(merge:(work syd) ali sud cas gim)
|
|
|
|
::
|
|
|
|
++ poke-mount
|
|
|
|
|= kiln-mount
|
|
|
|
=+ bem=(de-beam pax)
|
|
|
|
?~ bem
|
|
|
|
=+ "can't mount bad path: {<pax>}"
|
|
|
|
abet:(spam leaf+- ~)
|
|
|
|
abet:(emit %pass /mount %arvo %c [%mont pot u.bem])
|
|
|
|
::
|
2021-07-21 12:00:11 +03:00
|
|
|
++ poke-nuke
|
|
|
|
|= [=term desk=?]
|
|
|
|
=< abet
|
|
|
|
?. desk
|
|
|
|
(emit %pass /nuke %arvo %g [%nuke term])
|
|
|
|
%- emil
|
2021-07-23 14:07:58 +03:00
|
|
|
%+ turn (get-apps-have our term now)
|
2021-07-21 12:00:11 +03:00
|
|
|
|=([=dude ?] [%pass /nuke %arvo %g [%nuke dude]])
|
|
|
|
::
|
2021-09-06 17:27:17 +03:00
|
|
|
++ poke-pause
|
|
|
|
|= =desk
|
|
|
|
abet:abet:(pause:vats desk)
|
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-permission
|
|
|
|
|= [syd=desk pax=path pub=?]
|
|
|
|
=< abet
|
|
|
|
%- emit
|
|
|
|
=/ =rite [%r ~ ?:(pub %black %white) ~]
|
|
|
|
[%pass /kiln/permission %arvo %c [%perm syd pax rite]]
|
|
|
|
::
|
2021-08-20 10:41:16 +03:00
|
|
|
++ poke-rein
|
|
|
|
|= [=desk =rein]
|
|
|
|
abet:abet:(set-rein:vats +<)
|
|
|
|
::
|
2021-09-06 17:27:17 +03:00
|
|
|
++ poke-resume
|
|
|
|
|= =desk
|
|
|
|
abet:abet:(resume:vats desk)
|
|
|
|
::
|
2021-08-20 01:57:31 +03:00
|
|
|
++ poke-revive
|
|
|
|
|= =desk
|
|
|
|
abet:abet:(revive:vats desk)
|
|
|
|
::
|
2016-07-16 04:56:50 +03:00
|
|
|
++ poke-rm
|
2020-11-25 23:22:55 +03:00
|
|
|
|= a=path
|
2016-07-16 04:56:50 +03:00
|
|
|
=+ b=.^(arch %cy a)
|
|
|
|
?~ fil.b
|
|
|
|
=+ ~[leaf+"No such file:" leaf+"{<a>}"]
|
|
|
|
abet:(spam -)
|
2016-07-20 01:21:21 +03:00
|
|
|
(poke-info "removed" `(fray a))
|
2016-07-16 04:56:50 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ poke-schedule
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [where=path tym=@da eve=@t]
|
2015-09-02 01:20:17 +03:00
|
|
|
=. where (welp where /sched)
|
2016-05-07 02:21:29 +03:00
|
|
|
%+ poke-info "scheduled"
|
2015-12-09 04:54:26 +03:00
|
|
|
=+ old=;;((map @da cord) (fall (file where) ~))
|
2016-07-20 01:21:21 +03:00
|
|
|
`(foal where %sched !>((~(put by old) tym eve)))
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2021-08-20 01:57:31 +03:00
|
|
|
++ poke-suspend
|
|
|
|
|= =desk
|
|
|
|
abet:abet:(suspend:vats desk)
|
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-sync
|
|
|
|
|= hos=kiln-sync
|
|
|
|
?: (~(has by syn) hos)
|
|
|
|
abet:(spam (render "already syncing" [sud her syd]:hos) ~)
|
|
|
|
abet:abet:start-sync:(auto hos)
|
2018-02-14 01:29:16 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-syncs :: print sync config
|
|
|
|
|= ~
|
|
|
|
=< abet %- spam
|
|
|
|
?: =(0 ~(wyt by syn))
|
2021-07-16 05:25:03 +03:00
|
|
|
[%leaf "no syncs configured"]~
|
2021-07-01 04:03:47 +03:00
|
|
|
%+ turn ~(tap in ~(key by syn))
|
|
|
|
|=(a=kiln-sync (render "sync configured" [sud her syd]:a))
|
2015-09-17 02:40:53 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-track
|
|
|
|
|= hos=kiln-sync
|
|
|
|
?: (~(has by syn) hos)
|
|
|
|
abet:(spam (render "already tracking" [sud her syd]:hos) ~)
|
|
|
|
abet:abet:start-track:(auto hos)
|
2019-11-05 10:37:58 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-uninstall
|
|
|
|
|= loc=desk
|
|
|
|
abet:(uninstall:vats +<)
|
2020-03-19 02:06:33 +03:00
|
|
|
::
|
2021-07-01 04:03:47 +03:00
|
|
|
++ poke-unmount
|
|
|
|
|= mon=kiln-unmount
|
|
|
|
?^ mon
|
|
|
|
=+ bem=(de-beam mon)
|
|
|
|
?~ bem
|
|
|
|
=+ "can't unmount bad path: {<mon>}"
|
|
|
|
abet:(spam leaf+- ~)
|
|
|
|
abet:(emit %pass /unmount-beam %arvo %c [%ogre [[p q r] s]:u.bem])
|
|
|
|
abet:(emit %pass /unmount-point %arvo %c [%ogre mon])
|
|
|
|
::
|
|
|
|
++ poke-unsync
|
|
|
|
|= hus=kiln-unsync
|
|
|
|
?. (~(has by syn) hus)
|
|
|
|
abet:(spam (render "not syncing" [sud her syd]:hus) ~)
|
|
|
|
%* . abet:abet:stop:(auto hus)
|
|
|
|
syn (~(del by syn) hus)
|
|
|
|
==
|
2021-07-09 02:25:18 +03:00
|
|
|
:: +peer: handle %watch
|
|
|
|
::
|
|
|
|
++ peer
|
|
|
|
|= =path
|
|
|
|
?> (team:title our src)
|
|
|
|
?+ path ~|(kiln-path/path !!)
|
2021-09-28 22:33:16 +03:00
|
|
|
[%vats ~]
|
2021-09-28 05:50:32 +03:00
|
|
|
abet(moz :_(moz [%give %fact ~ %kiln-vats-snap-0 !>(ark)]))
|
2021-07-09 02:25:18 +03:00
|
|
|
==
|
2018-02-14 01:29:16 +03:00
|
|
|
::
|
2019-11-14 21:39:50 +03:00
|
|
|
++ take-agent
|
2019-11-19 07:36:21 +03:00
|
|
|
|= [=wire =sign:agent:gall]
|
2021-07-17 02:54:20 +03:00
|
|
|
?+ wire ~|([%kiln-bad-take-agent wire -.sign] !!)
|
|
|
|
[%fancy *]
|
|
|
|
?> ?=(%poke-ack -.sign)
|
|
|
|
(take-coup-fancy t.wire p.sign)
|
|
|
|
::
|
|
|
|
[%spam *]
|
|
|
|
?> ?=(%poke-ack -.sign)
|
|
|
|
(take-coup-spam t.wire p.sign)
|
2021-07-18 04:40:20 +03:00
|
|
|
::
|
|
|
|
[%link @ ~]
|
|
|
|
?> ?=(%poke-ack -.sign)
|
2021-09-26 08:07:23 +03:00
|
|
|
~> %slog.(fmt "linked {<`@tas`i.t.wire>} to console")
|
2021-07-18 04:40:20 +03:00
|
|
|
abet
|
2019-11-14 21:39:50 +03:00
|
|
|
==
|
|
|
|
::
|
2020-06-16 10:29:17 +03:00
|
|
|
++ take-arvo
|
2019-11-14 21:39:50 +03:00
|
|
|
|= [=wire =sign-arvo]
|
2021-07-17 02:54:20 +03:00
|
|
|
?- wire
|
2019-11-14 21:39:50 +03:00
|
|
|
[%sync %merg *] %+ take-mere-sync t.t.wire
|
|
|
|
?>(?=(%mere +<.sign-arvo) +>.sign-arvo)
|
|
|
|
[%find-ship *] %+ take-writ-find-ship t.wire
|
|
|
|
?>(?=(%writ +<.sign-arvo) +>.sign-arvo)
|
|
|
|
[%sync *] %+ take-writ-sync t.wire
|
|
|
|
?>(?=(%writ +<.sign-arvo) +>.sign-arvo)
|
|
|
|
[%autocommit *] %+ take-wake-autocommit t.wire
|
|
|
|
?>(?=(%wake +<.sign-arvo) +>.sign-arvo)
|
2021-07-20 18:00:07 +03:00
|
|
|
[%vats *] abet:(take:vats t.wire sign-arvo)
|
2021-05-24 01:43:41 +03:00
|
|
|
[%fuse-request @tas *]
|
2021-05-25 03:09:18 +03:00
|
|
|
=/ f (fuzz i.t.wire now)
|
|
|
|
?~ f
|
|
|
|
abet
|
|
|
|
abet:abet:(take:u.f t.t.wire sign-arvo)
|
2021-05-24 01:43:41 +03:00
|
|
|
[%fuse @tas *] ?> ?=(%mere +<.sign-arvo)
|
2021-05-25 03:09:18 +03:00
|
|
|
=/ syd=desk i.t.wire
|
|
|
|
?. ?=([%| *] +>.sign-arvo)
|
|
|
|
?~ p.p.sign-arvo
|
|
|
|
abet
|
2021-06-06 01:48:55 +03:00
|
|
|
=/ msg=tape "fuse merge conflict for {<syd>}"
|
|
|
|
%- (slog [leaf+msg >p.p.sign-arvo< ~])
|
2021-05-25 03:09:18 +03:00
|
|
|
abet
|
|
|
|
%- (slog leaf+"failed fuse for {<syd>}" p.p.sign-arvo)
|
|
|
|
abet
|
2019-11-14 21:39:50 +03:00
|
|
|
*
|
2020-06-27 05:21:09 +03:00
|
|
|
?+ +<.sign-arvo
|
|
|
|
((slog leaf+"kiln: strange card {<+<.sign-arvo wire>}" ~) abet)
|
2019-11-20 00:03:07 +03:00
|
|
|
%done %+ done wire
|
|
|
|
?>(?=(%done +<.sign-arvo) +>.sign-arvo)
|
2019-11-14 21:39:50 +03:00
|
|
|
%mere %+ take-mere wire
|
|
|
|
?>(?=(%mere +<.sign-arvo) +>.sign-arvo)
|
|
|
|
==
|
|
|
|
==
|
2020-11-26 17:09:31 +03:00
|
|
|
++ take |=(way=wire ?>(?=([@ ~] way) (work i.way))) :: general handler
|
2021-07-01 04:03:47 +03:00
|
|
|
++ done
|
|
|
|
|= [way=wire saw=(unit error:ames)]
|
|
|
|
~? ?=(^ saw) [%kiln-nack u.saw]
|
|
|
|
abet
|
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ take-mere ::
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [way=wire are=(each (set path) (pair term tang))]
|
2021-05-18 22:09:22 +03:00
|
|
|
?. ?=([@ ~] way)
|
|
|
|
abet
|
2015-09-02 01:20:17 +03:00
|
|
|
abet:abet:(mere:(take way) are)
|
|
|
|
::
|
|
|
|
++ take-coup-fancy ::
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [way=wire saw=(unit tang)]
|
2015-09-02 01:20:17 +03:00
|
|
|
abet:abet:(coup-fancy:(take way) saw)
|
|
|
|
::
|
2017-11-30 07:31:13 +03:00
|
|
|
++ take-coup-spam ::
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [way=wire saw=(unit tang)]
|
2017-11-30 07:31:13 +03:00
|
|
|
~? ?=(^ saw) [%kiln-spam-lame u.saw]
|
|
|
|
abet
|
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ take-mere-sync ::
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [way=wire mes=(each (set path) (pair term tang))]
|
|
|
|
?> ?=([@ @ @ *] way)
|
2020-11-25 23:22:55 +03:00
|
|
|
=/ hos=kiln-sync
|
2015-09-02 01:20:17 +03:00
|
|
|
:* syd=(slav %tas i.way)
|
|
|
|
her=(slav %p i.t.way)
|
|
|
|
sud=(slav %tas i.t.t.way)
|
|
|
|
==
|
2020-06-27 05:21:09 +03:00
|
|
|
?. (~(has by syn) hos)
|
|
|
|
abet
|
2018-12-04 09:59:41 +03:00
|
|
|
abet:abet:(mere:(auto hos) mes)
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2019-04-30 20:40:38 +03:00
|
|
|
++ take-writ-find-ship ::
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [way=wire rot=riot]
|
|
|
|
?> ?=([@ @ @ *] way)
|
2020-11-25 23:22:55 +03:00
|
|
|
=/ hos=kiln-sync
|
2019-04-30 20:40:38 +03:00
|
|
|
:* syd=(slav %tas i.way)
|
|
|
|
her=(slav %p i.t.way)
|
|
|
|
sud=(slav %tas i.t.t.way)
|
|
|
|
==
|
2020-06-27 05:21:09 +03:00
|
|
|
?. (~(has by syn) hos)
|
|
|
|
abet
|
2019-04-30 20:40:38 +03:00
|
|
|
abet:abet:(take-find-ship:(auto hos) rot)
|
|
|
|
::
|
2015-09-17 01:39:11 +03:00
|
|
|
++ take-writ-sync ::
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [way=wire rot=riot]
|
|
|
|
?> ?=([@ @ @ *] way)
|
2020-11-25 23:22:55 +03:00
|
|
|
=/ hos=kiln-sync
|
2015-09-02 01:20:17 +03:00
|
|
|
:* syd=(slav %tas i.way)
|
|
|
|
her=(slav %p i.t.way)
|
|
|
|
sud=(slav %tas i.t.t.way)
|
|
|
|
==
|
2020-06-27 05:21:09 +03:00
|
|
|
?. (~(has by syn) hos)
|
|
|
|
abet
|
2018-12-04 09:59:41 +03:00
|
|
|
abet:abet:(writ:(auto hos) rot)
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2019-08-25 12:00:26 +03:00
|
|
|
++ take-wake-autocommit
|
|
|
|
|= [way=wire error=(unit tang)]
|
|
|
|
?^ error
|
|
|
|
%- (slog u.error)
|
|
|
|
~& %kiln-wake-autocommit-fail
|
|
|
|
abet
|
|
|
|
=. nex.commit-timer (add now tim.commit-timer)
|
|
|
|
=< abet
|
|
|
|
%- emil
|
2019-11-14 21:39:50 +03:00
|
|
|
:~ [%pass /commit %arvo %c [%dirk mon.commit-timer]]
|
|
|
|
[%pass way.commit-timer %arvo %b [%wait nex.commit-timer]]
|
2019-08-25 12:00:26 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ spam
|
2020-11-25 23:22:55 +03:00
|
|
|
|= mes=(list tank)
|
2015-09-02 01:20:17 +03:00
|
|
|
((slog mes) ..spam)
|
2021-05-24 01:43:41 +03:00
|
|
|
:: state machine for fuses
|
|
|
|
::
|
|
|
|
++ fuzz
|
|
|
|
|= [syd=desk now=@da]
|
2021-05-25 03:09:18 +03:00
|
|
|
=/ pfu=(unit per-fuse) (~(get by fus) syd)
|
|
|
|
?~ pfu
|
|
|
|
~
|
|
|
|
=* kf kf.u.pfu
|
|
|
|
=* mox mox.u.pfu
|
2021-05-24 01:43:41 +03:00
|
|
|
=/ should-delete=flag |
|
2021-05-25 03:09:18 +03:00
|
|
|
%- some
|
2021-05-24 01:43:41 +03:00
|
|
|
|%
|
|
|
|
:: finalize
|
|
|
|
::
|
|
|
|
++ abet
|
2021-05-25 03:09:18 +03:00
|
|
|
?: should-delete
|
2021-05-24 01:43:41 +03:00
|
|
|
..fuzz(fus (~(del by fus) syd))
|
|
|
|
..fuzz(fus (~(put by fus) syd [mox kf]))
|
|
|
|
::
|
|
|
|
++ delete
|
|
|
|
^+ ..delete
|
|
|
|
=. should-delete &
|
|
|
|
..delete
|
|
|
|
:: queue moves
|
|
|
|
::
|
|
|
|
++ blab
|
|
|
|
|= new=(list card:agent:gall)
|
|
|
|
^+ +>
|
|
|
|
+>.$(moz (welp new moz))
|
2021-06-08 02:52:08 +03:00
|
|
|
:: +make-requests: send requests for each %trak source.
|
2021-05-24 01:43:41 +03:00
|
|
|
::
|
|
|
|
++ make-requests
|
|
|
|
^+ ..abet
|
|
|
|
=/ movs=(list card:agent:gall)
|
|
|
|
%+ murn
|
|
|
|
[[bas.kf *germ] con.kf]
|
|
|
|
|= [fs=fuse-source germ]
|
|
|
|
^- (unit card:agent:gall)
|
|
|
|
?^ ver.fs
|
|
|
|
:: static source, don't need to track
|
|
|
|
~
|
2021-06-22 03:44:29 +03:00
|
|
|
=/ bec=beak (realize-fuse-source fs &)
|
2021-05-24 01:43:41 +03:00
|
|
|
?> =(who.fs p.bec)
|
|
|
|
?> =(des.fs q.bec)
|
|
|
|
=/ hax=@ud (mug [kf (~(got by hxs) syd)])
|
2021-06-06 01:48:55 +03:00
|
|
|
=/ wir=wire
|
|
|
|
/kiln/fuse-request/[syd]/(scot %p p.bec)/[q.bec]/(scot %ud hax)
|
2021-06-22 03:44:29 +03:00
|
|
|
=/ rav=rave [%sing %w r.bec /]
|
2021-05-24 01:43:41 +03:00
|
|
|
=/ rif=riff [q.bec `rav]
|
|
|
|
`[%pass wir %arvo %c [%warp who.fs rif]]
|
|
|
|
:: No need to keep state if all the sources are static
|
|
|
|
?~ movs
|
|
|
|
delete
|
|
|
|
(blab movs)
|
|
|
|
::
|
|
|
|
++ send-fuse
|
|
|
|
^+ ..abet
|
2021-06-22 03:44:29 +03:00
|
|
|
=/ bas=beak (realize-fuse-source bas.kf |)
|
2021-05-24 01:43:41 +03:00
|
|
|
=/ con=(list [beak germ])
|
|
|
|
%+ turn
|
|
|
|
con.kf
|
|
|
|
|= [fs=fuse-source g=germ]
|
2021-06-22 03:44:29 +03:00
|
|
|
[(realize-fuse-source fs |) g]
|
2021-05-24 01:43:41 +03:00
|
|
|
%- blab
|
|
|
|
[%pass /kiln/fuse/[syd] %arvo %c [%fuse syd bas con]]~
|
|
|
|
::
|
|
|
|
++ fuse
|
|
|
|
^+ ..abet
|
|
|
|
send-fuse:make-requests
|
|
|
|
::
|
|
|
|
++ take
|
|
|
|
|= [wir=wire =sign-arvo]
|
|
|
|
^+ ..fuse
|
|
|
|
?> =((lent wir) 3)
|
|
|
|
=/ who=ship (slav %p (snag 0 wir))
|
|
|
|
=/ src=desk (snag 1 wir)
|
|
|
|
=/ hax=@ud (slav %ud (snag 2 wir))
|
|
|
|
?. =(hax (mug [kf (~(got by hxs) syd)]))
|
|
|
|
:: If the hash in the wire doesn't match the current request
|
|
|
|
:: this is a response for a previous fuse that we can ignore.
|
|
|
|
..take
|
2021-06-17 00:45:45 +03:00
|
|
|
?> ?=([?(%clay %behn) %writ *] sign-arvo)
|
|
|
|
=/ gif +.sign-arvo
|
2021-05-24 01:43:41 +03:00
|
|
|
?~ p.gif
|
|
|
|
%- (slog leaf+"|fuse request failed for {<src>} on <who> - cancelling")
|
|
|
|
delete
|
2021-06-08 02:52:08 +03:00
|
|
|
=/ cas=cass:clay !<(cass:clay +.r.u.p.gif)
|
|
|
|
=. mox (~(put by mox) [who src] ud.cas)
|
2021-05-24 01:43:41 +03:00
|
|
|
fuse
|
|
|
|
::
|
|
|
|
:: utility functions below
|
|
|
|
::
|
|
|
|
:: +realize-fuse-source: convert a fuse-source to a
|
|
|
|
:: fully realized beak.
|
|
|
|
::
|
|
|
|
++ realize-fuse-source
|
2021-06-22 03:44:29 +03:00
|
|
|
|= [fs=fuse-source incr=flag]
|
2021-05-24 01:43:41 +03:00
|
|
|
^- beak
|
|
|
|
:+ who.fs
|
|
|
|
des.fs
|
|
|
|
?@ ver.fs
|
2021-06-22 03:44:29 +03:00
|
|
|
(realize-case [who.fs des.fs incr])
|
2021-05-24 01:43:41 +03:00
|
|
|
`case`ver.fs
|
|
|
|
::
|
|
|
|
++ realize-case
|
2021-06-22 03:44:29 +03:00
|
|
|
|= [who=ship des=desk incr=flag]
|
2021-05-24 01:43:41 +03:00
|
|
|
^- case
|
|
|
|
=/ let=(unit @ud) (~(get by mox) [who des])
|
|
|
|
^- case
|
|
|
|
?~ let
|
|
|
|
da+now
|
2021-06-22 03:44:29 +03:00
|
|
|
:- %ud
|
|
|
|
?: incr
|
|
|
|
+(u.let)
|
|
|
|
u.let
|
2021-05-24 01:43:41 +03:00
|
|
|
--
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
|
|
|
++ auto
|
|
|
|
|= kiln-sync
|
2019-11-14 21:39:50 +03:00
|
|
|
=+ (~(gut by syn) [syd her sud] let=*@ud)
|
2015-09-02 01:20:17 +03:00
|
|
|
|%
|
|
|
|
++ abet
|
2019-11-14 21:39:50 +03:00
|
|
|
..auto(syn (~(put by syn) [syd her sud] let))
|
2015-06-18 02:44:00 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ blab
|
2020-11-25 23:22:55 +03:00
|
|
|
|= new=(list card:agent:gall)
|
2015-09-02 01:20:17 +03:00
|
|
|
^+ +>
|
|
|
|
+>.$(moz (welp new moz))
|
2015-05-12 03:31:37 +03:00
|
|
|
::
|
2019-11-14 21:39:50 +03:00
|
|
|
++ warp
|
|
|
|
|= [=wire =ship =riff]
|
|
|
|
(blab [%pass wire %arvo %c [%warp ship riff]] ~)
|
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ spam |*(* %_(+> ..auto (^spam +<)))
|
|
|
|
++ stop
|
|
|
|
=> (spam (render "ended autosync" sud her syd) ~)
|
2018-12-13 21:23:26 +03:00
|
|
|
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
2019-11-14 21:39:50 +03:00
|
|
|
(warp wire her sud ~)
|
2018-12-04 09:59:41 +03:00
|
|
|
:: XX duplicate of start-sync? see |track
|
2015-06-04 00:18:13 +03:00
|
|
|
::
|
2016-01-07 01:08:46 +03:00
|
|
|
++ start-track
|
|
|
|
=> (spam (render "activated track" sud her syd) ~)
|
|
|
|
=. let 1
|
2018-12-13 21:23:26 +03:00
|
|
|
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
2019-11-14 21:39:50 +03:00
|
|
|
(warp wire her sud `[%sing %y ud+let /])
|
2016-01-07 01:08:46 +03:00
|
|
|
::
|
|
|
|
++ start-sync
|
2019-04-30 20:40:38 +03:00
|
|
|
=> (spam (render "finding ship and desk" sud her syd) ~)
|
|
|
|
=/ =wire /kiln/find-ship/[syd]/(scot %p her)/[sud]
|
2019-11-14 21:39:50 +03:00
|
|
|
(warp wire her sud `[%sing %y ud+1 /])
|
2019-04-30 20:40:38 +03:00
|
|
|
::
|
|
|
|
++ take-find-ship
|
|
|
|
|= rot=riot
|
2019-05-14 00:45:53 +03:00
|
|
|
=> (spam (render "activated sync" sud her syd) ~)
|
2018-12-04 09:59:41 +03:00
|
|
|
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
2019-11-14 21:39:50 +03:00
|
|
|
(warp wire her sud `[%sing %w [%da now] /])
|
2015-05-12 03:31:37 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ writ
|
2018-12-04 09:59:41 +03:00
|
|
|
|= rot=riot
|
2015-09-02 01:20:17 +03:00
|
|
|
?~ rot
|
2019-01-31 05:48:30 +03:00
|
|
|
=. +>.$
|
|
|
|
%^ spam
|
|
|
|
leaf+"sync cancelled, retrying"
|
|
|
|
(render "on sync" sud her syd)
|
|
|
|
~
|
|
|
|
start-sync
|
2020-11-25 22:39:13 +03:00
|
|
|
=. let ?. ?=(%w p.p.u.rot) let ud:;;(cass:clay q.q.r.u.rot)
|
2019-11-14 21:39:50 +03:00
|
|
|
=/ =wire /kiln/sync/merg/[syd]/(scot %p her)/[sud]
|
2018-12-19 09:56:34 +03:00
|
|
|
:: germ: merge mode for sync merges
|
2018-12-04 21:11:43 +03:00
|
|
|
::
|
2018-12-19 09:56:34 +03:00
|
|
|
:: Initial merges from any source must use the %init germ.
|
|
|
|
:: Subsequent merges may use any germ, but if the source is
|
|
|
|
:: a remote ship with which we have not yet merged, we won't
|
2020-08-28 10:24:25 +03:00
|
|
|
:: share a merge-base commit and all germs but %only-that will
|
|
|
|
:: fail.
|
2018-12-04 21:11:43 +03:00
|
|
|
::
|
2020-08-28 10:24:25 +03:00
|
|
|
:: We want to always use %only-that for the first remote merge.
|
|
|
|
:: But we also want local syncs (%base to %home or %kids) to
|
|
|
|
:: succeed after that first remote sync. To accomplish both we
|
|
|
|
:: simply use %only-that for the first three sync merges. (The
|
|
|
|
:: first two are from the pill.)
|
2018-12-19 09:56:34 +03:00
|
|
|
::
|
|
|
|
=/ =germ
|
|
|
|
=/ =cass
|
|
|
|
.^(cass:clay %cw /(scot %p our)/[syd]/(scot %da now))
|
|
|
|
?: =(0 ud.cass)
|
|
|
|
%init
|
2020-08-28 10:24:25 +03:00
|
|
|
?:((gth 2 ud.cass) %only-that %mate)
|
2018-12-04 21:11:43 +03:00
|
|
|
=< %- spam
|
|
|
|
?: =(our her) ~
|
|
|
|
[(render "beginning sync" sud her syd) ~]
|
2019-11-14 21:39:50 +03:00
|
|
|
(blab [%pass wire %arvo %c [%merg syd her sud ud+let germ]] ~)
|
2015-06-04 00:18:13 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ mere
|
2018-12-04 09:59:41 +03:00
|
|
|
|= mes=(each (set path) (pair term tang))
|
2020-05-22 09:05:42 +03:00
|
|
|
?: ?=([%| %ali-unavailable *] mes)
|
2019-02-02 00:46:09 +03:00
|
|
|
=. +>.$
|
|
|
|
%^ spam
|
2019-05-03 04:06:31 +03:00
|
|
|
leaf+"merge cancelled, maybe because sunk; restarting"
|
2019-02-02 00:46:09 +03:00
|
|
|
(render "on sync" sud her syd)
|
|
|
|
~
|
|
|
|
start-sync:stop
|
2015-09-02 01:20:17 +03:00
|
|
|
=. let +(let)
|
|
|
|
=. +>.$
|
|
|
|
%- spam
|
2018-03-19 06:54:47 +03:00
|
|
|
?: ?=(%& -.mes)
|
2015-09-02 01:20:17 +03:00
|
|
|
[(render "sync succeeded" sud her syd) ~]
|
|
|
|
?+ p.p.mes
|
|
|
|
:* (render "sync failed" sud her syd)
|
2015-12-21 00:16:39 +03:00
|
|
|
leaf+"please manually merge the desks with"
|
|
|
|
leaf+"|merge %{(trip syd)} {(scow %p her)} %{(trip sud)}"
|
|
|
|
leaf+""
|
|
|
|
leaf+"error code: {<p.p.mes>}"
|
2015-09-02 01:20:17 +03:00
|
|
|
q.p.mes
|
|
|
|
==
|
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%no-ali-disc
|
2016-12-16 09:34:01 +03:00
|
|
|
:~ (render "sync activated" sud her syd)
|
2015-12-21 00:16:39 +03:00
|
|
|
leaf+"note: blank desk {<sud>} on {<her>}"
|
2015-09-02 01:20:17 +03:00
|
|
|
==
|
|
|
|
==
|
2018-12-04 09:59:41 +03:00
|
|
|
=/ =wire /kiln/sync/[syd]/(scot %p her)/[sud]
|
2019-11-14 21:39:50 +03:00
|
|
|
(warp wire her sud `[%sing %y ud+let /])
|
2015-09-02 01:20:17 +03:00
|
|
|
--
|
|
|
|
::
|
|
|
|
++ work :: state machine
|
2020-11-25 23:22:55 +03:00
|
|
|
|= syd=desk
|
2019-12-18 03:48:08 +03:00
|
|
|
=/ ,per-desk
|
2019-06-30 15:50:00 +03:00
|
|
|
%+ ~(gut by rem) syd
|
2017-11-30 00:29:35 +03:00
|
|
|
=+ *per-desk
|
2015-09-02 01:20:17 +03:00
|
|
|
%_(- cas [%da now])
|
|
|
|
|%
|
|
|
|
++ abet :: resolve
|
|
|
|
..work(rem (~(put by rem) syd auto gem her sud cas))
|
2015-05-28 05:46:58 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ blab
|
2020-11-25 23:22:55 +03:00
|
|
|
|= new=(list card:agent:gall)
|
2015-09-02 01:20:17 +03:00
|
|
|
^+ +>
|
|
|
|
+>.$(moz (welp new moz))
|
2015-05-28 05:46:58 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ win . :: successful poke
|
|
|
|
++ lose
|
|
|
|
^+ .
|
|
|
|
~| %kiln-work-fail
|
|
|
|
.
|
2015-06-24 21:30:28 +03:00
|
|
|
::
|
2016-12-16 09:34:01 +03:00
|
|
|
++ perform ::
|
2015-09-02 01:20:17 +03:00
|
|
|
^+ .
|
2020-08-28 10:24:25 +03:00
|
|
|
?< ?=(%this gem)
|
|
|
|
?< ?=(%that gem)
|
2019-11-14 21:39:50 +03:00
|
|
|
(blab [%pass /kiln/[syd] %arvo %c [%merg syd her sud cas gem]] ~)
|
2015-05-26 04:20:45 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ fancy-merge :: send to self
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [syd=desk her=@p sud=desk gem=?(%auto germ)]
|
2015-09-02 01:20:17 +03:00
|
|
|
^+ +>
|
2019-11-14 21:39:50 +03:00
|
|
|
=/ =cage [%kiln-merge !>([syd her sud cas gem])]
|
2015-09-02 01:20:17 +03:00
|
|
|
%- blab :_ ~
|
2019-11-14 21:39:50 +03:00
|
|
|
[%pass /kiln/fancy/[^syd] %agent [our %hood] %poke cage]
|
2015-05-26 04:20:45 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ spam ::|=(tang ((slog +<) ..spam))
|
|
|
|
|*(* +>(..work (^spam +<)))
|
|
|
|
++ merge
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [her=@p sud=@tas cas=case gim=?(%auto germ)]
|
2015-09-02 01:20:17 +03:00
|
|
|
^+ +>
|
2020-11-25 22:39:13 +03:00
|
|
|
?. ?=(%auto gim)
|
2016-01-07 01:08:46 +03:00
|
|
|
perform(auto |, gem gim, her her, cas cas, sud sud)
|
2018-05-03 00:38:01 +03:00
|
|
|
?: =(0 ud:.^(cass:clay %cw /(scot %p our)/[syd]/(scot %da now)))
|
2015-09-02 01:20:17 +03:00
|
|
|
=> $(gim %init)
|
|
|
|
.(auto &)
|
|
|
|
=> $(gim %fine)
|
|
|
|
.(auto &)
|
2015-05-26 04:20:45 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ coup-fancy
|
2020-11-25 23:22:55 +03:00
|
|
|
|= saw=(unit tang)
|
2015-09-02 01:20:17 +03:00
|
|
|
?~ saw
|
2020-05-14 05:28:04 +03:00
|
|
|
+>
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ :- "failed to set up conflict resolution scratch space"
|
|
|
|
"I'm out of ideas"
|
2015-12-21 00:16:39 +03:00
|
|
|
lose:(spam leaf+-< leaf+-> u.saw)
|
2015-05-26 04:20:45 +03:00
|
|
|
::
|
2015-09-02 01:20:17 +03:00
|
|
|
++ mere
|
2020-11-25 23:22:55 +03:00
|
|
|
|= are=(each (set path) (pair term tang))
|
2015-09-02 01:20:17 +03:00
|
|
|
^+ +>
|
|
|
|
?: =(%meld gem)
|
2018-03-19 06:54:47 +03:00
|
|
|
?: ?=(%& -.are)
|
2015-09-02 01:20:17 +03:00
|
|
|
?. auto
|
|
|
|
=+ "merged with strategy {<gem>}"
|
2015-12-21 00:16:39 +03:00
|
|
|
win:(spam leaf+- ?~(p.are ~ [>`(set path)`p.are< ~]))
|
2015-09-02 01:20:17 +03:00
|
|
|
:: ~? > =(~ p.are) [%mere-no-conflict syd]
|
2020-05-14 05:28:04 +03:00
|
|
|
=> .(+>.$ (spam leaf+"mashing conflicts" ~))
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ tic=(cat 3 syd '-scratch')
|
2020-05-14 05:28:04 +03:00
|
|
|
=/ notations=(list [path (unit [mark vase])])
|
|
|
|
%+ turn ~(tap in p.are)
|
|
|
|
|= =path
|
|
|
|
=/ =mark -:(flop path)
|
|
|
|
=/ =dais .^(dais %cb /(scot %p our)/[syd]/(scot cas)/[mark])
|
|
|
|
=/ base .^(vase %cr (weld /(scot %p our)/[tic]/(scot cas) path))
|
|
|
|
=/ ali .^(vase %cr (weld /(scot %p her)/[sud]/(scot cas) path))
|
|
|
|
=/ bob .^(vase %cr (weld /(scot %p our)/[syd]/(scot cas) path))
|
|
|
|
=/ ali-dif (~(diff dais base) ali)
|
|
|
|
=/ bob-dif (~(diff dais base) bob)
|
|
|
|
=/ mash (~(mash dais base) [her sud ali-dif] [our syd bob-dif])
|
|
|
|
:- path
|
|
|
|
?~ mash
|
|
|
|
~
|
|
|
|
`[mark (~(pact dais base) u.mash)]
|
|
|
|
=/ [annotated=(list [path *]) unnotated=(list [path *])]
|
|
|
|
(skid notations |=([* v=*] ?=(^ v)))
|
|
|
|
=/ tic=desk (cat 3 syd '-scratch')
|
|
|
|
=/ tan=(list tank)
|
|
|
|
%- zing
|
|
|
|
^- (list (list tank))
|
|
|
|
:~ %- tape-to-tanks
|
|
|
|
"""
|
|
|
|
done setting up scratch space in {<[tic]>}
|
|
|
|
please resolve the following conflicts and run
|
|
|
|
|merge {<syd>} our {<[tic]>}
|
|
|
|
"""
|
|
|
|
%^ tanks-if-any
|
|
|
|
"annotated conflicts in:" (turn annotated head)
|
|
|
|
""
|
|
|
|
%^ tanks-if-any
|
|
|
|
"unannotated conflicts in:" (turn unnotated head)
|
|
|
|
"""
|
|
|
|
some conflicts could not be annotated.
|
|
|
|
for these, the scratch space contains
|
|
|
|
the most recent common ancestor of the
|
|
|
|
conflicting content.
|
|
|
|
"""
|
|
|
|
==
|
|
|
|
=< win
|
|
|
|
%- blab:(spam tan)
|
|
|
|
:_ ~
|
|
|
|
:* %pass /kiln/[syd] %arvo %c
|
|
|
|
%info
|
|
|
|
tic %&
|
|
|
|
%+ murn notations
|
|
|
|
|= [=path dif=(unit [=mark =vase])]
|
|
|
|
^- (unit [^path miso])
|
|
|
|
?~ dif
|
|
|
|
~
|
|
|
|
`[path %mut mark.u.dif vase.u.dif]
|
|
|
|
==
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ "failed to merge with strategy meld"
|
2015-12-21 00:16:39 +03:00
|
|
|
lose:(spam leaf+- >p.p.are< q.p.are)
|
2018-03-19 06:54:47 +03:00
|
|
|
?: ?=(%& -.are)
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ "merged with strategy {<gem>}"
|
2015-12-21 00:16:39 +03:00
|
|
|
win:(spam leaf+- ?~(p.are ~ [>`(set path)`p.are< ~]))
|
2015-09-02 01:20:17 +03:00
|
|
|
?. auto
|
|
|
|
=+ "failed to merge with strategy {<gem>}"
|
2015-12-21 00:16:39 +03:00
|
|
|
lose:(spam leaf+- >p.p.are< q.p.are)
|
2015-09-02 01:20:17 +03:00
|
|
|
?+ gem
|
2015-12-21 00:16:39 +03:00
|
|
|
(spam leaf+"strange auto" >gem< ~)
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%init
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ :- "auto merge failed on strategy %init"
|
2015-05-12 03:31:37 +03:00
|
|
|
"I'm out of ideas"
|
2015-12-21 00:16:39 +03:00
|
|
|
lose:(spam leaf+-< leaf+-> [>p.p.are< q.p.are])
|
2015-05-12 03:31:37 +03:00
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%fine
|
|
|
|
?. ?=(%bad-fine-merge p.p.are)
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ "auto merge failed on strategy %fine"
|
2015-12-21 00:16:39 +03:00
|
|
|
lose:(spam leaf+- >p.p.are< q.p.are)
|
|
|
|
=> (spam leaf+"%fine merge failed, trying %meet" ~)
|
2015-09-02 01:20:17 +03:00
|
|
|
perform(gem %meet)
|
2015-07-28 01:39:36 +03:00
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%meet
|
|
|
|
?. ?=(%meet-conflict p.p.are)
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ "auto merge failed on strategy %meet"
|
2015-12-21 00:16:39 +03:00
|
|
|
lose:(spam leaf+- >p.p.are< q.p.are)
|
|
|
|
=> (spam leaf+"%meet merge failed, trying %mate" ~)
|
2015-09-02 01:20:17 +03:00
|
|
|
perform(gem %mate)
|
2015-07-28 01:39:36 +03:00
|
|
|
::
|
2020-11-25 22:39:13 +03:00
|
|
|
%mate
|
|
|
|
?. ?=(%mate-conflict p.p.are)
|
2015-09-02 01:20:17 +03:00
|
|
|
=+ "auto merge failed on strategy %mate"
|
2015-12-21 00:16:39 +03:00
|
|
|
lose:(spam leaf+- >p.p.are< q.p.are)
|
2015-09-02 01:20:17 +03:00
|
|
|
=> .(gem %meld)
|
|
|
|
=+ tic=(cat 3 syd '-scratch')
|
|
|
|
=> =+ :- "%mate merge failed with conflicts,"
|
|
|
|
"setting up scratch space at %{(trip tic)}"
|
2015-12-21 00:16:39 +03:00
|
|
|
[tic=tic (spam leaf+-< leaf+-> q.p.are)]
|
2020-05-14 05:28:04 +03:00
|
|
|
=. ..mere (fancy-merge tic our syd %init)
|
|
|
|
=> (spam leaf+"%melding %{(trip sud)} into scratch space" ~)
|
|
|
|
%- blab :_ ~
|
2020-08-28 10:24:25 +03:00
|
|
|
?< ?=(%this gem)
|
|
|
|
?< ?=(%that gem)
|
2020-05-14 05:28:04 +03:00
|
|
|
=/ note [%merg (cat 3 syd '-scratch') her sud cas gem]
|
|
|
|
[%pass /kiln/[syd] %arvo %c note]
|
2015-09-02 01:20:17 +03:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ tape-to-tanks
|
2020-11-25 23:22:55 +03:00
|
|
|
|= a=tape ^- (list tank)
|
|
|
|
(scan a (more (just '\0a') (cook |=(a=tape leaf+a) (star prn))))
|
2015-09-02 01:20:17 +03:00
|
|
|
::
|
|
|
|
++ tanks-if-any
|
2020-11-26 17:09:31 +03:00
|
|
|
|= [a=tape b=(list path) c=tape] ^- (list tank)
|
2015-09-02 01:20:17 +03:00
|
|
|
?: =(~ b) ~
|
|
|
|
(welp (tape-to-tanks "\0a{c}{a}") >b< ~)
|
2015-05-12 03:31:37 +03:00
|
|
|
--
|
|
|
|
--
|