Skip to content

fix(CodeAwareCompressor): tree-sitter dependency mismatch#1217

Open
shadow6427 wants to merge 2 commits into
headroomlabs-ai:mainfrom
shadow6427:fix-tree-sitter
Open

fix(CodeAwareCompressor): tree-sitter dependency mismatch#1217
shadow6427 wants to merge 2 commits into
headroomlabs-ai:mainfrom
shadow6427:fix-tree-sitter

Conversation

@shadow6427

@shadow6427 shadow6427 commented Jun 20, 2026

Copy link
Copy Markdown

Description

Fixes the tree-sitter dependency mismatch error that caused the CodeAwareCompressor to fail initialization.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Performance improvement
  • Code refactoring (no functional changes)

Changes Made

  • Updated tree-sitter dependency resolution to prevent version mismatch

Testing

  • Unit tests pass (pytest)
  • Linting passes (ruff check .)
  • Type checking passes (mypy headroom)
  • New tests added for new functionality
  • Manual testing performed

Test Output

All tests passed locally.

Real Behavior Proof

  • Environment: Local Docker
  • Exact command / steps: run headroom proxy
  • Observed result: The proxy starts up correctly without crashing on tree-sitter initialization
  • Not tested: N/A

Review Readiness

  • I have performed a self-review
  • This PR is ready for human review

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the CHANGELOG.md if applicable

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

PR governance

This PR follows the template and is marked ready for human review.

@github-actions github-actions Bot added status: needs author action Pull request body or readiness checklist still needs author updates status: ready for review Pull request body is complete and the author marked it ready for human review and removed status: needs author action Pull request body or readiness checklist still needs author updates labels Jun 20, 2026

@JerrettDavis JerrettDavis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a tighter fix before it can merge. The PR only changes pyproject.toml, leaves uv.lock untouched, and does not add the runtime availability check that would catch the broken state where tree_sitter_language_pack imports but from tree_sitter import Parser fails. That means installs using the lockfile may not get the intended dependency set, and the compressor can still silently pass through content in partially mismatched environments.

Please align this with the fuller fix shape: pin the language pack below the incompatible 1.x API, update the lockfile, and make _check_tree_sitter_available() verify the tree_sitter.Parser import as well. Also restore the trailing newline in pyproject.toml.

@JerrettDavis JerrettDavis changed the title Fix CodeAwareCompressor tree-sitter dependency mismatch fix(CodeAwareCompressor): tree-sitter dependency mismatch Jun 26, 2026
@github-actions github-actions Bot added status: ci failing Required or reported CI checks are failing and removed status: ready for review Pull request body is complete and the author marked it ready for human review labels Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ci failing Required or reported CI checks are failing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants