Skip to content

[KISS/SPoA] Refactor SettingsNormalizer into explicit idempotent normalization passes #68

Description

@github-actions

Audit finding

SettingsNormalizer is a large ordered procedure responsible for:

  • schema advancement;
  • built-in profile recovery/canonicalization;
  • custom profile identity, transform, tuning and name normalization;
  • overlay-scope canonicalization;
  • application string/identity recovery;
  • duplicate removal;
  • legacy-effect migration;
  • primary and menu profile-reference repair;
  • final collection replacement/change tracking.

The ordering is important but implicit, and adding a new schema rule expands the same class.

Target state

Retain one normalization coordinator, but represent the ordered work as small explicit idempotent passes with focused tests. Keep the pipeline simple—an ordered list/delegates or small internal pass types are sufficient.

The built-in-profile pass should consume the canonical registry from the corresponding SPoT issue.

Acceptance criteria

  • Each normalization pass has one named responsibility.
  • Pass ordering is explicit and tested.
  • Running the complete pipeline twice reports no second change.
  • A pass can be tested with a minimal settings fixture.
  • Change tracking is centralized and cannot be forgotten by a pass.
  • SettingsStore.Normalize forwarding-only API is removed or justified.
  • Existing migration, recovery and failed-persistence behavior remains unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions