Skip to content

feat(tagxl): distinguish incomplete configuration reports - #204

Closed
niko-kriznik-globtim wants to merge 1 commit into
mainfrom
feat/tagxl-complete-configuration-compare
Closed

niko-kriznik-globtim wants to merge 1 commit into
mainfrom
feat/tagxl-complete-configuration-compare

Conversation

@niko-kriznik-globtim

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

Copy link
Copy Markdown
Contributor

Summary

  • Add CompareConfiguration so Tag XL port-151 reports are classified as match, complete mismatch, or incomplete.
  • Keep MatchConfiguration as a compatibility wrapper that is true only on a complete match.

Depends on nothing. Used by truvami/api#987.

Test plan

  • go test ./pkg/decoder/tagxl/v1/ -run 'TestMatchConfiguration|TestCompareConfiguration|TestConfigurationComparisonString|TestPort151PayloadConfig'
  • golangci-lint via pre-commit
  • Review captured campaign fixtures against the DEV payloads

Summary by CodeRabbit

  • New Features

    • Added configuration comparison results for incomplete, matching, and mismatching configurations.
    • Configuration comparisons now identify missing reflected fields before evaluating payload differences.
    • Added readable labels for each comparison result.
  • Bug Fixes

    • Incomplete observed telemetry is now treated as a non-match without producing an error.
    • Complete matching and differing configurations are now classified consistently.

Campaign verification must not treat partial port-151 uplinks as
contradictions. CompareConfiguration now returns match, complete
mismatch, or incomplete when a requested setter is absent.
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review 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: ea47c26f-d1ad-45e5-b04e-b8d8abfd6489

📥 Commits

Reviewing files that changed from the base of the PR and between 2a9ec2e and 127b745.

📒 Files selected for processing (2)
  • pkg/decoder/tagxl/v1/configuration_match.go
  • pkg/decoder/tagxl/v1/configuration_match_test.go

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.


📝 Walkthrough

Walkthrough

Changes

Configuration comparison

Layer / File(s) Summary
Comparison states and observed-tag tracking
pkg/decoder/tagxl/v1/configuration_match.go
Adds ConfigurationComparison states and CompareConfiguration. MatchConfiguration now treats incomplete observed telemetry as a non-match. Observed parsing records comparable TLV tags and detects missing setters.
Comparison behavior validation
pkg/decoder/tagxl/v1/configuration_match_test.go
Tests cover incomplete, matching, mismatching, and missing-field results. Tests also cover string representations, including unknown values.

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

Merge Risk: ⚪ Minimal · up to 127b7

This change classifies partial configuration reports as incomplete while preserving complete match and mismatch behavior. Current coverage includes incomplete, matching, mismatching, and missing-field cases, with no remaining merge-readiness risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: distinguishing incomplete Tag XL configuration reports.
  • 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-complete-configuration-compare

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

@niko-kriznik-globtim

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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 86.11111% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/decoder/tagxl/v1/configuration_match.go 86.11% 4 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
pkg/decoder/tagxl/v1/configuration_match.go 88.32% <86.11%> (-1.51%) ⬇️

... and 1 file with indirect coverage changes

🚀 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.

@niko-kriznik-globtim
niko-kriznik-globtim marked this pull request as ready for review September 7, 2026 09:01
@niko-kriznik-globtim

Copy link
Copy Markdown
Contributor Author

API consumer: https://github.com/truvami/api/pull/988 (pseudo-version of this commit until tagged from main).

@niko-kriznik-globtim
niko-kriznik-globtim deleted the feat/tagxl-complete-configuration-compare branch September 8, 2026 07:00
@niko-kriznik-globtim
niko-kriznik-globtim restored the feat/tagxl-complete-configuration-compare branch September 8, 2026 07:00
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.

3 participants