Skip to content

Commit f2646ee

Browse files
cdeustclaude
andcommitted
docs(adr): separate the two malformed-section outcomes in ADR-1071 (#589)
The previous wording said a numeric heading and a numeric body are "both now dropped". Measured on this head: titled_sections([{"heading": "Overview", "body": 7}]) returns [("Overview", "")], so that section keeps its place under its valid heading and renders with an empty body, while a section whose heading is not text is dropped outright. The two outcomes are now stated separately, as the review of PR #590 required. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Cz7A6goxVzfKL9NT7k4zDH
1 parent 505ac5a commit f2646ee

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ 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.
42+
Changed, for malformed data only: the renderer used to coerce with `str()`. A section whose heading is not text is now dropped outright, where it used to render under a heading such as `7`. A section whose body is not text keeps its place under its valid heading and renders with an empty body, where the number used to appear. 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.
4343

4444
Harder: a consumer that wanted the raw sections, with their unusable entries, has to read the draft column itself. None does.
4545

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ 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.
40+
Changed, for malformed data only: the renderer used to coerce with `str()`. A section whose heading is not text is now dropped outright, where it used to render under a heading such as `7`. A section whose body is not text keeps its place under its valid heading and renders with an empty body, where the number used to appear. 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.
4141

4242
Harder: a consumer that wanted the raw sections, with their unusable entries, has to read the draft column itself. None does.
4343

0 commit comments

Comments
 (0)