From f43472cc9b6ffa47d4afdbd7afbbee982f8a10f7 Mon Sep 17 00:00:00 2001 From: Alexander Myasoedov Date: Tue, 22 Sep 2026 16:58:07 +0300 Subject: [PATCH 1/2] fix: ci poetry installs into system python poetry.toml sets virtualenvs.create=false, so pipx poetry installed into the runner's system Python 3.12 and failed uninstalling Debian packages. Force venv creation in CI via POETRY_VIRTUALENVS_CREATE. Drop the poetry cache from release, which never creates a venv. --- .github/workflows/pre-commit.yml | 1 + .github/workflows/release.yml | 1 - .github/workflows/test.yml | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index a3d8ce0..7246dda 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -2,6 +2,7 @@ name: Pre-Commit Checks env: POETRY_VERSION: "2.4.1" + POETRY_VIRTUALENVS_CREATE: "true" on: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be2f194..acca835 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.14" - cache: "poetry" - name: Build project for distribution run: poetry build --format sdist - name: Check Version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 640616f..c4d7cfc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,6 +8,7 @@ on: env: POETRY_VERSION: "2.4.1" + POETRY_VIRTUALENVS_CREATE: "true" OPENAI_API_KEY: "sk-fake" jobs: From 71c1f20a51118990b27ed11483d91aedd524ca02 Mon Sep 17 00:00:00 2001 From: Alexander Myasoedov Date: Tue, 22 Sep 2026 17:26:45 +0300 Subject: [PATCH 2/2] fix: unquote self-referential annotation for pyupgrade pyupgrade --py314-plus rewrites the quoted return annotation added in #345, failing pre-commit. The project requires Python 3.14, where annotations are evaluated lazily (PEP 649), so the unquoted form imports fine. --- agentic_security/refusal_classifier/hybrid_classifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agentic_security/refusal_classifier/hybrid_classifier.py b/agentic_security/refusal_classifier/hybrid_classifier.py index 9021f4c..38075e6 100644 --- a/agentic_security/refusal_classifier/hybrid_classifier.py +++ b/agentic_security/refusal_classifier/hybrid_classifier.py @@ -86,7 +86,7 @@ class HybridRefusalClassifier: detector: RefusalDetector, weight: float = 1.0, name: str | None = None, - ) -> "HybridRefusalClassifier": + ) -> HybridRefusalClassifier: """Add a detection method with specified weight. Args: