Skip to content

fix(meshcore): feeder WS presence, apply dispatch, and MC admin#335

Merged
pskillen merged 8 commits into
mainfrom
api-295/paddy/mc-feeder-identity
May 21, 2026
Merged

fix(meshcore): feeder WS presence, apply dispatch, and MC admin#335
pskillen merged 8 commits into
mainfrom
api-295/paddy/mc-feeder-identity

Conversation

@pskillen

@pskillen pskillen commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up to #334 (merged) for staging/local MC channel apply and operator tooling:

  • Feeder WS presence: detect connected MC feeders via channels-redis group ZSET (fixes false feeder_bot_not_connected 503).
  • WebSocket group: join node_mc_{id} by feeder_pubkey_prefix query param when multiple feeders share an API key.
  • Apply dispatch: msgpack-safe apply_mc_channels payloads (plain PUBLIC/HASHTAG strings, _ws_json_safe on group_send).
  • Django admin: MessageChannel lists MC type/hashtag; ManagedNode shows mc_channels mirror and mc_channels_synced_at.
  • Docs: Redis MC groups, horizontal scaling notes for local + pre-prod.

Companion: meshflow-bot#108 (WS prefix + channel scan diagnostics).

Related #295

Testing performed

  • python -m pytest Meshflow/common/tests/test_feeder_ws.py Meshflow/meshcore_packets/tests/test_apply_channel.py Meshflow/ws/tests/test_mc_node_consumer.py -v
  • Manually verified apply-mc-channel-config returns 202 with local API + pre-prod bot on shared Redis

Deploy notes

Restart API workers after merge. No migrations.

Match apply-mc-channel-config dispatch to the same ManagedNode as
feeder-scoped HTTP ingest when API keys are shared (#295).
group_channels does not exist on channels-redis 4.x; probe
asgi:group:{name} like group_send does. Fixes false 503 when
Redis shows the bot subscribed.
Use plain PUBLIC/HASHTAG choice values instead of gettext labels and
sanitize group_send payloads so channels_redis can serialize commands.
List MC type, hashtag, and feeder channel mirror with sync timestamp for
operators debugging device channel sync and apply flows.
Add MeshCoreMessageChannel proxy admin with #hashtag labels, show device
mirror read-only on ManagedNode, and admin action to push mirror via WS.
Extract channel_apply service shared with the apply API endpoint.
@pskillen pskillen merged commit 17d2f8f into main May 21, 2026
2 checks passed
@pskillen pskillen deleted the api-295/paddy/mc-feeder-identity branch May 21, 2026 13:50
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.

2 participants