Skip to content

Commit ae4c94d

Browse files
fix(workflow): bump speckit_version floor and harden CLI loader on #2421
- workflows/speckit/workflow.yml: bump ``requires.speckit_version`` from ``>=0.7.2`` to ``>=0.8.3`` so older spec-kit versions, which lack the engine-side resolution of the ``integration: "auto"`` sentinel, do not pull this workflow from the catalog and then fail by treating "auto" as a literal integration key. Adds an inline comment explaining the reason for the floor. - src/specify_cli/__init__.py: ``_read_integration_json`` now also catches ``UnicodeDecodeError`` (non-UTF8 file) so the CLI fails with a targeted, actionable diagnostic instead of an uncaught traceback, and notes in the docstring that the function shares its low-level parsing surface with ``_paths.try_read_integration_json`` while keeping loud per-cause messaging on top.
1 parent 0dd3426 commit ae4c94d

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,13 @@ def get_speckit_version() -> str:
18981898

18991899

19001900
def _read_integration_json(project_root: Path) -> dict[str, Any]:
1901-
"""Load ``.specify/integration.json``. Returns ``{}`` when missing."""
1901+
"""Load ``.specify/integration.json``. Returns ``{}`` when missing.
1902+
1903+
Shares its low-level parsing surface with
1904+
:func:`specify_cli._paths.try_read_integration_json` (used by the
1905+
workflow engine) but keeps loud, per-cause diagnostics so CLI users
1906+
get actionable messages instead of a silent fallback.
1907+
"""
19021908
path = project_root / INTEGRATION_JSON
19031909
if not path.exists():
19041910
return {}
@@ -1909,6 +1915,11 @@ def _read_integration_json(project_root: Path) -> dict[str, Any]:
19091915
console.print(f"Please fix or delete {INTEGRATION_JSON} and retry.")
19101916
console.print(f"[dim]Details:[/dim] {exc}")
19111917
raise typer.Exit(1)
1918+
except UnicodeDecodeError as exc:
1919+
console.print(f"[red]Error:[/red] {path} is not valid UTF-8.")
1920+
console.print(f"Please fix or delete {INTEGRATION_JSON} and retry.")
1921+
console.print(f"[dim]Details:[/dim] {exc}")
1922+
raise typer.Exit(1)
19121923
except OSError as exc:
19131924
console.print(f"[red]Error:[/red] Could not read {path}.")
19141925
console.print(f"Please fix file permissions or delete {INTEGRATION_JSON} and retry.")

workflows/speckit/workflow.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ workflow:
77
description: "Runs specify → plan → tasks → implement with review gates"
88

99
requires:
10-
speckit_version: ">=0.7.2"
10+
# 0.8.3 is the first release with engine-side resolution of the
11+
# ``integration: "auto"`` default. Older versions would treat "auto"
12+
# as a literal integration key and fail at dispatch.
13+
speckit_version: ">=0.8.3"
1114
integrations:
1215
# The four commands below (specify, plan, tasks, implement) are core
1316
# spec-kit commands provided by every integration. The list here is an

0 commit comments

Comments
 (0)