Skip to content

Recording: chain startedAt for parts after a split so input/program parts align within 1 s (OL-32 AC 3) #575

Closed

Description

@birme

Problem

The #569 (OL-32) acceptance run on the dev Strom (strom-se-sto01.osaas.io:8082, v0.7.1, open-live d8256d3, RECORDING_SEGMENT_SECS=300, 2026-10-26 10:37:47Z–10:47:50Z) fails AC 3 ("start times line up with the program parts of the same activation to within one second") for every part after a split. Evidence: #569 (comment)

For parts after the first one, startedAt uses startedAtSource: 'event'. That is the time open-live receives Live Recorder's RecorderFileChanged event (spec docs/specs/iso-input-recording.md §6 rule 2), and it arrives seconds after the new file's media actually starts. Compared with the previous part's start plus its exact duration:

Recorder Part 1 startedAt late by
program 3.08 s
SRT input 2.95 s
WHIP input 4.86 s

The WHIP input's part 1 is therefore 1.78 s out from program, past the 1 s bound. Two input parts also have an endedAt that is later than the moment their object was already registered. First parts line up (SRT input starts +0.17 s from program).

Proposed fix

In resolvePartTimings (src/lib/recording-parts.ts), for parts with index > 0, use the chained start (§6 rule 3: previous part's start + its probed duration) instead of the event time. Limit this to Live Recorder if needed: #571 saw up to 1.9 s unaccounted at the first split on the older builtin.recorder. Update spec §6 to match (the rule order changes), and add a unit test where a late RecorderFileChanged must not shift a part's startedAt.

The alternative, waiting for Eyevinn/strom#1057 (exact per-file start times from Strom), leaves AC 3 failing until a Strom release ships. The chained start can be replaced by #1057's value once that lands.

Acceptance criteria

  1. With Live Recorder, every part with index > 0 has a startedAt within 0.5 s of the previous part's startedAt + duration.
  2. Spec §6 describes the new rule order, and the existing first-part behaviour is unchanged.
  3. Unit test covers a late file-changed event.

Blocks #569 (AC 3).

Activity

  1. birme commented on Oct 26, 2026

    @birme
    ContributorAuthor

    Prerequisite for #569: filed by daily-backlog-pr Phase 2 (2026-10-26) from the #569 acceptance run, where AC 3 failed only on post-split startedAt. #569 has no other code left. Once this merges, its next acceptance run re-checks AC 3.

  2. self-assigned this
    on Oct 26, 2026
  3. removed their assignment
    on Oct 26, 2026
  4. added a commit that references this issue on Oct 26, 2026
    e421e4b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions