domain: deleting the published property on a live post leaves it Published but invisible #87
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rosa/vernier#87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during triage of #53.
Location:
crates/domain/src/models/micropub.rs(MicropubUpdate::apply_to, thepublishedbranch)Severity: Correctness — silent invisibility
Problem
A Micropub update with
delete: ["published"]on a Published post resolvespublished_attoNonewhile the status staysPublished.Post::is_liverequirespublished_at.is_some_and(|p| p <= now), so the post silently drops out of public view, listings, and webmention dispatch while still reporting itself as Published. The current resolution behavior is codified by theclear_published_unsets_itunit test.Why #53 doesn't cover this
The #53 fix is deliberately transition-based: it defaults
published_atonly when a status change to Published leaves it unset, and never counteracts adeleteoperation the client explicitly specified (Micropub update semantics define what the specified operations do; re-adding a property the client just deleted would contradict the request).So this case needs its own semantics decision. Options:
deleteofpublishedwithout also leaving the published state is an invalid request.Failure scenario
Publish a post via Micropub (
published_atset), then send an update deleting thepublishedproperty with no other changes. The post remainsPublishedbutis_liveis false forever; only the author sees it, and no un-publish webmentions go out.