Skip to content

chore: remove dead tree-sitter chunkers and dependency (FR-10)#14

Merged
thebtf merged 2 commits into
mainfrom
chore/remove-tree-sitter
Mar 17, 2026
Merged

chore: remove dead tree-sitter chunkers and dependency (FR-10)#14
thebtf merged 2 commits into
mainfrom
chore/remove-tree-sitter

Conversation

@thebtf
Copy link
Copy Markdown
Owner

@thebtf thebtf commented Mar 17, 2026

Summary

  • Removed internal/chunking/typescript/ and internal/chunking/python/ (dead code — never registered in createChunkManager())
  • Removed github.com/smacker/go-tree-sitter pseudo-version dependency from go.mod
  • Eliminates Windows CGo build failure caused by this dependency
  • 1394 lines of dead code removed

Test plan

  • go build ./cmd/worker/ compiles on Windows without CGo errors
  • go mod tidy shows no pseudo-versioned dependencies
  • Go and Markdown chunkers still registered and functional
  • No tree-sitter references remain in go.mod

Summary by CodeRabbit

Заметки о выпуске

  • Chores

    • Обновлены зависимости: добавлена прямая зависимость google/uuid; удалена зависимость go-tree-sitter.
  • Refactor

    • Удалена поддержка разбиения кода для Python и TypeScript; набор поддерживаемых языков сокращён до Go.
  • Tests

    • Удалены комплекты тестов для Python и TypeScript-чанкеров; обновлены тесты перечисления языков (только Go).

Delete internal/chunking/typescript/ and internal/chunking/python/
which were never registered in createChunkManager() and caused
Windows build failures due to broken CGo imports in go-tree-sitter.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6da538b2-a233-44b9-a37c-0756b988e8a4

📥 Commits

Reviewing files that changed from the base of the PR and between ee5af40 and 48a457c.

📒 Files selected for processing (2)
  • internal/chunking/types.go
  • internal/chunking/types_test.go
💤 Files with no reviewable changes (2)
  • internal/chunking/types_test.go
  • internal/chunking/types.go

Walkthrough

Удалены AST-ориентированные чанкеры для Python и TypeScript (включая тесты) и зависимость от github.com/smacker/go-tree-sitter; добавлена прямая зависимость github.com/google/uuid v1.6.0 в go.mod.

Changes

Cohort / File(s) Summary
Управление зависимостями
go.mod
Удалена зависимость github.com/smacker/go-tree-sitter; добавлена прямая зависимость github.com/google/uuid v1.6.0 (убрана косвенная запись).
Реализация Python-чанкера
internal/chunking/python/chunker.go, internal/chunking/python/chunker_test.go
Полное удаление файла реализации Python-чанкера и связанного набора тестов — удалены парсер на tree-sitter, обход AST, извлечение функций/классов/докстрингов и все тесты.
Реализация TypeScript-чанкера
internal/chunking/typescript/chunker.go, internal/chunking/typescript/chunker_test.go
Полное удаление файла реализации TypeScript-чанкера и связанного набора тестов — удалены парсер, обход дерева, извлечение функций/методов/классов/интерфейсов/тип-алиасов, обработка JSDoc и все тесты.
Типы чанкинга
internal/chunking/types.go
Удалены константы языков python, typescript, javascript из перечисления Language; оставлен только go.
Тесты типов
internal/chunking/types_test.go
Тест сократился: теперь проверяется только LanguageGo (удалены проверки для Python/TypeScript/JavaScript).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Стихотворение

🐰 Прощаюсь я с деревом кода,
tree-sitter уходит в лоно сна.
Python и TS — в удаленья свода,
пришёл же uuid — сияет дня.
Пусть прыгнет проект, как вечный заяц, в новый путь! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Название полностью соответствует основному изменению: удаление неиспользуемых chunker'ов tree-sitter и зависимости.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-tree-sitter
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on cleaning up the codebase by removing dead code related to tree-sitter chunkers for Python and TypeScript. It also addresses a dependency issue that was causing build failures on Windows. The changes improve the overall maintainability and stability of the project.

