Merge driver declines to resolve dates on BOM-prefixed pages (generator tolerates BOM) #6
Loading…
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?
Summary
The generator and the merge driver disagree about whether a UTF-8 BOM can appear on a page.
wiki-index.pyreads pages withencoding="utf-8-sig", so a BOM-prefixed page is explicitly supported and indexes fine.wiki-merge-updated.pyworks in binary and detects frontmatter with:On a BOM-prefixed page
lines[0]isb"\xef\xbb\xbf---", sofrontmatteris neverTrueand no date conflict on that page is ever resolved.Reproduction
Verified against
main(499a1c1a), marker size 7:Without the BOM the identical case resolves to
updated: 2026-09-14, exit 0.Severity
Low, and it fails safe — the conflict is left for review rather than resolved wrongly. Reporting it because the two halves of the toolchain hold different assumptions, so whichever is wrong will drift further over time. Either the driver should skip a leading BOM when locating frontmatter, or the generator should not advertise BOM tolerance.
Also, cosmetic
render()builds category headings withcategory.replace("-", " ").capitalize(). Sincestr.capitalize()lowercases the remainder, an auto-discovered category directory namedsaf-trenders asSaf t..title(), or capitalising only the first character, would preserve intent.Context
Reported by the downstream team whose index corruption prompted
a35c203b. We have now replaced our own local implementation with yours — it fixed four real defects in ours: an H1 taken from inside a code fence, a date conflict silently resolved inside a documentation example outside frontmatter, a deliberate backwards revert overridden, and CRLF destroyed by text-mode writes. The--diff3ancestor check and binary IO are the parts we had no answer for. Thank you.