Commit Graph

1875 Commits

Author SHA1 Message Date
Philip Monk
c3f5fe923a docket: update to use tire instead of kiln 2022-09-13 16:14:43 -08:00
Philip Monk
c46fb686ff kiln: remove resolve XX's 2022-09-12 20:51:39 -08:00
Philip Monk
1102288d75 kiln: remove old |sync, various fixes 2022-09-06 22:52:59 -08:00
Philip Monk
8884e7dfbc kiln: make compile 2022-09-02 16:51:39 -08:00
Philip Monk
093f0ae9de Merge branch 'philip/inline-thread' into philip/agent-clay-wip 2022-09-01 19:03:17 -08:00
Philip Monk
e3a8cab943 khan: support inline threads
This allows you to pass a thread directly into khan, instead of passing
a filename.  This has several implications:

- The friction for using threads from an app is significantly lower.
  Consider:

    =/  shed
      =/  m  (strand ,vase)
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
      ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('there'))
      (pure:m !>('product'))
    [%pass /wire %arvo %k %lard %base shed]

- These threads close over their subject, so you don't need to parse
  arguments out from a vase -- you can just refer to them.  The produced
  value must still be a vase.

    ++  hi-ship
      |=  [=ship msg1=@t msg2=@t]
      =/  shed
        =/  m  (strand ,vase)
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg1))
        ;<  ~  bind:m  (poke:strandio [ship %hood] %helm-hi !>(msg2))
        (pure:m !>('product'))
      [%pass /wire %arvo %k %lard %base shed]

- Inline threads can be added to the dojo, though this PR does not add
  any sugar for this.

    =strandio -build-file %/lib/strandio/hoon
    =sh |=  message=@t
        =/  m  (strand:rand ,vase)
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>('hi'))
        ;<  ~  bind:m  (poke:strandio [our %hood] %helm-hi !>(message))
        (pure:m !>('product'))
    |pass [%k %lard %base (sh 'the message')]

Implementation notes:
- Review the commits separately: the first is small and implements the
  real feature.  The second moves the strand types into lull so khan can
  refer to them.

- In lull, I wanted to put +rand inside +khan, but this fails to that
  issue that puts the compiler in a loop.  +rand depends on +gall, which
  depends on +sign-arvo, which depends on +khan.  If +rand is in +khan,
  this spins the compiler.  The usual solution is to either move
  everything into the same battery (very ugly here) or break the
  recursion (which we do here).
2022-08-29 21:04:50 -08:00
Philip Monk
fa569cf7f3 kiln: wip 2022-08-29 10:53:36 -08:00
Philip Monk
9a4d754429 clay: add +tire subscription for app state 2022-08-25 19:13:51 -08:00
Philip Monk
ed3b028d9a Merge remote-tracking branch 'origin/master' into philip/snap 2022-08-23 14:16:57 -08:00
Joe Bryan
679b38138d ames: prevent larval stage from possibly clobbering adult state 2022-08-23 10:37:01 -04:00
Ted Blackman
5a96f3bdbe ames: drop %hear as larva; check duct before metamorpohse 2022-08-23 16:45:17 +03:00
Ted Blackman
07601c6bee ames: metamorphose on first +take if possible 2022-08-23 16:09:35 +03:00
Ted Blackman
9abe49489d ames: +on-stir clean up comments 2022-08-23 13:31:10 +03:00
Joe Bryan
9439841ce8 ames: refactor %stir, %rest stale/wrong timers 2022-08-22 20:14:02 -04:00
Philip Monk
c6024c2661 azimuth: clear logs on %kick
%kick is supposed to start back from the snapshot and move forward.
Without this, we would only fetch logs that we hadn't already fetched.
Thus, if you were up-to-date when you kicked, you would miss anything
that happened between the time the snapshot was taken and the present,
though you would see things after the present.

Also reverted lull change to make this a safer upgrade.
2022-08-19 15:04:30 -08:00
fang
a04d564269
Merge pull request #5963 from urbit/m/ames-eager-molt
ames: ensure larva initializes adult's state
2022-08-20 00:35:50 +02:00
fang
3a7938f057
ames: say "metamorphosis" in all relevant cases 2022-08-20 00:05:20 +02:00
fang
53b0e7ecaa
ames: ensure larva initializes adult's state
Previously, when the larva got to processing enqueued events, it was
doing so without loading state into the adult beforehand, resulting in
incorrect processing of events.

