Per-channel default-adoption state, so "on by default" can stop re-adding an overlay the operator cleared #844

Open
opened 2026-08-26 20:41:45 +02:00 by timothy · 0 comments
Owner

Deferred from #732 (PR #843), where the limitation is documented rather than fixed.

The gap

graphics.on-now-next-on-by-default uses a single global ConfigElement marker
(graphics.on_now_next_default_attached) to decide whether the one-time backfill has run. A boolean
that means the backfill has run cannot express both of the properties this feature wants:

  • never re-add to a channel the operator deliberately cleared, and
  • never strand a channel that had no element to attach when the backfill ran.

Today the marker is written only once the built-in element resolves. That closes stranding. The
cost is a window: while the backfill is still armed — the built-in template file is absent, so
RefreshGraphicsElements has reaped its row — a cleared channel is indistinguishable from one never
considered. If the element is later restored, the next boot attaches it to every eligible channel,
including the cleared one.

Reproduced as a test in that PR (While_Armed_A_Restored_Element_Is_Attached_To_Every_Eligible_Channel),
so the behaviour is pinned rather than accidental.

Why it was not fixed there

Closing it properly needs durable per-channel state — "this channel has been considered for the
default" / "the operator opted out" — rather than one global flag. That is a TvContext model change
and therefore a dual-provider migration (scripts/add-migration.sh), which is a disproportionate
addition to a PR that had already grown well past its original scope.

Why it is low priority

The window is narrow (it requires the built-in template to be absent at startup), and the failure is
visible and reversible — an overlay reappears and can be toggled off again. Stranding, the
alternative the current design rules out, is silent and permanent. So the trade is deliberately made
in the direction it is.

Scope

  • Decide the shape: a per-channel adoption/opt-out column or join, versus keeping the global marker
    and accepting the window permanently (a valid outcome — record it either way)
  • If implementing: dual-provider migration via scripts/add-migration.sh
  • Backfill semantics for existing rows decided and documented
  • graphics.on-now-next-on-by-default updated — its current text states the limitation explicitly
    and would need rewriting rather than appending
  • Adversarial review passed

Related

Also worth folding in if this is picked up: the same "considered once" question applies to any future
default-on graphics element, so the state should not be named for On Now / Next specifically.

Deferred from #732 (PR #843), where the limitation is documented rather than fixed. ## The gap `graphics.on-now-next-on-by-default` uses a single global `ConfigElement` marker (`graphics.on_now_next_default_attached`) to decide whether the one-time backfill has run. A boolean that means *the backfill has run* cannot express both of the properties this feature wants: - **never re-add** to a channel the operator deliberately cleared, and - **never strand** a channel that had no element to attach when the backfill ran. Today the marker is written only once the built-in element **resolves**. That closes stranding. The cost is a window: while the backfill is still armed — the built-in template file is absent, so `RefreshGraphicsElements` has reaped its row — a cleared channel is indistinguishable from one never considered. If the element is later restored, the next boot attaches it to every eligible channel, including the cleared one. Reproduced as a test in that PR (`While_Armed_A_Restored_Element_Is_Attached_To_Every_Eligible_Channel`), so the behaviour is pinned rather than accidental. ## Why it was not fixed there Closing it properly needs durable **per-channel** state — "this channel has been considered for the default" / "the operator opted out" — rather than one global flag. That is a `TvContext` model change and therefore a dual-provider migration (`scripts/add-migration.sh`), which is a disproportionate addition to a PR that had already grown well past its original scope. ## Why it is low priority The window is narrow (it requires the built-in template to be absent at startup), and the failure is **visible and reversible** — an overlay reappears and can be toggled off again. Stranding, the alternative the current design rules out, is silent and permanent. So the trade is deliberately made in the direction it is. ## Scope - [ ] Decide the shape: a per-channel adoption/opt-out column or join, versus keeping the global marker and accepting the window permanently (a valid outcome — record it either way) - [ ] If implementing: dual-provider migration via `scripts/add-migration.sh` - [ ] Backfill semantics for existing rows decided and documented - [ ] `graphics.on-now-next-on-by-default` updated — its current text states the limitation explicitly and would need rewriting rather than appending - [ ] Adversarial review passed ## Related Also worth folding in if this is picked up: the same "considered once" question applies to any future default-on graphics element, so the state should not be named for On Now / Next specifically.
timothy added the enhancementpriority: low labels 2026-08-26 20:41:58 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timothy/ersatztv#844