fix(tools): do not blame the plan for a verdict okf_adjudicate built
run() parses the plan before building anything and parses its own
verdict after. Only the first failure is the operator's file.
The second is reachable: an empty --adjudicator produces a verdict the
grammar refuses ("adjudication field 'adjudicated_by' must be a
non-empty string"). The plan parsed fine; the fault is in what this
command stamped onto it.
Catching SegmentationError at the top of main() -- the previous commit
-- caught both raise sites and printed "malformed plan" for each. On
this path that is a clean, confident, WRONG diagnosis: it sends the
operator to fix the one artifact that was fine. Worse than the traceback
it replaced, because a traceback at least does not claim to know.
The verdict parse now raises AdjudicationError, which is what "this
command failed" already means in this file and already returns 2. Exit
code unchanged either way, nothing written either way; only the message
changes.
Suite 1073 -> 1074 passed (pytest exit 0, measured without a pipe);
ruff and mypy --strict clean.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
a72053f66f
commit
798f64ad6b
3 changed files with 55 additions and 1 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
|
@ -275,6 +275,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
belonged to. Pre-existing since the empty-verdict branch landed, and pinned
|
||||
until now by a test that recorded it as a finding rather than fixing it.
|
||||
|
||||
- **A verdict `okf_adjudicate` cannot read back is no longer reported as a
|
||||
malformed plan.** The command parses the plan before building anything and
|
||||
parses its own verdict after, so only the first failure is the operator's
|
||||
file. The second is reachable -- an empty `--adjudicator` produces a verdict
|
||||
the grammar refuses -- and before the change above it surfaced as a
|
||||
traceback. Catching the grammar error at the top would have turned it into a
|
||||
clean, confident, wrong diagnosis naming the plan file, which is worse than
|
||||
the traceback: it sends the operator to fix the one artifact that was fine.
|
||||
The verdict parse now raises `AdjudicationError`, so the message names what
|
||||
actually failed. Exit 2 either way; nothing is written either way.
|
||||
|
||||
## [0.5.0a2] — 2026-07-31
|
||||
|
||||
**This is the pre-release the pilots pin. `v0.5.0a1` was tagged and abandoned
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue