Add minimal CoT interoperability with UDP beaconing#4
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Tactical-App/core/src/main/java/com/example/core/interop/Interop.kt
Lines 47 to 49 in 5ba929d
[P1] Schedule periodic work below WorkManager minimum interval
The self-beacon is created with PeriodicWorkRequestBuilder<SelfBeaconWorker>(5, TimeUnit.SECONDS), but WorkManager enforces a minimum repeat interval of 15 minutes. Calling this method will throw IllegalArgumentException: intervalMillis < MIN_PERIODIC_INTERVAL_MILLIS when the user enables CoT in the settings screen, so the beacon can never start. Use at least 15 minutes (or PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS) and consider constraints instead of short polling.
[P1] Self beacon worker ignores runtime location permission
The worker fetches the last known GPS location without checking whether ACCESS_FINE_LOCATION has been granted at runtime. On devices where the user has not granted location, getLastKnownLocation will raise SecurityException, causing the periodic work to fail continuously and preventing any beacons from being transmitted. Request or verify the permission before scheduling the work and handle failures gracefully inside the worker.
[P1] Exported CoT receiver crashes on malformed broadcasts
The exported CotMarkerReceiver blindly decodes the marker extra with Json.decodeFromString and lacks error handling. Any other app can send com.tacticalapp.SEND_MARKER with invalid JSON, causing a SerializationException that terminates the process while the receiver runs in the background. Validate or catch parsing errors and consider requiring a permission for the broadcast to avoid a trivial DoS.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
Summary
coremodule with CoT event model, XML helpers, UDP sender and Interop APITesting
gradle test(fails: SDK location not found)https://chatgpt.com/codex/tasks/task_e_68c4044aaa1c832881b32e5cab07178f