Merge pull request #6852 from urbit/pkova/migrate-sky

gall: migrate sky to versioned path
This commit is contained in:
Pyry Kovanen 2023-11-27 19:01:16 +02:00 committed by GitHub
commit 9abab5d650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 86 additions and 54 deletions

View File

@ -2762,7 +2762,7 @@
sky=(map spur path-state) sky=(map spur path-state)
ken=(jug spar:ames wire) ken=(jug spar:ames wire)
== == == ==
+$ egg-any $%([%15 egg]) +$ egg-any $%([%15 egg] [%16 egg])
+$ bowl :: standard app state +$ bowl :: standard app state
$: $: our=ship :: host $: $: our=ship :: host
src=ship :: guest src=ship :: guest

View File

@ -42,9 +42,9 @@
:: $move: Arvo-level move :: $move: Arvo-level move
:: ::
+$ move [=duct move=(wind note-arvo gift-arvo)] +$ move [=duct move=(wind note-arvo gift-arvo)]
:: $state-15: overall gall state, versioned :: $state-16: overall gall state, versioned
:: ::
+$ state-15 [%15 state] +$ state-16 [%16 state]
:: $state: overall gall state :: $state: overall gall state
:: ::
:: system-duct: TODO document :: system-duct: TODO document
@ -150,8 +150,7 @@
:: remember to duplicate version tag changes here to $egg-any:gall in lull :: remember to duplicate version tag changes here to $egg-any:gall in lull
:: ::
+$ spore +$ spore
$: %15 $: system-duct=duct
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request)) outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship) contacts=(set ship)
eggs=(map term egg) eggs=(map term egg)
@ -159,10 +158,11 @@
=bug =bug
leaves=(unit [=duct =wire date=@da]) leaves=(unit [=duct =wire date=@da])
== ==
+$ spore-16 [%16 spore]
-- --
:: adult gall vane interface, for type compatibility with pupa :: adult gall vane interface, for type compatibility with pupa
:: ::
=| state=state-15 =| state=state-16
|= [now=@da eny=@uvJ rof=roof] |= [now=@da eny=@uvJ rof=roof]
=* gall-payload . =* gall-payload .
~% %gall-top ..part ~ ~% %gall-top ..part ~
@ -1062,7 +1062,7 @@
%+ trace & %+ trace &
[leaf+"gall: {<agent-name>}: cull {<[case spur]>} no paths"]~ [leaf+"gall: {<agent-name>}: cull {<[case spur]>} no paths"]~
=/ fis (need (pry:on-path fan.u.old)) =/ fis (need (pry:on-path fan.u.old))
?. &((gth yon key.fis) (lte yon key.u.las)) ?. &((gte yon key.fis) (lte yon key.u.las))
%. sky.yoke %. sky.yoke
%+ trace & %+ trace &
:_ ~ :_ ~
@ -1959,31 +1959,33 @@
:: ::
++ load ++ load
|^ |= old=spore-any |^ |= old=spore-any
=? old ?=(%7 -.old) (spore-7-to-8 old) =? old ?=(%7 -.old) (spore-7-to-8 +.old)
=? old ?=(%8 -.old) (spore-8-to-9 old) =? old ?=(%8 -.old) (spore-8-to-9 +.old)
=? old ?=(%9 -.old) (spore-9-to-10 old) =? old ?=(%9 -.old) (spore-9-to-10 +.old)
=? old ?=(%10 -.old) (spore-10-to-11 old) =? old ?=(%10 -.old) (spore-10-to-11 +.old)
=? old ?=(%11 -.old) (spore-11-to-12 old) =? old ?=(%11 -.old) (spore-11-to-12 +.old)
=? old ?=(%12 -.old) (spore-12-to-13 old) =? old ?=(%12 -.old) (spore-12-to-13 +.old)
=? old ?=(%13 -.old) (spore-13-to-14 old) =? old ?=(%13 -.old) (spore-13-to-14 +.old)
=? old ?=(%14 -.old) (spore-14-to-15 old) =? old ?=(%14 -.old) (spore-14-to-15 +.old)
?> ?=(%15 -.old) =? old ?=(%15 -.old) (spore-15-to-16 +.old)
?> ?=(%16 -.old)
gall-payload(state old) gall-payload(state old)
:: ::
+$ spore-any +$ spore-any
$% spore $% [%16 spore]
spore-7 [%7 spore-7]
spore-8 [%8 spore-8]
spore-9 [%9 spore-9]
spore-10 [%10 spore-10]
spore-11 [%11 spore-11]
spore-12 [%12 spore-12]
spore-13 [%13 spore-13]
spore-14 [%14 spore-14]
[%15 spore-15]
== ==
+$ spore-15 spore
+$ spore-14 +$ spore-14
$: %14 $: system-duct=duct
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request)) outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship) contacts=(set ship)
eggs=(map term egg) eggs=(map term egg)
@ -1991,8 +1993,7 @@
=bug =bug
== ==
+$ spore-13 +$ spore-13
$: %13 $: system-duct=duct
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request)) outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship) contacts=(set ship)
eggs=(map term egg) eggs=(map term egg)
@ -2005,8 +2006,7 @@
attributing=ship attributing=ship
== ==
+$ spore-12 +$ spore-12
$: %12 $: system-duct=duct
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request)) outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship) contacts=(set ship)
eggs=(map term egg-12) eggs=(map term egg-12)
@ -2030,8 +2030,7 @@
sky=(map spur path-state) sky=(map spur path-state)
== == == ==
+$ spore-11 +$ spore-11
$: %11 $: system-duct=duct
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request)) outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship) contacts=(set ship)
eggs=(map term egg-11) eggs=(map term egg-11)
@ -2052,8 +2051,7 @@
marks=(map duct mark) marks=(map duct mark)
== ==
+$ spore-10 +$ spore-10
$: %10 $: system-duct=duct
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request)) outstanding=(map [wire duct] (qeu remote-request))
contacts=(set ship) contacts=(set ship)
eggs=(map term egg-10) eggs=(map term egg-10)
@ -2074,8 +2072,7 @@
marks=(map duct mark) marks=(map duct mark)
== ==
+$ spore-9 +$ spore-9
$: %9 $: system-duct=duct
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request-9)) outstanding=(map [wire duct] (qeu remote-request-9))
contacts=(set ship) contacts=(set ship)
eggs=(map term egg-10) eggs=(map term egg-10)
@ -2086,8 +2083,7 @@
+$ remote-request-9 ?(remote-request %cork) +$ remote-request-9 ?(remote-request %cork)
:: ::
+$ spore-8 +$ spore-8
$: %8 $: system-duct=duct
system-duct=duct
outstanding=(map [wire duct] (qeu remote-request-9)) outstanding=(map [wire duct] (qeu remote-request-9))
contacts=(set ship) contacts=(set ship)
eggs=(map term egg-8) eggs=(map term egg-8)
@ -2106,8 +2102,7 @@
+$ watches-8 [inbound=bitt outbound=boat-8] +$ watches-8 [inbound=bitt outbound=boat-8]
+$ boat-8 (map [wire ship term] [acked=? =path]) +$ boat-8 (map [wire ship term] [acked=? =path])
+$ spore-7 +$ spore-7
$: %7 $: wipe-eyre-subs=_| ::NOTE band-aid for #3196
wipe-eyre-subs=_| ::NOTE band-aid for #3196
system-duct=duct system-duct=duct
outstanding=(map [wire duct] (qeu remote-request-9)) outstanding=(map [wire duct] (qeu remote-request-9))
contacts=(set ship) contacts=(set ship)
@ -2117,20 +2112,22 @@
:: ::
++ spore-7-to-8 ++ spore-7-to-8
|= old=spore-7 |= old=spore-7
^- spore-8 ^- spore-any
:- %8 :- %8
^- spore-8
=. eggs.old =. eggs.old
%- ~(urn by eggs.old) %- ~(urn by eggs.old)
|= [a=term e=egg-8] |= [a=term e=egg-8]
:: kiln will kick off appropriate app revival :: kiln will kick off appropriate app revival
:: ::
e(old-state [%| p.old-state.e]) e(old-state [%| p.old-state.e])
+>.old +.old
:: ::
++ spore-8-to-9 ++ spore-8-to-9
|= old=spore-8 |= old=spore-8
:- %9
^- spore-9 ^- spore-9
=- old(- %9, eggs -, blocked [blocked.old *bug]) =- old(eggs -, blocked [blocked.old *bug])
%- ~(run by eggs.old) %- ~(run by eggs.old)
|= =egg-8 |= =egg-8
^- egg-10 ^- egg-10
@ -2153,7 +2150,9 @@
:: ::
++ spore-9-to-10 ++ spore-9-to-10
|= old=spore-9 |= old=spore-9
=- old(- %10, outstanding -) :- %10
^- spore-10
=- old(outstanding -)
%- ~(run by outstanding.old) %- ~(run by outstanding.old)
|= q=(qeu remote-request-9) |= q=(qeu remote-request-9)
%- ~(gas to *(qeu remote-request)) %- ~(gas to *(qeu remote-request))
@ -2166,9 +2165,9 @@
:: ::
++ spore-10-to-11 ++ spore-10-to-11
|= old=spore-10 |= old=spore-10
:- %11
^- spore-11 ^- spore-11
%= old %= old
- %11
eggs eggs
%- ~(urn by eggs.old) %- ~(urn by eggs.old)
|= [a=term e=egg-10] |= [a=term e=egg-10]
@ -2180,9 +2179,9 @@
:: ::
++ spore-11-to-12 ++ spore-11-to-12
|= old=spore-11 |= old=spore-11
:- %12
^- spore-12 ^- spore-12
%= old %= old
- %12
eggs eggs
%- ~(urn by eggs.old) %- ~(urn by eggs.old)
|= [a=term e=egg-11] |= [a=term e=egg-11]
@ -2194,9 +2193,9 @@
:: ::
++ spore-12-to-13 ++ spore-12-to-13
|= old=spore-12 |= old=spore-12
:- %13
^- spore-13 ^- spore-13
%= old %= old
- %13
eggs eggs
%- ~(urn by eggs.old) %- ~(urn by eggs.old)
|= [a=term e=egg-12] |= [a=term e=egg-12]
@ -2208,10 +2207,9 @@
:: ::
++ spore-13-to-14 ++ spore-13-to-14
|= old=spore-13 |= old=spore-13
:- %14
^- spore-14 ^- spore-14
%= old %= old
- %14
::
blocked blocked
^- (map term (qeu blocked-move)) ^- (map term (qeu blocked-move))
%- ~(run by blocked.old) %- ~(run by blocked.old)
@ -2228,8 +2226,35 @@
:: ::
++ spore-14-to-15 ++ spore-14-to-15
|= old=spore-14 |= old=spore-14
^- spore :- %15
old(- %15, bug [bug.old ~]) ^- spore-15
old(bug [bug.old ~])
:: convert to versioned sky
::
++ spore-15-to-16
|= old=spore-15
^- spore-16
:- %16
%= old
eggs
%- ~(urn by eggs.old)
|= [=term e=egg]
^- egg
?: ?=(%nuke -.e) e(sky *(map spur @ud))
%= e
sky
%- molt
%+ turn ~(tap by sky.e)
|= [=spur p=path-state]
:- spur
:- ~
=/ m ~(val by fan.p)
%+ gas:on-path *_fan.p
%+ turn (gulf 1 ~(wyt by fan.p))
|= a=@ud
[a (snag (dec a) m)]
==
==
-- --
:: +scry: standard scry :: +scry: standard scry
:: ::
@ -2341,14 +2366,17 @@
?: ?& =(%w care) ?: ?& =(%w care)
=([%$ %da now] coin) =([%$ %da now] coin)
=(our ship) =(our ship)
?=([%'1' *] path)
== ==
=> .(path t.path)
=/ yok (~(get by yokes.state) q.bem) =/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) [~ ~] ?. ?=([~ %live *] yok) [~ ~]
?~ ski=(~(get by sky.u.yok) path) [~ ~] ?~ ski=(~(get by sky.u.yok) path) [~ ~]
?~ las=(ram:on-path fan.u.ski) [~ ~] ?~ las=(ram:on-path fan.u.ski) [~ ~]
``case/!>(ud/key.u.las) ``case/!>(ud/key.u.las)
:: ::
?: ?=(%x care) ?: &(?=(%x care) ?=([%'1' *] path))
=> .(path t.path)
?. =(p.bem our) ~ ?. =(p.bem our) ~
:: ::
?: ?=(%$ q.bem) :: app %$ reserved ?: ?=(%$ q.bem) :: app %$ reserved
@ -2401,7 +2429,9 @@
?: ?& =(%t care) ?: ?& =(%t care)
=([%$ %da now] coin) =([%$ %da now] coin)
=(our ship) =(our ship)
?=([%'1' *] path)
== ==
=> .(path t.path)
=/ yok (~(get by yokes.state) q.bem) =/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) ~ ?. ?=([~ %live *] yok) ~
:^ ~ ~ %file-list !> ^- (list ^path) :^ ~ ~ %file-list !> ^- (list ^path)
@ -2413,7 +2443,9 @@
:: ::
?: ?& =(%z care) ?: ?& =(%z care)
=(our ship) =(our ship)
?=([%'1' *] path)
== ==
=> .(path t.path)
=/ yok (~(get by yokes.state) q.bem) =/ yok (~(get by yokes.state) q.bem)
?. ?=([~ %live *] yok) ~ ?. ?=([~ %live *] yok) ~
?~ ski=(~(get by sky.u.yok) path) ~ ?~ ski=(~(get by sky.u.yok) path) ~
@ -2432,7 +2464,7 @@
:: TODO: superfluous? see +molt :: TODO: superfluous? see +molt
:: ::
++ stay ++ stay
^- spore ^- spore-16
=; eggs=(map term egg) state(yokes eggs) =; eggs=(map term egg) state(yokes eggs)
%- ~(run by yokes.state) %- ~(run by yokes.state)
|= =yoke |= =yoke