CAT-K5: a section is a part with a plain title, never a file; a reference has one form

A new rule, section-form (31 now), refuses from the day the records move a section whose title is a file name, a number
prefix, a slash or over 200 bytes, a title twice in a record, and a text that holds a local path, a file and line, or a
link to a file. Only a section that is new or changed is judged, so a record imported with file-named sections keeps
them until its form-only version; write refuses at once.

Issue 1966.

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 11:56:31 +01:00
parent 17ba95bca6
commit bd9764ef9a
8 changed files with 196 additions and 7 deletions
@@ -32,6 +32,7 @@ func TestADraftIsWrittenOneSectionAtATimeAndSubmittedAsAVersion(t *testing.T) {
r, _ := w.k.ReserveNumber("author@g14", KindDecision, "a test record")
p := valid(r.Number)
secs := p.Sections
secs[0].Text = "The merge window of ADR 0276 §1 waits too long." // a reference of the one form; a link to a file is refused at the write
p.Sections = nil
key := Key{KindDecision, r.Number}