markharness

0004: Migration policy when a Feature’s id: changes

Status

Accepted (reconsideration proposed in 0013)

Background

The external evaluation review (テスト知識管理のGit-nativeモデル_評価レビュー_有用性判定と修正指示.md, P2) pointed out that the constraint whereby changing the id: of feature.yml breaks tracking of it as the same Feature — while a known fact of the design — was not documented for users.

The current implementation (src/id_cache.rs) can follow directory renames because it reads a Feature’s id from the id: field of feature.yml (paper §3.3). However, if the value of the id: field itself is rewritten, changes compute (paper §3.2–3.4) treats it as if the Feature with the old id was deleted and a Feature with the new id was added, with no means of linking the two as the same Feature. Version history (derived_from) is severed at that point.

Options considered

  1. Implement a migration command (e.g., a markharness feature rename-id <old> <new> command that retroactively rewrites changes/*.yaml across past milestones, or adding a mapping file such as id_aliases).
  2. Add an explicit alias mechanism to the design (have feature.yml hold aliases: [old-id, ...], so that changes compute can also follow the history of the old id).
  3. Implement nothing, and merely document the constraint for users.

Decision

Option 3 was adopted. Neither a migration command nor an alias mechanism will be implemented.

Rationale:

Response taken

Conditions for future reconsideration