forked from EduCraft/curriculum-project-hub
d9cde19bdf
恢复不再改名;同名兄弟占位时抛 409 name_conflict_on_restore + 人话提示, 操作者自行重命名现有节点或彻底删除旧节点后再恢复。
810 B
810 B
ADR 0035: Restore Keeps The Original Name; Conflict Is A Clear Error
Status
Accepted. Supersedes ADR-0033 (restore de-duplicates the node name on sibling conflict).
Context
ADR-0033 made restore auto-rename to 原名(已恢复) on sibling name conflict so
restore never fails. In practice the suffix is unwanted noise - operators expect the
original name back and prefer to resolve conflicts themselves.
Decision
Restore clears deletedAt and keeps the node's original name. If an active
sibling now occupies the same name (D14 partial unique index), the service throws a
409 name_conflict_on_restore with a human-readable message ("同名节点已存在,请先
重命名现有节点再恢复") - no silent renaming, no suffix. The restore audit records
the original name only.