fix(host): a bridge that held a host follows the app that takes its place

Plan P15 unit A5, fix round. A bridge started under a `serve` host, when that
host went and the app started in its place, took a lease on the app's server:
a lease with no host behind it, which never ends. When the app later closed,
the assistant got a generic timeout and never "Wanderbooks isn't running". A
lease with no host now turns the bridge into the line to whatever runs, as a
bridge that began without a host is (`Lease::is_hostless`, `Bridge::keep`), and
it answers in the same words when the app is closed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 12:16:24 -07:00
1 parent 2ff2913274
commit 6164d0fa68
2 files changed
+18

No files matched your search

+7
View File
@@ -166,6 +166,13 @@ struct HostLink {
}
impl Lease {
/// Whether this lease is on the app's server with no host behind it
/// (INVARIANT 6): it never ends, so a holder that has one follows
/// what runs by looking, as a bridge with no host does.
pub fn is_hostless(&self) -> bool {
self.link.is_none()
}
/// The host's next word: `Ready`, or `Ending` with why; `None` when
/// the host is gone without a word.
pub async fn next(&mut self) -> Option<HostMsg> {