Skip to content

[P2] Enforce deterministic XMLTV deduplication and guide-binding fan-out #173

Description

@cbulock

The merger appends channel/programme arrays without deduplicating programmes by (channel,start,title) or resolving duplicate source records deterministically. bindingRuleByInputId also stores just one rule per input channel ID, dropping earlier rules when multiple canonical channels intentionally select the same source guide channel.

Code: server/epg.js#L350-L483. Reviewed 2026-09-06; these source files are unchanged between local 5ee8134 and GitHub main 0d923cf.

Evidence: Static review of the merge loop. test/integration/epg.test.js mainly tests synthetic array concatenation rather than production conflict/fan-out behavior. The earlier broad EPG issue #16 is closed, so this tracks the remaining concrete semantics.

Acceptance criteria:

  • Deduplicate channels and programmes with documented deterministic priority rules.
  • Represent input-guide-channel selection as one-to-many and emit each requested canonical output ID.
  • Preserve language-tagged titles and canonical IDs during deduplication and rewriting.
  • Test duplicate records, conflicting sources, and two canonical channels bound to one source guide ID through actual XMLTV routes.

Validation note: the local full test suite could not pass because the installed better-sqlite3 binary is incompatible with the available ARM64 Node runtime. Reproductions mentioned above use isolated dependencies and do not claim full application integration coverage.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions