Use compileall for recursive compile checks
Stop letting the explicit compile step overstate its coverage. The old py_compile globs only touched top-level modules, so syntax errors in nested packages could slip past make check and release-check.\n\nAdd a shared compile-check recipe in Makefile that runs python -m compileall -q src tests, and have both check and release-check use it so the local verification paths stay aligned. Update the GitHub Actions compile step and the matching runtime validation evidence doc to describe the same recursive compile contract.\n\nValidate with python3 -m compileall -q src tests, make check, and make release-check.
This commit is contained in:
parent
94ead25737
commit
f779b71e1b
3 changed files with 10 additions and 6 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -40,7 +40,7 @@ jobs:
|
|||
uv sync --active --frozen
|
||||
echo "${GITHUB_WORKSPACE}/.venv/bin" >> "${GITHUB_PATH}"
|
||||
- name: Run compile check
|
||||
run: python -m py_compile src/*.py tests/*.py
|
||||
run: python -m compileall -q src tests
|
||||
- name: Run unit and package-logic test suite
|
||||
run: python -m unittest discover -s tests -p 'test_*.py'
|
||||
|
||||
|
|
|
|||
9
Makefile
9
Makefile
|
|
@ -6,7 +6,7 @@ BUILD_DIR := $(CURDIR)/build
|
|||
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
RUN_CONFIG := $(if $(RUN_ARGS),$(abspath $(firstword $(RUN_ARGS))),$(CONFIG))
|
||||
|
||||
.PHONY: run doctor self-check runtime-check eval-models build-heuristic-dataset sync-default-model check-default-model sync test check build package package-deb package-arch package-portable release-check release-prep install-local install-service install clean-dist clean-build clean
|
||||
.PHONY: run doctor self-check runtime-check eval-models build-heuristic-dataset sync-default-model check-default-model sync test compile-check check build package package-deb package-arch package-portable release-check release-prep install-local install-service install clean-dist clean-build clean
|
||||
EVAL_DATASET ?= $(CURDIR)/benchmarks/cleanup_dataset.jsonl
|
||||
EVAL_MATRIX ?= $(CURDIR)/benchmarks/model_matrix.small_first.json
|
||||
EVAL_OUTPUT ?= $(CURDIR)/benchmarks/results/latest.json
|
||||
|
|
@ -52,8 +52,11 @@ sync:
|
|||
test:
|
||||
$(PYTHON) -m unittest discover -s tests -p 'test_*.py'
|
||||
|
||||
compile-check:
|
||||
$(PYTHON) -m compileall -q src tests
|
||||
|
||||
check:
|
||||
$(PYTHON) -m py_compile src/*.py
|
||||
$(MAKE) compile-check
|
||||
$(MAKE) test
|
||||
|
||||
build:
|
||||
|
|
@ -72,7 +75,7 @@ package-portable:
|
|||
|
||||
release-check:
|
||||
$(MAKE) check-default-model
|
||||
$(PYTHON) -m py_compile src/*.py tests/*.py
|
||||
$(MAKE) compile-check
|
||||
$(MAKE) runtime-check
|
||||
$(MAKE) test
|
||||
$(MAKE) build
|
||||
|
|
|
|||
|
|
@ -15,8 +15,9 @@ Completed on 2026-03-12:
|
|||
- `PYTHONPATH=src python3 -m unittest discover -s tests -p 'test_*.py'`
|
||||
- confirms the runtime and diagnostics changes do not regress the broader
|
||||
daemon, CLI, config, and portable bundle flows
|
||||
- `python3 -m py_compile src/*.py tests/*.py`
|
||||
- verifies the updated runtime and diagnostics modules compile cleanly
|
||||
- `python3 -m compileall -q src tests`
|
||||
- verifies the updated runtime, diagnostics, and nested package modules
|
||||
compile cleanly
|
||||
|
||||
## Automated scenario coverage
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue