%leave over the network didn't work because we included the message type
in the wire from gall, so the duct for the initial %watch and the %leave
were different. We need to know the message type so we can route the
acknowledgment as %poke-ack, %watch-ack, or no-op.
This moves this piece of information to a piece of state, where we queue
up the message types per [duct wire]. Ames guarantees that
acknowledgments will come in order.
This also includes an easy state adapter. The more interesting part of
the upgrade is that we likely have outstanding subscriptions with the
old wire format. The disadvantage of storing information in wires is
that it can't be upgraded in +load. So, here we listen for updates on
the old wire format, and when we get them we kill the old subscription,
so that it will be recreated with the new wire format.
As an aside, this is a good example of what we mean when we say
subscriptions may be killed at any time, so apps must handle this case.
Finally, this fixes the "attributing" ship to ~zod for agent requests.
This information was ignored for agent requests, but including it causes
spurious duct mismatches.
We've seen issues where the message-num of the head of live.state is
less than current.state. When this happens, we continually try to
resend message n-1, but we throw away any acknowledgment for n-1 because
current.state is already n. This halts progress on that flow.
We don't know what causes us to get in this bad state, so this adds an
assert to the packet pump that we're in a good state, run every time
the packet pump is run. When this crashes, we can turn on |ames-verb
and hopefully identify the cause.
This also adds logic to +on-wake in the packet pump to not try to resend
any messages that have already been acknowledged. This is just to
rescue ships that currently have these stuck flows.
(Incidentally, I'd love to have a rr-style debugger for stuff like this.
Just run a command that says "replay my event log watching for this
specific condition and then stop and let me poke around".)
Turns out this wasn't a regression, it was intended behavior. I
continue to believe it's the wrong behavior, but that will require a
longer discussion.
Replaces the 'merge-and-update-solid' script with the simpler
'merge-with-custom-msg' which merges branches using a custom merge
commit message.
Maintainers may want to alias it locally via something like:
git config alias.mu '!sh/merge-with-custom-msg'
Then use it via:
git mu SOME_BRANCH SOME_PR_NUMBER
* origin/chat-safe-tab:
chat: give terminal bell on tab in an empty buffer
chat: don't crash on tab in an empty buffer
Signed-off-by: Jared Tobin <jared@tlon.io>
The placement of the buttons and chat title on Landscape were slightly
off-line with each other. This commit lines them up
and changes font size to f8 to match the mockup closely.
We've periodically seen malloc failures (ie, returning a null pointer)
in newt.c, our IPC implementation ("memory lost" assertion failures).
I've suspected that they were caused by attempts to allocate zero bytes.
We were not properly following libuv's read callback conventions for
EAGAIN/EWOULDBLOCK, which would've had that result.
The message parsing and assembly was in one large function that I found
it hard to follow, so I've refactored into smaller pieces, so it should
be more maintainable going forward.