Merge branch 'next/kelvin/412' into tinnus/local-provenance

This commit is contained in:
Tinnus Napbus 2023-06-07 20:38:05 +12:00
commit 7c3a1c4d7c
15 changed files with 1766 additions and 2373 deletions

View File

@ -45,7 +45,6 @@
|= [=mark =vase]
^- (quip card _this)
|^
?> (team:title our.bowl src.bowl)
?+ mark (on-poke:def mark vase)
%handle-http-request
=+ !<([id=@ta req=inbound-request:eyre] vase)
@ -53,6 +52,7 @@
(handle-http-request id req)
::
%azimuth-action
?> (team:title our.bowl src.bowl)
=+ !<([%disconnect bind=binding:eyre] vase)
~& >>> "disconnecting at {<bind>}"
:_ this

View File

@ -368,7 +368,8 @@
(gth expiry-time.a expiry-time.b)
|= [cookie=@uv session:eyre]
%- pairs
:~ 'cookie'^s+(end [3 4] (rsh [3 2] (scot %x (shax cookie))))
:~ 'cookie'^s+(scot %uv cookie)
'identity'^(render-identity:v-eyre identity)
'expiry'^(time expiry-time)
'channels'^(numb ~(wyt in channels))
==
@ -383,6 +384,7 @@
|= [key=@t channel:eyre]
%- pairs
:~ 'session'^s+key
'identity'^(render-identity:v-eyre identity)
'connected'^b+!-.state
'expiry'^?-(-.state %& (time date.p.state), %| ~)
'next-id'^(numb next-id)
@ -992,6 +994,15 @@
++ channel-state
(scry ^channel-state %e %channel-state ~)
::
++ render-identity
|= =identity
^- json
%- ship:enjs:format
?- -.identity
%ours our.bowl
%fake who.identity
==
::
++ render-action
|= =action
^- json

File diff suppressed because one or more lines are too long

View File

@ -89,7 +89,6 @@
++ on-watch
|= =path
^- (quip card _this)
?> (team:title our.bowl src.bowl)
?+ path (on-watch:def path)
[%http-response *] [~ this]
==

View File

@ -0,0 +1,24 @@
|_ [cur=vere next=(unit vere)]
++ en-vere
|= v=vere
%- pairs:enjs:format
:- [%non s+non.v]
:- [%rev (path:enjs:format rev.v)]
%+ turn kel.v
|= w=weft
[lal.w (numb:enjs:format num.w)]
::
++ grab
|%
++ noun ,[cur=vere next=(unit vere)]
--
++ grow
|%
++ json
%- pairs:enjs:format
:- [%cur (en-vere cur)]
?~ next ~
:- [%next (en-vere u.next)] ~
--
++ grad %noun
--

View File

@ -768,6 +768,7 @@
:: %cork: request to delete message flow
:: %kroc: request to delete stale message flows
:: %plea: request to send message
:: %deep: deferred calls to %ames, from itself
::
:: Remote Scry Tasks
::
@ -795,6 +796,7 @@
[%cork =ship]
[%kroc dry=?]
$>(%plea vane-task)
[%deep =deep]
::
[%keen spar]
[%yawn spar]
@ -902,7 +904,15 @@
:: life based on the ship.
::
+$ spar [=ship =path]
:: $deep: deferred %ames call, from self, to keep +abet cores pure
::
+$ deep
$% [%nack =ship =nack=bone =message-blob]
[%sink =ship =target=bone naxplanation=[=message-num =error]]
[%drop =ship =nack=bone =message-num]
[%cork =ship =bone]
[%kill =ship =bone]
==
:: +| %atomics
::
+$ bone @udbone
@ -2164,6 +2174,14 @@
:: inbound-request: the original request which caused this connection
::
=inbound-request
:: session-id: the session associated with this connection
:: identity: the identity associated with this connection
::
::NOTE technically the identity is associated with the session (id),
:: but we may still need to know the identity that was used
:: after the session proper expires.
::
[session-id=@uv =identity]
:: response-header: set when we get our first %start
::
response-header=(unit response-header:http)
@ -2181,7 +2199,10 @@
:: +session: server side data about a session
::
+$ session
$: :: expiry-time: when this session expires
$: :: identity: authentication level & id of this session
::
=identity
:: expiry-time: when this session expires
::
:: We check this server side, too, so we aren't relying on the browser
:: to properly handle cookie expiration as a security mechanism.
@ -2195,6 +2216,14 @@
:: mint some sort of long lived cookie for mobile apps which only has
:: access to a single application path.
==
:: $identity: authentication method & @p
::
+$ identity
$~ [%ours ~]
$% [%ours ~] :: local, root
[%fake who=@p] :: guest id
:: [%real who=@p] :: authed cross-ship
==
:: channel-state: state used in the channel system
::
+$ channel-state
@ -2238,6 +2267,7 @@
::
+$ channel
$: mode=?(%json %jam)
=identity
:: channel-state: expiration time or the duct currently listening
::
:: For each channel, there is at most one open EventSource
@ -2322,6 +2352,9 @@
:: respond with the @p the requester is authenticated as
::
[%name ~]
:: respond with the @p of the ship serving the response
::
[%host ~]
:: respond with the default file not found page
::
[%four-oh-four ~]