Highlights

  • Dead Code Removal: This PR removes unused tree-sitter chunkers for Python and TypeScript, which were never registered in the createChunkManager().
  • Dependency Cleanup: The PR removes the github.com/smacker/go-tree-sitter pseudo-version dependency from go.mod.
  • Build Fix: This change resolves a Windows CGo build failure that was caused by the removed dependency.
  • Code Reduction: A total of 1394 lines of dead code have been removed, contributing to a cleaner codebase.
Changelog
  • go.mod
    • Removed the github.com/smacker/go-tree-sitter dependency.
  • go.sum
    • Removed entries related to the github.com/smacker/go-tree-sitter dependency.
  • internal/chunking/python/chunker.go
    • Removed the Python chunker implementation.
  • internal/chunking/python/chunker_test.go
    • Removed the Python chunker tests.
  • internal/chunking/typescript/chunker.go
    • Removed the TypeScript chunker implementation.
  • internal/chunking/typescript/chunker_test.go
    • Removed the TypeScript chunker tests.
Activity
  • The PR author, thebtf, has removed unused tree-sitter chunkers and a related dependency.
  • The PR description includes a test plan to verify the changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request does a great job of removing dead code and simplifying dependencies by deleting the unused Python and TypeScript tree-sitter chunkers. The changes are clean and address the stated goal of fixing the CGo build issue on Windows. I've added a couple of minor suggestions to remove some now-orphaned constants for a more complete cleanup.

Comment thread internal/chunking/python/chunker.go
Comment thread internal/chunking/typescript/chunker.go
@thebtf
Copy link
Copy Markdown
Owner Author

thebtf commented Mar 17, 2026

@codex review

…Script constants

Python and TypeScript chunkers were removed in this PR. Their corresponding
Language constants in types.go are now dead code. Remove them along with the
associated test assertions.
@thebtf thebtf merged commit ba34747 into main Mar 17, 2026
2 checks passed
@thebtf thebtf deleted the chore/remove-tree-sitter branch March 17, 2026 22:57
thebtf added a commit that referenced this pull request Apr 12, 2026
Backend:
- Migration 075: add type column (TEXT, default 'task') to issues table
- Issue model: Type field with validation (bug/feature/improvement/task)
- Store: CreateIssue validates type, UpdateIssueFields accepts type,
  ListIssuesEx filters by type
- MCP tool: type param in issues(action="create")
- REST: type in POST/PATCH body, GET query param

Dashboard:
- "New Issue" button + creation modal (title, body, type, priority, target_project)
- Type filter buttons (All/Bug/Feature/Improvement/Task)
- Type badge in issue list (colored: red/blue/green/gray)
- Type badge + edit in issue detail view

Hooks:
- formatIssuesBlock shows [TYPE] tag in session injection

Plugin v3.7.8.
Closes #31, #14.
thebtf added a commit that referenced this pull request Apr 12, 2026
* feat(issues): add type field (bug/feature/improvement/task) [T001-T008]

* feat(issues): add type field + operator create from dashboard (#31, #14)

Backend:
- Migration 075: add type column (TEXT, default 'task') to issues table
- Issue model: Type field with validation (bug/feature/improvement/task)
- Store: CreateIssue validates type, UpdateIssueFields accepts type,
  ListIssuesEx filters by type
- MCP tool: type param in issues(action="create")
- REST: type in POST/PATCH body, GET query param

Dashboard:
- "New Issue" button + creation modal (title, body, type, priority, target_project)
- Type filter buttons (All/Bug/Feature/Improvement/Task)
- Type badge in issue list (colored: red/blue/green/gray)
- Type badge + edit in issue detail view

Hooks:
- formatIssuesBlock shows [TYPE] tag in session injection

Plugin v3.7.8.
Closes #31, #14.

* fix(issues): address PR #145 review findings

- migrations.go: add DB-level CHECK constraint issues_type_check for
  type IN ('bug','feature','improvement','task') with proper rollback
- models.go: add not null to GORM tag for Type field to match migration
- handlers_issues.go: normalize type param with TrimSpace+ToLower in
  list, create, and update handlers
- api.ts: refactor createIssue to use postJson helper (removes
  duplicated timeout/abort/retry logic); require non-empty target_project
  and validate eagerly before HTTP call
- IssuesView.vue: pass target_project as string (not undefined) since
  createIssue now validates it directly

---------

Co-authored-by: Kirill Turanskiy <thebtf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant