A root 0031 could not normalise still cannot be edited #249

Open
opened 2026-08-25 12:04:37 +01:00 by naps62-yolo · 0 comments
Owner

Migration 0031 deliberately skips normalising a root whose stripped path another
row already holds, so the migration cannot fail to apply. Its comment calls the
leftover "a settings mistake for the operator to resolve by hand".

There is no hand-resolution path. For such a row, roots.rs:207 takes the
no-relocation branch, because the normalised payload equals the normalised
current value, so path_is_free is skipped — and then the UPDATE at
roots.rs:214 writes the normalised path straight into the UNIQUE index and
returns root_conflict, a 409, even for a policy-only edit. The operator's only
way out is deleting the root.

Very low severity: roots also carries UNIQUE (kind, audience), so the table
holds at most four rows, and getting into this state needs two roots that differ
only by a trailing separator.

Scope: either detect the collision and return an error that says what is wrong
and which other root holds the path, or let the operator edit the row's other
fields without touching its path.

Migration 0031 deliberately skips normalising a root whose stripped path another row already holds, so the migration cannot fail to apply. Its comment calls the leftover "a settings mistake for the operator to resolve by hand". There is no hand-resolution path. For such a row, `roots.rs:207` takes the no-relocation branch, because the normalised payload equals the normalised current value, so `path_is_free` is skipped — and then the `UPDATE` at `roots.rs:214` writes the normalised path straight into the `UNIQUE` index and returns `root_conflict`, a 409, even for a policy-only edit. The operator's only way out is deleting the root. Very low severity: `roots` also carries `UNIQUE (kind, audience)`, so the table holds at most four rows, and getting into this state needs two roots that differ only by a trailing separator. Scope: either detect the collision and return an error that says what is wrong and which other root holds the path, or let the operator edit the row's other fields without touching its path.
naps62-yolo added this to the Feedback pass 2 milestone 2026-08-25 12:04:37 +01:00
naps62-yolo added the difficulty/easyarea/apitype/bug labels 2026-08-25 12:04:37 +01:00
naps62-yolo modified the milestone from Feedback pass 2 to Feedback pass 2 follow-ups 2026-08-25 12:16:49 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#249