View File

@ -180,20 +180,6 @@
=+ wid=(met 3 pat)
?> (lte wid 384)
[pat wid]
::
:: +bind-duct: find or make new $bone for .duct in .ossuary
::
++ bind-duct
|= [=ossuary =duct]
^+ [next-bone.ossuary ossuary]
::
?^ existing=(~(get by by-duct.ossuary) duct)
[u.existing ossuary]
::
:- next-bone.ossuary
:+ (add 4 next-bone.ossuary)
(~(put by by-duct.ossuary) duct next-bone.ossuary)
(~(put by by-bone.ossuary) next-bone.ossuary duct)
:: +make-bone-wire: encode ship, rift and bone in wire for sending to vane
::
++ make-bone-wire
@ -453,17 +439,17 @@
++ sift-shut-packet
~/ %sift-shut-packet
|= [=shot =symmetric-key sndr-life=@ rcvr-life=@]
^- shut-packet
?. =(sndr-tick.shot (mod sndr-life 16))
~| ames-sndr-tick+sndr-tick.shot !!
?. =(rcvr-tick.shot (mod rcvr-life 16))
~| ames-rcvr-tick+rcvr-tick.shot !!
^- (unit shut-packet)
?. ?& =(sndr-tick.shot (mod sndr-life 16))
=(rcvr-tick.shot (mod rcvr-life 16))
==
~
=/ siv (end 7 content.shot)
=/ len (end 4 (rsh 7 content.shot))
=/ cyf (rsh [3 18] content.shot)
~| ames-decrypt+[[sndr rcvr origin]:shot len siv]
=/ vec ~[sndr.shot rcvr.shot sndr-life rcvr-life]
;; shut-packet %- cue %- need
%- some ;; shut-packet %- cue %- need
(~(de sivc:aes:crypto (shaz symmetric-key) vec) siv len cyf)
::
++ is-peer-dead
@ -1102,14 +1088,17 @@
:: message on a "forward flow" from a peer, originally passed from
:: one of the peer's vanes to the peer's Ames.
::
:: Ames passes a %plea to itself to handle internal %cork moves
:: Ames passes a %deep task to itself to handle deferred calls
:: Ames passes a %private-keys to Jael to request our private keys.
:: Ames passes a %public-keys to Jael to request a peer's public
:: keys.
::
+$ note
$~ [%b %wait *@da]
$% $: %b
$% $: %a
$>(%deep task:ames)
==
$: %b
$>(?(%wait %rest) task:behn)
==
$: %c
@ -1666,14 +1655,14 @@
^+ peer-core
:: handle cork only deals with bones that are in closing
::
(handle-cork:abet:(call:(abed:mi:peer-core bone) %done ok=%.y) bone)
%. bone
handle-cork:abet:(call:(abed:mi:peer-core bone) %done ok=%.y)
:: failed; send message nack packet
::
++ send-nack
|= [=bone =^error]
^+ peer-core
=. peer-core abet:(call:(abed:mi:peer-core bone) %done ok=%.n)
=. event-core abet:peer-core :: XX extraneous?
=. peer-core abet:(call:(abed:mi:peer-core bone) %done ok=%.n)
:: construct nack-trace message, referencing .failed $message-num
::
=/ failed=message-num
@ -1683,7 +1672,7 @@
:: send nack-trace message on associated .nack-bone
::
=/ nack-bone=^bone (mix 0b10 bone)
abet:(call:(abed:mu:(abed-got:pe her) nack-bone) %memo message-blob)
abet:(call:(abed:mu:peer-core nack-bone) %memo message-blob)
--
:: +on-sift: handle request to filter debug output by ship
::
@ -1983,9 +1972,23 @@
::
=/ =peer-state +.u.sndr-state
=/ =channel [[our sndr.shot] now channel-state -.peer-state]
=? event-core !=(sndr-tick.shot (mod her-life.channel 16))
%. event-core
%^ ev-trace odd.veb sndr.shot
|. ^- tape
=/ sndr [sndr-tick=sndr-tick.shot her-life=her-life.channel]
"sndr-tick mismatch {<sndr>}"
=? event-core !=(rcvr-tick.shot (mod our-life.channel 16))
%. event-core
%^ ev-trace odd.veb sndr.shot
|. ^- tape
=/ rcvr [rcvr-tick=rcvr-tick.shot our-life=our-life.channel]
"rcvr-tick mismatch {<rcvr>}"
~| %ames-crash-on-packet-from^her.channel
=/ =shut-packet
=/ shut-packet=(unit shut-packet)
(sift-shut-packet shot [symmetric-key her-life our-life]:channel)
?~ shut-packet
event-core
:: non-galaxy: update route with heard lane or forwarded lane
::
=? route.peer-state !=(%czar (clan:title her.channel))
@ -2018,7 +2021,7 @@
:: perform peer-specific handling of packet
::
=< abet
(~(on-hear-shut-packet pe peer-state channel) [lane shut-packet dud])
(~(on-hear-shut-packet pe peer-state channel) [lane u.shut-packet dud])
:: +on-take-boon: receive request to give message to peer
::
++ on-take-boon
@ -2052,16 +2055,6 @@
++ on-plea
|= [=ship =plea]
^+ event-core
:: since flow kill goes like:
:: client vane cork task -> client ames pass cork as plea ->
:: -> server ames sinks plea -> server ames +on-plea (we are here);
:: if it's %cork plea passed to ames from its sink,
:: give %done and process flow closing after +on-take-done call
::
?: =([%a /close ~] plea) (emit duct %give %done ~)
::
:: .plea is from local vane to foreign ship
::
=/ ship-state (~(get by peers.ames-state) ship)
::
?. ?=([~ %known *] ship-state)
@ -2069,16 +2062,16 @@
|= todos=alien-agenda
todos(messages [[duct plea] messages.todos])
::
=/ =peer-state +.u.ship-state
=/ =channel [[our ship] now channel-state -.peer-state]
=+ peer-core=(abed-peer:pe ship +.u.ship-state)
:: .plea is from local vane to foreign ship
::
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
=^ =bone peer-core (bind-duct:peer-core duct)
%- %^ ev-trace msg.veb ship
|. ^- tape
=/ sndr [our our-life.channel]
=/ rcvr [ship her-life.channel]
=/ sndr [our our-life.channel.peer-core]
=/ rcvr [ship her-life.channel.peer-core]
"plea {<sndr rcvr bone=bone vane.plea path.plea>}"
abet:(~(on-memo pe [peer-state channel]) bone plea %plea)
abet:(on-memo:peer-core bone plea %plea)
:: +on-cork: handle request to kill a flow
::
++ on-cork
@ -2090,26 +2083,23 @@
%^ enqueue-alien-todo ship ship-state
|= todos=alien-agenda
todos(messages [[duct plea] messages.todos])
=/ =peer-state +.u.ship-state
=/ =channel [[our ship] now channel-state -.peer-state]
::
=/ [=bone ossuary=_ossuary.peer-state]
?^ cork-bone [u.cork-bone ossuary.peer-state]
(bind-duct ossuary.peer-state duct)
=. ossuary.peer-state ossuary
=+ peer-core=(abed-peer:pe ship +.u.ship-state)
=^ =bone peer-core
?^ cork-bone [u.cork-bone peer-core]
(bind-duct:peer-core duct)
::
?. (~(has by by-bone.ossuary.peer-state) bone)
?. (~(has by by-bone.ossuary.peer-state.peer-core) bone)
%. event-core
%^ ev-trace odd.veb ship
|.("trying to cork {<bone=bone>}, not in the ossuary, ignoring")
::
=. closing.peer-state (~(put in closing.peer-state) bone)
%- %^ ev-trace msg.veb ship
|. ^- tape
=/ sndr [our our-life.channel]
=/ rcvr [ship her-life.channel]
=/ sndr [our our-life.channel.peer-core]
=/ rcvr [ship her-life.channel.peer-core]
"cork plea {<sndr rcvr bone=bone vane.plea path.plea>}"
abet:(~(on-memo pe [peer-state channel]) bone plea %plea)
abet:(on-memo:(on-cork-flow:peer-core bone) bone plea %plea)
:: +on-kroc: cork all stale flows from failed subscriptions
::
++ on-kroc
@ -2181,6 +2171,49 @@
|
%. &
(ev-trace &(dry odd.veb) ship |.((weld "failed %watch plea " log)))
:: +on-deep: deferred %ames calls from itself
::
++ on-deep
|= =deep
^+ event-core
:: currently $deep tasks are all focused on a
:: particular ship but future ones might not
::
?> ?=([@ =ship *] deep)
=/ ship-state (~(get by peers.ames-state) ship.deep)
?> ?=([~ %known *] ship-state)
=+ peer-core=(abed-peer:pe ship.deep +.u.ship-state)
|^ ?- -.deep
%nack abet:(send-nack-trace [nack-bone message-blob]:deep)
%sink abet:(sink-naxplanation [target-bone naxplanation]:deep)
%drop abet:(clear-nack [nack-bone message-num]:deep)
%cork =~((cork-bone bone.deep) (emit duct %give %done ~))
%kill (kill-bone bone.deep)
==
::
++ send-nack-trace
|= [=nack=bone =message-blob]
abet:(call:(abed:mu:peer-core nack-bone) %memo message-blob)
::
++ sink-naxplanation
|= [=target=bone =naxplanation]
abet:(call:(abed:mu:peer-core target-bone) %near naxplanation)
::
++ clear-nack
|= [=nack=bone =message-num]
abet:(call:(abed:mi:peer-core nack-bone) %drop message-num)
:: client ames [%cork as plea] -> server ames [sinks %cork plea],
:: pass %deep %cork task to self
:: put flow in closing (+cork-bone),
:: and give %done
:: sink %ack, pass %deep %kill <- after +on-take-done, ack %cork plea
:: task to self, and delete the and delete the flow in +handle-cork
:: flow (+kill-bone)
::
::
++ cork-bone |=(=bone abet:(on-cork-flow:peer-core bone))
++ kill-bone |=(=bone abet:(on-kill-flow:peer-core bone))
--
:: +on-take-wake: receive wakeup or error notification from behn
::
++ on-take-wake
@ -2782,6 +2815,21 @@
~| %dangling-bone^her^bone
(~(got by by-bone.ossuary.peer-state) bone)
::
:: +bind-duct: find or make new $bone for .duct in .ossuary
::
++ bind-duct
|= =^duct
=* ossa ossuary.peer-state
^+ [next-bone.ossa peer-core]
?^ existing=(~(get by by-duct.ossa) duct)
[u.existing peer-core]
:- next-bone.ossa
=. ossa
:+ (add 4 next-bone.ossa)
(~(put by by-duct.ossa) duct next-bone.ossa)
(~(put by by-bone.ossa) next-bone.ossa duct)
peer-core
::
++ is-corked
|= =bone
?| (~(has in corked.peer-state) bone)
@ -2953,6 +3001,35 @@
fi-abet:(fi-sub:(abed:fi path) duct)
=. keens (~(put by keens) path *keen-state)
fi-abet:(fi-start:(abed:fi path) duct)
:: +on-cork-flow: mark .bone as closing
::
++ on-cork-flow
|= =bone
^+ peer-core
peer-core(closing.peer-state (~(put in closing.peer-state) bone))
:: +on-kill-flow: delete flow on cork sender side
::
++ on-kill-flow
|= =bone
^+ peer-core
?: (~(has in corked.peer-state) bone)
~> %slog.0^leaf/"ames: ignoring kill on corked bone {<bone>}"
peer-core
=. peer-state
=, peer-state
%_ peer-state
:: if the publisher was behind, preemptively remove any nacks
::
rcv (~(del by (~(del by rcv) bone)) (mix 0b10 bone))
snd (~(del by snd) bone)
corked (~(put in corked) bone)
closing (~(del in closing) bone)
by-duct.ossuary (~(del by by-duct.ossuary) (got-duct bone))
by-bone.ossuary (~(del by by-bone.ossuary) bone)
==
:: since we got one cork ack, try the next one
::
recork-one
::
+| %implementation
:: +dedup-message: replace with any existing copy of this message
@ -3084,7 +3161,6 @@
~> %slog.0^leaf/"ames: recork {<her i.boz>}"
=/ =plea [%$ /flow [%cork ~]]
(on-memo i.boz plea %plea)
::
:: +handle-cork: handle flow kill after server ames has taken %done
::
++ handle-cork
@ -3364,7 +3440,7 @@
%- %+ pe-trace msg.veb
=/ dat [her bone=bone message-num=message-num -.task]
|.("remove naxplanation flow {<dat>}")
:: XX we avoid re-adding the bone in abet:mu; test that it works
:: we avoid re-adding the bone in abet:mu
::
=. snd.peer-state (~(del by snd.peer-state) bone)
peer-core
@ -3374,7 +3450,8 @@
?: =(0 (end 0 (rsh 0 bone))) peer-core
:: nack-trace bone; assume .ok, clear nack from |sink
::
abet:(call:(abed:mi (mix 0b10 bone)) %drop message-num)
%+ pe-emit duct
[%pass /clear-nack %a %deep %drop her (mix 0b10 bone) message-num]
:: if the bone belongs to a closing flow and we got a
:: naxplanation, don't relay ack to the client vane
::
@ -3382,8 +3459,7 @@
:: not a nack-trace bone; relay ack to client vane
::
(pe-emit (got-duct bone) %give %done error)
:: XX impure +abet pattern
:: +pump-cork: kill flow on cork sender side
:: +pump-cork: handle %cork on the publisher
::
++ pump-cork
|= =message-num
@ -3395,24 +3471,8 @@
%- %+ pe-trace odd.veb
|.("trying to delete a corked bone={<bone>}")
peer-core
=/ nack-bone=^bone (mix 0b10 bone)
=? rcv.peer-state (~(has by rcv.peer-state) nack-bone)
:: if the publisher was behind we remove nacks on that bone
::
(~(del by rcv.peer-state) nack-bone)
=. peer-state
=, peer-state
%_ peer-state
snd (~(del by snd) bone)
rcv (~(del by rcv) bone)
corked (~(put in corked) bone)
closing (~(del in closing) bone)
by-duct.ossuary (~(del by by-duct.ossuary) (got-duct bone))
by-bone.ossuary (~(del by by-bone.ossuary) bone)
==
:: since we got one cork ack, try the next one
::
recork-one
=/ =wire (make-bone-wire her her-rift.channel bone)
(pe-emit duct %pass wire %a %deep %kill her bone)
:: +pu: construct |packet-pump core
::
++ pu
@ -4003,33 +4063,33 @@
%- %+ pe-trace msg.veb
=/ dat [her bone=bone message-num=message-num]
|.("sink plea {<dat>}")
=; pe=_peer-core
=. peer-core pe
=? sink !ok (call %done ok=%.n)
sink
?. ok
:: send nack-trace with blank .error for security
::
=/ nack-bone=^bone (mix 0b10 bone)
=/ =message-blob (jam [message-num *error])
abet:(call:(abed:mu nack-bone) %memo message-blob)
=+ ;; =plea message
=/ =wire (make-bone-wire her her-rift.channel nack-bone)
:: send nack-trace with blank .error for security
::
=. peer-core
%+ pe-emit duct
[%pass wire %a %deep %nack her nack-bone message-blob]
::
(done ok=%.n)
::
=/ =wire (make-bone-wire her her-rift.channel bone)
::
?. =(vane.plea %$)
?+ vane.plea ~| %ames-evil-vane^our^her^vane.plea !!
%c (pe-emit duct %pass wire %c %plea her plea)
%g (pe-emit duct %pass wire %g %plea her plea)
%j (pe-emit duct %pass wire %j %plea her plea)
==
:: a %cork plea is handled using %$ as the recipient vane to
:: account for publishers that still handle ames-to-ames %pleas
::
?> &(?=([%cork *] payload.plea) ?=(%flow -.path.plea))
:: XX FIXME impure +abet pattern...
::
=. closing.peer-state (~(put in closing.peer-state) bone)
(pe-emit duct %pass wire %a %plea her [%a /close ~])
=. peer-core
=+ ;; =plea message
?. =(vane.plea %$)
?+ vane.plea ~| %ames-evil-vane^our^her^vane.plea !!
%c (pe-emit duct %pass wire %c %plea her plea)
%g (pe-emit duct %pass wire %g %plea her plea)
%j (pe-emit duct %pass wire %j %plea her plea)
==
:: a %cork plea is handled using %$ as the recipient vane to
:: account for publishers that still handle ames-to-ames %pleas
::
?> &(?=([%cork *] payload.plea) ?=(%flow -.path.plea))
(pe-emit duct %pass wire %a %deep %cork her bone)
sink
::
:: +ha-boon: handle response message, acking unconditionally
::
@ -4063,7 +4123,7 @@
[duct.move %give %lost ~]
:: send ack unconditionally
::
(call %done ok=%.y)
(done ok=%.y)
::
++ ha-nack
^+ sink
@ -4077,12 +4137,14 @@
::
=/ target=^bone (mix 0b10 bone)
=. peer-core
:: notify |message-pump that this message got naxplained
:: will notify |message-pump that this message got naxplained
::
abet:(call:(abed:mu target) %near ;;(naxplanation message))
=/ =wire (make-bone-wire her her-rift.channel target)
%+ pe-emit duct
[%pass wire %a %deep %sink her target ;;(naxplanation message)]
:: ack nack-trace message (only applied if we don't later crash)
::
(call %done ok=%.y)
(done ok=%.y)
--
--
:: +fi: constructor for |fine remote scry core
@ -4455,12 +4517,12 @@
++ max-backoff
^- @dr
?:(?=([[%gall %use %ping *] *] duct) ~s25 ~m2)
:: +in-slow-start: %.y iff we're in "slow-start" mode
:: +in-slow-start: %.y if we're in "slow-start" mode
::
++ in-slow-start
^- ?
(lth cwnd ssthresh)
:: +in-recovery: %.y iff we're recovering from a skipped packet
:: +in-recovery: %.y if we're recovering from a skipped packet
::
:: We finish recovering when .live-packets finally dips back
:: down to .cwnd.
@ -4595,6 +4657,7 @@
%plea (on-plea:event-core [ship plea]:task)
%cork (on-cork:event-core ship.task)
%kroc (on-kroc:event-core dry.task)
%deep (on-deep:event-core deep.task)
::
%keen (on-keen:event-core +.task)
%yawn (on-cancel-scry:event-core | +.task)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
/- spider
/+ strandio
=>
|%
+$ vere-update [cur=vere next=(unit vere)]
::
:: parse out the commit suffix for people on pre-release vere
:: these revisions look like /vere/~.2.7-de2d39b
:: we will have better pre-release (pace) handling later
++ parse-current-version
|= current=vere
^- @t
=/ v
%+ rush
(slav %ta (rear rev.current))
;~((glue hep) (star ;~(pose nud dot)) (star aln))
?~ v (slav %ta (rear rev.current))
(crip -.u.v)
::
++ is-equal-version
|= [latest=@t current=vere]
=(latest (parse-current-version current))
--
=, strand=strand:spider
^- thread:spider
|= arg=vase
=/ m (strand ,vase)
;< latest=cord bind:m
(fetch-cord:strandio "https://bootstrap.urbit.org/vere/live/last")
;< =bowl:spider bind:m get-bowl:strandio
=/ cur=vere .^(vere %$ /(scot %p our.bowl)//(scot %da now.bowl)/zen/ver)
=/ =vere-update
?: (is-equal-version latest cur)
[cur ~]
=| next=vere
[cur `next(rev /vere/(scot %ta latest))]
%- pure:m
!>(vere-update)

View File

@ -206,19 +206,24 @@
|= [ovo=ovum ken=*]
[~ (slum ken [now ovo])]
::
:: boot-two: startup formula
:: kernel-formula
::
:: We evaluate :arvo-formula (for jet registration),
:: then ignore the result and produce .installed
::
=/ kernel-formula
[%7 arvo-formula %1 installed]
::
:: boot-two: startup formula
::
=/ boot-two
=> *[arvo-formula=^ installed=^ tale=*]
!= =+(.*(0 arvo-formula) [installed tale])
=> *[kernel-formula=^ tale=*]
!= [.*(0 kernel-formula) tale]
::
:: boot-ova
::
=/ boot-ova=(list)
[aeon:eden:part boot-two arvo-formula installed ~]
[aeon:eden:part boot-two kernel-formula ~]
::
:: a pill is a 3-tuple of event-lists: [boot kernel userspace]
::

View File

@ -98,6 +98,10 @@ export class Eyre extends Component {
const summary = (<>
{c.session}
<table style={{borderBottom: '1px solid black'}}><tbody>
<tr>
<td class="inter">identity</td>
<td>{c['identity']}</td>
</tr>
<tr>
<td class="inter">connected?</td>
<td>{c.connected
@ -152,9 +156,26 @@ export class Eyre extends Component {
});
const sessionItems = props.authentication.map(s => {
return (<div>
{`${s.cookie} expires ${msToDa(s.expiry)}, uses ${s.channels} channel(s)`}
</div>);
return ({key: s.identity, jsx: (<div class="flex">
<div class="flex-auto" style={{maxWidth: '5em'}}>
{s.cookie.slice(0,6)}
</div>
<div class="flex-auto" style={{width: '40%'}}>
~{s.identity}
</div>
<div class="flex-auto">
{msToDa(s.expiry)}
</div>
<div class="flex-auto">
{s.channels} channel(s)
</div>
<div class="flex-auto">
<form method="post" action="/~/logout?redirect=/~debug/eyre">
<input type="hidden" name="sid" value={s.cookie} />
<button type="submit" name="all">kick</button>
</form>
</div>
</div>)});
});
return (<>
@ -174,14 +195,15 @@ export class Eyre extends Component {
</SearchableList>
<h4>Cookies</h4>
<button onClick={this.loadAuthenticationState}>refresh</button>
<form method="post" action="/~/logout">
<button type="submit">logout</button>
<button type="submit">logout self</button>
</form>
<form method="post" action="/~/logout">
<button type="submit" name="all">logout all</button>
<button type="submit" name="all">logout all selves</button>
</form>
{sessionItems}
<SearchableList placeholder="identity" items={sessionItems}>
<button onClick={this.loadAuthenticationState}>refresh</button>
</SearchableList>
</>);
}
}

View File

@ -20,7 +20,7 @@
::
++ bex-roof
^- roof
|= [lyc=gang vis=view bem=beam]
|= [lyc=gang pov=path vis=view bem=beam]
^- (unit (unit cage))
?> =(s.bem //some/data/atom)
?+ vis ~

View File

@ -398,7 +398,7 @@
0xb.130c.ab37.ca24.49cd.aecb.23ba.70f1.6f1c.4d00.124e.c9a5.
3413.3843.d81c.47c4.7040.6e62.3700.0200.0132.e1ab.9004
==
:~ :- ~[//unix] [%pass /bone/~nec/0/1 %a %plea ~nec [%a /close ~]]
:~ :- ~[//unix] [%pass /bone/~nec/0/1 %a %deep %cork ~nec 1]
==
==
:- t27 |. :- %|
@ -408,12 +408,12 @@
%: ames-check-call:v ames.bud
[~1111.1.8 0xbeef.dead *roof]
:- ~[/bone/~nec/0/1 //unix]
[%plea ~nec [%a /close ~]]
[%deep %cork ~nec 1]
:~ :- ~[/bone/~nec/0/1 //unix] [%give %done ~]
==
==
:: publisher ames hears cork done from self, sends ack packet
~& > 'publisher ames hears cork done from self, sends ack packet'
:: publisher ames hears cork done from self, sends ack and $cork to self
~& > 'publisher ames hears cork done from self, sends ack and $cork to self'
:- t28 |. :- %|
=^ t29 ames.bud
%: ames-check-take:v ames.bud
@ -474,8 +474,8 @@
[%gall %unto %watch-ack ~]
~
==
:: subscriber ames hears %cork ack
~& > 'subscriber ames hears %cork ack'
:: subscriber ames hears %cork ack, sends $kill to self
~& > 'subscriber ames hears %cork ack, sends $kill to self'
:- t32 |. :- %|
=^ t33 ames.nec
%: ames-check-call:v ames.nec
@ -485,9 +485,24 @@
0x5f.f966.8e00.0449.bdec.9006.c7e5.1237.
1d87.53fe.d7bb.ad00.0100.0223.c6a8.5804
==
[~[/ames] [%pass /pump/~bud/0 %b %rest ~1111.1.5..00.02.00]]~
:~ :- ~[//unix]
[%pass /bone/~bud/0/0 %a %deep %kill ~bud 0]
::
:- ~[/ames]
[%pass /pump/~bud/0 %b %rest ~1111.1.5..00.02.00]
==
==
:- t33 |. :- %&
:: subscriber ames hears $kill from self, deletes the flow
~& > 'subscriber ames hears $kill from self, deletes the flow'
:- t33 |. :- %|
=^ t34 ames.nec
%: ames-check-call:v ames.nec
[~1111.1.10 0xdead.beef *roof]
:- ~[/bone/~bud/0/0 //unix]
[%deep %kill ~bud 0]
~
==
:- t34 |. :- %&
;: weld
%+ expect-eq
!> (sy 0 ~)

View File

@ -288,10 +288,10 @@
=/ =shot:ames
(etch-shut-packet:ames shut-packet nec-sym ~marnec ~marbud-marbud 3 17)
::
=/ decoded (sift-shut-packet:ames shot nec-sym 3 17)
=/ decoded=(unit shut-packet:ames) (sift-shut-packet:ames shot nec-sym 3 17)
::
%+ expect-eq
!> shut-packet
!> `shut-packet
!> decoded
::
:: Crypto failures are now non-deterministic
@ -424,31 +424,33 @@
:: established a channel, and can proceed as usual
::
=/ post [%post 'first1!!']
=^ moves3 nec (call nec ~[//unix] %hear (snag-packet 0 moves2))
%+ weld
%- expect-fail |.
(call nec ~[//unix] %hear (snag-packet 1 moves2))
=^ moves3 nec (call nec ~[//unix] %hear (snag-packet 0 moves2))
=^ moves4 nec (call nec ~[//unix] %hear (snag-packet 1 moves2))
::
=^ moves4 comet (call comet ~[//unix] %hear (snag-packet 0 moves3))
=^ moves5 comet (take comet /bone/~nec/1/1 ~[//unix] %g %done ~)
=^ moves6 nec (call nec ~[//unix] %hear (snag-packet 0 moves5))
=^ moves7 comet (take comet /bone/~nec/1/1 ~[//unix] %g %boon post)
=^ moves8 nec (call nec ~[//unix] %hear (snag-packet 0 moves7))
=^ moves5 comet (call comet ~[//unix] %hear (snag-packet 0 moves3))
=^ moves6 comet (take comet /bone/~nec/1/1 ~[//unix] %g %done ~)
=^ moves7 nec (call nec ~[//unix] %hear (snag-packet 0 moves6))
=^ moves8 comet (take comet /bone/~nec/1/1 ~[//unix] %g %boon post)
=^ moves9 nec (call nec ~[//unix] %hear (snag-packet 0 moves8))
::
;: weld
%+ expect-eq
!> =- [~[//unix] %pass /qos %d %flog %text -]
"; ~nec is your neighbor"
!> (snag 0 `(list move:ames)`moves4)
!> (snag 0 `(list move:ames)`moves5)
::
%+ expect-eq
!> =- [~[//unix] %pass /qos %d %flog %text -]
"; {<our-comet>} is your neighbor"
!> (snag 0 `(list move:ames)`moves6)
!> (snag 0 `(list move:ames)`moves7)
::
%+ expect-eq
!> [~[/g/talk] %give %boon post]
!> (snag 0 `(list move:ames)`moves8)
!> (snag 0 `(list move:ames)`moves9)
::
%+ expect-eq
!> ~
!> moves4
==
::
++ test-comet-comet-message-flow ^- tang
@ -495,13 +497,25 @@
:: ~bud -> nack-trace -> ~nec
::
=^ moves5 nec (call nec ~[//unix] %hear (snag-packet 1 moves3))
:: ~nec -> naxplanation -> ~nec
::
=/ sink-naxplanation-plea
[%deep %sink ~bud bone=0 message-num=1 error]
=^ moves6 nec (call nec ~[//unix] sink-naxplanation-plea)
:: ~nec -> ack nack-trace -> ~bud
::
=^ moves6 bud (call bud ~[//unix] %hear (snag-packet 0 moves5))
=^ moves7 bud (call bud ~[//unix] %hear (snag-packet 0 moves5))
::
%+ expect-eq
!> [~[/g/talk] %give %done `error]
!> (snag 0 `(list move:ames)`moves5)
;: welp
%+ expect-eq
!> [~[/g/talk] %give %done `error]
!> (snag 0 `(list move:ames)`moves6)
::
%+ expect-eq
!> [~[//unix] %pass /bone/~bud/0/0 %a sink-naxplanation-plea]
!> (snag 0 `(list move:ames)`moves5)
::
==
::
++ test-boon-lost ^- tang
:: ~nec -> %plea -> ~bud

File diff suppressed because it is too large Load Diff