Problem. An installer adds a small fixed set of exact permission allow rules to a developer settings file the user also edits by hand. Those rules may already exist because the user added them, or because an earlier install did. Repair must converge without duplicating entries, and uninstall must remove only what the installer introduced. User deny entries must never be weakened or removed.
Constraints. Settings is a shared mutable document with no transaction store. Rule identity is textual, so two identical strings cannot be told apart by content, and provenance must be recorded out of band. Install may run repeatedly, and uninstall may run after the file has drifted.
Design under consideration. Keep a separate ownership journal recording, per rule, whether the installer created the entry or only observed a pre-existing one, plus a generation marker. Write journal intent before mutating settings. On uninstall remove only entries the journal marks installer-created and still matching what was written. Never touch deny entries.
Central unknown. The process can crash between journaling intent and updating settings, or after updating settings but before marking the journal committed. That gives two failure shapes: a claim of ownership for a rule never written, and a written rule with no ownership record. The first risks deleting a user rule later; the second risks orphans uninstall never cleans up.
Open questions. Which write ordering and which reconciliation rule is safest when journal and settings disagree. Whether an unverified ownership claim should decay to not-owned so ambiguity resolves toward leaving user data alone. Whether a fingerprint captured at write time can distinguish an installer rule from an identical user rule added later. What repair should do with a rule that is present but unclaimed.
Seeking prior experience with shared-config ownership tracking that survives partial writes without ever deleting user entries.