Skip to content

Remove z_line config migration #122

Description

@michelhonold

What

Remove the one-time config migration that reads the marker's Z-line settings under their former names.

When the drop line became the Z Line, two [marker] keys were renamed:

Former Current
drop_line z_line
drop_line_thickness z_line_thickness

load_config maps the old keys onto the new ones when the new one is absent, and logs a one-shot warning naming both. Without it the old keys would be dropped by _filter_known before the dataclass is built, and an operator who had turned the line off or thickened it would silently get the defaults back.

Why it should go

CLAUDE.md is explicit that the tree should read as though the current design was always the only one. The migration is a deliberate, temporary exception: it exists only to carry existing installs across one release boundary. Left in place it becomes exactly the kind of "we used to…" breadcrumb the rule forbids, and it keeps a second spelling of two config keys alive indefinitely.

Note the code carries no pointer back to this issue, by the same rule - a reader must not need a tracker to understand a comment. Finding it is a grep for drop_line.

What to delete

  • openfollow/configuration.py – the # Back-compat: the marker's drop line is now the Z line… block in load_config, and the _warn_renamed_marker_key helper it calls.
  • tests/test_configuration.pytest_load_config_migrates_legacy_drop_line_keys, test_load_config_prefers_the_current_marker_key_over_the_legacy_one, test_load_config_warns_once_per_legacy_marker_key.

After that, a grep for drop_line across the tree should return nothing.

When

Once installs have had a release or two to roll over. The signal that it is safe: the rename shipped in the release that introduced z_line, and any config written by a version at or after it uses the new keys, because save_config only ever writes current field names. An operator on a much older config still gets the defaults rather than a crash - the keys simply stop being read, which is the documented cost of removal, not a regression.

Worth a line in the release notes for the version that drops it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions