fix(plan): use structured alternatives objects in plan explain output per spec #9407

Merged
HAL9000 merged 5 commits from timeline/day-104-2026-04-14-auto-time-2 into master 2026-06-13 19:07:22 +00:00

5 Commits

Author SHA1 Message Date
HAL9000 4a06885dfb fix(actor): catch typer.Exit in actor run commands and test steps
CI / push-validation (pull_request) Successful in 29s
CI / lint (pull_request) Successful in 37s
CI / build (pull_request) Successful in 45s
CI / helm (pull_request) Successful in 46s
CI / quality (pull_request) Successful in 52s
CI / typecheck (pull_request) Successful in 1m7s
CI / security (pull_request) Successful in 1m25s
CI / unit_tests (pull_request) Successful in 6m40s
CI / docker (pull_request) Successful in 1m51s
CI / integration_tests (pull_request) Successful in 9m30s
CI / coverage (pull_request) Successful in 15m22s
CI / status-check (pull_request) Successful in 3s
typer.Exit (v0.26.7) inherits from typer._click.exceptions.Exit and
RuntimeError, not click.exceptions.Exit. The existing
`except click.exceptions.Exit: raise` guards in actor.py and
actor_run.py therefore did not re-raise Exit(code=2) from
_resolve_config_files; it fell through to `except Exception` and was
re-raised as Exit(code=3). Similarly, step definitions catching
(SystemExit, click.exceptions.Exit) failed to intercept typer.Exit,
causing resolve_config_files error-path scenarios to error instead of
fail cleanly.

Fix the except clauses in both CLI entry-points and in the three
affected step files. Also correct the plan_explain step that created
a decision with none of the alternatives matching chosen_option, so
exactly one alternative now has chosen=True as the spec requires.

ISSUES CLOSED: #9166
2026-06-13 14:44:45 -04:00
controller-ci-rerun 378de0a362 chore: re-trigger CI [controller] 2026-06-13 14:44:45 -04:00
controller-ci-rerun dd97494a7b chore: re-trigger CI [controller] 2026-06-13 14:44:45 -04:00
HAL9000 ed7cf00d7f fix(plan): update robot helper to assert alternatives key in explain output
The robot/helper_plan_explain.py integration test helper was still
asserting the old field name alternatives_considered in the explain
dict output. Since _build_explain_dict() now outputs alternatives
(structured objects with index/description/chosen fields per spec),
the assertion was failing the CI integration_tests job.

Updated the assertion to check for alternatives and also verify
it is a list, matching the new structured output format.
2026-06-13 14:44:45 -04:00
HAL9000 9c49bbc4db fix(plan): use structured alternatives objects in plan explain output per spec
Convert alternatives_considered list of strings to structured objects with
index (1-based), description, and chosen fields in _build_explain_dict().
Rename output field from alternatives_considered to alternatives.
Update BDD tests in plan_explain.feature, plan_explain_cli_coverage.feature,
and plan_explain_steps.py to validate the new structured format.

Closes #9166
2026-06-13 14:44:45 -04:00