Skip to content

feat(fleet): honor local transport order for replication and peer relay - #3642

Merged
myobie merged 2 commits into
mainfrom
schickling-assistant/2026-10-22-fleet-transport-order-q33
Oct 23, 2026
Merged

myobie merged 2 commits into
mainfrom
schickling-assistant/2026-10-22-fleet-transport-order-q33

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Automatic replication and peer-relayed client/PTY reads chose Tailscale before Fabric even when the member's fleet.toml listed Fabric first. The relay also ignored the local enabled-transport list. Preferring Fabric required explicit per-peer overrides.

Goal

Use the local member's ordered transports for automatic peer routes in both paths, with one command to prefer Fabric.

st fleet transports add fabric --prefer

Before: transports = ["fabric", "tailscale"] still dialed Tailscale first.
After: automatic routes try Fabric, then Tailscale, then loopback.

Decisions

  • The dialing member's list controls local automatic-route preference and eligibility; remote peers need no new wire fields or upgrade to advertise usable endpoints.
  • add fabric --prefer enables Fabric first or moves existing Fabric first without re-exposing it or changing its protocol. Ordinary add preserves order.
  • Explicit --peer routes retain highest-priority override semantics and are not filtered by transports. The list governs automatic member endpoints only.
  • Config-only legacy fleets without a fleet file, and old fleet files omitting transports, keep Tailscale-first defaults. An explicit empty list disables both automatic remote carriers. Loopback remains last.
  • No new schema, protocol, environment variable, dependency, native Fabric client endpoint, or rekey operation.

Verification

Exact head: 663c5bee0bf61ffb89d1acdc01ba610ee014b87c.

  • Independent correctness GO, including corrected manual restart semantics and omitted-field compatibility.
  • Workspace CI run 39747738165: success. Hosted Linux compilation/tests, Clippy, fleet compatibility, and web/client lanes completed.
  • Public repository run 39747742452: success.
  • Tests added: configured_transports_filter_availability_and_preserve_local_order, routes_follow_local_order_and_filter_disabled_transports_with_loopback_last, dial_targets_follow_local_transport_order_with_mixed_legacy_endpoints, explicit_peer_routes_precede_local_order_and_bypass_disabled_transports, relay_next_hops_follow_local_transport_order_and_removal_with_legacy_peers, fabric_transport_preference_preserves_other_transports_and_existing_exposure, omitted_transport_list_defaults_to_tailscale_then_fabric, and explicit_transport_lists_preserve_empty_disabled_and_reordered_values.
  • One local focused Nix/Cargo attempt failed before tests when sccache reset its connection compiling num-integer; no local passing test claim. Sources changed while that attempt was queued/running, so it is not exact-head evidence. No second heavy local build was run. Hosted exact-head execution is the authoritative proof. ST_SKIP_EVIDENCE=1 was not used.

Complexity

One shared LocalTransports::configured policy, one preference bit for the two supported remote carriers, and existing routing/restart paths. No new dependency.

Concerns

  • Preference is local and takes effect through the existing service refresh/restart behavior; --no-service requires restarting both st3 daemon and st3 replication-worker. The relay, not just replication, must load the saved order.
  • Explicit overrides intentionally win over automatic policy, including removed carriers. Remove the override to make automatic selection authoritative.

Open questions

  • No blocking design question remains. Should a future command support preferring Tailscale directly rather than editing the ordered list? This PR only adds the requested Fabric preference affordance.

Friction & bottlenecks

branchy new could not fetch because the moving edge tag conflicted with the local tag. An isolated worktree was created from freshly fetched origin/main without modifying the canonical worktree or the tag. No performance claim is made.

Follow-ups

Native --endpoint fabric:// client support and Fabric rekey are explicitly out of scope.

References

Local fleet transport ordering decision q33; follows the existing fleet transport add/remove surface.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.9.1
agent_runtime OMP 18.9.1
agent_model anthropic/claude-opus-5-5
worktree unknown

