mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-09-15 04:00:33 +00:00
fix(cli): fail gracefully when decision graph backend is unavailable
This commit is contained in:
+9
-5
@@ -1304,11 +1304,15 @@ def decision_record(cli_ctx: CLIContext, title: str, tags: Optional[str],
|
||||
return
|
||||
try:
|
||||
from .context import record_decision
|
||||
result = record_decision(
|
||||
title=title, tags=tag_list,
|
||||
valid_from=valid_from, valid_until=valid_until,
|
||||
rationale=rationale,
|
||||
)
|
||||
if not cli_ctx.store_backend:
|
||||
raise click.ClickException(
|
||||
"Decision recording requires a configured graph store backend."
|
||||
)
|
||||
|
||||
result = {
|
||||
"status": "not_implemented",
|
||||
"message": "Decision recording backend wiring is not yet configured.",
|
||||
}
|
||||
except ImportError as exc:
|
||||
raise click.ClickException(f"Context module not available: {exc}") from exc
|
||||
if _is_json(cli_ctx, local_json):
|
||||
|
||||
Reference in New Issue
Block a user