docket: force a |rein %base prior to fixing #5667

This commit is contained in:
yosoyubik 2022-04-27 14:10:24 +02:00
parent 8aaeeef405
commit 9bb844ada9

View File

@ -2,8 +2,9 @@
/+ *server, agentio, default-agent, multipart, dbug, verb
|%
+$ card card:agent:gall
+$ state-0
$: :: local
+$ app-state
$: %2
:: local
charges=(map desk charge)
==
:: $cache: impermanent state
@ -11,7 +12,7 @@
by-base=(map term desk)
::
+$ inflated-state
[state-0 cache]
[app-state cache]
:: +lac: toggle verbosity
++ lac &
::
@ -50,12 +51,15 @@
++ on-load
|= =vase
^- (quip card _this)
=+ !<(old=state-0 vase)
=* cha ~(. ch q.byk.bowl)
|^
=. -.state old
=. +.state inflate-cache
`this
=+ !<(old=app-states vase)
=? old ?=(?(~ ^) -.old) [%1 old]
=^ cards old
?. ?=(%1 -.old) `old
:_ old(- %2)
[%pass /rein %agent [our.bowl %hood] %poke kiln-rein+!>([%base %.y ~ ~])]~
?> ?=(%2 -.old)
[cards this(state [old inflate-cache])]
::
++ inflate-cache
^- cache
@ -64,6 +68,22 @@
|= [=desk =charge]
?. ?=(%glob -.href.docket.charge) ~
`:_(desk base.href.docket.charge)
::
+$ app-states
$^ state-0-ket
$% state-0-sig
state-1
app-state
==
::
+$ state-1 [%1 (map desk charge)]
+$ state-0-sig
$: ~
==
::
+$ state-0-ket
$: (map desk charge)
==
--
::
++ on-save !>(-.state)
@ -182,6 +202,7 @@
=^ cards state
?+ wire ~&(bad-docket-take+wire `state)
~ `state
[%rein ~] `state
[%kiln ~] take-kiln
[%charge @ *] (take-charge i.t.wire t.t.wire)
==