docs: point the comments and guides at what is actually there

Two PacketFilter comments cited sections of a plan document nobody reading the
source has, the limiter's key-offset comment and the test helper's mirror note
named the wrong file, and two FILTER.md troubleshooting rows sat above the
table header they belong under.
This commit is contained in:
Jason Huebert committed 2026-10-03 16:18:40 -05:00
1 parent 1896b68c79
commit e898e2d0df
4 files changed
+9 -8

No files matched your search

+2 -2
View File
@@ -1054,10 +1054,10 @@ filter get 0
filter stats
```
| Typo in a command did nothing | Nothing is ignored any more: a command with an unexpected extra word, unbalanced quotes, or an over-long line is refused with a usage line and changes nothing |
| A channel is missing from `filter chan list` | The store holds more than fits one reply — the listing ends with `next=N`; run `filter chan list N` for the rest |
| Symptom | Check |
|---|---|
| Typo in a command did nothing | Nothing is ignored any more: a command with an unexpected extra word, unbalanced quotes, or an over-long line is refused with a usage line and changes nothing |
| A channel is missing from `filter chan list` | The store holds more than fits one reply — the listing ends with `next=N`; run `filter chan list N` for the rest |
| Rule gets no hits | Is the filter on (`filter on`)? Is the rule enabled? Did an earlier rule match first? |
| Sender/text never matches | Can the repeater decrypt the channel? Is it group text? Are you matching the right field (sender without colon, text without name)? |
| Matches too broadly | Add `^`/`$` anchors; escape literal dots; remember `sender=Bot` matches `MyBot2` |
+4 -3
View File
@@ -21,9 +21,10 @@
struct AdvertSeenEntry { // RAM-only; cleared on reboot
uint8_t pub_key_prefix[4]; // 4 pubkey bytes sampled at fixed offsets (see
// AdvertRateLimiter::drop); collision odds ~0.001%
// per 256 distinct nodes, vanity-robust; worst
// case is one falsely suppressed advert/window
// KEY_OFFSETS in AdvertRateLimiter.cpp); collision
// odds ~0.001% per 256 distinct nodes,
// vanity-robust; worst case is one falsely
// suppressed advert/window
uint64_t first_seen_millis; // on this repeater's own 64-bit monotonic clock
};
+2 -2
View File
@@ -199,7 +199,7 @@ FilterChannel* FilterRules::addChannel(const char* name, const char* psk_hex) {
if (psk_hex == NULL || psk_hex[0] == 0) {
if (name[0] != '#') return NULL; // psk required for non-hash channels
// hashtag channels are public-by-construction: secret = sha256(name)[0..15]
// (per the companion protocol; see plan §2.11)
// (per the companion protocol)
uint8_t digest[32];
mesh::Utils::sha256(digest, sizeof(digest), (const uint8_t*)name, strlen(name));
memcpy(candidate.secret, digest, 16);
@@ -365,7 +365,7 @@ static bool intervalMatches(const Interval& iv, int32_t v) {
// Path chain predicate: sliding window of adjacent hash entries over pkt->path.
// Each entry is a prefix compare of min(rule_len, path_hash_size) bytes.
// Binary per-entry compare, NOT hex-string matching (odd-nibble alignment and
// variable entry sizes make string matching incorrect — plan §4.2a).
// variable entry sizes make string matching incorrect).
static bool pathMatches(const FilterRule* r, const mesh::Packet* pkt) {
// A recorded path is the flood relay history. A routed-direct packet's path is
// an itinerary between two endpoints, and a TRACE path collects SNRs rather
+1 -1
View File
@@ -14,7 +14,7 @@
#include "CliUtil.h" // CLI_REPLY_MAX
// payload offsets the advert rate limiter samples its 4-byte origin key from
// (mirrors the fixed KEY_OFFSETS in PacketFilter.cpp)
// (mirrors the fixed KEY_OFFSETS in AdvertRateLimiter.cpp)
static const uint8_t ADV_KEY_OFFSETS[4] = { 8, 14, 20, 26 };
// Build a packet with the given header fields. mesh::Packet's constructor only