Skip to content

Writes re-serialize the whole file → raw diffs are unreviewable #7

Description

@tobsch

Problem

config diff reports a change that is not in the data when control titles are duplicated.

Repro

On a real config (many controls share titles like I2, T5, room names), add one unrelated block and diff:

lox-cli config add --type memory --title "probe" copy.Loxone
lox-cli config diff config.Loxone copy.Loxone
#   + Added: "probe" (AMemory)                       ← correct
#   ~ Changed: "Ankleidezimmer" — room "Arbeitszimmer" → "Ankleidezimmer"   ← FALSE, identical in both files

Verified via config controls on both files: the "Ankleidezimmer" room is identical; the change is a mis-pairing.

Cause / Fix

Controls appear to be paired by title for the diff. Real houses have many duplicate titles → mis-pairing. Match by UUID instead.

Impact

A review tool that invents changes can't be trusted; it hides real changes among false ones.


Found during an agent-driven analysis session (Claude Code) building multi-room logic on a real config.

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