From 65a85637da977c3d2753435fc35837036835a0ac Mon Sep 17 00:00:00 2001 From: Paul Calnon Date: Wed, 6 May 2026 18:21:43 -0500 Subject: [PATCH] =?UTF-8?q?ci(async-audit):=20Phase=204=20=E2=80=94=20enfo?= =?UTF-8?q?rce=20async-route=20audit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the soft-fail flags so any new ASYNC* violation hard-fails: - ``.github/workflows/ci.yml``: remove ``continue-on-error: true`` from the ``async-route-audit`` job and ``--exit-zero`` from the ruff command. Rename job to "Async-route audit (BUG-JD-10 class)" (no more "soft-fail" suffix). - ``.pre-commit-config.yaml``: remove ``--exit-zero`` from the ``ruff-async-audit`` hook so violations block commits. Repo reached zero violations at end of Phase 3 (PR #96). Verified ``ruff check --select ASYNC juniper_data/`` exits clean and ``pre-commit run ruff-async-audit --all-files`` passes. First of four Phase 4 PRs (data → cascor → canopy → worker). Refs: notes/ASYNC_ROUTE_AUDIT_HOOK_MIGRATION_PLAN.md §4 (in juniper-ml) Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 16 +++++----------- .pre-commit-config.yaml | 11 +++++------ 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fed273..1ab28a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,16 +122,15 @@ jobs: python scripts/check_doc_links.py --exclude templates --exclude history --cross-repo skip # ═══════════════════════════════════════════════════════════════════════════════════════════════ - # Async-route audit (Phase 2 — soft-fail visibility). + # Async-route audit (Phase 4 — enforced). # Catches the BUG-JD-10 bug class (sync-blocking calls inside async def - # route handlers). `continue-on-error: true` so violations surface as - # PR annotations without blocking merge. Phase 4 will flip this off. + # route handlers). Hard-fails on any new violation; this repo reached + # zero violations at end of Phase 3 (PR #96). # See juniper-ml notes/ASYNC_ROUTE_AUDIT_HOOK_MIGRATION_PLAN.md §4. # ═══════════════════════════════════════════════════════════════════════════════════════════════ async-route-audit: - name: Async-route audit (BUG-JD-10 class, soft-fail) + name: Async-route audit (BUG-JD-10 class) runs-on: ubuntu-latest - continue-on-error: true steps: - name: Checkout Code @@ -150,12 +149,7 @@ jobs: echo "╔════════════════════════════════════════════════════════════╗" echo "║ JuniperData - Async-route audit (BUG-JD-10) ║" echo "╚════════════════════════════════════════════════════════════╝" - # --exit-zero: same soft-fail contract as the pre-commit hook - # (Phase 2 "violations as warnings, not blockers"). Annotations - # still render via --output-format=github so reviewers see them - # in the PR; the step itself doesn't fail. Phase 4 will drop - # this flag along with `continue-on-error: true` on the job. - ruff check --select ASYNC --exit-zero --output-format=github juniper_data/ + ruff check --select ASYNC --output-format=github juniper_data/ # ═══════════════════════════════════════════════════════════════════════════════════════════════ # Unit Tests: Run unit tests with coverage enforcement diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 94bd64a..98f7db1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -97,16 +97,15 @@ repos: name: Format with Ruff files: ^juniper_data/.*\.py$ # ───────────────────────────────────────────────────────────────────── - # Async-route audit (Phase 2 — soft-fail visibility). + # Async-route audit (Phase 4 — enforced). # See juniper-ml notes/ASYNC_ROUTE_AUDIT_HOOK_MIGRATION_PLAN.md. - # `--exit-zero` keeps violations as warnings (won't block commits). - # CI lane in .github/workflows/ci.yml runs the same check with - # `continue-on-error: true` so PRs see annotations without blocking - # merge. Phase 4 will drop both `--exit-zero` and `continue-on-error`. + # Hard-fails on any new ASYNC* violation. The repo reached zero + # violations at end of Phase 3 (PR #96); per-file-ignores live in + # pyproject.toml [tool.ruff.lint.per-file-ignores]. - id: ruff alias: ruff-async-audit name: Async-route audit (BUG-JD-10 class) - args: [--select, ASYNC, --exit-zero] + args: [--select, ASYNC] files: ^juniper_data/.*\.py$ stages: [pre-commit, manual]