Skip to content

Scope posts to a MeshCore region (floodScope) - #32

Merged
tuzzmaniandevil merged 1 commit into
devfrom
feat/flood-scope
Oct 8, 2026
Merged

tuzzmaniandevil merged 1 commit into
devfrom
feat/flood-scope

Conversation

@tuzzmaniandevil

Copy link
Copy Markdown
Contributor

Ports OwlShack's flood scope: posts can be scoped to a MeshCore region so only repeaters that allow it pass them on.

  • floodScope on a [[bot]] scopes all its posts; on a trigger it overrides the bot (inherit = the bot's). Unset stays unscoped, as today.
  • Same values as OwlShack: region:<name>, everywhere, inherit, so a block moves between the two unchanged. region:nz keys as firmware's #nz (meshcore.NewRegion).
  • Checked when the config loads: a bad value stops startup with an error naming the bot, and a SIGHUP reload with one keeps the running config. $ private regions are refused (no derivable key), as in OwlShack.
  • Channel replies and cron posts both go through SendGroupTextScoped.
  • OwlShack's channel-level scope level is left out: OwlBot has no per-channel settings, so the levels are trigger, then bot, then unscoped.

Testing

  • TestBotPostsCarryTheResolvedScope builds a bot on a recording modem and checks the packets on the wire: the bot-level region:nz post is a transport flood carrying nz's transport code, and a trigger set to everywhere is a plain flood.
  • Resolution and load-time validation tables.
  • Mutation-checked: the sender dropping the scope, bot and trigger precedence swapped, and validation made a no-op each fail the tests.
  • Binary: nz, region:#nz, region:$priv and a bot-level inherit each stop startup with a clear error; region:nz loads.
  • Not on air yet: a scoped post from the bench would only show the receiving node parses #nz; whether repeaters forward it depends on their region lists.

Ported from OwlShack, same values: region:<name>, everywhere, inherit.
A bot-level floodScope scopes all its posts and a trigger can override
it; unset stays unscoped. Values are checked when the config loads, so
a bad one is refused at startup and a SIGHUP reload keeps the running
config. Sends go through SendGroupTextScoped.
@tuzzmaniandevil
tuzzmaniandevil merged commit 91bcffb into dev Oct 8, 2026
1 check passed
@tuzzmaniandevil
tuzzmaniandevil deleted the feat/flood-scope branch October 8, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant