Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (claude): clarify probe-throw semantics and egress assumption

Adam Eivy2b49a1765b34
diff --git a/server/lib/connectivity.js b/server/lib/connectivity.js
index 2525843388..5b19e39d5f 100644
--- a/server/lib/connectivity.js
+++ b/server/lib/connectivity.js
@@ -10,6 +10,13 @@
* as an outage) and NOT an HTTP/TLS exchange (we only need "can packets leave").
* It never rejects: callers use it as a gate, and a probe that failed to run is
* not proof of anything, so the promise always resolves to a boolean.
+ *
+ * Assumes normal outbound egress (the single-user private-machine model PortOS
+ * targets). In a locked-down, proxy-only network where both anycast IPs are
+ * blocked, a machine with working internet would read as offline — the caller
+ * (the TUI idle reaper) treats that as "defer the reap", which its independent
+ * max-runtime backstop still bounds, so the failure mode is a delayed reap, not
+ * a wedged agent.
*/
import net from 'net';
diff --git a/server/services/agentTuiSpawning.js b/server/services/agentTuiSpawning.js
index 08851353fa..a4cbce7cec 100644
--- a/server/services/agentTuiSpawning.js
+++ b/server/services/agentTuiSpawning.js
@@ -371,8 +371,10 @@ export async function spawnTuiAgent({
.then(() => checkOnlineFn())
.then((online) => {
if (finalized) return;
- // A probe that failed to RUN (threw) is not proof of an outage — only
- // an explicit `false` result flips us offline; anything else stays online.
+ // A probe that RESOLVES `false` is the only thing that flips us offline;
+ // any other resolved value maps to online. A probe that THROWS is
+ // swallowed by the `.catch` below and leaves the last reading untouched
+ // — a failed-to-run probe is never proof of an outage by itself.
const nowOnline = online !== false;
// Reconnect grace: on the offline→online transition, give the CLI a
// fresh idle window to notice the network is back and resume before the