feat(tagsl): compare reflected configuration - #202
Conversation
Keep setter and report TLV tags next to the port 151 decoder so matching and decoding cannot drift.
Verify Tag S/L campaigns by matching port-128 downlinks against the comparable fields in port-4 reports.
|
@coderabbitai review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (4)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughAdds TAGSL configuration matching for standard and BLE payloads. It validates payload lengths, decodes shared payload layouts, compares configuration fields, and supports optional report fields. It also centralizes TAGXL configuration mappings and TLV matching. ChangesConfiguration matching and payload mappings
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds reflected Tag S/L configuration matching and preserves verification for reports with optional fields; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant Caller
participant MatchConfiguration
participant TAGSLDecoder
Caller->>MatchConfiguration: provide sentHex and observedHex
MatchConfiguration->>TAGSLDecoder: decode and validate payloads
TAGSLDecoder-->>MatchConfiguration: return validated configuration values
MatchConfiguration-->>Caller: return match result or error
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Action performedReview finished.
|
|
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
Call the port 151 identifiers TLV tags so the decoder schema is not framed as a report.
Own the port-128 layout in the decoder so encoding and campaign matching share one struct.
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@niko-kriznik-globtim please be aware of the BLE, DataRate and Accuracy Booster Downlinks. There is way of verification but might still be used in the configuration campaigns. |
Port 134 downlinks are reported on port 8 with the same 22-byte layout, so campaigns can verify BLE scan config the same way as port 128 vs port 4.
6c78f4a
|
@michaelbeutler thanks — we took the BLE path. Port 134 BLE scan/advertising config is reported on port 8 (same 22-byte layout), so this PR now has DataRate is not a Tag S/L downlink in this protocol (Smart Label port 128/4 and Tag XL TLV only). Accuracy booster (port 131) has no reflecting uplink, so those campaigns stay unverified, same as today. Port 128 BLE/GNSS/Wi-Fi enable flags are still ignored: they are not on the port-4 config report. |
|
@coderabbitai review |
|
Summary
Supports truvami/api#972.
Test plan
go test ./pkg/decoder/tagxl/v1 ./pkg/decoder/tagsl/v1 ./pkg/common ./pkg/encoder/tagsl/v1 -count=1