[gemma4] update tests

This commit is contained in:
2026-06-19 17:52:38 +02:00
parent d6bd5f4096
commit 49f0f23a54
4 changed files with 117 additions and 18 deletions
+8 -6
View File
@@ -13,7 +13,7 @@ This document outlines the identified fragilities in the `skillls` project and t
**Problem**: The current recursive traversal in `_traverse_tree` is susceptible to `RecursionError` on deeply nested files.
**Goal**: Ensure the server can handle arbitrarily deep syntax trees without crashing.
**Proposed Actions**:
- [ ] Refactor `SkillParser._traverse_tree` to use an iterative approach (using a stack/deque) instead of recursion.
- [x] Refactor `SkillParser._traverse_tree` to use an iterative approach (using a stack/deque) instead of recursion.
## s3. Single Source of Truth for Errors
**Problem**: The project is in a transitional state where error management is split between the new `SkillParser` diagnostics and the legacy `server.errs` dictionary in `main.py`.
@@ -23,9 +23,11 @@ This document outlines the identified fragilities in the `skillls` project and t
- [ ] Remove the `errs` dictionary from `SkillLanguageServer`.
- [ ] Decommission and delete deprecated files: `skillls/checker.py` and unused parts of `skillls/helpers.py`.
## 4. Dependency Management Stabilization
**Problem**: The dependency on a private SSH Git URL for `tree-sitter-skill` introduces external failure points into the build pipeline.
**Goal**: Stabilize the build environment.
## 5. Test Suite Strengthening
**Problem**: While core logic is tested, the LSP lifecycle and complex parsing edge cases lack specific unit test coverage.
**Goal**: Achieve high-confidence verification of the LSP server's behavior and parser robustness.
**Proposed Actions**:
- [ ] Evaluate the feasibility of publishing `tree-sitter-skill` to a private PyPI registry or a more accessible artifact repository.
- [ ] Implement a fallback/vendoring strategy for critical grammar components if possible.
- [ ] Implement `tests/test_server.py` to verify LSP lifecycle events (`didOpen`, `didChange`) and diagnostic publishing logic.
- [ ] Expand `tests/test_helpers.py` with specialized unit tests for the `find_scopes` regex and brace-tracking logic.
- [ ] Harden `tests/test_parser.py` by implementing deterministic symbol extraction verification instead of existence checks.