mirror of
https://github.com/agessaman/MeshCore.git
synced 2026-08-28 02:54:05 +00:00
Fork-owned, host-tested MQTT bridge lifecycle state machine and the narrow dependency seam to drive it deterministically, plus the cross-core ownership model. This is the Phase 4 "ownership and teardown test seams" safety net that must land before the Phase 5 cooperative-shutdown refactor. - src/helpers/MQTTLifecycle.h: pure state machine (Stopped->Starting->Running->StopRequested->Stopping->Stopped) + injected Ops seam (clock / task / resource owner / OTA barrier) + Coordinator with a bounded stop timeout. No Arduino/FreeRTOS/WiFi deps. - test/test_mqtt_lifecycle/: 18 GoogleTest cases covering the phase's teardown matrix (stop during every activity, callback timing, duplicate/early stop, restart, timeout fallback, no-access-after-release) and the OTA-barrier scenarios. - MQTT_OWNERSHIP.md: one owner per mutable runtime domain, current cross-core hazards with file:line references, target primitives, and Phase-0-pending (hardware-characterization) items. - STABILITY_TESTABILITY_HANDOFF.md: Phase 4 status and verified premise refinements. Scope: MQTTBridge.cpp is intentionally untouched. The production rewiring (plain-data snapshot publication, volatile-handshake replacement, cooperative shutdown) is deferred to Phase 5.