Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
6.5 KiB
6.5 KiB
Orbit TV 0.99.3: adaptive film rest (After Dark and Premiere)
This is the fifth isolated editorial correction, from the proposal of 4 November 2026. The change is to scheduling only, for two film channels.
What's in it
adaptiveRestMs(ChannelSchedule.kt). A film channel's everyday block can rest each film for a time worked out from how long the block's own films take to play through, back to back, in the block's daily hours:- Too short for the channel's 7 days: 90% of that time. Each pick then comes from a genuinely rested shortlist, not the "longest waiting" fallback, which plays the pool in the same fixed order every cycle.
- Longer than 7 days: up to 80% of it, never under 7 days, so a big pool airs more of itself.
- Floor and ceiling: 2 and 14 days.
- Events keep the channel's rest. That covers B-Movie Throwbacks, Cult Classics, Joe Bob Saturdays and every other event. The Drive-In and PPV Sunday aren't affected.
- On for two channels only (
ChannelProgramming.adaptiveFilmRest):- After Dark: late 21:00 to 05:00 rests 14 days; day 05:00 to 21:00 rests 5.0 days, where flat 7 days can't be kept.
- Premiere: 7.7 days.
- Every other film channel is unchanged, for the reasons below.
Why only these two
Four weeks of every channel booking together on box copies from 4 November 00:40, flat 7 days against adaptive for every film channel (docs/replays/editorial-corrections-2026-11-04.txt, section 5b):
| Channel | Rest | Different films | Fixed-order fallbacks | Repeat gap, median / shortest |
|---|---|---|---|---|
| After Dark | 14 d late, 5.0 d day | 126 → 132 | 190 → 0 | 5.7 / 5.2 → 5.4 / 5.0 d |
| Premiere | 7.7 d | 97 → 98 | 0 → 0 | 8.6 / 7.0 → 9.1 / 7.7 d |
| Action, Sci-Fi, Horror, Romance | 7.0 d | the same | 0 → 0 | the same within 0.2 d |
| VHS | 6.2 d | 96 → 96 | 235 → 0 | 6.9 / 6.9 → 6.7 / 6.2 d |
| Detour | 5.5 d | 88 → 88 | 261 → 0 | 6.1 / 6.1 → 5.9 / 5.5 d |
| BritX | 5.8 d | 90 → 90 | 256 → 0 | 6.4 / 6.4 → 6.2 / 5.8 d |
| Wonder | 5.0 d | 92 → 92 | 303 → 0 | 5.6 / 5.6 → 5.4 / 5.0 d |
| PixelZ | 6.1 d | 100 → 100 | 217 → 0 | 6.8 / 6.8 → 6.7 / 6.1 d |
- After Dark gains six more films over four weeks, and its day block stops looping.
- Premiere rests its films longer.
- The five small channels (VHS, Detour, BritX, Wonder and PixelZ):
- The fixed-order loop ends, but films come back about a fifth of a day sooner.
- The loop already gives each film the longest possible gap. So the real fix for these channels is more films, not a different rest.
- Switching one on later is a one-line change.
Checks before install
- 408 unit tests pass, including the hand-run replays. Lint has no errors.
- New AdaptiveFilmRestTest:
- The rest follows the block's films and hours, with the floor, ceiling and 7-day minimum for big pools.
- A small pool picks from a rested shortlist with no fallbacks, keeps the adaptive rest and leaves no gaps.
- Events keep 7 days.
- Only 301 and 305 adapt.
- Fingerprints: a four-week replay of all 30 channels against 0.99.2. Every committed fingerprint is identical, and only 301 and 305 differ.
- Clashes: 0 new clashes with adaptive rest on every film channel. The only overlap is the old committed Shaun of the Dead.
Known limits
- After Dark's pool is still waiting for Paul's review. Removing films would shorten its day-block rest automatically, because the rest follows the pool.
- Tested here as scheduling logic only.
Rollback
Install 0.99.2. No saved data changes.
Installation record (4 November 2026)
Paul approved 0.99.1 (with 0.99.0) at 01:08 and 0.99.3 (with 0.99.2) at 01:31.
- 0.99.1: installed over 0.98.0 at 01:27.
- 0.99.3: installed over 0.99.1 at 01:42.
Before each install I took a snapshot of all 95 schedule files. Rollback APKs are in outputs/revision-0.98.0 and outputs/revision-0.99.1. Orbit relaunched both times with no crash in the log. After the 0.99.3 relaunch, every channel's log line ends clashes=0.
- Committed bookings:
- Across both installs, every plan kept every remaining entry identical. The only removals were the normal daily trim of programmes that ended more than 24 hours ago.
- No plan cursor changed except Tots'. Tots' plan dropped under six days ahead at 01:38 and topped up on its own, as every channel does. That added 111 programmes from 10 November 00:40, without touching its committed entries.
- Tots' first weighted bookings show the approved split. Morning (39) and Playtime (15) carry weighted reasons. Wind Down (18) and Night (39) carry equal-turns reasons.
- Episode cursors: every aired cursor that moved now points to an episode that started in its plan, which is the normal record of what has gone out. None was reset.
- Ring X: the six weeknight blocks are appointments in the installed configuration (RingXWeeknightsTest). Its committed plan runs to about 10 November, so the first on-time weeknight is booked from there.
- Catalogue aliases (pools re-read their lists after install):
- Dark Files, refreshed: The Staircase (2004) has 13 episodes, Homicide Hunter: Lt. Joe Kenda 142, My Ghost Story: Caught on Camera 70 and Crime Scene 10. The pool grew from 46 to 50 shows, each one logical series.
- Vortex, refreshed: Tenchi Muyo! Tenchi Universe did not resolve. The pool is unchanged at 117 shows. The cause isn't known yet; it could be the server's search with the "!" in the title, or no playable episodes. I'll check this before the cutover.
- Odyssey, Junior, Sci-Fi and Wonder: waiting for their refreshes, which run one channel at a time and can take about ten minutes each. To be checked when they finish.
- No duplicates: the pool reader keeps one copy per series id and per exact title, so an original and its alias can't both enter. In every case here the original name has no match in the library anyway. Episode histories are keyed by the library's series id, so a show read under its alias has one history. Each alias sits in the same blocks, tier and order setting as its original (CatalogueNamesTest).
- Playback: Orbit Three resumed after each relaunch, and an ident was shown and the next programme loaded at 01:41. There are no player, decoder or audio-clock errors in the log.
On-air verification (pending)
- Ring X's first on-time weeknight, from about 10 November.
- After Dark and Premiere bookings with adaptive rest, from about 10 November.
- Tots' first weighted Morning and Playtime, from 10 November 06:00.
- The remaining alias refreshes, and the Vortex alias.