forge: add patch 10 — widen coordinator delays ~25%

Bumps base/jitter/hop_step/cap/TTL ~25% for more reliable token
suppression at the multi-hop edge. Bumps BOT_PREFS_VERSION 4 -> 5 to
force re-default of hop_step_ms on existing bots. Test bumped
many_hops.path_hash_count 10 -> 20 so the cap-check still trips with
the new 15000ms cap.
This commit is contained in:
cj-vana
2026-05-16 20:31:20 -06:00
parent b7cc1dc0ca
commit 0010842ac2
12 changed files with 72 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Fri, 15 May 2026 11:44:21 -0600
Subject: [PATCH 1/9] Add companion radio firmware bot command parity
Subject: [PATCH 01/10] Add companion radio firmware bot command parity
---
.../companion_radio/BotCommandRegistry.cpp | 121 ++

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Fri, 15 May 2026 19:58:42 -0600
Subject: [PATCH 2/9] Harden firmware bot response coordination
Subject: [PATCH 02/10] Harden firmware bot response coordination
---
examples/companion_radio/BotCommands.cpp | 2 +-

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Fri, 15 May 2026 20:09:58 -0600
Subject: [PATCH 3/9] Allow prefixless firmware bot DMs
Subject: [PATCH 03/10] Allow prefixless firmware bot DMs
---
examples/companion_radio/BotPolicy.cpp | 2 +-

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Sat, 16 May 2026 04:12:02 +0000
Subject: [PATCH 4/9] Align firmware bot commands with upstream behavior
Subject: [PATCH 04/10] Align firmware bot commands with upstream behavior
---
.../companion_radio/BotCommandRegistry.cpp | 25 +-

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Sat, 16 May 2026 12:38:13 -0600
Subject: [PATCH 5/9] Add hop-aware bot coordination, utility commands, and
Subject: [PATCH 05/10] Add hop-aware bot coordination, utility commands, and
bounded delays
Adds new utility commands (TIME, LORA, ID, NEIGHBORS), neighbor tracking,

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Sat, 16 May 2026 18:58:28 -0600
Subject: [PATCH 6/9] Mark bot adverts, speed up initial advert, default
Subject: [PATCH 06/10] Mark bot adverts, speed up initial advert, default
contacts auto-overwrite
Three coordination/discoverability fixes:

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Sat, 16 May 2026 19:33:04 -0600
Subject: [PATCH 7/9] Prefix bot responses with request token for inter-bot
Subject: [PATCH 07/10] Prefix bot responses with request token for inter-bot
suppression
Adds a 4-hex request token (low 16 bits of the request fingerprint) as a

View File

@@ -1,7 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Sat, 16 May 2026 19:55:36 -0600
Subject: [PATCH 8/9] Drop [MCBOT] advert suffix and auto-learn known-bot path
Subject: [PATCH 08/10] Drop [MCBOT] advert suffix and auto-learn known-bot
path
Removes BOT_ADVERT_MARKER / writeBotAdvertName / isBotAdvertName from
FirmwareBot, autoLearnKnownBotAdvert and getAdvertNodeName from MyMesh,

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Sat, 16 May 2026 20:05:19 -0600
Subject: [PATCH 9/9] Widen hop-step + drop "ack " prefix from test response
Subject: [PATCH 09/10] Widen hop-step + drop "ack " prefix from test response
Two changes:

View File

@@ -0,0 +1,60 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: cj-vana <cj@depth23.online>
Date: Sat, 16 May 2026 20:31:12 -0600
Subject: [PATCH 10/10] Widen coordinator delays a tiny bit more
~25% bump across the main coordination knobs:
- BOT_RESPONSE_DELAY_BASE_MILLIS 1200 -> 1500
- BOT_RESPONSE_DELAY_JITTER_MILLIS 1800 -> 2200
- BOT_HOP_STEP_MILLIS_DEFAULT 2500 -> 3000
- BOT_HOP_BIAS_MAX_MILLIS 12000 -> 15000
- BOT_RESPONSE_PENDING_TTL_MILLIS 60000 -> 75000
BOT_PREFS_VERSION bumped 4 -> 5 so existing bots re-derive the new
hop_step_ms default instead of carrying the old value.
Gives near and far bots more breathing room so far bots reliably hear
near bots' acks before firing their own (token suppression). Worst-case
6-hop scheduled delay rises from ~17.6s to ~22.5s, still well under the
new 75s TTL.
---
examples/companion_radio/BotTypes.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/examples/companion_radio/BotTypes.h b/examples/companion_radio/BotTypes.h
index 5a953639..ee3f8984 100644
--- a/examples/companion_radio/BotTypes.h
+++ b/examples/companion_radio/BotTypes.h
@@ -28,16 +28,16 @@
#define BOT_KNOWN_BOT_SLOTS 8
#define BOT_NEIGHBOR_SLOTS 16
#define BOT_NEIGHBOR_RECENT_MILLIS (60UL * 60UL * 1000UL)
-#define BOT_RESPONSE_DELAY_BASE_MILLIS 1200UL
-#define BOT_RESPONSE_DELAY_JITTER_MILLIS 1800UL
-#define BOT_RESPONSE_PENDING_TTL_MILLIS 60000UL
+#define BOT_RESPONSE_DELAY_BASE_MILLIS 1500UL
+#define BOT_RESPONSE_DELAY_JITTER_MILLIS 2200UL
+#define BOT_RESPONSE_PENDING_TTL_MILLIS 75000UL
#define BOT_RESPONSE_RECENT_TTL_MILLIS 30000UL
#define BOT_KNOWN_BOT_FLAG_SUPPRESS_NORMAL 0x01
#define BOT_SENDER_KEY_PREFIX_LEN 6
#define BOT_MIN_AUTH_SENDER_KEY_PREFIX_LEN 4
#define BOT_KNOWN_BOT_LABEL_LEN 12
#define BOT_PREFS_MAGIC 0x31504642UL
-#define BOT_PREFS_VERSION 4
+#define BOT_PREFS_VERSION 5
#define BOT_PREFS_DEFAULT_LOCAL_ADVERT_MILLIS (24UL * 60UL * 60UL * 1000UL)
#define BOT_PREFS_DEFAULT_FLOOD_ADVERT_MILLIS (24UL * 60UL * 60UL * 1000UL)
#define BOT_PREFS_INITIAL_LOCAL_ADVERT_MILLIS 60000UL
@@ -45,9 +45,9 @@
#define BOT_PREFS_MAX_DELAY_MILLIS 60000U
#define BOT_PREFS_MAX_ADVERT_MILLIS (7UL * 24UL * 60UL * 60UL * 1000UL)
#define BOT_PREFS_SERIALIZED_SIZE 296
-#define BOT_HOP_STEP_MILLIS_DEFAULT 2500U
+#define BOT_HOP_STEP_MILLIS_DEFAULT 3000U
#define BOT_HOP_STEP_MILLIS_MAX 30000U
-#define BOT_HOP_BIAS_MAX_MILLIS 12000UL
+#define BOT_HOP_BIAS_MAX_MILLIS 15000UL
enum BotChannelKind : uint8_t {
BOT_CHANNEL_DM = 0,