Replace the home-relay watchdog with in-place relay failover (flexaccess-iroh v0.0.8) - #99
Merged
Merged
Conversation
…ess-iroh v0.0.8) Adopt flexaccess-iroh v0.0.8. The server-side watchdog (a 60 s network_change() nudge that is a no-op on a stable host and a 180 s endpoint rebuild that dropped every connection and bridge) is gone; `run_server` runs `relay_failover::fail_over_home_relay` alongside `ProxyServer::run`: after 60 s without a connected home relay the wedged relay is taken out of the relay map so iroh's forced net report homes the endpoint on another configured relay in place, and the relay is put back once a probe shows it connectable. The serve loop is a single pass again; the `Pass` enum, the rebuild deadline escalation and its constants are removed. v0.0.8 also binds the endpoint without the custom relays that fail the startup probe (a relay that answers probes but refuses relay connections would otherwise be preferred, never connect, and keep the process from ever coming online); `create_server_endpoint` returns `CreatedEndpoint` and the server hands `relays_left_out` to the failover to restore. The crate no longer carries a rebuildable endpoint, but the client's reconnect escalation (a full endpoint rebuild every third failed attempt, for a wedged client endpoint after a network change) is flextunnel's own and stays: `ClientEndpoint`, its `EndpointFactory` and the tolerant rebuild bind now live in `transport/endpoint.rs`, with the same coalescing semantics and tests. A client keeps a relay that failed its startup probe out for its session; a rebuilt client endpoint goes back to the full configured set. Custom relays (`relay_urls` / `--relay-url`) require at least two distinct URLs; default relay mode is unchanged. Docs point at iroh-common-architecture's relay-failover.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZhxxjP2TA93PHNr6p1BU8
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZhxxjP2TA93PHNr6p1BU8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
flexaccess-irohv0.0.3 → v0.0.8. The server-side watchdog (60 snetwork_change()nudge, a no-op on a stable host, then a 180 s endpoint rebuild that dropped every connection and bridge) is replaced by the crate's in-place failover, run inrun_serveralongsideProxyServer::run: after 60 s without a connected home relay the wedged relay is taken out of the relay map, iroh's forced net report homes the endpoint on another configured relay, and nothing is torn down. The relay is put back once a probe shows it connectable. The serve loop is a single pass again.create_server_endpointreturnsCreatedEndpointand the failover restoresrelays_left_out.ClientEndpoint,EndpointFactoryand the tolerant rebuild bind now live intransport/endpoint.rs, same semantics, tests ported.Test plan
ci/unix/ci.sh:cargo clippy --workspace --exclude flextunnel-desktop --all-targets -- -D warnings,cargo test -p flextunnel-core -p flextunnel-cli(30 + 153 passed, including the two portedClientEndpointtests)🤖 Generated with Claude Code
https://claude.ai/code/session_01RZhxxjP2TA93PHNr6p1BU8