Merge mit-base-salvage into test without extension source#251
Merged
Conversation
Add retrieval benchmark harness and A/B config support
Fix collection
…se” collection
- watch_index_core/utils.py
* treat per-repo state entries that point at placeholder collections (codebase,
etc.) as invalid in multi-repo mode, derive the correct collection via
get_collection_name, and persist the repaired mapping back to state
- workspace_state.py
* stop auto-populating serving_collection from qdrant_collection when
multi-repo is enabled and staging is off, and never propagate placeholder
collection names into serving_collection
- tests/test_watcher_collection_resolution.py
* add regression test ensuring stale state.json values (codebase) are ignored
for per-repo routing in multi-repo mode
Regression fixes: Per repo fixes
…yments Reverts 4ec4208. The hardcoded allowed_hosts whitelist breaks: - ctx-mcp-bridge (primary extension access pattern) - K8s deployments (LAN IPs, internal DNS) - Any custom domain deployment If host validation is needed, it should be opt-in via env var (auth already exists).
Revert TransportSecuritySettings - breaks bridge and non-Docker deployments
Updated both mcp_indexer_server.py and mcp_memory_server.py to disable DNS rebinding protection in FastMCP by setting transport_security=TransportSecuritySettings(enable_dns_rebinding_protection=False). This change is necessary to allow proper internal networking when running the servers inside Docker containers.
Updated both Dockerfile and Dockerfile.mcp to explicitly pin mcp to 1.17.0 and fastmcp to 2.12.4 for consistency across services and alignment with requirements.txt. This ensures reproducible builds and avoids issues from unintentional upgrades.
Update environment variable definitions to use the ${VAR:-} syntax, ensuring variables are inherited from .env files rather than the host shell. This change improves consistency and reliability when configuring chunking and lexical vector settings across services.
Fix env var inheritance in docker-compose.yml
Updated both Dockerfile and Dockerfile.mcp to install Python dependencies from a shared requirements.txt file for improved consistency and maintainability across services.
Disable DNS rebinding protection for FastMCP in Docker
Removed default value '0' for PATTERN_VECTORS and added missing PATTERN_VECTORS variable in one service. Standardized environment variable definitions to use '${VAR:-}' for proper .env inheritance, and added missing default fallbacks for several variables.
Introduces scripts/refrag_openai.py, providing an OpenAI-based adapter for decoder-side ReFRAG operations. Updates requirements.txt to require openai>=2.11.0. Modifies context_answer.py and query_expand.py to support OpenAI as a runtime, including auto-detection via OPENAI_API_KEY and proper client instantiation. Decoder availability checks and prompt handling are updated to accommodate the new OpenAI integration.
Update environment variable defaults in docker-compose.yml
Autodetect of REFRAG_RUNTIME is now opt-in via REFRAG_RUNTIME_AUTODETECT to prevent unintended API calls. Query expansion prompts for OpenAI and GLM now require a JSON object with a 'queries' key. Added an async variant generate_pseudo_tags_batch_async to refrag_openai.py and improved event loop handling for batch pseudo tag generation.
Updated .env.example and CONFIGURATION.md to add OpenAI as a supported decoder backend, document new environment variables for OpenAI integration, and clarify runtime selection with an opt-in auto-detection mechanism. Expanded documentation for decoder configuration and query expansion to reflect these changes.
Matches 1793a46 pattern: detect running loop and use ThreadPoolExecutor to avoid RuntimeError when generate_pseudo_tags_batch is called from async context (e.g., FastMCP server handlers).
Eliminated the REFRAG_RUNTIME_AUTODETECT environment variable and all related auto-detection logic from configuration, documentation, and code. The decoder runtime must now be set explicitly, defaulting to 'llamacpp' if unset, to prevent unintended API calls.
…ngine into open-ai-support
Add OpenAI adapter and runtime support for ReFRAG
Introduces scripts and modules for running CoIR and CoSQA code search benchmarks, including dataset handling, indexing, and evaluation runners. Updates requirements.txt to include the coir-eval package for benchmarking. Also adds Context-Engine retriever adapters and utilities for Qdrant-based evaluation.
The indexer now enriches code snippets with AST-extracted symbols, imports, and calls, improving both embedding and lexical vector quality. The runner script's documentation is updated to reflect new Context-Engine features, including hybrid search, reranking, and query expansion, and adds environment variable controls for these features. Baseline MRR values are updated to match the latest CoSQA+ paper.
Refactored fallback functions in indexer.py to clarify unused arguments and added noqa comments. Updated and expanded baseline MRR comments in runner.py for clarity, added context on expected performance, and passed the 'mode' parameter to repo_search in search_cosqa_corpus.
Introduces a new benchmarking suite for evaluating file retrieval performance on the SWE-bench dataset. Adds dataset loading, repository management, and a runner script to measure recall, precision, and other retrieval metrics for Context-Engine, supporting both lite and full subsets.
Fix ingest metadata TS config import order
- Refactored extension.js from 1,416 to ~590 lines (~58% reduction).
- Extracted cohesive logic into dedicated managers using a factory pattern:
- python_env.js: Python interpreter and venv management.
- process_manager.js: Spawning, tracking, and terminating child processes.
- config_resolver.js: Path resolution and configuration logic.
- commands.js: Centralized vscode command registration.
- Sign out if auth on and local session exists
- onboarding.js: Workspace setup and onboarding flow logic.
- Consolidated all path logic into config_resolver.js and deleted workspace_paths.js.
- Cleaned up orphaned global variables and redundant delegator functions.
(cherry picked from commit d2b85d9)
- auth_utils.js: Convert checkAuthStatus to async (use spawn instead of spawnSync to avoid blocking UI thread), fix logout to show error when endpoint not configured, add proper type checking for getEffectiveConfig
- commands.js: Fix uploadGitHistory command to use uploadGitHistory' mode instead of 'force' (was duplicate behavior), deduplicate auth command error handling with resolveEndpointOrThrow helper
- config_resolver.js: Fix startWatchAfterForce default value - VSCode's
config.get() ignores second parameter, use nullish coalescing instead
- extension.js: Add spawn and log to sidebar dependencies, remove unused checkAuthStatus import
- onboarding.js: Add .catch() handler to executeCommand call to prevent unhandled promise rejections
- process_manager.js: Fix double-resolve race condition in execAsync cancellation (add finished flag), fix path containment check to use path.relative instead of startsWith (prevents false positives from sibling directories), fix _hasLoggedBuildEnv flag to actually be set
- python_env.js: Fix error handling to safely convert non-Error thrown values to strings (prevent crashes), fix double-resolve in execAsync
- sidebar.js: Convert getCachedAuthLoggedIn to async (uses async
checkAuthStatus), add workspace path to cache key for per-workspace caching, add proper error handling, remove spawnSync import
(cherry picked from commit ca8a97b)
(cherry picked from commit 5361664)
(cherry picked from commit 48aa4ce)
(cherry picked from commit 5db44bb)
(cherry picked from commit fc2af57)
(cherry picked from commit c108682)
Distinguish between transient MCP transport errors (recoverable via reinit) and terminal backend auth rejections. When a true auth failure is detected (e.g., "Invalid or expired session"), mark the local session as expired (set expiresAt: 1). This ensures the sidebar correctly shows "Sign In" immediately upon rejection, while preserving the backend URL for seamless re-authentication. (cherry picked from commit 1b016fc)
(cherry picked from commit 5d0d309)
…bility - Fix ReferenceError in mcpServer.js by correctly passing backendHint. - Add missing activation event for Antigravity MCP config command. - Standardize stdout/stderr string conversion in process manager. - Improve defensive error handling for child processes. - Refactor watch cleanup logic and remove duplicate notifications. (cherry picked from commit 73be4ba)
… and tighten git-history/auth behavior - Rewire uploadGitHistory so the command runs the dedicated mode and passes REMOTE_UPLOAD_GIT_FORCE only when requested, ensuring the python clients emit git_history.json without starting watch mode afterward. - Restore the prior targetPath inference fallback so status bar/tooling stay stable even when auto-detect can’t read the workspace folder. - Tighten auth gating (state must be 'ok'), slow sidebar refresh churn, and make command registration degrade gracefully instead of throwing during activation when optional managers fail. - Harden MCP bridge routing by only sending known memory-prefixed tools to the memory client. (cherry picked from commit 64ec362)
…ta everywhere (cherry picked from commit 078d373)
- Conditionally load cached paths only on deletion events (performance) - Use requireDep pattern for safer config access in commands.js - Normalize error values before logging in process_manager.js - Validate gitMaxCommits >= 0 (allow 0 for disable, reject negative) - Filter onDidChangeTextDocument for file:// URIs only (cherry picked from commit 28a0dbe)
…oad clients - for windows specifically (antivirus, etc) (cherry picked from commit 74ceb16)
…ror handling Critical fixes: - Normalize watchdog event_type to lowercase (was checking uppercase, never matched) - Wrap configResolver init in try/catch to prevent extension activation failures Diagnostics & robustness: - Capture stderr for any non-zero auth exit (not just error state) - Add dependency validation for clearer initialization errors - Fix misleading error message in settings reading - Clarify derivedHostRoot edge case handling (cherry picked from commit 770d0e4)
…bridge detection - Export readConfig for use in mcpServer - Resolve auth backend dynamically by matching indexer/memory URL hostnames - Strip internal container_path from bridge search results - Add probeBridgeAlive to detect externally running bridge processes - Suppress auto-install prompts for auto-detected Python interpreters - Add MCP config watchers for antigravity, server mode, and bridge settings (cherry picked from commit 653efee)
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
mit-base-salvagefork intotestREADME.md.envValidation
git diff --check✅python3 -m compileall scripts✅node_modulesis not present in the clean worktree and no dependency install was performedNotes
origin/testafter the earlier branch was based onorigin/maintest(the actual default branch)Pull Request opened by Augment Code with guidance from the PR author