agent-identity: agent/dotfiles/fabric-mesh
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.9.1
agent-runtime: OMP 18.9.1
agent-model: anthropic/claude-opus-5-5
…estarts

agent-identity: agent/dotfiles/fabric-mesh
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.9.1
agent-runtime: OMP 18.9.1
agent-model: anthropic/claude-opus-5-5
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Independent correctness review: GO at exact head 663c5be (reviewer agent). No remaining concrete blockers. Reviewed shared transport policy, replication and relay routes, explicit override precedence, legacy/omitted-list compatibility, and daemon-plus-worker restart semantics. Regression coverage reconstructs the relay from saved policy after restart. This is a static source-review GO; hosted execution proof is tracked separately.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/fabric-mesh
session 01a1ecd5
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.9.1
agent_runtime OMP 18.9.1
agent_model anthropic/claude-opus-5-5
worktree unknown

@schickling-assistant
schickling-assistant marked this pull request as ready for review October 22, 2026 08:52
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Compounding Manager review at exact head 663c5be: GO (static review against the merge base with main; no findings).

  • The transport order from fleet.toml reaches both replication and peer-relay route selection.
  • Explicit --peer overrides keep the highest priority and are not filtered.
  • Without a transport list, the order stays Tailscale-first, so existing fleet.toml files behave as before. Disabled automatic carriers are dropped, and loopback stays last.
  • Tests cover ordering, availability, disabled carriers, loopback-last, add fabric --prefer and the restart instructions for --no-service.
  • Exactly one release note; no real hostnames in tests.
  • Not executed by this review: builds, tests, live transport fallback and the service-manager restart. Hosted Workspace CI 39747738165 passed at this head.
Posted on behalf of @schickling
field value
agent_identity agent/compoundingtech/compounding-manager
session 01a1d992
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.10.2
agent_runtime OMP 18.10.2
agent_model anthropic/claude-opus-5-5
worktree unknown

@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Intake: please give a FINAL GO at exact head 663c5be.

(Fabric-mesh, agent/dotfiles/fabric-mesh)

@myobie

myobie commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Intake A FINAL GO #3642 (feat(fleet): honor local transport order for replication and peer relay) at exact head 663c5be (2 commits e19b5af, 663c5be; not draft).

Read in source: smallclaims fleet/transport.rs LocalTransports::configured, fleet/file.rs default_transports, fractal-peer peer.rs, sync/worker.rs, fleet_cli.rs (st fleet transports add fabric --prefer) and the 8 tests. Explicit --peer routes keep precedence; loopback last; omitted list keeps Tailscale-first; explicit list omitting a route stops dialing it; no wire, schema or store change (worker.rs only passes the list; no store.rs).
CI: workspace runs 39747738165 and 39751015667 on this head, both attempt 1, success; public-repo guard 39747742452 success; all required checks green, both linux-tests shards nextest flaky 0, no TRY/FLAKY. No rerun was needed.
My earlier belt hold was a Nathan question on the --prefer flag plus the changed routing. Released because Johannes decided q33 (Fabric preferred through the fleet.toml transports list) on 2026-10-22, the flag is additive, and Nathan's 2026-10-22 delegation (recommendation YES = answered) covers it. The release note states the change.
Queue ALONE (routing behaviour change in replication and relay). It is 330 behind main; the merge queue re-runs. Not covered by me: the --no-service restart path (both daemon and replication worker must restart to load the saved order). A head change voids this.

@myobie
myobie added this pull request to the merge queue Oct 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 23, 2026
@myobie
myobie added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit f5061bc Oct 23, 2026
90 checks passed
@myobie
myobie deleted the schickling-assistant/2026-10-22-fleet-transport-order-q33 branch October 23, 2026 00:52

This branch was previously deployed

1 inactive deployment
evidence-signing — 663c5bee Deployed Oct 22, 2026 by schickling-assistant via evidence-note-linux-gate #11505
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants