Resolve published_* snapshot column semantics (spec vs bDS2 vs RuDS three-way conflict) #79
Reference in New Issue
Block a user
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?
Source: Audit section 2.10. Decision needed before implementation.
State of the world:
specs/post.alliumdocuments published_title/content/tags/categories/excerpt as "copy as of last publish. Used by changes_affect_published_content to decide when an edit reopens a published post" — but NO implementation uses them for that.../bDS2/lib/bds/posts.ex:99,rebuild_from_files.ex:168; only passthrough via update attrs). Its reopen check compares updates against CURRENT field values.engine/post.rsset_published_snapshot) and uses them as a discard fallback.Task: Decide with the maintainer:
Then update
specs/post.allium(entity Post comment + ReopenPublishedPost rule) andspecs/schema.alliumto describe the chosen semantics, and align code + tests. Validate specs with thealliumCLI.Acceptance: One coherent story across spec, RuDS, and bDS2-created databases; tests encode it.
Decision by maintainer: match bDS2 and update code and the spec accordingly.
Implemented Option A in
b8014e0to match bDS2 and shared-database parity. Publishing no longer populates published_title/content/tags/categories/excerpt; pre-existing non-null values remain untouched but are behaviorally inert. Reopen decisions are tested against current metadata and the canonical file body, discard already restores from the file, and WordPress analysis/execution no longer uses published_content as a fallback or transient body store. Removed the obsolete snapshot writer and narrow query helpers made unused by the single-record publish update. Updated post.allium, schema.allium, and model documentation to state the compatibility-only semantics. Verified with Allium check/analyse, a full production-read audit, focused publish/reopen/discard/import tests, cargo fmt --check, cargo check --workspace, cargo machete --with-metadata, cargo build --workspace, and cargo test --workspace (all passed; one intentional model-download test ignored).