docs: raw fetch --html record and kb/CONTRACT.md path budget follow the folder accept (#112)
Files changed: - CHANGES.md - VERSION - kb/CONTRACT.md - tools/CONTRACT.md - tools/chemenu/commands/raw_cmd.py Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
1 parent
59c06e5ddc
commit
100ace846e
5 files changed
+21
-8
No files matched your search
+12
-1
@@ -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
|
**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/
|
- 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
|
- 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
|
- 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
|
||||||
<!-- /wikitool:bumps -->
|
<!-- /wikitool:bumps -->
|
||||||
|
|
||||||
|
### 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
|
### 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
|
**Breaking.** A subdirectory of `incoming/` was tolerated and ignored since the date shard
|
||||||
|
|||||||
+2
-1
@@ -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
|
`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
|
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
|
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
|
Paths - advisory, not a hard error, so a corpus that predates the budget still passes
|
||||||
`--fail-on-error`; the fix is `wikitool rename`.
|
`--fail-on-error`; the fix is `wikitool rename`.
|
||||||
|
|||||||
+2
-2
@@ -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 `<url>` and `--html` were given
|
- 1 The URL is not `http`/`https` (also after a redirect), or neither or both of `<url>` and `--html` were given
|
||||||
- 1 A target file already exists in `incoming/`
|
- 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 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/<stem>.md` already exists
|
- 1 raw fetch --html: `--url` is missing, the file is not directly in `incoming/` or does not exist, or `incoming/<stem>.md` already exists
|
||||||
|
|
||||||
**ON FAILURE**
|
**ON FAILURE**
|
||||||
|
|
||||||
- The URL is not `http`/`https` (also after a redirect), or neither or both of `<url>` and `--html` were given -> Fix the call and retry once. A local file is dropped into `incoming/` by hand, not fetched
|
- The URL is not `http`/`https` (also after a redirect), or neither or both of `<url>` 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 <stem>`, then retry once
|
- A target file already exists in `incoming/` -> Nothing was written or overwritten. Accept or remove what is there, or pass `--name <stem>`, 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
|
- 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/<stem>.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/<stem>.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**
|
**NEVER**
|
||||||
|
|
||||||
|
|||||||
@@ -1229,9 +1229,10 @@ def _fetch_html_file(html: Path, source_url: Optional[str]) -> None:
|
|||||||
),
|
),
|
||||||
cli_contract.Failure(
|
cli_contract.Failure(
|
||||||
label="raw fetch --html",
|
label="raw fetch --html",
|
||||||
cause="`--url` is missing, the file is not under `incoming/` or does not exist, or "
|
cause="`--url` is missing, the file is not directly in `incoming/` or does not "
|
||||||
"`incoming/<stem>.md` already exists",
|
"exist, or `incoming/<stem>.md` already exists",
|
||||||
reaction="Fix the named argument and retry once - nothing was written",
|
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=(
|
examples=(
|
||||||
|
|||||||
Reference in new issue
Block a user