tools: fail() prints ON FAILURE lines on stderr after ERROR (#143)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2 Files changed: - AGENTS.md - CHANGES.md - VERSION - tools/CONTRACT.md - tools/chemenu/cli.py - tools/chemenu/cli_contract.py - tools/chemenu/commands/_util.py - tools/chemenu/tests/test_cli.py - tools/chemenu/tests/test_cli_contract.py - tools/chemenu/tests/test_util.py
This commit is contained in:
1 parent
5fe6003929
commit
63f566ff05
10 files changed
+403
-19
No files matched your search
+17
-1
@@ -59,7 +59,7 @@ concern - readable here, never shipped as something to parse.
|
||||
|
||||
---
|
||||
|
||||
## 7.1.0-beta.21 - 2026-09-26 - Command records: NOTES is always a tuple of bullets; every record's examples are tested
|
||||
## 7.1.0-beta.22 - 2026-09-26 - fail() prints the command's ON FAILURE lines on stderr
|
||||
|
||||
**Author:** Torben Nehmer
|
||||
|
||||
@@ -70,6 +70,7 @@ concern - readable here, never shipped as something to parse.
|
||||
**Medium impact**
|
||||
- CalDAV task-tracker provider (Nextcloud Tasks, iOS Reminders); review reports unknown-value findings instead of skipping them
|
||||
- dist export no longer cuts the dist export record out of the shipped tools/CONTRACT.md
|
||||
- fail() prints the command's ON FAILURE lines on stderr
|
||||
|
||||
**Low impact**
|
||||
- version bump no longer points at version release in its output
|
||||
@@ -342,6 +343,21 @@ over the real registry hold what the rewrite established: every command has at l
|
||||
example, and every command with a gate shows how its clearance is passed back in (`--confirm`,
|
||||
`--confirm-rebase` or `--resume`).
|
||||
|
||||
### fail() prints the command's ON FAILURE lines on stderr
|
||||
|
||||
`_util.fail()` used to print only its `ERROR` line; the reaction a caller needs the moment a
|
||||
command declines lived one lookup away, in `wikitool <cmd> -h`'s ON FAILURE section - exactly
|
||||
the lookup AGENTS.md's own tool error contract already warned is the one most likely to be
|
||||
skipped in the heat of a failure. `fail()` now prints that section's exit-1 causes (each with a
|
||||
reaction) right after the `ERROR` line, on stderr and as plain text rather than through Rich - a
|
||||
reaction can carry a literal `[--flag]`, which Rich would otherwise read as markup. A record
|
||||
with no exit-1 cause of its own falls back to a bare `see: wikitool <cmd> -h` pointer;
|
||||
`docs contract` is the one real command that hits it today. Nothing about stdout changes: a
|
||||
command's output on success, or up to and including its `ERROR` line on failure, is
|
||||
byte-identical to before. `cli.py`'s and `_util.py`'s lookup of the running command's
|
||||
`cli_contract` path is now one shared function, `cli_contract.path_of`, in place of a private
|
||||
copy that used to live only in `cli.py`.
|
||||
|
||||
---
|
||||
|
||||
## 7.0.0 - 2026-09-22 - Task-Tracker-Anbindung: Vorhaben als Seitenart, Verpflichtungsschicht, Weekly Review als Read-Time-Join
|
||||
|
||||
Reference in new issue
Block a user