Skip to content

feat(zigbee-lock): validate indices during lockCodes migration - #3327

Merged
hcarter-775 merged 1 commit into
mainfrom
feat/zigbee-lock-migration-validation
Nov 4, 2026
Merged

hcarter-775 merged 1 commit into
mainfrom
feat/zigbee-lock-migration-validation

Conversation

@hcarter-775

@hcarter-775 hcarter-775 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Drop lockCodes slots that are not integer credential indices, or fall below the credential minimum, instead of migrating them. Slot 0 is a valid credential index but not a valid user index (minimum 1), so its user takes the lowest unused userIndex without displacing any slot whose number is already a valid userIndex.

Move the migration into its own module and add per-table minimums to the table definitions.

Summary of Completed Tests

Unit tests updated. Tested on Zigbee Yale and Kwikset devices.

@hcarter-775 hcarter-775 added the CGAI Contains code that was generated by AI label Nov 4, 2026
@hcarter-775
hcarter-775 force-pushed the feat/zigbee-lock-migration-validation branch from 77d931e to a7253f0 Compare November 4, 2026 17:43
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Channel deleted.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

zigbee-lock_coverage.xml

File Coverage
All files 94% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_utils/tables.lua 98% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/samsungsds/init.lua 89% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/init.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/migrate.lua 98% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/configurations.lua 95% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/init.lua 99% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lazy_load_subdriver.lua 57% ❌
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/legacy-handlers/yale/init.lua 92% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_handlers/capabilities.lua 90% ✅
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/zigbee-lock/src/lock_handlers/zigbee_responses.lua 89% ❌

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 867cea4

@CLAassistant

CLAassistant commented Nov 4, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Test Results

   73 files    548 suites   0s ⏱️
3 327 tests 3 327 ✅ 0 💤 0 ❌
5 337 runs  5 337 ✅ 0 💤 0 ❌

Results for commit 867cea4.

♻️ This comment has been updated with latest results.

Drop lockCodes slots that are not integer credential indices, or fall
below the credential minimum, instead of migrating them. Slot 0 is a
valid credential index but not a valid user index (minimum 1), so its
user takes the lowest unused userIndex without displacing any slot
whose number is already a valid userIndex.

Move the migration into its own module and add per-table minimums to
the table definitions.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@hcarter-775
hcarter-775 force-pushed the feat/zigbee-lock-migration-validation branch from a7253f0 to 867cea4 Compare November 4, 2026 18:34
@hcarter-775
hcarter-775 merged commit f0792c5 into main Nov 4, 2026
21 of 22 checks passed
@hcarter-775
hcarter-775 deleted the feat/zigbee-lock-migration-validation branch November 4, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CGAI Contains code that was generated by AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants