Commit Graph
5 Commits
Author SHA1 Message Date
Audric ab7ab031e9 chore: drop local-tooling references from tracked files
- tests/test_satellite_secrets.py: remove a stale internal spec path from the
  module docstring; describe the per-satellite secret resolver rule directly.
- .gitignore: drop local-only working-artifact patterns and their headings;
  those paths are now ignored via the untracked .git/info/exclude so no tracked
  file names them. Kept the neutral .worktrees/ rule.
2026-06-17 17:39:00 +02:00
Audric d757384c9c fix(satellite): defer heartbeat until auth; reject hello triggers cleanup
SatelliteLink's heartbeat timer was constructed with the default
enabled=true, so it started ticking at connect time. When a hello was
rejected, m_con->disconnect() closed the socket but the timer kept
running; at the t=10s tx tick it called sendMsg, which hit
assert(sock >= 0) in TcpConnection::write and crashed the reflector.

TcpConnection::disconnect() intentionally does not emit the
disconnected signal (header comment), so the TcpServer's
clientDisconnected handler never ran -- the SatelliteLink stayed in
m_satellite_con_map with no path to cleanup. TrunkLink avoids this
by constructing its heartbeat with enabled=false and enabling it only
after auth (TrunkLink.cpp:197); SatelliteLink just missed the pattern.

Mirror TrunkLink: construct the heartbeat disabled, enable it after
successful authentication in handleMsgPeerHello. On all four rejection
branches, fire linkFailed(this) after m_con->disconnect() so the
existing onSatelliteLinkFailed -> processSatelliteCleanup path deletes
the leaked link.

Add test_rejection_does_not_crash_parent regression test that sends
a hello with a wrong-for-pinned-id secret, waits past the 10s
heartbeat threshold, and confirms /status still responds and shows
no phantom satellite entry.
2026-05-17 02:20:50 +02:00
Audric 0c23d5a627 test(satellite): drop unused HOST import in per-id test file 2026-05-17 00:43:47 +02:00
Audric c8e16de246 test(satellite): send rejection hello raw to avoid handshake() raise 2026-05-17 00:39:19 +02:00
Audric 02c220ab24 test(satellite): add failing per-id secret integration tests 2026-05-17 00:33:47 +02:00