Skip to content

Lab/routing backtrack - #132

Merged
fnyaker merged 22 commits into
mainfrom
lab/routing-backtrack
Oct 14, 2026
Merged

fnyaker merged 22 commits into
mainfrom
lab/routing-backtrack

Conversation

@fnyaker

@fnyaker fnyaker commented Oct 14, 2026

Copy link
Copy Markdown
Owner

No description provided.

fnyaker and others added 21 commits October 13, 2026 21:57
…e no-systemd test is hermetic

test_systemctl_without_systemd_is_not_systemd failed on any machine that
really runs systemd, because detect_init looked at the real /run/systemd/system.
The directory can now be overridden; the test points it at a path that does
not exist. Version 0.4.89.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first-run card, the standing bar and the topology legend all said the same
thing about a node with no network, at length. The bar and the card are now one
sentence and two instructions, and the legend waits for a link to explain.
Version 0.4.90.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…dled exception on accept

Measured on 40 to 200 in-process nodes: the first handshake to a node nobody
links to is lost to a forwarding cycle the replay table breaks, and a shorter
retry does not help. Recorded as open with the reproduction and the options.
Version 0.4.91.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r way

A relay forwarded to the XOR-nearest neighbour except the link a packet came
from, and the replay table dropped the second visit to a node: a cycle ate the
only copy. A relay now remembers, per packet and bounded, the identities it
arrived from and left to, and sends a duplicate that arrives over a new
identity to a neighbour not yet tried. Replays over a known identity are still
dropped, a packet leaves by at most the fanout, and the book is bounded.

Measured on 120 nodes over eight processes: 285 of 300 first contacts arrive
within 12 s instead of 256, and the sender retries 15 times instead of 45, for
about 7 % more packets relayed. Adds tests/tools/mesh_sim.py, which spreads the
nodes over processes and reports the event loop's lateness, after single-process
figures at 100 and 200 nodes were found to measure the simulator. BUGSVULNS 100
is rewritten and the withdrawn figures say so. Version 0.4.92.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… of the accept callback

The CHALLENGE send at the end of _on_new_transport was unguarded, unlike the
capabilities announcement before it, so a far end that let go between the
accept and our first words surfaced as an unhandled exception in the transport's
callback. It now ends the link like any failed send. BUGSVULNS 101. Version
0.4.93.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… same node

_authenticated_peers ran for every routed packet and scored every link, though a
score only settles a choice between two links to one identity. A second link now
triggers the scoring. On 120 nodes over eight processes that function went from
32 s to 2.4 s in one worker's profile and the workers' CPU at rest fell by about
16 percent over three alternating runs. mesh_sim.py gains --profile and reports
the CPU the workers used. Version 0.4.94.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ould forward

Measured on 100 nodes over eight processes: a fifth of first contacts are lost
at 20 percent black-hole relays. A retry by another first hop and a quicker
retry were tried and gave no gain in delivery, so they are recorded and not
kept. mesh_sim.py learns --blackhole. Version 0.4.95.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…, not an interpreter message

node was read once at the top of the fleet routes and never checked to be text,
so an object or a list reached a dictionary lookup and came back as a 503 saying
'unhashable type'. It is now a 400, and a type error that gets past the checks
is logged and answered without the interpreter's words. Adds
tests/tools/api_fuzz.py, which signs in to a throwaway node and sends every
route hostile requests; all 60 routes refuse a request without a session.
BUGSVULNS 103. Version 0.4.96.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The console wraps its listening socket for TLS, so the handshake ran inside
accept() and a client that connected and said nothing held the only accepting
thread, with no timeout and no password needed. The three HTTP servers (console,
chat, MCP) now share HardenedServer: the handshake is the connection's own, a
silent connection is closed at 30 s, at most 256 are served at once, and a client
that hangs up is not written to stderr (500 resets used to leave 723 kB of
traceback in the log). Version 0.4.97. BUGSVULNS 104.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The total bound alone turned one client's unfinished requests into the console
refusing everybody: 256 requests that never finish, a byte now and then, filled
every slot. One address is now held to 32, measured against a real node (300
attempts left 32 open, and another machine was served). BUGSVULNS 104 says the
first fix was not enough. Version 0.4.98.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…iptors follow the bind host

A lan address was confirmed only by an inbound connection, so a node nobody had
connected to refused its first short invitation and sent the operator to a
three-block manual exchange. With no confirmed address and no relay it now
offers an address on its own network, marked untried, and the page says so;
a public address nothing has reached is still never offered.

Found on the way: ip_reachability listed every address the machine holds
whatever the listener was bound to, while expand_listen_uri honours a concrete
bind host. A loopback listener announced LAN addresses it did not listen on.
Descriptors now follow the bind host. BUGSVULNS 105 and 106. Version 0.4.99.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e list

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… anyone without the key

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…orter identity text; ui_walk tool

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nk past a soft limit

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Comment thread tests/test_http_server.py Fixed
…reads it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@fnyaker
fnyaker merged commit 4128678 into main Oct 14, 2026
9 checks passed
@fnyaker
fnyaker deleted the lab/routing-backtrack branch October 14, 2026 13:51
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