bDS2: templates: content_changed?/2 compares supplied content against effective_template_content (DB content or file body) and resolve_next_status demotes only then (../bDS2/lib/bds/templates.ex ~lines 208-215). Scripts: same pattern (../bDS2/lib/bds/scripts.ex ~line 160-177).
Current behaviour (RuDS):engine/template.rsupdate_template/save_template and engine/script.rsupdate_script/save_script flip Published→Draft on ANY update (title, enabled, kind, entrypoint…), even a no-op content save.
Task: Demote only when supplied content differs from effective content (read file body when DB content is NULL — unpublish already shows how). Title/enabled/kind/entrypoint changes keep published status; consider whether they require a published-file frontmatter rewrite (bDS2: file_path/attrs go through update side-effect sync — mirror it; enabled/version/title live in frontmatter, so a published row's metadata change should rewrite the file in place).
Acceptance: Tests per entity: metadata-only update keeps published (+ file frontmatter updated), content change demotes, identical content save keeps published.
**Source:** Audit section 2.13.
**Spec:** `specs/template.allium` ReopenPublishedTemplate requires `template_changes_affect_rendered_output(changes)`; `specs/script.allium` ReopenPublishedScript requires `script_changes_affect_published_output(changes)`.
**bDS2:** templates: `content_changed?/2` compares supplied content against `effective_template_content` (DB content or file body) and `resolve_next_status` demotes only then (`../bDS2/lib/bds/templates.ex` ~lines 208-215). Scripts: same pattern (`../bDS2/lib/bds/scripts.ex` ~line 160-177).
**Current behaviour (RuDS):** `engine/template.rs` `update_template`/`save_template` and `engine/script.rs` `update_script`/`save_script` flip Published→Draft on ANY update (title, enabled, kind, entrypoint…), even a no-op content save.
**Task:** Demote only when supplied content differs from effective content (read file body when DB content is NULL — unpublish already shows how). Title/enabled/kind/entrypoint changes keep published status; consider whether they require a published-file frontmatter rewrite (bDS2: file_path/attrs go through update side-effect sync — mirror it; enabled/version/title live in frontmatter, so a published row's metadata change should rewrite the file in place).
**Acceptance:** Tests per entity: metadata-only update keeps published (+ file frontmatter updated), content change demotes, identical content save keeps published.
hugo
added the bug label 2026-07-20 19:44:00 +00:00
Implemented in 1410b97. Template and script update/save paths now compare supplied content with effective content, falling back to the published file body when DB content is absent. Metadata-only and identical-content updates remain published and atomically refresh file frontmatter/version while preserving the body; actual content changes reopen drafts and leave the previous published file intact. Allium now makes the effective-content transition and published metadata synchronization explicit, and README lifecycle documentation was updated. Verified neutrally against issue #82, bDS2, metadata diff/rebuild behavior, and Allium with per-entity metadata/content/no-op tests, allium check/analyse, formatting, cargo check, cargo machete, cargo build, and cargo test --workspace.
Implemented in 1410b97. Template and script update/save paths now compare supplied content with effective content, falling back to the published file body when DB content is absent. Metadata-only and identical-content updates remain published and atomically refresh file frontmatter/version while preserving the body; actual content changes reopen drafts and leave the previous published file intact. Allium now makes the effective-content transition and published metadata synchronization explicit, and README lifecycle documentation was updated. Verified neutrally against issue #82, bDS2, metadata diff/rebuild behavior, and Allium with per-entity metadata/content/no-op tests, allium check/analyse, formatting, cargo check, cargo machete, cargo build, and cargo test --workspace.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Source: Audit section 2.13.
Spec:
specs/template.alliumReopenPublishedTemplate requirestemplate_changes_affect_rendered_output(changes);specs/script.alliumReopenPublishedScript requiresscript_changes_affect_published_output(changes).bDS2: templates:
content_changed?/2compares supplied content againsteffective_template_content(DB content or file body) andresolve_next_statusdemotes only then (../bDS2/lib/bds/templates.ex~lines 208-215). Scripts: same pattern (../bDS2/lib/bds/scripts.ex~line 160-177).Current behaviour (RuDS):
engine/template.rsupdate_template/save_templateandengine/script.rsupdate_script/save_scriptflip Published→Draft on ANY update (title, enabled, kind, entrypoint…), even a no-op content save.Task: Demote only when supplied content differs from effective content (read file body when DB content is NULL — unpublish already shows how). Title/enabled/kind/entrypoint changes keep published status; consider whether they require a published-file frontmatter rewrite (bDS2: file_path/attrs go through update side-effect sync — mirror it; enabled/version/title live in frontmatter, so a published row's metadata change should rewrite the file in place).
Acceptance: Tests per entity: metadata-only update keeps published (+ file frontmatter updated), content change demotes, identical content save keeps published.
Implemented in
1410b97. Template and script update/save paths now compare supplied content with effective content, falling back to the published file body when DB content is absent. Metadata-only and identical-content updates remain published and atomically refresh file frontmatter/version while preserving the body; actual content changes reopen drafts and leave the previous published file intact. Allium now makes the effective-content transition and published metadata synchronization explicit, and README lifecycle documentation was updated. Verified neutrally against issue #82, bDS2, metadata diff/rebuild behavior, and Allium with per-entity metadata/content/no-op tests, allium check/analyse, formatting, cargo check, cargo machete, cargo build, and cargo test --workspace.