Skip to content

Two profiles sharing an id resolve to different profiles depending on the lookup path #81

Description

@kelchm

When two profile files declare the same id, the by-id index keeps the last file loaded, while GetById(id, source) scans and returns the first match. The two disagree, so which profile is actually used depends on which path the caller took.

The settings override key is "Id:Source" with no filename component, so a user with two same-id profiles cannot disambiguate them. This currently produces only a warning at load.

This has already cost real debugging time: a hardware test in a previous investigation silently ran under a different profile than intended, for exactly this reason.

Fix direction: require ids to be unique within a source, reject later same-source duplicates deterministically rather than by directory enumeration order, and log both filenames so the warning is actionable.

Acceptance: every lookup and deletion path resolves to the same profile regardless of the order the directory is enumerated in.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions