Skip to content

fix(tagxl): classify supported configuration actions - #211

Merged
michaelbeutler merged 1 commit into
mainfrom
feat/tagxl-configuration-actions-main
Sep 17, 2026
Merged

michaelbeutler merged 1 commit into
mainfrom
feat/tagxl-configuration-actions-main

Conversation

@niko-kriznik-globtim

@niko-kriznik-globtim niko-kriznik-globtim commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This is the same content as #210 / `v1.6.0-rc2`: Tag XL `0x80`–`0x84`, Smart Label v2 `0x81`–`0x84`, Tag S/L sent validators.

API follow-up: https://github.com/truvami/api/pull/1022 still pins `v1.6.0-rc2` until this is merged.

Test plan

Summary by CodeRabbit

  • New Features

    • Added support for validating TAGSL configuration payloads, including standard and BLE formats.
    • Added support for action-only configuration profiles in TagXL and SmartLabel V2.
    • Added recognition of alarm, device reset, immediate scan, storage clearing, and complete wipe actions.
    • Added configuration analysis to identify required settings and supported actions before device communication.
  • Bug Fixes

    • Improved handling of malformed, duplicate, unsupported, oversized, and invalid configuration data.

Land the #210 squash on main. The original PR was merged into the
already-merged parent branch, so action analysis never reached main.
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Essentials

Run ID: aef89e7a-863d-4739-93fe-cd10cacb22a0

📥 Commits

Reviewing files that changed from the base of the PR and between f9c19c2 and ff8f50d.

📒 Files selected for processing (6)
  • pkg/decoder/tagsl/v1/configuration_match.go
  • pkg/decoder/tagsl/v1/configuration_match_test.go
  • pkg/decoder/tagxl/v1/configuration_dialect.go
  • pkg/decoder/tagxl/v1/configuration_match.go
  • pkg/decoder/tagxl/v1/configuration_match_test.go
  • pkg/decoder/tagxl/v1/port151.go

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.


📝 Walkthrough

Walkthrough

Changes

Configuration validation and action handling

Layer / File(s) Summary
TagXL action definitions and parsing
pkg/decoder/tagxl/v1/port151.go, pkg/decoder/tagxl/v1/configuration_dialect.go, pkg/decoder/tagxl/v1/configuration_match.go
TagXL now defines supported actions, stores dialect action mappings, and parses action arguments with duplicate and length checks.
TagXL analysis and configuration flow
pkg/decoder/tagxl/v1/configuration_match.go, pkg/decoder/tagxl/v1/configuration_match_test.go
AnalyzeConfiguration reports requirements and actions. Action-only payloads validate but cannot be compared or used to build getter requests. Tests cover action handling, limits, readback, and errors.
TagSL configuration payload validation
pkg/decoder/tagsl/v1/configuration_match.go, pkg/decoder/tagsl/v1/configuration_match_test.go
Standard and BLE configuration validators check hexadecimal input, fixed payload lengths, decoding, and decoder validation errors.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant AnalyzeConfiguration
  participant parseConfigurationSent
  participant dialectSpec
  Caller->>AnalyzeConfiguration: provide dialect and sent hex
  AnalyzeConfiguration->>parseConfigurationSent: parse configuration
  parseConfigurationSent->>dialectSpec: read supported actions
  dialectSpec-->>parseConfigurationSent: return action definitions
  parseConfigurationSent-->>AnalyzeConfiguration: return requirements and action presence
  AnalyzeConfiguration-->>Caller: return analysis or validation error
Loading

Merge Risk: ⚪ Minimal · up to ff8f5

The configuration validation and action-handling changes have no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.62% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 26 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: classifying supported TagXL configuration actions. It matches the pull request objectives and changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/tagxl-configuration-actions-main

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.33333% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/decoder/tagxl/v1/configuration_dialect.go 50.00% 1 Missing and 1 partial ⚠️
pkg/decoder/tagxl/v1/configuration_match.go 95.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
pkg/decoder/tagsl/v1/configuration_match.go 93.75% <100.00%> (+1.25%) ⬆️
pkg/decoder/tagxl/v1/port151.go 90.84% <ø> (ø)
pkg/decoder/tagxl/v1/configuration_dialect.go 89.28% <50.00%> (-3.17%) ⬇️
pkg/decoder/tagxl/v1/configuration_match.go 90.52% <95.00%> (+2.15%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@michaelbeutler
michaelbeutler merged commit 99fb266 into main Sep 17, 2026
15 checks passed
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.

4 participants