fix(loracloud): bump request timestamp by 1s on GNSS-NG EoG#190
Conversation
EoG uplinks share the same RX second as the prior captures in their group, so Traxmate's solver can't order them. Adding 1s to the request timestamp when the GNSS-NG header has EoG set keeps the EoG message strictly after the rest of the group without changing the response timestamp surface.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughWhen DeliverUplinkMessage decodes a GNSS‑NG header with EndOfGroup and a non‑nil uplink timestamp, it increments that timestamp by 1 second before sending the HTTP POST. Two unit tests cover adjustment and confirm the caller's timestamp pointer is not mutated. .secrets.baseline line numbers and timestamp updated. ChangesLoraCloud EndOfGroup Timestamp Adjustment
Sequence Diagram(s)sequenceDiagram
participant Caller
participant DeliverUplinkMessage
participant GNSSNGDecoder
participant LoraCloudEndpoint
Caller->>DeliverUplinkMessage: Deliver uplink message (with Timestamp)
DeliverUplinkMessage->>GNSSNGDecoder: decode GNSS-NG header
GNSSNGDecoder-->>DeliverUplinkMessage: header (EndOfGroup=true)
DeliverUplinkMessage->>DeliverUplinkMessage: if EndOfGroup && Timestamp != nil: Timestamp += 1s
DeliverUplinkMessage->>LoraCloudEndpoint: HTTP POST with adjusted Timestamp
LoraCloudEndpoint-->>DeliverUplinkMessage: 200 OK
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR adjusts LoRaCloud uplink delivery so GNSS-NG End-of-Group messages with a request timestamp are sent 1 second later, ensuring they sort after prior captures in the same group without mutating the caller’s timestamp pointer.
Changes:
- Adds local timestamp adjustment for EoG uplinks before marshaling the LoRaCloud request.
- Adds tests for EoG timestamp bumping, nil timestamp behavior, non-EoG behavior, and caller pointer immutability.
- Updates the secrets baseline line numbers after test file changes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pkg/solver/loracloud/loracloud.go |
Adds EoG timestamp adjustment before sending uplink requests. |
pkg/solver/loracloud/loracloud_test.go |
Adds regression coverage for timestamp adjustment behavior. |
.secrets.baseline |
Refreshes baseline metadata/line numbers for shifted test content. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
|
Actionable comments posted: 0 |
Summary
EoGbit is set on a Tag XL uplink, add 1 second to the requesttimestampsent to LoRaCloud/Traxmate so the EoG message sorts strictly after the prior captures in the same group.DeliverUplinkMessageafter the header is decoded, so both the v1 and v2Solvepaths benefit. The response-sideGetTimestamp()surface is unchanged.*float64is never mutated.Test plan
go test ./pkg/solver/loracloud/...go test ./pkg/decoder/tagxl/...go test ./...Summary by CodeRabbit
New Features
Tests