[ISSUE] A homeowner's Matter code at a turned-off slot's index suspends the slot
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
Research direction
Start from the core code that maps a credential index to a slot's occupancy, and from the clear path that removes only LCM-tagged users and returns False. The slot_suspended repair is raised after 3 failed clears. Reproduce with the fake Matter lock: create an untagged user at index 3 with slot 3 turned off, then check that the slot reads in sync. Done means the off slot reads clear, the untagged code is reported as foreign, and set-path adoption still works. This depends on the unmerged #1694, so confirm its status first.
Written by the indexing model from the issue text.
Description
What happened?
Found while reviewing #1694 (the feature/clean-room-core fix for #1518). It only happens once #1694 is in.
On a Matter lock, a homeowner's own untagged user ("Mom") may hold a PIN at the credential index matching an LCM slot that is turned off. #1694 makes sure LCM's clear never deletes Mom's code. That part works.
The slot itself gets stuck, though:
- The read maps Mom's credential to the slot by its credential index, so the slot reads as occupied by its own code.
- The clear only removes LCM-tagged users, so it finds nothing to remove and returns False.
- After 3 tries the slot is suspended with a
slot_suspendedrepair saying "a code may remain". That repair can never be resolved, and it calls Mom's code the slot's own.
Expected: an untagged user at a slot's credential index counts as someone else's code on the lock, not as the slot's own. The turned-off slot reads clear (in sync), and Mom's code is reported separately, like any other code LCM doesn't manage.
Constraint: we can't just stop mapping untagged users by index. Set-path adoption needs that mapping: a pre-tag LCM user is adopted and tagged on the next write. So this needs a new kind of reading, e.g. "occupied by an untagged user at this index", that the core treats as foreign when the slot is off and as adoptable when it is on.
Steps to reproduce the issue
- On a Matter lock, create user "Mom" with a PIN at credential index 3 through HA's own Matter fabric. Mom is untagged.
- Configure LCM slot 3 on that lock, with its user turned off.
- Let sync run.
- Mom's code stays on the lock, as it should. But slot 3 never reads in sync, and after 3 clear attempts it is suspended with an unresolvable
slot_suspendedrepair.
Home Assistant Version
dev (test harness)
What version of Lock Code Manager are you running?
feature/clean-room-core with #1694
Lock make and model
Matter (reproduced with the fake Matter lock)
🤖 Generated with Claude Code
- Dominant language
- Python
- Stars
- 108
- Forks
- 18
- Avg merge
- 2h 7m
- Merged PRs (30d)
- 130
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raman325/lock_code_manager
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
raman325/lock_code_manager#1729 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 22/100
raman325/lock_code_manager#1697 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 24/100
raman325/lock_code_manager#1691 ·
Maintainers usually reply within 1 day
-
[ISSUE] Adding a lock in the options flow overwrites codes already on itPossibly taken @raman325 claimed this 1 day ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
raman325/lock_code_manager#1684 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 45/100
raman325/lock_code_manager#1581 · 3 comments ·
Maintainers usually reply within 1 day
All issues in raman325/lock_code_manager
Similar issues
-
bot-triaged module: LrScheduler module: optimizer triaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
documentation glm5 llm-model
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/vllm-ascend#19062 ·
Maintainers usually reply within 1 day
-
author-page correction
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
acl-org/acl-anthology#10496 · 1 comment ·
Maintainers usually reply within 1 day
-
Issue Type: Bug Report
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
celery/celery#10875 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SasanLabs/VulnerableApp#836 ·
Maintainers usually reply within 1 day