Skip to content

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
mainfrom
agent/x99-claude-sonnet/che-10418-8d105e527d66
Open

congvc-bot-x99[bot] wants to merge 2 commits into
mainfrom
agent/x99-claude-sonnet/che-10418-8d105e527d66

Conversation

@congvc-bot-x99

Copy link
Copy Markdown

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 one device_events row (merged / kept_separate) in the same transaction.
  • Merge refuses different owners (device_identity_unresolved, 409) and non-owners (device_not_yours, 403). Two different hardware identities are refused (ValueError): they are two phones.
  • New additive table device_non_matches (revision 3 of the devices module). _identify never joins a recorded pair again.
  • device_merge.merge / keep_separate take the device_reservations lock through DeviceReservations.serialized and refuse with device_claimed while 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.

@congvc-bot-x99
congvc-bot-x99 Bot marked this pull request as ready for review November 30, 2026 08:05
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.

0 participants