feat: path budget - a file's path stays at 160 characters or fewer; new, rename, move and raw accept refuse more, lint reports Long Paths (#163)
Files changed: - CHANGES.md - README.md - VERSION - instructions/page-lifecycle.md - kb/CONTRACT.md - 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/commands/raw_cmd.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_raw_cmd.py - tools/chemenu/tests/test_titles.py - tools/chemenu/titles.py
This commit is contained in:
1 parent
03743ebbc0
commit
04aebdeccf
18 files changed
+394
-29
No files matched your search
+22
-1
@@ -59,13 +59,14 @@ concern - readable here, never shipped as something to parse.
|
||||
|
||||
---
|
||||
|
||||
## 8.0.0-beta.11 - 2026-09-30 - setup-instance step 15 names --no-push for a local-only first publish; gates.md and a docstring follow #159
|
||||
## 8.0.0-beta.12 - 2026-09-30 - Path budget: a file's path stays at 160 characters or fewer so a Windows checkout works without long paths (#163)
|
||||
|
||||
**Author:** Torben Nehmer
|
||||
|
||||
**Breaking Change:**
|
||||
- Page titles must form valid, unique file names on Windows and macOS: new and rename refuse forbidden characters, reserved names (including INDEX and COLLECTION), a trailing dot or space, and titles that collide with another page by case or Unicode normalization; lint reports existing violations as hard errors - rename each affected page with tools/wikitool rename
|
||||
- publish without --no-push now exits 1 before committing when the remote is unreachable or not configured, where it used to commit locally and fail at the push - an offline session or a local-only instance must pass --no-push
|
||||
- new, rename, move and raw accept refuse a target whose path below the instance root is over 160 characters (UTF-16 code units); lint reports existing files over it as Long Paths (advisory) - rename each affected page with tools/wikitool rename, and shorten an incoming/ file name before raw accept
|
||||
|
||||
**Migration:** none required - No page format changes; the rule only refuses titles, and each affected page is renamed individually with tools/wikitool rename
|
||||
|
||||
@@ -85,6 +86,7 @@ concern - readable here, never shipped as something to parse.
|
||||
- Bug-report collector: tools/bugreport.py and instructions/bug-report.md
|
||||
- Bug-report collector can pseudonymise identities, in two stages
|
||||
- publish: the gate lists the staged state; a missing or unreachable remote stops before the commit
|
||||
- Path budget: a file's path stays at 160 characters or fewer so a Windows checkout works without long paths (#163)
|
||||
|
||||
**Low impact**
|
||||
- version bump no longer points at version release in its output
|
||||
@@ -120,6 +122,25 @@ concern - readable here, never shipped as something to parse.
|
||||
- setup-instance step 15 names --no-push for a local-only first publish; gates.md and a docstring follow #159
|
||||
<!-- /wikitool:bumps -->
|
||||
|
||||
### Path budget: a file's path stays at 160 characters or fewer so a Windows checkout works without long paths (#163)
|
||||
|
||||
Windows counts 259 characters for a whole path, the install folder included, and the target system
|
||||
has long paths off. A page title long enough to be a sentence made a checkout fail there, in a
|
||||
place nobody would look. The path of any file below the instance root now has a budget of 160
|
||||
characters, counted in UTF-16 code units the way Windows counts (an emoji takes two); the folder
|
||||
limit that `doctor` and the install preflight enforce is the other half of the same sum.
|
||||
|
||||
`new` (every root), `rename` (`--to` only, also under `--dry-run`), `move` (a single page, and
|
||||
`--reconcile`, which skips and names the target as it does for an occupied one) and `raw accept`
|
||||
(the remedy is renaming the file in `incoming/`; `incoming/` and `raw/` stay unchanged) refuse a
|
||||
longer path with exit 1 before writing anything. `lint` reports existing files over the budget
|
||||
under a new advisory finding, Long Paths, for `kb/` and `raw/`; it is not a hard error, so
|
||||
`--fail-on-error` does not start failing a corpus that predates the rule. The fix for an existing
|
||||
page is `wikitool rename`, and `--from` is never checked, so renaming away from a long title works.
|
||||
|
||||
The measurement is `titles.path_budget_problem`, a pure function beside the title rules, and
|
||||
`kb/CONTRACT.md` § Titles are identifiers carries the normative statement.
|
||||
|
||||
### setup-instance step 15 names --no-push for a local-only first publish; gates.md and a docstring follow #159
|
||||
|
||||
The close-out review of #159 found three places the change had not reached. `setup-instance.md`
|
||||
|
||||
Reference in new issue
Block a user