Repository navigation
feat(admin-console): add device Merge and Keep separate in the device repository (CHE-10418) [squash] - #355
Open
congvc-bot-x99[bot] wants to merge 2 commits into
Open
congvc-bot-x99[bot] wants to merge 2 commits into
congvc-bot-x99[bot] wants to merge 2 commits into
Conversation
added 2 commits
November 27, 2026 12:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
CHE-10418 (CHE-1480 stage 1): Merge and Keep separate for devices, repository and service layer only. No HTTP routes, no UI.
DeviceRepository.merge/keep_separate: resolve ids through aliases, check owners, write onedevice_eventsrow (merged/kept_separate) in the same transaction.device_identity_unresolved, 409) and non-owners (device_not_yours, 403). Two different hardware identities are refused (ValueError): they are two phones.device_non_matches(revision 3 of thedevicesmodule)._identifynever joins a recorded pair again.device_merge.merge/keep_separatetake thedevice_reservationslock throughDeviceReservations.serializedand refuse withdevice_claimedwhile either device has a claim.Tests
uv run pytest tests/unit/admin_console/test_device_merge.py: 12 passed.Device, host, queue and schema related admin_console tests: 697 passed, 1 skipped.
make lint: passed.Not in this PR
HTTP routes and route classification: CHE-1480 stage 2.