From 72eebd4fe6b819689f0892d1c4762ed2a7933880 Mon Sep 17 00:00:00 2001 From: chopratejas Date: Thu, 26 Mar 2026 12:04:30 -0700 Subject: [PATCH] Fix CI test, bump to 0.5.7 - test_nested_functions: guard syntax_valid assert behind is_tree_sitter_available() (CI doesn't have tree-sitter) - Bump version to 0.5.7 --- headroom/__init__.py | 2 +- pyproject.toml | 2 +- tests/test_transforms/test_code_compressor.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/headroom/__init__.py b/headroom/__init__.py index 327981764..e088de82c 100644 --- a/headroom/__init__.py +++ b/headroom/__init__.py @@ -153,7 +153,7 @@ from .transforms import ( TransformPipeline, ) -__version__ = "0.5.6" +__version__ = "0.5.7" __all__ = [ # Main client diff --git a/pyproject.toml b/pyproject.toml index b3881cbb7..e17235140 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "headroom-ai" -version = "0.5.6" +version = "0.5.7" description = "The Context Optimization Layer for LLM Applications - Cut costs by 50-90%" readme = "README.md" license = "Apache-2.0" diff --git a/tests/test_transforms/test_code_compressor.py b/tests/test_transforms/test_code_compressor.py index c9f7a87cb..95da801af 100644 --- a/tests/test_transforms/test_code_compressor.py +++ b/tests/test_transforms/test_code_compressor.py @@ -645,7 +645,9 @@ def outer(): result = compressor.compress(code) assert result is not None - assert result.syntax_valid is True + # syntax_valid requires tree-sitter; without it, validation is skipped + if is_tree_sitter_available(): + assert result.syntax_valid is True def test_syntax_errors_in_input(self, default_config): """Syntax errors in input don't crash the compressor."""