Skip to content

feat(backends): the measured routes from the egress proxy to a model server on the host (#503, 3/6) - #516

Merged
edgehero merged 1 commit into
mainfrom
feat/503-host-routes
Oct 2, 2026
Merged

edgehero merged 1 commit into
mainfrom
feat/503-host-routes

Conversation

@edgehero

@edgehero edgehero commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Part of #503: PR 3 of 6. This adds the measured routes from the egress proxy to a model server on the host, as data. Nothing reads them yet; doctor uses them in a later part.

What changes

  • worker/src/backends.mjs gains a frozen HOST_ROUTES table, kept apart from the security declarations (enforced, asserted, absent), because a route is a reachability fact. It also gains a pure hostRouteFor(runtime, endpointHost), which returns {status, sentence}. Any combination the table does not name reads unmeasured.
  • Every row comes from the 2026-09-30 measurements in the Local model servers: declared endpoints reached through the egress proxy, keyless providers that pass the credential gate, and fleet-wide slot leases #503 comment, and each row applies only to the version it was measured on:
    • Docker Desktop: host.docker.internal reaches even a loopback-only server, and nothing needs adding.
    • Docker Engine 29.1.3: host.docker.internal works through --add-host host.docker.internal:host-gateway on the proxy, with the server on 172.17.0.1 or 0.0.0.0. A host with UFW active is unmeasured.
    • Rootless Podman 4.9.3 (slirp4netns): host.containers.internal and the host's own LAN address both work.
    • Rootless Podman 5.8.1 (pasta): host.containers.internal (169.254.1.2) works. The host's own LAN address is refuted.
    • Rootful Podman 5.8.1: host.containers.internal is the network gateway, so the server must be on 0.0.0.0.
    • Everywhere: a loopback-only server is never reachable.
  • docs/backends.md and docs/podman.md gain a "Reaching a model server on the host" section. The rows are generated from the table by the doc tests.
  • Specs: DES-PODMAN-NATIVE-ROOTLESS-BACKEND records the measured routes and refutes the "LAN endpoints only for Podman 4.x" fallback. DES-CONTAINER-BACKEND-REGISTRY records the separate table.

Tests

  • The table is frozen and its row shape pinned.
  • One hostRouteFor case per measured row; loopback is refuted on every runtime; 13 unnamed combinations read unmeasured.
  • Mutations, each shown red:
    • pasta's own-LAN-address row flipped to works
    • the host-gateway need dropped from the Docker Engine row

@edgehero
edgehero force-pushed the feat/503-host-routes branch 2 times, most recently from ac6ad40 to 6dd9457 Compare October 2, 2026 06:53
…server on the host (#503)

HOST_ROUTES in worker/src/backends.mjs records, per runtime, helper and
exact measured version, which host an endpoint declares to reach a model
server through the egress proxy, and what the proxy and the server need
for it. Every row states only what the 2026-09-30 measurements on #503
and their addendum publish. It is a reachability fact kept apart from
BACKENDS: no declaration word, never read by the floor, and it refuses
nothing. Doctor and the proxy do not read it yet.

hostRouteFor takes a host as the endpoints parser stores it. Only three
things read works or refuted: a host-local address (refuted on every
runtime), the two alias names, and an IPv4 address in the host's own
address list. Another address or name is lan, an ordinary outbound
route that is never works. Anything else is unmeasured.

PROXY_LOCAL_ADDRESSES is the one host-local set. model-endpoints.mjs
builds LOCAL_ADDRESSES from it and now also refuses a declared 10.0.2.2,
which the rendered deny always blocked.

docs/backends.md and docs/podman.md generate their tables from the
source.

Specs: DES-PODMAN-NATIVE-ROOTLESS-BACKEND, DES-CONTAINER-BACKEND-REGISTRY,
INT-MODEL-ENDPOINTS-FILE-CONTRACT amended; INT-CONTAINER-RUNTIME-CONTRACT
unchanged, checked.

Signed-off-by: Rob Boerman <robboerman@live.nl>
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.

1 participant