GRI-2104: add DELETE /devices/{id} to remove a device #251
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!251
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/GRI-2104-remove-device"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
DELETE /devices/{device_id}, gated byDevicesManage, to permanently remove a device.device_playlist_assignmentsrow via the existingON DELETE CASCADE.DeviceConnections::disconnectsignals the live WebSocket session via an in-processNotify, since there is no wire frame for "please hang up."blockremains the way to keep a device out permanently.plan/server/rest-api.md, which previously documented DELETE as out of MVP scope.Test plan
No pre-written QA tests existed for this issue, so acceptance tests were written from the forge issue's "Done when" list, added in
crates/server/tests/devices_integration.rs:Verified locally:
./scripts/local-gates.sh --rust-only— every gate passed.Approved. DELETE removes the row, the assignment goes on the cascade, a live session ends via the per-registration Notify (fresh on each register, so a stale one cannot fire). Campus check returns 404 for a device outside the caller's scope. Tests cover delete+cascade, unknown, no session. CI green on
5578af32.Correct. Delete then disconnect is the right order; a reconnect with the old token falls to handle_unknown_device (ws.rs), so the 'admitted as new pending' claim holds. DB tests run in CI (SIGNAGE_TEST_DATABASE_URL is set). Merging.
New commits pushed, approval review dismissed automatically according to repository settings