Here, we make the larva call +molt more eagerly, ensuring that the adult
always has its state available when we use it.
2022-08-19 23:58:10 +02:00
Philip Monk
ca0a00cb3c Merge remote-tracking branch 'origin/master' into philip/snap 2022-08-19 12:37:25 -08:00
fang
8108595b2b
gall: don't inject potentially-fake acks
We shouldn't be hitting this case anymore. Injecting events into agents
which they might not expect, and might not even be real, is bad.
2022-08-19 21:39:44 +02:00
fang
59f0556e3b
Merge pull request #5958 from urbit/ted/rake
gall: %rake task to clean up dead %leave's
2022-08-19 21:29:08 +02:00
fang
a79f2f27e5
Merge pull request #5961 from urbit/m/ames-stir-thoroughly
ames: don't skip closing flows in +on-stir
2022-08-19 21:22:49 +02:00
fang
a9a8619daa
Merge pull request #5947 from urbit/ted/staying-alive-rebase
gall: revive %hood and %dojo on keypress
2022-08-19 21:22:28 +02:00
fang
ce2e433a8a
ames: don't skip closing flows in +on-stir
Yes, there is a global timer for closing flows, but all that does is
enqueue a cork message. +on-stir needs to set _pump_ timers for all
flows that might still have messages to send, which includes closing
flows.
2022-08-19 20:26:08 +02:00
fang
cfa18b1f1f
gall: when kicked, register %cork as outstanding
When ames notifies us that our subscription has been kicked, we enqueue
a cork to clean up the flow. Unlike the %leave case, however, we were
not registering the cork in the queue of outstanding comms. We would
eventually get an ack, but not know what for, and erroneously inject
%poke-acks and %watch-acks.

Here we simply add a %cork entry to the queue before sending it.
2022-08-19 16:04:36 +02:00
fang
c8a163fedb
gall: clean up big wire construction 2022-08-18 22:46:58 +02:00
fang
a5335f5851
gall: improve match detection in +ap-rake
Making sure to stringify the nonce and including all the target details in the
wire, and excluding flows that are already closing.
2022-08-18 22:39:54 +02:00
Ted Blackman
d8df2787a0 gall: %rake task to clean up dead %leave's 2022-08-18 20:34:42 +03:00
Philip Monk
50c22343b6 clay: wip 2022-08-16 20:33:25 -08:00
fang
18019d6d83
gall: re-enable doff, only for old-style subs
This is sufficient to bring the normal (non-prerelease-bugged) cases
into the new world.

