feat(414): stamp immutable Channel.Origin (auto-tuned vs user-created) and surface it #575

Merged
timothy merged 1 commits from feat/414-channel-origin into main 2026-07-23 20:12:26 +02:00
1 Commits
Author SHA1 Message Date
timothyandClaude Opus 4.8 015d416604 feat(414): stamp immutable Channel.Origin (auto-tuned vs user-created) and surface it
PR Gates / CI image pin matches docker/ci (pull_request) Successful in 15s
PR Gates / Docs update reminder (pull_request) Successful in 15s
PR Gates / decisions lifecycle (pull_request) Successful in 24s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 1m26s
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 5m39s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 13m24s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 19m25s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 19m37s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Add a `ChannelOrigin { Unknown, UserCreated, AutoTuned }` enum + `Channel.Origin`
column (dual-provider migration, default 0 = Unknown for un-back-filled legacy
rows). Stamped once at insert — `AutoTuned` in `CreateChannelFromLineupHandler`
(the single primitive bulk auto-tune delegates to), `UserCreated` in
`CreateChannelHandler` — and never mutated on edit, so "auto-generated then
user-edited" stays AutoTuned. Surfaced as a raw `origin` on `ChannelResponseModel`;
the SPA badges only AutoTuned (absence = user-created or legacy).

This is #72 scope item (a), deferred in `api.channel-health-signal` because no
honest signal existed (`ChannelPlayoutSource.Generated` also tags SPA-created
blanks; a "Channel Lineups" playlist-group join is a heuristic that breaks on edit).
The fix is a dedicated column — a fact, not a derivation.

Decision: docs/decisions.md `channel.origin-marker`; docs/domain-model.md updated;
design-system Channels prototype mirrored.

Verified: 1833 .NET + 939 web tests; independent review clean; live-E2E write→read
round-trip (POST channel → GET returns origin=UserCreated; seed row=Unknown).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 19:17:37 +02:00