Skip to content

[P2] Preserve canonical IDs and user settings across mapping edits #175

Closed

Description

@cbulock

Canonical identity is derived from tvg_id + guideNumber + name. Changing a mapping display name or guide number changes the identity, allocates a new UUID, and drops custom names and prior stream/guide choices. Output entries are restored by the same old identity, so their user settings are lost too.

Code: libs/canonical-channel-service.js#L109-L218. Reviewed 2026-09-06; these source files are unchanged between local 5ee8134 and GitHub main 0d923cf.

Evidence: Executing the actual rebuild function against an in-memory database, then changing a mapping name, produced a new canonical ID and reset custom_name to null.

Acceptance criteria:

  • Anchor canonical identity to a stable persisted relationship independent of editable labels and guide numbers.
  • Migrate/reconcile existing records while preserving profile positions/enabled state/overrides, custom names, preferred streams, and guide bindings.
  • Define explicit merge/split behavior when mappings converge or diverge.
  • Add repeated rename/renumber and reload regressions; preserve stable IDs exposed through MCP and HTTP.

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

  1. cbulock commented on Sep 6, 2026

    @cbulock
    OwnerAuthor

    Fixed in merged PR #183.

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