Skip to content

fix(meshtastic): persist dashboard-ready positions - #363

Open
fallenmi wants to merge 3 commits into
brian7704:masterfrom
fallenmi:codex/opentak-meshtastic-map-integrity
Open

fallenmi wants to merge 3 commits into
brian7704:masterfrom
fallenmi:codex/opentak-meshtastic-map-integrity

Conversation

@fallenmi

@fallenmi fallenmi commented Aug 26, 2026

Copy link
Copy Markdown

Closes #358.

What changed

  • persist the CoT event behind each Meshtastic position and link the Point through cot_id, so dashboard serialization has the expected how and type
  • refresh the matching EUD's last_event_time and connected status when a position arrives
  • resolve one canonical EUD UID for the event, CoT sender, and Point device, including persisted ATAK UID mappings recovered after a restart
  • roll back a failed CoT/Point write instead of emitting an orphan point payload

The resolver preserves an existing physical-device EUD when an in-memory mapped UID is stale, avoiding an unsafe UID migration or a unique-callsign collision.

Validation

  • exact master (640a8ae9) with the regression suite: 6 failures and 1 error
  • corrected head: 3 tests passed, covering five raw/mapped/restart identity scenarios plus activity-only conflict handling and transaction rollback
  • SQLite foreign-key oracle: raw-existing and mapped-new CoT/Point relationships both committed successfully
  • Black, isort, Flake8 on the new test, compileall, and git diff --check passed

AI assistance disclosure

OpenAI Codex assisted with issue triage, implementation, tests, adversarial review, and publication. The account owner explicitly authorized this contribution. It is ready for upstream review.

@fallenmi
fallenmi marked this pull request as ready for review August 26, 2026 15:32
@brian7704

Copy link
Copy Markdown
Owner

If this PR resolves an issue you were experiencing I'm happy to test it and merge it if everything works well. However if it's something that AI suggested that's unrelated to any known issue then I'm inclined to close it.

@fallenmi

Copy link
Copy Markdown
Author

This is not a personal deployment issue, but it is directly scoped to the independently reported #358, not an unrelated AI suggestion. That report describes Meshtastic nodes present in the EUD and points tables but absent from the dashboard map because the point lacks cot_id and EUD activity is not refreshed.

The regression on current master reproduces that data-path gap. This patch persists the linked CoT and Point rows and refreshes the matching EUD, including mapped-UID and restart cases. The useful remaining external gate is a test against a real Meshtastic setup like the reporter’s.

Codex assisted with this clarification; the account owner authorized posting it.

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.

Meshtastic-sourced points not shown on dashboard map (missing cot_id / last_event_time)

2 participants