Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
- name: Validate tag and source version
run: python scripts/validate_release.py --tag "$GITHUB_REF_NAME"
- name: Install release tooling
run: python -m pip install --upgrade build twine
run: |
python -m pip install --upgrade build twine
python -m pip install -c requirements-dev.lock ruff
- name: Build wheel and source distribution
run: python -m build
- name: Validate distributions
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

## 1.3.1 - 2026-10-20

- Fix #111: Ship the measured check-duration correction missing from 1.3.0 and
verify a real non-cached Ruff invocation through the installed release wheel.
- Include untracked source files in context and restore strict typing (#109).

- Fix #110: Reject invalid context token budgets with a concise usage error and
exit code 2, including supported categories, before generating artifacts.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "ai-dev-cli-tools"
version = "1.3.0"
version = "1.3.1"
description = "Cross-platform CLI helpers that give AI coding agents concise, deterministic development reports."
readme = "README.md"
requires-python = ">=3.11"
Expand Down
37 changes: 36 additions & 1 deletion scripts/test_installed_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,39 @@ def _smoke_entrypoint(entrypoint: Path, cwd: Path) -> None:
mcp_response = json.loads(mcp_result.stdout)
if mcp_response.get("result", {}).get("serverInfo", {}).get("name") != "ai-dev-cli-tools":
raise SmokeError("installed MCP entrypoint did not initialize")
_smoke_check_duration(entrypoint, cwd)


def _smoke_check_duration(entrypoint: Path, cwd: Path) -> None:
# Run real Ruff from the development environment through the installed wheel.
# The wheel's venv remains independent and contains no editable source install.
(cwd / "sample.py").write_text("value = 1\n", encoding="utf-8")
(cwd / ".ai-dev-tools.toml").write_text(
'[commands]\nlint = "python -m ruff check sample.py"\n', encoding="utf-8"
)
result = _run(
[str(entrypoint), "--json", "check", "--mode", "fast", "--no-cache"], cwd,
env={
**os.environ,
"PATH": str(Path(sys.executable).parent) + os.pathsep + os.environ.get("PATH", ""),
},
)
_assert_report_json(result.stdout, "check")
payload = json.loads(result.stdout)
checks = payload["summary"]["results"]
if len(checks) != 1:
raise SmokeError(f"expected one installed Ruff check, found {len(checks)}")
check = checks[0]
duration = check.get("duration_seconds", 0)
if check.get("cached") is not False or duration <= 0:
raise SmokeError("installed non-cached Ruff check lost measured subprocess duration")
aggregate = payload["summary"]["execution"]["aggregate_subprocess_seconds"]
if duration != aggregate:
raise SmokeError("installed per-check duration differs from subprocess aggregate")
saved = json.loads((cwd / ".ai/reports/check-fast-latest.json").read_text(encoding="utf-8"))
if saved["summary"]["results"][0]["duration_seconds"] != duration:
raise SmokeError("saved report lost installed check duration")
print(f"Installed Ruff duration verified: {duration}s")


def _assert_report_json(output: str, command: str) -> None:
Expand All @@ -137,7 +170,8 @@ def _assert_report_json(output: str, command: str) -> None:


def _run(
command: list[str], cwd: Path, *, input_text: str | None = None
command: list[str], cwd: Path, *, input_text: str | None = None,
env: dict[str, str] | None = None,
) -> subprocess.CompletedProcess[str]:
result = subprocess.run(
command,
Expand All @@ -147,6 +181,7 @@ def _run(
errors="replace",
capture_output=True,
input=input_text,
env=env,
shell=False,
timeout=180,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ai_dev_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""AI Dev CLI Tools."""

__version__ = "1.3.0"
__version__ = "1.3.1"
2 changes: 1 addition & 1 deletion tests/unit/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_report_schema_contains_required_fields(tmp_path: Path) -> None:
).finish()
data = report.to_dict()
assert data["schema_version"] == "1.1"
assert data["tool_version"] == "1.3.0"
assert data["tool_version"] == "1.3.1"
assert data["status"] == "success"
assert data["command"] == "scan"
assert data["summary"] == {}
Expand Down
Loading