fix(327): validate playlist name on rename (reject empty/whitespace/too-long) #454

Merged
timothy merged 1 commits from fix/327-playlist-rename-validation into main 2026-07-18 18:27:20 +02:00
Owner

ReplacePlaylistItemsHandler performed no name validation on rename. Added a .BindT(ValidateName) step using the StringValidation combinators (NotEmpty/NotLongerThan(50)), mirroring RenamePlaylistGroupHandler and matching CreatePlaylistHandler's rule exactly. Failure maps to 422 per api-conventions. 4 tests added (9/9 pass).

Review: write-path — independent cold review = MERGEABLE (one inherited nit: rename doesn't check name-uniqueness, same as its exemplar RenamePlaylistGroupHandler; deferred, not a regression).

fixes #327

`ReplacePlaylistItemsHandler` performed no name validation on rename. Added a `.BindT(ValidateName)` step using the `StringValidation` combinators (`NotEmpty`/`NotLongerThan(50)`), mirroring `RenamePlaylistGroupHandler` and matching `CreatePlaylistHandler`'s rule exactly. Failure maps to 422 per api-conventions. 4 tests added (9/9 pass). **Review:** write-path — independent cold review = **MERGEABLE** (one inherited nit: rename doesn't check name-uniqueness, same as its exemplar RenamePlaylistGroupHandler; deferred, not a regression). fixes #327
timothy added 1 commit 2026-07-18 16:58:12 +02:00
fix(327): validate playlist name on rename (reject empty/whitespace/too-long)
Build ErsatzTV Image / CI image pin matches docker/ci (pull_request) Successful in 5s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 8s
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 6s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 7m0s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 1m1s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 15m43s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 14m11s
48f7ceff62
fixes #327

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
Owner

Review-verdict: MERGEABLE @ 48f7ceff62
Write-path. Independent cold review = MERGEABLE. Name validation mirrors RenamePlaylistGroupHandler/StringValidation, maps to 422, 9/9 tests. One inherited nit (no name-uniqueness check, same as its exemplar) deferred — not a regression.

Review-verdict: MERGEABLE @ 48f7ceff6272871405104b39086439eaac1ea098 Write-path. Independent cold review = MERGEABLE. Name validation mirrors RenamePlaylistGroupHandler/StringValidation, maps to 422, 9/9 tests. One inherited nit (no name-uniqueness check, same as its exemplar) deferred — not a regression.
Author
Owner

Live-E2E PASSED (scripts/e2e-local.sh, real /api endpoints, machine-key auth). Every mutation round-trips through a subsequent GET — the write-path requirement per docs/e2e-local.md is satisfied. Proceeding to merge.

Live-E2E PASSED (scripts/e2e-local.sh, real /api endpoints, machine-key auth). Every mutation round-trips through a subsequent GET — the write-path requirement per docs/e2e-local.md is satisfied. Proceeding to merge.
timothy merged commit f62ff0eebc into main 2026-07-18 18:27:20 +02:00
Sign in to join this conversation.