fix(cli): tighten plan explain error handling
CI / push-validation (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 29s
CI / quality (pull_request) Successful in 33s
CI / build (pull_request) Successful in 36s
CI / security (pull_request) Successful in 53s
CI / e2e_tests (pull_request) Successful in 3m53s
CI / integration_tests (pull_request) Successful in 3m57s
CI / typecheck (pull_request) Successful in 3m58s
CI / unit_tests (pull_request) Successful in 8m33s
CI / docker (pull_request) Successful in 1m19s
CI / coverage (pull_request) Successful in 10m42s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m10s
CI / push-validation (pull_request) Successful in 17s
CI / lint (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 29s
CI / quality (pull_request) Successful in 33s
CI / build (pull_request) Successful in 36s
CI / security (pull_request) Successful in 53s
CI / e2e_tests (pull_request) Successful in 3m53s
CI / integration_tests (pull_request) Successful in 3m57s
CI / typecheck (pull_request) Successful in 3m58s
CI / unit_tests (pull_request) Successful in 8m33s
CI / docker (pull_request) Successful in 1m19s
CI / coverage (pull_request) Successful in 10m42s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m10s
- raise typer.Exit from None to satisfy B904\n- update Behave and Robot tests to expect decision-only errors\n- document the fix in the changelog and add HAL9000 contributor entry\n\nISSUES CLOSED: #6325
This commit is contained in:
@@ -46,6 +46,13 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||||
PR–issue label synchronization. The `issue-state-updater` syncs PR state labels whenever
|
||||
issue states change.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **CLI – plan explain** (#6325): `agents plan explain` no longer attempts a
|
||||
plan-ID fallback. It now exits with a decision-specific error message when a
|
||||
plan ULID is provided, and the Behave/Robot regression suites have been
|
||||
updated to assert the corrected behaviour.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Automation Tracking Format**: All automation tracking issues now use a standardized
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Aditya Chhabra <aditya.chhabra@cleverthis.com>
|
||||
* Brent E. Edwards <brent.edwards@cleverthis.com>
|
||||
* Hamza Khyari <hamza.khyari@cleverthis.com>
|
||||
* HAL 9000 <hal9000@cleverthis.com>
|
||||
* Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com>
|
||||
* Luis Mendes <luis.p.mendes@gmail.com>
|
||||
* Rui Hu <rui.hu@cleverthis.com>
|
||||
|
||||
@@ -16,6 +16,7 @@ from behave.runner import Context
|
||||
from typer.testing import CliRunner
|
||||
from ulid import ULID
|
||||
|
||||
from cleveragents.application.services.decision_service import DecisionNotFoundError
|
||||
from cleveragents.application.services.plan_lifecycle_service import (
|
||||
InvalidPhaseTransitionError,
|
||||
)
|
||||
@@ -169,8 +170,7 @@ def step_pec_mock_decision_svc(context: Context) -> None:
|
||||
def step_pec_mock_decision_none(context: Context) -> None:
|
||||
context.pec_decision_id = str(ULID())
|
||||
svc = MagicMock()
|
||||
svc.get_decision.return_value = None
|
||||
svc.list_decisions.return_value = []
|
||||
svc.get_decision.side_effect = DecisionNotFoundError(context.pec_decision_id)
|
||||
context.pec_container = _mock_container_with_decision_svc(svc)
|
||||
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ def explain_plan_id_shows_question() -> None:
|
||||
)
|
||||
|
||||
combined: str = (result.stdout + result.stderr).lower()
|
||||
if "what should we build?" in combined or "decision" in combined:
|
||||
if "what should we build?" in combined or "a rest api" in combined:
|
||||
_fail(
|
||||
"plan explain output unexpectedly included decision content. "
|
||||
f"stdout: {result.stdout}\n"
|
||||
|
||||
@@ -4217,7 +4217,7 @@ def explain_decision_cmd(
|
||||
decision = svc.get_decision(identifier)
|
||||
except DecisionNotFoundError:
|
||||
console.print(f"[red]Error:[/red] '{identifier}' not found as a decision.")
|
||||
raise typer.Exit(1)
|
||||
raise typer.Exit(1) from None
|
||||
|
||||
data = _build_explain_dict(
|
||||
decision,
|
||||
|
||||
Reference in New Issue
Block a user