diff --git a/CHANGES.md b/CHANGES.md index 838d873..80f3903 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -59,7 +59,7 @@ concern - readable here, never shipped as something to parse. --- -## 8.0.0-beta.27 - 2026-10-03 - incoming/ as a queue: raw pending picks the next entry, raw accept takes a whole folder +## 8.0.0-beta.28 - 2026-10-03 - raw fetch --html record and kb/CONTRACT.md path budget follow the folder accept **Author:** Torben Nehmer @@ -138,8 +138,19 @@ concern - readable here, never shipped as something to parse. - raw/CONTRACT.md points at the path budget for a name accepted from incoming/ - preflight.ps1: the asset-mode error helper is Exit-Asset, so PSScriptAnalyzer passes - kb/CONTRACT.md: an external article's raw_files point under raw/, a raw fetch capture names both files +- raw fetch --html record and kb/CONTRACT.md path budget follow the folder accept +### raw fetch --html record and kb/CONTRACT.md path budget follow the folder accept + +Two sentences the previous change left behind, found in its closing check. `raw fetch --html`'s +command record still named a file "not under `incoming/`" as its refusal, though since the +previous change a saved page inside a subdirectory of `incoming/` is refused too; it now says +"not directly in `incoming/`" and names moving the file up as the fix. `kb/CONTRACT.md`'s path +budget paragraph named only renaming a file in `incoming/` as the remedy for `raw accept`; for a +folder the remedy is a shorter folder name or shorter names inside it, and it now says so. No +behaviour change. + ### incoming/ as a queue: raw pending picks the next entry, raw accept takes a whole folder **Breaking.** A subdirectory of `incoming/` was tolerated and ignored since the date shard diff --git a/VERSION b/VERSION index 8a7b2c6..a6af12a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.0.0-beta.27 +8.0.0-beta.28 diff --git a/kb/CONTRACT.md b/kb/CONTRACT.md index cf536c8..22f33dc 100644 --- a/kb/CONTRACT.md +++ b/kb/CONTRACT.md @@ -147,7 +147,8 @@ checks is the other half of the same sum. `wikitool new` (every root), `wikitool rename` (`--to` only, also under `--dry-run`), `wikitool move` (a single page, and `--reconcile`, which skips and names such a target) and `wikitool raw -accept` (the target under `raw/`; the remedy is renaming the file in `incoming/`) refuse a path +accept` (the target under `raw/`; the remedy is renaming the file in `incoming/` - for a folder, +a shorter folder name or shorter names inside it) refuse a path over the budget before writing anything. `wikitool lint` reports existing files over it as Long Paths - advisory, not a hard error, so a corpus that predates the budget still passes `--fail-on-error`; the fix is `wikitool rename`. diff --git a/tools/CONTRACT.md b/tools/CONTRACT.md index 3571e03..9a4ad5c 100644 --- a/tools/CONTRACT.md +++ b/tools/CONTRACT.md @@ -1415,14 +1415,14 @@ Capture a web page the user names into `incoming/`: the HTML as received plus a - 1 The URL is not `http`/`https` (also after a redirect), or neither or both of `` and `--html` were given - 1 A target file already exists in `incoming/` - 1 The server answered with an HTTP error, could not be reached, took longer than 30 s, or sent more than 25 MiB -- 1 raw fetch --html: `--url` is missing, the file is not under `incoming/` or does not exist, or `incoming/.md` already exists +- 1 raw fetch --html: `--url` is missing, the file is not directly in `incoming/` or does not exist, or `incoming/.md` already exists **ON FAILURE** - The URL is not `http`/`https` (also after a redirect), or neither or both of `` and `--html` were given -> Fix the call and retry once. A local file is dropped into `incoming/` by hand, not fetched - A target file already exists in `incoming/` -> Nothing was written or overwritten. Accept or remove what is there, or pass `--name `, then retry once - The server answered with an HTTP error, could not be reached, took longer than 30 s, or sent more than 25 MiB -> Nothing was written. An HTTP 4xx is not fixed by retrying - check the URL with the user; for a paywall or login, save the page in a browser and use `--html`. An unreachable host or a timeout may be retried once -- raw fetch --html: `--url` is missing, the file is not under `incoming/` or does not exist, or `incoming/.md` already exists -> Fix the named argument and retry once - nothing was written +- raw fetch --html: `--url` is missing, the file is not directly in `incoming/` or does not exist, or `incoming/.md` already exists -> Fix the named argument and retry once - nothing was written. A saved page inside a subdirectory of `incoming/` is moved up into `incoming/` first **NEVER** diff --git a/tools/chemenu/commands/raw_cmd.py b/tools/chemenu/commands/raw_cmd.py index a1507a7..eeddb30 100644 --- a/tools/chemenu/commands/raw_cmd.py +++ b/tools/chemenu/commands/raw_cmd.py @@ -1229,9 +1229,10 @@ def _fetch_html_file(html: Path, source_url: Optional[str]) -> None: ), cli_contract.Failure( label="raw fetch --html", - cause="`--url` is missing, the file is not under `incoming/` or does not exist, or " - "`incoming/.md` already exists", - reaction="Fix the named argument and retry once - nothing was written", + cause="`--url` is missing, the file is not directly in `incoming/` or does not " + "exist, or `incoming/.md` already exists", + reaction="Fix the named argument and retry once - nothing was written. A saved page " + "inside a subdirectory of `incoming/` is moved up into `incoming/` first", ), ), examples=(