OverviewFilesCommitsIssuesDocsReleasesPeers

favela-bridge commits / 40740fb

0.0.7: autostart, and say out loud that --watch always sends
autostart was false on both hosts, so neither bridge survived a reboot — the standing link between favela and the existing bsky/fediverse identities would have quietly stopped at the next restart with nothing to indicate it. The watch loop already catches every cycle error (a peer restarting, a sink respawning on OTA, a socket that vanished are all ordinary here), so a boot race against favela-peer or hyper-proto-peer is survivable rather than fatal. That is what makes autostart safe. And the flag finding, which cost real time today. `--watch` calls cycle(true) unconditionally; SEND is read only by the one-shot path. So --send has no bearing in watch mode, and the deployed pgh args are ["--watch"] with no --send — which is why ashatron's daemon logs "mode SEND" while /proc/<pid>/cmdline shows no such flag. I read the cmdline, read `const SEND = argv.includes('--send')`, and concluded the two contradicted each other, when the loop simply does not consult SEND. Deliberately NOT resolved by making watch honour SEND: both deployed daemons depend on this and would silently stop publishing. Documented instead, the startup line now says SENDS on every cycle, and --limit 0 is the way to run a watch that publishes nothing. 17/17 pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
40740fb0e19ab2b9c194f7eb66c9c84cbee0f446
by plankatron <fleeky@gmail.com> · 2026-09-09T22:23:12.000Z

Changed files (2) +9 -3

index.js +7 -1
……@@ -53,7 +53,13 @@ const ROOM_TYPE = process.env.FAVELA_ROOM_TYPE || 'public'
5353
5454async function main () {
5555 if (WATCH) {
56 console.log('favela-bridge · watching every ' + (EVERY / 1000) + 's · ctrl-c to stop')
56 // ⛔ WATCH ALWAYS SENDS, and --send has no bearing on it. The loop below calls cycle(true)
57 // unconditionally; SEND is read only by the one-shot path at the end of this function. Said out
58 // loud because the two flags read as orthogonal and are not: `favela-bridge --watch` expecting a
59 // dry run would publish, and the deployed pgh args are exactly that (["--watch"], no --send).
60 // Deliberately NOT "fixed" by making watch honour SEND — both deployed daemons rely on this and
61 // would silently stop publishing. Use --limit 0 for a watch that sends nothing.
62 console.log('favela-bridge · watching every ' + (EVERY / 1000) + 's · SENDS on every cycle · ctrl-c to stop')
5763 for (;;) {
5864 // ⛔ One cycle NEVER throws the loop. A peer restarting, a sink respawning on OTA, a socket
5965 // that vanished — all ordinary. A bridge that exited on the first of them would stop
package.json +2 -2
……@@ -1,6 +1,6 @@
11{
22 "name": "favela-bridge",
3 "version": "0.0.6",
3 "version": "0.0.7",
44 "description": "Projects favela records onto the networks a room may reach. One reader, one reach decision, one projection per network.",
55 "type": "module",
66 "main": "index.js",
……@@ -29,7 +29,7 @@
2929 ],
3030 "type": "daemon",
3131 "runtime": "bare",
32 "autostart": false,
32 "autostart": true,
3333 "depends": [
3434 "pgh-sidecar"
3535 ],