This repository was archived by the owner on Jun 16, 2026. It is now read-only.
Fix mteb_to_codeweaver.py: undefined names, broken init block, wrong imports and sys.path - #214
Merged
Adam Poulemanos (bashandbone) merged 5 commits intoMar 16, 2026
Conversation
…orts and sys.path
|
|
||
|
|
||
| type AliasMap = dict[ | ||
| Annotated[Provider, BeforeValidator(lambda v: Provider.from_string(v))], |
| ModelMaker, | ||
| dict[ | ||
| ModelName, | ||
| tuple[Annotated[HFModelProviders, BeforeValidator(lambda v: Provider.from_string(v))], ...], |
| Convert an MTEB model metadata dictionary to a PartialCapabilities object. | ||
| """ | ||
| loader = getattr(model, "loader", {}) | ||
| loader = loader if isinstance(loader, dict) else {} |
Copilot
AI
changed the title
[WIP] Fix syntax errors in mteb_to_codeweaver.py
Fix mteb_to_codeweaver.py: undefined names, broken init block, wrong imports and sys.path
Mar 15, 2026
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com>
Adam Poulemanos (bashandbone)
marked this pull request as ready for review
March 16, 2026 03:42
Contributor
There was a problem hiding this comment.
Copilot reviewed 5 out of 9 changed files in this pull request and generated no comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adam Poulemanos (bashandbone)
deleted the
copilot/fix-mteb-to-codeweaver-script
branch
March 16, 2026 03:53
Copilot AI
added a commit
that referenced
this pull request
Mar 17, 2026
…imports and sys.path (#214) * Initial plan * Fix mteb_to_codeweaver.py: add KNOWN_ALIASES, fix init block, fix imports and sys.path * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * fix: .gitignore --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Adam Poulemanos <adam@knit.li>
Adam Poulemanos (bashandbone)
added a commit
that referenced
this pull request
Mar 17, 2026
…consistent error handling (#238) * Initial plan * 🧹 Refactor: Remove bare `except Exception:` suppressing errors silently (#227) * Refactor: Remove bare `except Exception:` suppressing errors silently Modifies `_resolve_indexer_from_container` in `src/codeweaver/server/agent_api/search/__init__.py` to capture exceptions as `e` and log them using `logger.warning`. This improves observability and code health by preventing silent failures without changing the return logic. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore: remove deprecated `combined_lifespan` alias (#226) The `combined_lifespan` assignment and associated comment in `src/codeweaver/server/lifespan.py` were unused dead code that provided a deprecated alias. Removing this improves code health and maintainability by keeping the module surface smaller and less confusing. All tests pass with no regressions. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * chore: update dependencies * Fix mteb_to_codeweaver.py: undefined names, broken init block, wrong imports and sys.path (#214) * Initial plan * Fix mteb_to_codeweaver.py: add KNOWN_ALIASES, fix init block, fix imports and sys.path * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * fix: .gitignore --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Adam Poulemanos <adam@knit.li> * test: update CircuitBreakerState to use .variable (#228) Updates test_error_recovery.py and test_health_monitoring.py to align with the BaseEnum interface by using `.variable` on CircuitBreakerState enum entries instead of `.value` or string literals. Also removed the `# FIX:` comments regarding this change. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * ⚡ perf: Optimize Provider membership check using tuple (#218) * perf: use tuple instead of list for enum membership check Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(di): correctly resolve Union[None] type to None Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(di): properly handle NoneType inside Union checking Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * ⚡ perf: optimize membership check in _check_profile using set (#220) * perf: optimize membership check in _check_profile by using set instead of list Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * ci: add Copilot to allowed_bots in claude-code-action Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: namespace conflict preventing initialization when Fastembed provider enabled * 🧪 Add unit tests for DiscoveredFile absolute_path property (#215) * test(core): add unit tests for DiscoveredFile.absolute_path Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(ci): add allowed_bots and allowed_non_write_users to PR review comment job Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(ci): add allowed_bots and allowed_non_write_users to PR review comment job Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(ci): add allowed_bots to Issue Assigned job Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(ci): add allowed bots to all jobs Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: handle missing optional imports safely in Python 3.14t and 3.13t Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: correctly handle ImportError in Python 3.14t for `uuid_extensions` Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * ⚡ Optimize list membership check to set for HTML tags (#216) * perf: Optimize membership check for HTML block tags by using set literal Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(di): allow type(None) in `_get_signature_and_hints` on Python 3.13 Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: restore duckduckgo types and handle telemetry safely Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * perf: Optimize membership check for HTML block tags by using set literal Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: feature gating for duck duck go * Fix mock_provider_lazy configuration in integration tests (#232) * tests: fix mock_provider_lazy configuration in client factory integration tests Added missing `__name__` and `return_value` assignments to `mock_provider_lazy` in Qdrant provider integration tests. This ensures the mocks are consistent with how they are used by the provider factory and matches the pattern used for other providers in the same test file. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * refactor: consolidate mock_provider_lazy setup and improve comments - Implemented `make_lazy_provider_mock` helper to centralize mock configuration. - Replaced brittle line-number comments with behavioral descriptions. - Updated all Voyage and Qdrant provider tests to use the new helper. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * perf(cli): optimize membership check in index command (#234) Changed list membership check to a set to leverage Python's constant-folded frozenset optimization. This provides O(1) lookup time instead of O(n) and avoids list creation at runtime. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * 🧪 test: add coverage for force shutdown handler (#217) * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Also added Copilot to allowed_bots and allowed_non_write_users in `.github/workflows/claude.yml` to prevent CI failures. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Also fixed Copilot permissions in `.github/workflows/claude.yml` to resolve CI failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Also fixed Copilot permissions in `.github/workflows/claude.yml` to resolve CI failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: integration test failures * 🧪 test: Add unit tests for get_version fallback mechanisms (#219) * test: Add tests for `get_version` function Added comprehensive unit tests for `get_version` in `tests/unit/test_init.py`. The tests verify that all mechanisms to retrieve the package version function as intended: - Reading `codeweaver._version.__version__` - Using `importlib.metadata.version` - Falling back to `git describe` - Handling missing `git` command - Handling broader unexpected exceptions All fallback scenarios now properly ensure the code returns the default `0.0.0` string or the valid version. No functional code was changed, only new tests were introduced. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * test: Add tests for `get_version` function Added unit tests for `get_version` in `tests/unit/test_init.py`. The tests verify that all mechanisms to retrieve the package version function as intended: - Reading `codeweaver._version.__version__` - Using `importlib.metadata.version` - Falling back to `git describe` - Handling missing `git` command - Handling broader unexpected exceptions Uses `monkeypatch` safely by keeping original references to avoid polluting the global namespace and Pytest internal packages. No functional code changes. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: Add tests for `get_version` function Added comprehensive unit tests for `get_version` in `tests/unit/test_init.py`. The tests verify that all mechanisms to retrieve the package version function as intended: - Reading `codeweaver._version.__version__` - Using `importlib.metadata.version` - Falling back to `git describe` - Handling missing `git` command - Handling broader unexpected exceptions Uses `monkeypatch` safely by keeping original references to avoid polluting the global namespace and Pytest internal packages. No functional code changes. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: Add tests for `get_version` function Added comprehensive unit tests for `get_version` in `tests/unit/test_init.py`. The tests verify that all mechanisms to retrieve the package version function as intended: - Reading `codeweaver._version.__version__` - Using `importlib.metadata.version` - Falling back to `git describe` - Handling missing `git` command - Handling broader unexpected exceptions Uses `monkeypatch` safely by keeping original references to avoid polluting the global namespace and Pytest internal packages. No functional code changes. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add robust coverage for get_version fallbacks Adds comprehensive tests for `codeweaver.get_version()` in `tests/unit/test_init.py`. Properly mocks the module import mechanisms, importlib.metadata, and git subprocess calls to ensure all fallback paths (file -> metadata -> git -> default) are tested. Addresses PR feedback by isolating the `_original_version` scope and adding explanatory comments about module reloading requirements during tests. Removes `test_investigate.py`. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: spdx information --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * 🔒 Replace insecure pickle with JSON for node types cache (#233) * 🔒 Replace insecure pickle with JSON for node types cache Mitigate insecure deserialization vulnerability by switching the tree-sitter node types cache from pickle to JSON. - Updated scripts/build/preprocess-node-types.py to serialize cache to JSON. - Updated src/codeweaver/semantic/node_type_parser.py to load and validate the JSON cache using pydantic.TypeAdapter. - Corrected build and CI artifact paths in mise.dev.toml. - Updated documentation in src/codeweaver/semantic/data/__init__.py. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * 🔒 Switch node types cache to JSON and fix CI issues - Switch tree-sitter node types cache from pickle to JSON to mitigate insecure deserialization (S301). - Use Pydantic's TypeAdapter for safe validation and loading. - Fix CI failures on Python 3.14 by using the project's internal uuid7 utility instead of uuid_extensions. - Clean up classification_result during cache loading to ensure fresh recomputation. - Correct artifact paths in mise.dev.toml and documentation. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding 'Unused import' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * Fix JSON node types cache: commit missing file and repair union deserialization (#235) * Initial plan * Fix JSON cache loading: resolve connection union, fix type errors, extract helper methods, add cache file Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Address code review: clarify noqa comment, improve circular-import doc, simplify adapter guard Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: uuid7 generator resolution * fix: correct uuid7 timestamp handling * fix: Remove "has_package() is None" checks; has_package returns a boolean. * fix: test_init tests bypassing themselves * Initial plan * 🔒 fix: security hardening for DI container eval - remove type builtin, consistent None returns, test improvements Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * 🔒 fix: security hardening for DI container eval - remove type builtin, consistent None returns, test improvements Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * 🔒 fix: security hardening for DI container eval - remove type builtin, consistent None returns, test improvements, fix pre-existing lint issues Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Adam Poulemanos <adam@knit.li> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Adam Poulemanos (bashandbone)
added a commit
that referenced
this pull request
Mar 17, 2026
* 🔒 fix: replace dangerous eval() with safe AST-validated type resolution Introduces _safe_eval_type to the Container class, which uses AST parsing and validation to ensure type strings only contain safe constructs. It blocks dunder access and evaluates in a restricted environment without builtins, preventing arbitrary code execution while preserving functionality for complex type hints. Fixes a security vulnerability in src/codeweaver/core/di/container.py. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * 🔒 fix: replace dangerous eval() with safe AST-validated resolution - Replaces `eval()` in `src/codeweaver/core/di/container.py` with `_safe_eval_type`. - `_safe_eval_type` uses AST validation to allow only type-safe constructs. - Blocks access to dunder attributes and names to prevent sandbox escapes. - Evaluates in a restricted environment with a whitelist of safe built-ins (int, str, list, etc.). - Includes comprehensive security tests in `tests/di/test_container_security.py` with proper license headers and documentation. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding 'Unused import' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * fix: Remove type from accepted builtins in DI Container, consistently return None in Container if not resolved. * 🔒 Harden DI container string type resolution: remove `type` builtin, consistent error handling (#238) * Initial plan * 🧹 Refactor: Remove bare `except Exception:` suppressing errors silently (#227) * Refactor: Remove bare `except Exception:` suppressing errors silently Modifies `_resolve_indexer_from_container` in `src/codeweaver/server/agent_api/search/__init__.py` to capture exceptions as `e` and log them using `logger.warning`. This improves observability and code health by preventing silent failures without changing the return logic. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * chore: remove deprecated `combined_lifespan` alias (#226) The `combined_lifespan` assignment and associated comment in `src/codeweaver/server/lifespan.py` were unused dead code that provided a deprecated alias. Removing this improves code health and maintainability by keeping the module surface smaller and less confusing. All tests pass with no regressions. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * chore: update dependencies * Fix mteb_to_codeweaver.py: undefined names, broken init block, wrong imports and sys.path (#214) * Initial plan * Fix mteb_to_codeweaver.py: add KNOWN_ALIASES, fix init block, fix imports and sys.path * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * fix: .gitignore --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Adam Poulemanos <adam@knit.li> * test: update CircuitBreakerState to use .variable (#228) Updates test_error_recovery.py and test_health_monitoring.py to align with the BaseEnum interface by using `.variable` on CircuitBreakerState enum entries instead of `.value` or string literals. Also removed the `# FIX:` comments regarding this change. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * ⚡ perf: Optimize Provider membership check using tuple (#218) * perf: use tuple instead of list for enum membership check Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(di): correctly resolve Union[None] type to None Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(di): properly handle NoneType inside Union checking Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * ⚡ perf: optimize membership check in _check_profile using set (#220) * perf: optimize membership check in _check_profile by using set instead of list Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * ci: add Copilot to allowed_bots in claude-code-action Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: namespace conflict preventing initialization when Fastembed provider enabled * 🧪 Add unit tests for DiscoveredFile absolute_path property (#215) * test(core): add unit tests for DiscoveredFile.absolute_path Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(ci): add allowed_bots and allowed_non_write_users to PR review comment job Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(ci): add allowed_bots and allowed_non_write_users to PR review comment job Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(ci): add allowed_bots to Issue Assigned job Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(ci): add allowed bots to all jobs Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: handle missing optional imports safely in Python 3.14t and 3.13t Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: correctly handle ImportError in Python 3.14t for `uuid_extensions` Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * ⚡ Optimize list membership check to set for HTML tags (#216) * perf: Optimize membership check for HTML block tags by using set literal Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix(di): allow type(None) in `_get_signature_and_hints` on Python 3.13 Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: restore duckduckgo types and handle telemetry safely Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * perf: Optimize membership check for HTML block tags by using set literal Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: feature gating for duck duck go * Fix mock_provider_lazy configuration in integration tests (#232) * tests: fix mock_provider_lazy configuration in client factory integration tests Added missing `__name__` and `return_value` assignments to `mock_provider_lazy` in Qdrant provider integration tests. This ensures the mocks are consistent with how they are used by the provider factory and matches the pattern used for other providers in the same test file. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * refactor: consolidate mock_provider_lazy setup and improve comments - Implemented `make_lazy_provider_mock` helper to centralize mock configuration. - Replaced brittle line-number comments with behavioral descriptions. - Updated all Voyage and Qdrant provider tests to use the new helper. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * perf(cli): optimize membership check in index command (#234) Changed list membership check to a set to leverage Python's constant-folded frozenset optimization. This provides O(1) lookup time instead of O(n) and avoids list creation at runtime. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * 🧪 test: add coverage for force shutdown handler (#217) * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Also added Copilot to allowed_bots and allowed_non_write_users in `.github/workflows/claude.yml` to prevent CI failures. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Also fixed Copilot permissions in `.github/workflows/claude.yml` to resolve CI failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Also fixed Copilot permissions in `.github/workflows/claude.yml` to resolve CI failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add coverage for force shutdown conditional branches Added comprehensive unit tests for `_setup_signal_handler` in `src/codeweaver/main.py` to cover conditional logic within the `force_shutdown_handler` closure. The tests verify correct behavior for initial and subsequent SIGINT interruptions, as well as standard error handling upon signal registration failure. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: integration test failures * 🧪 test: Add unit tests for get_version fallback mechanisms (#219) * test: Add tests for `get_version` function Added comprehensive unit tests for `get_version` in `tests/unit/test_init.py`. The tests verify that all mechanisms to retrieve the package version function as intended: - Reading `codeweaver._version.__version__` - Using `importlib.metadata.version` - Falling back to `git describe` - Handling missing `git` command - Handling broader unexpected exceptions All fallback scenarios now properly ensure the code returns the default `0.0.0` string or the valid version. No functional code was changed, only new tests were introduced. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * test: Add tests for `get_version` function Added unit tests for `get_version` in `tests/unit/test_init.py`. The tests verify that all mechanisms to retrieve the package version function as intended: - Reading `codeweaver._version.__version__` - Using `importlib.metadata.version` - Falling back to `git describe` - Handling missing `git` command - Handling broader unexpected exceptions Uses `monkeypatch` safely by keeping original references to avoid polluting the global namespace and Pytest internal packages. No functional code changes. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: Add tests for `get_version` function Added comprehensive unit tests for `get_version` in `tests/unit/test_init.py`. The tests verify that all mechanisms to retrieve the package version function as intended: - Reading `codeweaver._version.__version__` - Using `importlib.metadata.version` - Falling back to `git describe` - Handling missing `git` command - Handling broader unexpected exceptions Uses `monkeypatch` safely by keeping original references to avoid polluting the global namespace and Pytest internal packages. No functional code changes. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: Add tests for `get_version` function Added comprehensive unit tests for `get_version` in `tests/unit/test_init.py`. The tests verify that all mechanisms to retrieve the package version function as intended: - Reading `codeweaver._version.__version__` - Using `importlib.metadata.version` - Falling back to `git describe` - Handling missing `git` command - Handling broader unexpected exceptions Uses `monkeypatch` safely by keeping original references to avoid polluting the global namespace and Pytest internal packages. No functional code changes. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * test: add robust coverage for get_version fallbacks Adds comprehensive tests for `codeweaver.get_version()` in `tests/unit/test_init.py`. Properly mocks the module import mechanisms, importlib.metadata, and git subprocess calls to ensure all fallback paths (file -> metadata -> git -> default) are tested. Addresses PR feedback by isolating the `_original_version` scope and adding explanatory comments about module reloading requirements during tests. Removes `test_investigate.py`. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * fix: spdx information --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * 🔒 Replace insecure pickle with JSON for node types cache (#233) * 🔒 Replace insecure pickle with JSON for node types cache Mitigate insecure deserialization vulnerability by switching the tree-sitter node types cache from pickle to JSON. - Updated scripts/build/preprocess-node-types.py to serialize cache to JSON. - Updated src/codeweaver/semantic/node_type_parser.py to load and validate the JSON cache using pydantic.TypeAdapter. - Corrected build and CI artifact paths in mise.dev.toml. - Updated documentation in src/codeweaver/semantic/data/__init__.py. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * 🔒 Switch node types cache to JSON and fix CI issues - Switch tree-sitter node types cache from pickle to JSON to mitigate insecure deserialization (S301). - Use Pydantic's TypeAdapter for safe validation and loading. - Fix CI failures on Python 3.14 by using the project's internal uuid7 utility instead of uuid_extensions. - Clean up classification_result during cache loading to ensure fresh recomputation. - Correct artifact paths in mise.dev.toml and documentation. Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding 'Unused import' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * Fix JSON node types cache: commit missing file and repair union deserialization (#235) * Initial plan * Fix JSON cache loading: resolve connection union, fix type errors, extract helper methods, add cache file Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Address code review: clarify noqa comment, improve circular-import doc, simplify adapter guard Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: uuid7 generator resolution * fix: correct uuid7 timestamp handling * fix: Remove "has_package() is None" checks; has_package returns a boolean. * fix: test_init tests bypassing themselves * Initial plan * 🔒 fix: security hardening for DI container eval - remove type builtin, consistent None returns, test improvements Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * 🔒 fix: security hardening for DI container eval - remove type builtin, consistent None returns, test improvements Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> * 🔒 fix: security hardening for DI container eval - remove type builtin, consistent None returns, test improvements, fix pre-existing lint issues Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Adam Poulemanos <adam@knit.li> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --------- Signed-off-by: Adam Poulemanos <89049923+bashandbone@users.noreply.github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/model_data/mteb_to_codeweaver.pywas partially implemented with several ruff F821 (undefined name) errors preventing it from running.Fixes
KNOWN_ALIASESundefined —RootJson.aliasescomputed property referencedKNOWN_ALIASESbut it was never defined. Added definition built fromOLLAMA_ALIASES:Init block accidentally stringified — The if/else block that defines
_ROOT,DATA,MODEL_MAP_DATA,ALIAS_MAP_DATA, andFLATTENED_ALIASESwas wrapped in triple quotes, making it a no-op string literal instead of executable code. Restored as properif JSON_CACHE.exists() / elseblock. Also dropped staleSPARSE_MODELSreference — that field no longer exists onRootJson.Broken codeweaver imports — Both imports pointed to non-existent re-export locations:
from codeweaver.core import Provider→from codeweaver.providers.provider import Providerfrom codeweaver.providers import PartialCapabilities→from codeweaver.providers.embedding.capabilities.types import PartialCapabilitiesWrong
sys.path.insertdepth — Was insertingscripts/(one level too shallow for thesrc/layout), fixed toPath(__file__).parent.parent.parent / "src".Supporting files
Created the
scripts/model_data/directory with the required data files the script depends on:secondary_providers.json, a minimalhf-models.json, and their REUSE license files.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.