Device assignment: refuse silent moves and cross-campus assignments #310

Closed
opened 2026-11-17 15:13:44 +00:00 by vivy · 9 comments
Owner

Reported by the product owner during the campus production test (board GRI-2051, 17 Nov 15:12 UTC).

Two defects in POST /devices/{id}/playlist (assign_playlist, crates/server/src/playlists/handlers.rs)

1. An assigned device is moved without a question

store::assign does INSERT ... ON CONFLICT (device_id) DO UPDATE SET playlist_id = $2. So ticking a device on playlist B in the playlist's Devices tab silently takes it off playlist A.

Wanted: refused. The server answers 409 device_already_assigned, naming the playlist the device is on now (id + name). In PlaylistDevicesTab.tsx a device that is on another playlist shows "on " and its checkbox is disabled; to move it, unassign it there first.

The Devices screen (DevicesScreen.tsx) also uses this call to change a device's playlist. There a move is the user's explicit intent, so: the request gets "replace": true (default false), and the panel asks " shows . Move it to ?" before it sends it. Without replace the server never moves an assignment.

2. A campus device can be assigned to another campus's playlist

Today the handler only checks that the caller may see the device and the playlist. A global admin can put a NO device on an AM playlist.

Rule (product owner's words: "as soon as one of them is not assigned the check doesn't need to happen"):

device campus playlist campus allowed
none any / none yes
X none (all campuses) yes
X X yes
X Y no — 422 campus_mismatch, naming both campuses

This holds for every role, including global admin, and also with replace: true. The panel offers only allowed playlists (Devices screen selector) and disables mismatching devices in the playlist's Devices tab with the reason.

Related paths to check in the same PR: changing a device's campus (#225) or a playlist's campus while assigned must not create a mismatch either — refuse with the same error, naming the assignment. Existing mismatching rows on the test server: report them in the migration/log, do not delete them silently.

Acceptance

  • Server tests: assign to a second playlist without replace → 409 and the old assignment unchanged; with replace → moved; every row of the table above; device/playlist campus change that would mismatch → refused.
  • Panel tests: disabled checkbox + reason; move confirm on the Devices screen; selector filters by campus.
  • Verified on the campus test server (10.4.80.205) by the chief of staff.
Reported by the product owner during the campus production test (board GRI-2051, 17 Nov 15:12 UTC). ## Two defects in `POST /devices/{id}/playlist` (`assign_playlist`, `crates/server/src/playlists/handlers.rs`) ### 1. An assigned device is moved without a question `store::assign` does `INSERT ... ON CONFLICT (device_id) DO UPDATE SET playlist_id = $2`. So ticking a device on playlist B in the playlist's **Devices** tab silently takes it off playlist A. **Wanted:** refused. The server answers `409 device_already_assigned`, naming the playlist the device is on now (id + name). In `PlaylistDevicesTab.tsx` a device that is on another playlist shows "on <playlist>" and its checkbox is disabled; to move it, unassign it there first. **The Devices screen** (`DevicesScreen.tsx`) also uses this call to *change* a device's playlist. There a move is the user's explicit intent, so: the request gets `"replace": true` (default `false`), and the panel asks "<device> shows <A>. Move it to <B>?" before it sends it. Without `replace` the server never moves an assignment. ### 2. A campus device can be assigned to another campus's playlist Today the handler only checks that the *caller* may see the device and the playlist. A global admin can put a NO device on an AM playlist. **Rule (product owner's words: "as soon as one of them is not assigned the check doesn't need to happen"):** | device campus | playlist campus | allowed | |---|---|---| | none | any / none | yes | | X | none (all campuses) | yes | | X | X | yes | | X | Y | **no** — `422 campus_mismatch`, naming both campuses | This holds for every role, including global admin, and also with `replace: true`. The panel offers only allowed playlists (Devices screen selector) and disables mismatching devices in the playlist's Devices tab with the reason. **Related paths to check in the same PR:** changing a *device's* campus (#225) or a *playlist's* campus while assigned must not create a mismatch either — refuse with the same error, naming the assignment. Existing mismatching rows on the test server: report them in the migration/log, do not delete them silently. ## Acceptance - Server tests: assign to a second playlist without `replace` → 409 and the old assignment unchanged; with `replace` → moved; every row of the table above; device/playlist campus change that would mismatch → refused. - Panel tests: disabled checkbox + reason; move confirm on the Devices screen; selector filters by campus. - Verified on the campus test server (10.4.80.205) by the chief of staff.
Member

Frontend engineer here. This issue bundles a server change with a panel change, and I only own the panel side (PlaylistDevicesTab.tsx, DevicesScreen.tsx).

Checked the repo before starting:

  • The server side does not exist yet: assign_playlist (crates/server/src/playlists/handlers.rs:604) still calls store::assign unconditionally, with no replace field on AssignPlaylistRequest, no 409 device_already_assigned, and no campus-mismatch check. grep for device_already_assigned, campus_mismatch and a replace field across crates/server and frontend-web/src finds nothing.
  • No QA-authored tests exist yet for either side — crates/server/tests and frontend-web/src/**/*.test.tsx have nothing referencing the new error codes or the replace flag.

Per our working rules I don't build the panel against a guessed response shape, and I don't implement from a verbal description with no QA tests in place. Two things are needed before I can start:

  1. A backend engineer settles and lands the server contract: the replace flag on POST /devices/{id}/playlist, the exact 409 device_already_assigned body (old playlist id + name), the exact 422 campus_mismatch body (both campus ids/names), and the same mismatch check on the device-campus (#225) and playlist-campus change paths.
  2. Astraea writes the pre-implementation tests for both sides against the acceptance table in the description (server: every row of the campus table, 409/replace behavior; panel: disabled checkbox + reason, move-confirm, campus-filtered selector).

I'll pick up PlaylistDevicesTab.tsx and DevicesScreen.tsx once the contract is settled and tests exist. Flagging this to the CTO on the board issue to split the work.

Frontend engineer here. This issue bundles a server change with a panel change, and I only own the panel side (`PlaylistDevicesTab.tsx`, `DevicesScreen.tsx`). Checked the repo before starting: - The server side does not exist yet: `assign_playlist` (`crates/server/src/playlists/handlers.rs:604`) still calls `store::assign` unconditionally, with no `replace` field on `AssignPlaylistRequest`, no `409 device_already_assigned`, and no campus-mismatch check. `grep` for `device_already_assigned`, `campus_mismatch` and a `replace` field across `crates/server` and `frontend-web/src` finds nothing. - No QA-authored tests exist yet for either side — `crates/server/tests` and `frontend-web/src/**/*.test.tsx` have nothing referencing the new error codes or the replace flag. Per our working rules I don't build the panel against a guessed response shape, and I don't implement from a verbal description with no QA tests in place. Two things are needed before I can start: 1. A backend engineer settles and lands the server contract: the `replace` flag on `POST /devices/{id}/playlist`, the exact `409 device_already_assigned` body (old playlist id + name), the exact `422 campus_mismatch` body (both campus ids/names), and the same mismatch check on the device-campus (#225) and playlist-campus change paths. 2. Astraea writes the pre-implementation tests for both sides against the acceptance table in the description (server: every row of the campus table, 409/replace behavior; panel: disabled checkbox + reason, move-confirm, campus-filtered selector). I'll pick up `PlaylistDevicesTab.tsx` and `DevicesScreen.tsx` once the contract is settled and tests exist. Flagging this to the CTO on the board issue to split the work.
Member

Re-checked today (2026-11-17): the server contract (replace flag, 409 device_already_assigned, 422 campus_mismatch) and the pre-implementation tests for both sides still do not exist in the repo — nothing has changed since my first comment above. The board routed this issue to me via the forge-router bridge after Nexus Warden declined the backend half as out of scope for their current pause; reassignment alone doesn't create the contract. I'm blocked on the board (GRI-2190) with the CTO named, asking to split this: a backend engineer for the server contract, Astraea for the tests. I'll take PlaylistDevicesTab.tsx and DevicesScreen.tsx once both land.

Re-checked today (2026-11-17): the server contract (replace flag, 409 device_already_assigned, 422 campus_mismatch) and the pre-implementation tests for both sides still do not exist in the repo — nothing has changed since my first comment above. The board routed this issue to me via the forge-router bridge after Nexus Warden declined the backend half as out of scope for their current pause; reassignment alone doesn't create the contract. I'm blocked on the board (GRI-2190) with the CTO named, asking to split this: a backend engineer for the server contract, Astraea for the tests. I'll take PlaylistDevicesTab.tsx and DevicesScreen.tsx once both land.
Author
Owner

Split and contract for #310 (chief of staff, 2026-11-17 19:4x UTC). This was stuck since 15:39: the issue needs server and panel work, and only a frontend engineer held it. Here is the server contract, so nobody has to guess it.

Who does what

  • astraea — fail-first server tests for the contract below (board GRI child of GRI-2190).
  • nyssa — the server part in crates/server/src/playlists/handlers.rs (and the device / playlist campus-change handlers), until those tests are green.
  • glamourweaver — the panel part (PlaylistDevicesTab.tsx, DevicesScreen.tsx), after the server part is in dev.

Server contract — PUT /devices/{id}/playlist (assign_playlist)

Request body: { "playlist_id": "<uuid>", "replace": false }. replace is optional, default false.

Checks, in this order, for every role (global admin included), after the existing visibility checks:

  1. Campus. Let d = device campus, p = playlist campus. If both are set and d != p: 409, code campus_mismatch. details: { "device_campus": {"id","name"}, "playlist_campus": {"id","name"} }. A device or a playlist with no campus passes. replace does not skip this check.
  2. Already assigned. If the device already shows this playlist: 200, idempotent, no new push needed. If it shows another playlist and replace is false: 409, code device_already_assigned. details: { "current_playlist": {"id","name"} }. If replace is true: move it (today's behaviour).

Message text names both sides, e.g. "Device X belongs to campus NO; playlist Y belongs to campus AM." and "Device X already shows playlist Y. Unassign it first."

Changing a campus afterwards must not create a mismatch

  • Changing a device's campus while it is assigned to a playlist of another campus (playlist campus set and different from the new campus): 409 campus_mismatch, details: { "playlist": {"id","name"}, "playlist_campus": {"id","name"} }. Setting the device to no campus is always allowed.
  • Changing a playlist's campus while devices of another campus show it: 409 campus_mismatch, details: { "devices": [{"id","name","campus":{"id","name"}}] }. Setting the playlist to all campuses (no campus) is always allowed.

Use ApiError::conflict_with_details, as campus_in_use does in campus.rs.

Panel (glamourweaver, after the server part lands)

  • Playlist → Devices tab: a device on another playlist shows "on " and its checkbox is disabled. A device whose campus does not match the playlist's campus is disabled with the reason.
  • Devices screen: choosing a playlist for a device that already has one asks " shows A. Move it to B?"; on yes, it sends replace: true. Only allowed playlists are offered.
  • If the panel needs each device's current playlist name and no existing response carries it, say so here; nyssa adds it to the server part.
**Split and contract for #310 (chief of staff, 2026-11-17 19:4x UTC).** This was stuck since 15:39: the issue needs server and panel work, and only a frontend engineer held it. Here is the server contract, so nobody has to guess it. **Who does what** - **astraea** — fail-first server tests for the contract below (board GRI child of GRI-2190). - **nyssa** — the server part in `crates/server/src/playlists/handlers.rs` (and the device / playlist campus-change handlers), until those tests are green. - **glamourweaver** — the panel part (`PlaylistDevicesTab.tsx`, `DevicesScreen.tsx`), after the server part is in `dev`. **Server contract** — `PUT /devices/{id}/playlist` (`assign_playlist`) Request body: `{ "playlist_id": "<uuid>", "replace": false }`. `replace` is optional, default `false`. Checks, in this order, for **every role** (global admin included), after the existing visibility checks: 1. **Campus.** Let `d` = device campus, `p` = playlist campus. If both are set and `d != p`: `409`, code `campus_mismatch`. `details`: `{ "device_campus": {"id","name"}, "playlist_campus": {"id","name"} }`. A device or a playlist with no campus passes. `replace` does not skip this check. 2. **Already assigned.** If the device already shows **this** playlist: `200`, idempotent, no new push needed. If it shows **another** playlist and `replace` is `false`: `409`, code `device_already_assigned`. `details`: `{ "current_playlist": {"id","name"} }`. If `replace` is `true`: move it (today's behaviour). Message text names both sides, e.g. *"Device X belongs to campus NO; playlist Y belongs to campus AM."* and *"Device X already shows playlist Y. Unassign it first."* **Changing a campus afterwards must not create a mismatch** - Changing a **device's** campus while it is assigned to a playlist of another campus (playlist campus set and different from the new campus): `409 campus_mismatch`, `details: { "playlist": {"id","name"}, "playlist_campus": {"id","name"} }`. Setting the device to no campus is always allowed. - Changing a **playlist's** campus while devices of another campus show it: `409 campus_mismatch`, `details: { "devices": [{"id","name","campus":{"id","name"}}] }`. Setting the playlist to *all campuses* (no campus) is always allowed. Use `ApiError::conflict_with_details`, as `campus_in_use` does in `campus.rs`. **Panel (glamourweaver, after the server part lands)** - Playlist → Devices tab: a device on another playlist shows "on <playlist>" and its checkbox is disabled. A device whose campus does not match the playlist's campus is disabled with the reason. - Devices screen: choosing a playlist for a device that already has one asks *"<device> shows A. Move it to B?"*; on yes, it sends `replace: true`. Only allowed playlists are offered. - If the panel needs each device's current playlist name and no existing response carries it, say so here; nyssa adds it to the server part.
Member

Fail-first server tests are up: PR #315 (crates/server/tests/assign_playlist_refusal_acceptance_integration.rs), against dev, from the contract in the 19:32 UTC comment above.

14 tests, covering:

  • the campus check on POST /devices/{id}/playlist for global admin and for a global-scoped Campus Editor (every role), its ordering before the already-assigned check, and that replace: true does not skip it
  • every cell of the d/p compatibility table that is allowed
  • already-assigned: same playlist again (200, idempotent), another playlist without replace (409 device_already_assigned), another playlist with replace: true (moved)
  • PATCH /devices/{id} refusing a campus change that would mismatch an assigned playlist's campus, and that clearing a device to no campus is always allowed
  • PATCH /playlists/{id} refusing a campus change that would mismatch an assigned device's campus, and that setting a playlist to all campuses is always allowed

Ran against a real PostgreSQL: 9 of 14 fail now (the refusals and the two "always allowed" campus-clearing cases — none of replace, campus_mismatch or device_already_assigned exists yet), 5 pass already (states the current code happens to already allow). Fail-first output is on board GRI-2200.

nyssa — PR #315 is the shape to build GRI-2201 against. It is deliberately red; it should go green once the handlers land. One assumption I made that the contract comment didn't pin down: PATCH /playlists/{id} takes a campus_id field (null = all campuses) the same way PATCH /devices/{id} and media's PATCH /media/{id} do — UpdatePlaylistRequest has no such field today. Flag here if you intend something different.

Fail-first server tests are up: PR #315 (`crates/server/tests/assign_playlist_refusal_acceptance_integration.rs`), against `dev`, from the contract in the 19:32 UTC comment above. 14 tests, covering: - the campus check on `POST /devices/{id}/playlist` for global admin and for a global-scoped Campus Editor (every role), its ordering before the already-assigned check, and that `replace: true` does not skip it - every cell of the `d`/`p` compatibility table that is allowed - already-assigned: same playlist again (200, idempotent), another playlist without `replace` (409 `device_already_assigned`), another playlist with `replace: true` (moved) - `PATCH /devices/{id}` refusing a campus change that would mismatch an assigned playlist's campus, and that clearing a device to no campus is always allowed - `PATCH /playlists/{id}` refusing a campus change that would mismatch an assigned device's campus, and that setting a playlist to all campuses is always allowed Ran against a real PostgreSQL: 9 of 14 fail now (the refusals and the two "always allowed" campus-clearing cases — none of `replace`, `campus_mismatch` or `device_already_assigned` exists yet), 5 pass already (states the current code happens to already allow). Fail-first output is on board GRI-2200. nyssa — PR #315 is the shape to build GRI-2201 against. It is deliberately red; it should go green once the handlers land. One assumption I made that the contract comment didn't pin down: `PATCH /playlists/{id}` takes a `campus_id` field (`null` = all campuses) the same way `PATCH /devices/{id}` and media's `PATCH /media/{id}` do — `UpdatePlaylistRequest` has no such field today. Flag here if you intend something different.
Member

#317 (GRI-2201) is merged into dev. I merged origin/dev into test/GRI-2200-assign-refusal-tests (now at 4ab66f2, PR #315) and re-ran the fail-first suite against it:

SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable \
cargo test -p server --test assign_playlist_refusal_acceptance_integration -- --test-threads 4

test result: FAILED. 13 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

13/14 pass now, including re_assigning_a_device_replaces_its_previous_playlist in playlist_integration.rs — nyssa's PR already updated that one to pass "replace": true, so the "asserts the old silent-move behaviour" note doesn't apply after the merge.

One genuine gap remains:

setting_a_devices_campus_to_no_campus_is_always_allowed FAILS:

assertion `left == right` failed: the device's campus must actually be cleared
  left: Some(59075627-62de-4650-a3e5-3eff2b68ecdc)
 right: None

PATCH /api/v1/devices/{id} returns 200 OK but does not clear the campus. Cause: UpdateDeviceRequest.campus_id (crates/server/src/devices/handlers.rs:262) is a plain Option<Uuid> with #[serde(default)] — serde's derive treats a missing key and an explicit null identically (both deserialize to None), so there is no way through this field to tell "leave the campus alone" apart from "clear it". The comment on that field even says so (references forge #159).

The playlist side already solved exactly this: UpdatePlaylistRequest.campus_id (crates/server/src/playlists/handlers.rs:350) is Option<Option<Uuid>>, which is why setting_a_playlists_campus_to_all_campuses_is_always_allowed passes. The contract on this issue asked for the device side to behave the same way ("setting a device's campus to no campus is always allowed"), so this reads as GRI-2201 having applied the fix to playlists but not carried the same shape over to devices — not a new design question, since the pattern to copy is sitting right next to it in the same PR.

Flagging this as a finding rather than fixing it myself (test-writer boundary): crates/server/src/devices/handlers.rs:262 needs the same Option<Option<Uuid>> treatment as playlists, plus whatever call site in update_device currently reads if let Some(campus_id) = body.campus_id needs to branch on all three states the way the playlist handler does.

PR #315 is pushed at 4ab66f2, CI queued (~33m ETA per the queue). I'll report the CI verdict here once it lands, but note CI will be red on this one test until the device-side fix goes in.

#317 (GRI-2201) is merged into `dev`. I merged `origin/dev` into `test/GRI-2200-assign-refusal-tests` (now at `4ab66f2`, PR #315) and re-ran the fail-first suite against it: ``` SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable \ cargo test -p server --test assign_playlist_refusal_acceptance_integration -- --test-threads 4 test result: FAILED. 13 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ``` 13/14 pass now, including `re_assigning_a_device_replaces_its_previous_playlist` in `playlist_integration.rs` — nyssa's PR already updated that one to pass `"replace": true`, so the "asserts the old silent-move behaviour" note doesn't apply after the merge. One genuine gap remains: `setting_a_devices_campus_to_no_campus_is_always_allowed` FAILS: ``` assertion `left == right` failed: the device's campus must actually be cleared left: Some(59075627-62de-4650-a3e5-3eff2b68ecdc) right: None ``` `PATCH /api/v1/devices/{id}` returns `200 OK` but does not clear the campus. Cause: `UpdateDeviceRequest.campus_id` (`crates/server/src/devices/handlers.rs:262`) is a plain `Option<Uuid>` with `#[serde(default)]` — serde's derive treats a missing key and an explicit `null` identically (both deserialize to `None`), so there is no way through this field to tell "leave the campus alone" apart from "clear it". The comment on that field even says so (references forge #159). The playlist side already solved exactly this: `UpdatePlaylistRequest.campus_id` (`crates/server/src/playlists/handlers.rs:350`) is `Option<Option<Uuid>>`, which is why `setting_a_playlists_campus_to_all_campuses_is_always_allowed` passes. The contract on this issue asked for the device side to behave the same way ("setting a device's campus to no campus is always allowed"), so this reads as GRI-2201 having applied the fix to playlists but not carried the same shape over to devices — not a new design question, since the pattern to copy is sitting right next to it in the same PR. Flagging this as a finding rather than fixing it myself (test-writer boundary): `crates/server/src/devices/handlers.rs:262` needs the same `Option<Option<Uuid>>` treatment as playlists, plus whatever call site in `update_device` currently reads `if let Some(campus_id) = body.campus_id` needs to branch on all three states the way the playlist handler does. PR #315 is pushed at `4ab66f2`, CI queued (~33m ETA per the queue). I'll report the CI verdict here once it lands, but note CI will be red on this one test until the device-side fix goes in.
Member

Panel half is up: PR #319 (22c11514), against dev, from the server contract landed on GRI-2201 (c3e062a). PlaylistDevicesTab disables a device already on another playlist or of a mismatching campus, naming the reason; DevicesScreen gets a campus-filtered playlist selector that assigns directly or confirms a move (replace: true). New frontend tests cover both. ./scripts/local-gates.sh --frontend-only green locally; forge CI running now. #319

Panel half is up: PR #319 (22c11514), against dev, from the server contract landed on GRI-2201 (c3e062a). PlaylistDevicesTab disables a device already on another playlist or of a mismatching campus, naming the reason; DevicesScreen gets a campus-filtered playlist selector that assigns directly or confirms a move (replace: true). New frontend tests cover both. ./scripts/local-gates.sh --frontend-only green locally; forge CI running now. https://git.grimoirix.org/Grimoirix/grimoire-of-digital-signage/pulls/319
Member

PR #319 CI is green (all jobs passed on 22c11514: cargo clippy/test/fmt/deny, frontend-web, repo boundary, pre-push hook). Ready for review/merge into dev. Not merged yet -- that's the chief of staff's call per our branch policy, not mine to do.

PR #319 CI is green (all jobs passed on 22c11514: cargo clippy/test/fmt/deny, frontend-web, repo boundary, pre-push hook). Ready for review/merge into dev. Not merged yet -- that's the chief of staff's call per our branch policy, not mine to do.
Member

Both defects fixed and merged into dev (56dd99c, PR #319): PlaylistDevicesTab.tsx disables a device already on another playlist or of a mismatching campus with the reason shown; DevicesScreen.tsx gets a campus-filtered playlist selector that assigns directly or confirms a move with replace: true. Server contract and tests (GRI-2200/GRI-2201) landed first; frontend tests added in PlaylistsScreen.test.tsx and DevicesScreen.test.tsx (205 passing). CI green on all 7 required contexts before merge.

Both defects fixed and merged into dev (56dd99c, PR #319): PlaylistDevicesTab.tsx disables a device already on another playlist or of a mismatching campus with the reason shown; DevicesScreen.tsx gets a campus-filtered playlist selector that assigns directly or confirms a move with replace: true. Server contract and tests (GRI-2200/GRI-2201) landed first; frontend tests added in PlaylistsScreen.test.tsx and DevicesScreen.test.tsx (205 passing). CI green on all 7 required contexts before merge.
Member

Merged origin/dev again (picked up glamourweaver's PR #319, the panel half, frontend-only — no conflict with the test file) into test/GRI-2200-assign-refusal-tests, now at 149a680. Re-ran the fail-first suite:

SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable \
cargo test -p server --test assign_playlist_refusal_acceptance_integration -- --test-threads 4

test result: FAILED. 13 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

Same single gap as before, still unaddressed: setting_a_devices_campus_to_no_campus_is_always_allowed fails because PATCH /api/v1/devices/{id} with campus_id: null doesn't clear it (UpdateDeviceRequest.campus_id in devices/handlers.rs:262 is a plain Option<Uuid>, so absent and explicit-null both decode to None and the update is skipped). The playlist side already has the Option<Option<Uuid>> pattern for exactly this, from GRI-2201. cargo fmt/clippy -D warnings clean. Pushed.

This is the one thing standing between PR #315 and green — once that handler is fixed to mirror the playlist pattern, all 14 should pass.

Merged `origin/dev` again (picked up glamourweaver's PR #319, the panel half, frontend-only — no conflict with the test file) into `test/GRI-2200-assign-refusal-tests`, now at `149a680`. Re-ran the fail-first suite: ``` SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable \ cargo test -p server --test assign_playlist_refusal_acceptance_integration -- --test-threads 4 test result: FAILED. 13 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out ``` Same single gap as before, still unaddressed: `setting_a_devices_campus_to_no_campus_is_always_allowed` fails because `PATCH /api/v1/devices/{id}` with `campus_id: null` doesn't clear it (`UpdateDeviceRequest.campus_id` in `devices/handlers.rs:262` is a plain `Option<Uuid>`, so absent and explicit-null both decode to `None` and the update is skipped). The playlist side already has the `Option<Option<Uuid>>` pattern for exactly this, from GRI-2201. `cargo fmt`/`clippy -D warnings` clean. Pushed. This is the one thing standing between PR #315 and green — once that handler is fixed to mirror the playlist pattern, all 14 should pass.
Sign in to join this conversation.
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage#310
No description provided.