For the prerelease ships that ran a buggier version of the new gall
subscription logic, we note that the conditional may trigger for the
nonce=1 case where it had already triggered for their
(shouldn't-be-possible) nonce=0 case. This results in a %leave on a wire
that wasn't in use. This no-ops on the publisher side though, and the
flow gets corked right away, so this is considered harmless.
2022-08-16 23:02:59 +02:00
Ted Blackman
c972c0fbe2 gall: roundtrip through arvo to revive %hood and %dojo 2022-08-16 01:37:35 +03:00
Ted Blackman
95580f7e83 gall: revive %hood and %dojo on poke 2022-08-16 00:40:38 +03:00
Ted Blackman
a70c2ffe1a gall: now restarts %hood, but not %dojo yet 2022-08-16 00:40:38 +03:00
Ted Blackman
ac072729c2 gall: force load %hood and %dojo on poke 2022-08-16 00:40:38 +03:00
fang
81f18d13ad
gall: remove outdated fixme comment
This is part of the %doff work, which is getting integrated elsewhere.
2022-08-15 12:24:18 +02:00
Ted Blackman
1898483a45 gall: disable %doff for now 2022-08-12 00:55:19 +03:00
Ted Blackman
b1bab79f58 gall: add %f scry for sub-nonce's 2022-08-11 22:33:57 +03:00
fang
350f33d6ba
Merge branch 'next/arvo' into ted/doff-6 2022-08-11 21:06:30 +02:00
fang
5b4a964cdf
gall: fix the %doff conditional
No comment.
2022-08-11 19:48:27 +02:00
fang
06b7f52755
gall: print less during %doff 2022-08-11 17:04:44 +02:00
fang
cd0ea06ad4
gall: use a fully-formed wire when sending %cork
In response to clog notification from remote ames, we were sending a
%cork to clean up the flow. However, the wire we were using had the /sys
prefix already stripped off. Here, we put it back in.
2022-08-11 16:53:45 +02:00
fang
39cd895a55
gall: in +ap-doff, process oldest subs first
Start by killing subscription nonce 0, then work our way up instead of
down. We enhance the printf with a "total nonces" indicator so we can
still easily see the progress being made.
2022-08-10 22:51:38 +02:00
fang
2fe27bd8d7
gall: simplify +ap-doff filter conditional 2022-08-10 22:25:01 +02:00
fang
04b7b86cae
gall: support %doff-ing specific apps and/or ships
This gives us more control over exactly which subscriptions get culled,
which is useful in debugging and targetted recovery scenarios.
2022-08-10 20:33:07 +02:00
Ted Blackman
6b836bb56d ames: fix no-op for messages on closing bones 2022-08-10 20:18:57 +03:00
Ted Blackman
20ccac22a2 ames: clean up closing bone check and printfs 2022-08-10 19:55:07 +03:00
Ted Blackman
9e47490c95 gall: fix %doff handling
Previous +ap-doff kicked the agent repeatedly.  We needed to kick
it only once.  Now publisher agents clear their incoming subscription
state without the subscriber making lots of new subscriptions because
of repeated kicking.
2022-08-10 19:48:39 +03:00
Ted Blackman
0baad53fb4 ames: drop pleas on dead bones 2022-08-10 19:47:59 +03:00
Ted Blackman
ef09595788 gall: update comment 2022-08-10 19:13:32 +03:00
Ted Blackman
543efac183 gall: kill old subscriptions on %doff (still has bug)
Squashed commit of the following:

commit 1e31ab96c14e7506d5cb746d90153cb5658df6e0
Author: Ted Blackman <ted@tlon.io>
Date:   Wed Aug 10 19:08:39 2022 +0300

    ames: revert prints on bad memos

commit c47f9c6053
Author: Ted Blackman <ted@tlon.io>
Date:   Wed Aug 10 18:44:56 2022 +0300

    Merge fix to +ap-kill-down and use that pattern in +mo-doff.

    This doesn't seem to work properly, but I'm not sure why so far.

commit e696816b8d
Merge: 4edb247cd7 a5f08643ff
Author: Ted Blackman <ted@tlon.io>
Date:   Wed Aug 10 18:29:42 2022 +0300

    Merge branch 'next/arvo' into ted/doff-revival

commit 4edb247cd7
Author: Ted Blackman <ted@tlon.io>
Date:   Sat Aug 6 00:09:04 2022 +0300

    ames,gall: fix lopsided bitt/boar state from old doffs

commit b21ffd9cfa
Merge: 7d532afaf8 8eb8a1da29
Author: Ted Blackman <ted@tlon.io>
Date:   Fri Aug 5 17:53:15 2022 +0300

    Merge branch 'next/arvo' into ted/kill-subs

commit 7d532afaf8
Author: Ted Blackman <ted@tlon.io>
Date:   Fri Aug 5 17:52:16 2022 +0300

    gall: add subscription nonce to %doff

commit f750de9aac
Merge: 38540658b5 aad5fa6fae
Author: Ted Blackman <ted@tlon.io>
Date:   Fri Aug 5 11:24:55 2022 +0300

    Merge branch 'next/arvo' into ted/kill-subs

commit 38540658b5
Author: fang <git@fang.io>
Date:   Thu Jul 28 21:10:57 2022 +0200

    gall: account for renaming of subscription state

commit c015dc8446
Merge: 7c222e4c60 731e27d5a1
Author: Zach Alberico <git@zalberico.com>
Date:   Thu Jul 28 10:14:24 2022 -0700

    Merge branch 'next/arvo' into ted/kill-subs

commit 7c222e4c60
Author: Ted Blackman <ted@tlon.io>
Date:   Thu Jul 28 14:01:00 2022 +0200

    hood: |doff generator

commit 8d00cf1bd1
Author: Ted Blackman <ted@tlon.io>
Date:   Thu Jul 28 13:21:45 2022 +0200

    gall: fix compile errors

commit 6a1fd360ff
Author: Ted Blackman <ted@tlon.io>
Date:   Thu Jul 28 13:01:16 2022 +0200

    gall: add %doff task to kill subscriptions
2022-08-10 19:09:47 +03:00