You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] a headless or non-text section heading still reaches wiki.pages.sections and the curator #589
ADR-1070 closed the wiki_refine_draft entry point: a section must carry a heading and a body, both non-blank text. Two consumers one layer down make the same assumptions without checking them, and a draft can reach them from another origin (wiki_synthesize, a row written before ADR-1070, a direct DB write).
core/draft_curator.py:64-66 calls heading.strip() on whatever the section holds. A non-string heading raises AttributeError inside evaluate_draft, the same defect ADR-1070 fixed in _validate_against_contract.
Related, and not covered by ADR-1070: two sections submitted with the same heading are silently deduped by the wiki.pages.sections mapping, so the second body replaces the first without any error.
Expected behavior
A section with no usable heading never reaches wiki.pages.sections, and the curator reports a malformed section instead of raising. Duplicate headings in one draft are refused by name, or the mirror keeps both, decided in the ADR that closes this.
Evidence required to close
Tests compiling a draft whose sections carry a blank heading, a non-string heading and a duplicated heading, asserting what wiki.pages.sections holds afterwards, and a curator test on a non-string heading.
Activity
docs(adr): record what the renderer now does with malformed sections (#…
docs(adr): separate the two malformed-section outcomes in ADR-1071 (#589
fix(wiki): one reading of a draft section for every consumer (#589) (#…