Skip to content

Commit 505ac5a

Browse files
cdeustclaude
andcommitted
docs(adr): record what the renderer now does with malformed sections (#589)
The review of PR #590 measured the delta case by case: the old loop coerced with str(), so a numeric heading rendered as 7 and a numeric body rendered under its heading, while titled_sections drops both. A padded heading now renders stripped and a whitespace-only body renders empty. A well-formed draft renders exactly as before. ADR-1071's consequences say so; no code or test changed. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Cz7A6goxVzfKL9NT7k4zDH
1 parent 11a3b05 commit 505ac5a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎docs/adr/ADR-1071-one-reading-of-a-draft-section-for-every-consumer.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Easier: a page row can no longer carry prose under an empty key, and the curator
3939

4040
`tests_py/shared/test_wiki_sections.py` covers the four functions over dicts, `Section` objects, missing fields and non-text values. `tests_py/handlers/test_wiki_compile_sections_mirror.py` compiles a draft holding a blank heading, a missing heading and a numeric heading, and asserts the mirror holds only the titled section while the published Markdown omits the orphan prose. `tests_py/core/test_draft_curator_sections.py` drives four malformed shapes through `evaluate_draft`. `test_duplicate_headings_are_refused` covers the refine entry point. Three of those fail on the previous code, one of them with the `AttributeError`.
4141

42+
Changed, for malformed data only: the renderer used to coerce with `str()`, so a numeric heading rendered as `7` and a numeric body rendered under its heading. Both are now dropped, a whitespace-only body renders empty, and a padded heading renders stripped. A well-formed draft renders exactly as before, checked case by case against the previous loop.
43+
4244
Harder: a consumer that wanted the raw sections, with their unusable entries, has to read the draft column itself. None does.
4345

4446
Unchanged: what the synthesizer writes, and what `wiki_curate` decides for a well-formed draft.

‎wiki/adr/cortex/1071-one-reading-of-a-draft-section-for-every-consumer.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Easier: a page row can no longer carry prose under an empty key, and the curator
3737

3838
`tests_py/shared/test_wiki_sections.py` covers the four functions over dicts, `Section` objects, missing fields and non-text values. `tests_py/handlers/test_wiki_compile_sections_mirror.py` compiles a draft holding a blank heading, a missing heading and a numeric heading, and asserts the mirror holds only the titled section while the published Markdown omits the orphan prose. `tests_py/core/test_draft_curator_sections.py` drives four malformed shapes through `evaluate_draft`. `test_duplicate_headings_are_refused` covers the refine entry point. Three of those fail on the previous code, one of them with the `AttributeError`.
3939

40+
Changed, for malformed data only: the renderer used to coerce with `str()`, so a numeric heading rendered as `7` and a numeric body rendered under its heading. Both are now dropped, a whitespace-only body renders empty, and a padded heading renders stripped. A well-formed draft renders exactly as before, checked case by case against the previous loop.
41+
4042
Harder: a consumer that wanted the raw sections, with their unusable entries, has to read the draft column itself. None does.
4143

4244
Unchanged: what the synthesizer writes, and what `wiki_curate` decides for a well-formed draft.

0 commit comments

Comments
 (0)