From 20745399c0f7ca5842e7cd04c0ae72595760bafa Mon Sep 17 00:00:00 2001 From: Torben Nehmer Date: Sat, 26 Sep 2026 16:24:50 +0200 Subject: [PATCH] docs: CHANGES entry for #145 in English, like the rest of the candidate Files changed: - CHANGES.md --- CHANGES.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index cd49af2..e4fcfda 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -379,15 +379,15 @@ CalDAV and Super Productivity providers do too. A test over the real registry pi ### log append: unreadable --body-file is an ERROR line, not a traceback -`log append --body-file ` rief `Path.read_text()` ungeschützt auf; fehlte die Datei, war -sie ein Verzeichnis oder kein gültiges UTF-8, endete der Aufruf mit einem Python-Traceback statt -mit der `ERROR`-Zeile, die der Datensatz seit jeher versprach - Fall 4 des Tool error contract -(unerwarteter Fehler, nicht wiederholen) statt Fall 2 (Validierungsfehler, einmal korrigiert -wiederholen), obwohl der Datensatz Fall 2 dokumentierte. Das Lesen ist jetzt in -`try/except (OSError, UnicodeDecodeError)` gefasst und bricht über `fail()` ab, bevor -`kb/log.md` geöffnet wird; die Datei bleibt in jedem Fehlerfall byte-identisch zum Vorher. Der -Datensatz benennt die Ursache jetzt genauer ("missing, not a readable file, or not valid -UTF-8"). Gefunden beim Datensatz-Durchgang für #142/#143 (Gitea #145). +`log append` read `--body-file` with an unguarded `Path.read_text()`. A missing file, a +directory or a file that is not valid UTF-8 ended the call in a Python traceback, while the +command's record promised an `ERROR` line with "fix the path and retry once" - so an agent was +told to treat the same failure as case 2 of the tool error contract (validation error, retry +once) by the record and as case 4 (unexpected error, do not retry a non-idempotent command) by +the output. The read is now guarded against `OSError` and `UnicodeDecodeError` and leaves +through `fail()`, which also gives the budget slot back, before `kb/log.md` is opened: the log +stays byte-identical in every failure case, and a parametrised test pins all three. The +record's cause now names the cases ("missing, not a readable file, or not valid UTF-8"). ---