feat: page titles must be valid, unique file names on Windows and macOS - new/rename/move refuse, lint reports Unportable Titles, new never overwrites (#155)
CI / verify (push) Successful in 1m37s
Release / release (push) Successful in 37s

Files changed:
- CHANGES.md
- README.md
- VERSION
- instructions/page-lifecycle.md
- instructions/wiki-lint/SKILL.md
- kb/CONTRACT.md
- kb/CONVENTIONS.md
- kb/CONVENTIONS.md.template
- tools/CONTRACT.md
- tools/chemenu/commands/_util.py
- tools/chemenu/commands/lint.py
- tools/chemenu/commands/new_page.py
- tools/chemenu/commands/page_ops.py
- tools/chemenu/lint_core.py
- tools/chemenu/tests/test_lint.py
- tools/chemenu/tests/test_new_page.py
- tools/chemenu/tests/test_page_ops.py
- tools/chemenu/tests/test_titles.py
- tools/chemenu/titles.py
This commit is contained in:
torben committed 2026-09-30 06:29:28 +02:00
1 parent 94deccb18d
commit 8be5e6e5f3
19 files changed
+654 -33

No files matched your search

+20 -3
View File
@@ -14,6 +14,17 @@ frontmatter reference arrays (`related:`, `sources:`, `entities:`, `concepts:`).
hand.** Each of the commands below rewrites all three places at once; hand-editing rewrites
one and leaves the others pointing at nothing.
<!-- wikitool:toc -->
## Contents
- [Rename](#rename)
- [Delete](#delete)
- [Move](#move)
- [Drop a single reference](#drop-a-single-reference)
- [Afterwards](#afterwards)
- [Scope](#scope)
<!-- /wikitool:toc -->
## Rename
```bash
@@ -25,6 +36,11 @@ Repoints body wikilinks (aliases and anchors preserved), a citation id derived f
title (both its Footnotes definition and every `[^cite-id]` reference to it), the page's own
H1, and every frontmatter reference array the type declares in `page_ref_fields:`.
`--to` has to be a valid, unique file name on every platform, and `--dry-run` refuses it the
same way the real run does. The rule is in `kb/CONTRACT.md` § Titles are identifiers. Only `--to`
is checked, so this is also the fix for `lint`'s **Unportable Titles** finding: rename the page
away from the title that breaks the rule. A change of case alone (`Foo` to `FOO`) is allowed.
**If `--from` is not a page but is referenced**, rename instead repoints those references onto
the existing `--to` page and moves nothing. That is the fix for a reference spelled
`act_runner` when the page is `Act Runner`.
@@ -62,9 +78,10 @@ reference anywhere in the wiki needs updating.
to do. `wikitool lint`'s **Misplaced Pages** finding is the advisory this fixes - it is not a
hard error, so an unreconciled corpus is not a broken one, only one `move` would tidy.
A destination that already holds a file with the page's name is refused, not silently
overwritten - that only happens on a pre-existing duplicate-title collision, which `lint`'s
**Duplicate Titles** finding reports separately.
A destination that already holds a file with the page's name - or one that differs from it only
in case or Unicode normalization - is refused, not silently overwritten. That only happens on a
pre-existing duplicate-title collision, which `lint`'s **Duplicate Titles** and **Unportable
Titles** findings report separately.
## Drop a single reference