~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
ci: stabilize dependency validation and split coupled updates (#8006)
LearningCircuit2fa84027ab39
diff --git a/.github/dependabot.yml b/.github/dependabot.ymlindex fb684f27ac..c676fc156f 100644--- a/.github/dependabot.yml+++ b/.github/dependabot.yml@@ -8,8 +8,15 @@ updates:# Keep pip-compile locks out of mixed pyproject/plain-requirements updates,# which can select an updater that does not regenerate these lockfiles.exclude-paths:+ - "requirements/bandit.*"- "requirements/ci-health.*"+ - "requirements/dependency-review.txt"- "requirements/gitleaks-tests.*"+ - "requirements/mcp-extra.*"+ - "requirements/pre-commit-update.*"+ - "requirements/semgrep.*"+ - "requirements/towncrier.*"+ - "requirements/twine.*"# Reviewed by hand together with scripts/refresh_pip_urllib3.py, which# looks for these exact wheel names; an automatic bump breaks the build.- "requirements/pip-vendor-refresh.txt"@@ -78,10 +85,43 @@ updates:commit-message:prefix: "chore"include: "scope"- # One PR per weekly run for every minor/patch bump and one for security fixes,- # instead of one PR per dependency. Majors stay individual PRs so each- # breaking upgrade is reviewed on its own.+ # Keep the MCP extra and its application-shared bounds together. Changes+ # to those bounds need application review without holding up other tools.+ # Other minor/patch updates share one group; majors remain individual.groups:+ mcp-runtime-minor-and-patch:+ applies-to: version-updates+ patterns:+ - "mcp"+ - "pyjwt"+ - "certifi"+ - "click"+ - "cryptography"+ - "httpx"+ - "pydantic-settings"+ - "pydantic"+ - "python-multipart"+ - "rich"+ - "starlette"+ - "uvicorn"+ update-types:+ - "minor"+ - "patch"+ mcp-runtime-security:+ applies-to: security-updates+ patterns:+ - "mcp"+ - "pyjwt"+ - "certifi"+ - "click"+ - "cryptography"+ - "httpx"+ - "pydantic-settings"+ - "pydantic"+ - "python-multipart"+ - "rich"+ - "starlette"+ - "uvicorn"requirements-minor-and-patch:applies-to: version-updatespatterns:@@ -127,6 +167,19 @@ updates:patterns:- "vitest"- "@vitest/*"+ # The Markdown renderer, extension and KaTeX have coupled peer ranges.+ # Keep their major and minor changes together, apart from other UI deps.+ math-rendering:+ patterns:+ - "marked"+ - "marked-katex-extension"+ - "katex"+ math-rendering-security:+ applies-to: security-updates+ patterns:+ - "marked"+ - "marked-katex-extension"+ - "katex"frontend-minor-and-patch:applies-to: version-updatespatterns:diff --git a/.github/labels.yml b/.github/labels.ymlindex e5fc764d24..c944c8feb5 100644--- a/.github/labels.yml+++ b/.github/labels.yml@@ -1,4 +1,5 @@# Automation-relevant labels managed by .github/workflows/labels-sync.yml.+# Descriptions use BMP characters supported by the pinned synchronizer.# This file is additive: labels not listed here are left untouched.# PR author classification (applied by .github/workflows/pr-triage.yml).@@ -29,22 +30,22 @@# too. Neither source is exclusive.- name: github-actionscolor: '1f2328'- description: 'Changes to GitHub Actions workflows. Release notes: 🔧 CI/CD & Maintenance (8/20).'+ description: 'Changes to GitHub Actions workflows. Release notes: CI/CD & Maintenance (8/20).'- name: ci-cdcolor: '57606a'- description: 'CI/CD pipeline, GitHub Actions, or build changes. Release notes: 🔧 CI/CD & Maintenance (8/20).'+ description: 'CI/CD pipeline, GitHub Actions, or build changes. Release notes: CI/CD & Maintenance (8/20).'- name: dockercolor: '2496ed'- description: 'Docker, containerization, or deployment changes. Release notes: 🐳 Docker (15/20).'+ description: 'Docker, containerization, or deployment changes. Release notes: Docker (15/20).'- name: documentationcolor: '0075ca'- description: 'Documentation changes. Release notes: 📚 Documentation (7/20).'+ description: 'Documentation changes. Release notes: Documentation (7/20).'- name: testscolor: 'bfe5bf'- description: 'Adds, updates, or fixes tests. Release notes: 🧪 Tests (priority 11/20).'+ description: 'Adds, updates, or fixes tests. Release notes: Tests (priority 11/20).'- name: databasecolor: '0e8a16'- description: 'Database schema, migration, or storage changes. Release notes: 🗄️ Database Changes (6/20).'+ description: 'Database schema, migration, or storage changes. Release notes: Database Changes (6/20).'- name: configurationcolor: 'd4c5f9'description: 'Configuration or settings changes. Release notes: ⚙️ Configuration (priority 12/20).'@@ -53,22 +54,22 @@description: 'Updates project dependencies (packages, libraries). Release notes: ⬆️ Dependencies (9/20).'- name: researchcolor: '0e8a16'- description: 'Research functionality changes. Release notes: 🔍 Research Features (16/20).'+ description: 'Research functionality changes. Release notes: Research Features (16/20).'- name: pythoncolor: '3572a5'- description: 'Python code changes. Release notes: 🐍 Python Changes (priority 13/20).'+ description: 'Python code changes. Release notes: Python Changes (priority 13/20).'- name: javascriptcolor: 'f1e05a'- description: 'JavaScript code changes (.js/.mjs). Release notes: 🎨 Frontend Changes (14/20).'+ description: 'JavaScript code changes (.js/.mjs). Release notes: Frontend Changes (14/20).'- name: csscolor: 'fbb6c4'- description: 'CSS and styling changes. Release notes: 🎨 Frontend Changes (14/20).'+ description: 'CSS and styling changes. Release notes: Frontend Changes (14/20).'# Semantic PR labels the AI reviewer may apply. The authoritative allowlist is# .github/ai-review-label-policy.json; unknown model suggestions are rejected.- name: accessibilitycolor: 'a8c5e1'- description: 'Accessibility improvements (a11y). Release notes: 🎨 Frontend Changes (14/20).'+ description: 'Accessibility improvements (a11y). Release notes: Frontend Changes (14/20).'- name: apicolor: '0366d6'description: API routes, request/response contracts, or client-facing API behavior.@@ -77,19 +78,19 @@description: Change may affect runtime performance; a compare_configurations() benchmark run is wanted.- name: breaking-changecolor: 'a01441'- description: 'Introduces breaking API change requiring user action. Release notes: 💥 Breaking Changes (2/20).'+ description: 'Introduces breaking API change requiring user action. Release notes: Breaking Changes (2/20).'- name: bugfixcolor: 'f8b4b4'- description: 'Fix for a reported bug (PR-only). Release notes: 🐛 Bug Fixes (4/20).'+ description: 'Fix for a reported bug (PR-only). Release notes: Bug Fixes (4/20).'- name: code-qualitycolor: '0366d6'- description: 'Readability, maintainability, or robustness work. Release notes: 🧹 Code Quality (10/20).'+ description: 'Readability, maintainability, or robustness work. Release notes: Code Quality (10/20).'- name: critical-changescolor: 'a01441'- description: 'Changes to critical system components. Release notes: 💥 Breaking Changes (2/20).'+ description: 'Changes to critical system components. Release notes: Breaking Changes (2/20).'- name: developer-experiencecolor: '7057ff'- description: 'Improvements to developer workflow, tooling, or DX. Release notes: 🧹 Code Quality (10/20).'+ description: 'Improvements to developer workflow, tooling, or DX. Release notes: Code Quality (10/20).'- name: enhancementcolor: 'a2eeef'description: 'Improvement to an existing feature. Release notes: ✨ New Features (priority 3/20).'@@ -104,10 +105,10 @@description: LLM provider integrations, response compatibility, model discovery, or provider configuration.- name: maintenancecolor: 'afb8c1'- description: 'Repo maintenance, tooling updates, or non-functional changes. Release notes: 🔧 CI/CD (8/20).'+ description: 'Repo maintenance, tooling updates, or non-functional changes. Release notes: CI/CD (8/20).'- name: metricscolor: '0e8a16'- description: 'Metrics, monitoring, or analytics changes. Release notes: 📊 Metrics & Analytics (17/20).'+ description: 'Metrics, monitoring, or analytics changes. Release notes: Metrics & Analytics (17/20).'- name: newscolor: '0366d6'description: News search, subscriptions, scheduling, or news user interfaces.@@ -122,28 +123,28 @@description: Retrieval, indexing, embeddings, vector stores, or retrieval-augmented generation.- name: refactoringcolor: '0e8a16'- description: 'Code restructuring without changing behavior. Release notes: 🧹 Code Quality (10/20).'+ description: 'Code restructuring without changing behavior. Release notes: Code Quality (10/20).'- name: research-qualitycolor: '5319e7'- description: 'Improvements to research output quality. Release notes: 🔍 Research Features (16/20).'+ description: 'Improvements to research output quality. Release notes: Research Features (16/20).'- name: research-speedcolor: '0e8a16'- description: 'Improvements to research execution speed. Release notes: 🔍 Research Features (16/20).'+ description: 'Improvements to research execution speed. Release notes: Research Features (16/20).'- name: securitycolor: 'd73a4a'- description: 'Security fix or hardening. Release notes: 🔒 Security Updates (1/20, highest precedence).'+ description: 'Security fix or hardening. Release notes: Security Updates (1/20, highest precedence).'- name: snappycolor: '00d084'- description: 'UI/UX responsiveness and app feel. Release notes: 🎨 Frontend Changes (14/20).'+ description: 'UI/UX responsiveness and app feel. Release notes: Frontend Changes (14/20).'- name: technical-debtcolor: 'fbca04'- description: 'Addresses accumulated technical debt. Release notes: 🧹 Code Quality (10/20).'+ description: 'Addresses accumulated technical debt. Release notes: Code Quality (10/20).'- name: ui-uxcolor: 'f9c4d2'- description: 'User interface or user experience improvements. Release notes: 🎨 Frontend Changes (14/20).'+ description: 'User interface or user experience improvements. Release notes: Frontend Changes (14/20).'- name: visualizationcolor: '1d76db'- description: 'Data visualization or chart changes. Release notes: 🎨 Frontend Changes (14/20).'+ description: 'Data visualization or chart changes. Release notes: Frontend Changes (14/20).'# AI-reviewer recommendations for opt-in, resource-intensive checks. The# reviewer lists these in its review and a maintainer applies the label,@@ -185,7 +186,7 @@# check and the three path labels above; it does not apply this label.- name: security-review-neededcolor: 'ededed'- description: 'Requires security review before merge. Release notes: 🚧 Review & Blocked Items (19/20).'+ description: 'Requires security review before merge. Release notes: Review & Blocked Items (19/20).'# Workflow/control labels. These are deliberately excluded from the AI# reviewer's output allowlist.@@ -197,22 +198,22 @@description: 'Preliminary readiness. Not human-verified; re-check before code-ready.'- name: ai_code_reviewcolor: '6f42c1'- description: 'Maintainer-only: apply or re-add to run AI code review. Release notes: 🔄 Automation (18/20).'+ description: 'Maintainer-only: apply or re-add to run AI code review. Release notes: Automation (18/20).'- name: automationcolor: '8b949e'- description: 'Automation or scripting changes. Release notes: 🔄 Branch Syncs & Automation (18/20).'+ description: 'Automation or scripting changes. Release notes: Branch Syncs & Automation (18/20).'- name: synccolor: 'ededed'- description: 'Branch synchronization PR. Release notes: 🔄 Branch Syncs & Automation (18/20).'+ description: 'Branch synchronization PR. Release notes: Branch Syncs & Automation (18/20).'- name: auto-mergecolor: 'ededed'- description: 'PR approved for automatic merging. Release notes: 🔄 Automation (18/20).'+ description: 'PR approved for automatic merging. Release notes: Automation (18/20).'- name: merge-blockedcolor: 'ededed'- description: 'PR is blocked from merging. Release notes: 🚧 Review & Blocked Items (19/20).'+ description: 'PR is blocked from merging. Release notes: Review & Blocked Items (19/20).'- name: conflictscolor: 'ededed'- description: 'PR has merge conflicts needing resolution. Release notes: 🚧 Review & Blocked Items (19/20).'+ description: 'PR has merge conflicts needing resolution. Release notes: Review & Blocked Items (19/20).'# Legacy names retained for historical issues and PRs. The AI policy maps them# to the canonical PR label and never applies the legacy name to new PRs.diff --git a/.github/workflows/README.md b/.github/workflows/README.mdindex cd90a382eb..5dcddb3212 100644--- a/.github/workflows/README.md+++ b/.github/workflows/README.md@@ -74,6 +74,13 @@ These requests use the existing suites, including their normal CI time and APIquota usage. Other npm directories retain their normal pytest, JavaScript,infrastructure, and accessibility checks.+The root pip updater owns the bootstrap requirements; focused tool inputs and+locks have a single owner in the `/requirements` updater. The MCP extra and+its application-shared bounds use a separate update group, as do the Markdown+renderer, KaTeX extension, and KaTeX. This keeps compatibility reviews scoped+while unrelated updates proceed. Matching groups also cover security updates.+Application bounds and the scanner review checks remain part of validation.+## Update NPM Dependencies Workflow**File**: `update-npm-dependencies.yml`diff --git a/.github/workflows/mypy-type-check.yml b/.github/workflows/mypy-type-check.ymlindex c1f23f81dc..b288602708 100644--- a/.github/workflows/mypy-type-check.yml+++ b/.github/workflows/mypy-type-check.yml@@ -43,7 +43,7 @@ jobs:- name: Install PDMrun: |- pip install pdm==2.26.2+ python -m pip install --require-hashes --only-binary=:all: -r requirements/bootstrap-ci.txt- name: Cache PDM dependenciesuses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0@@ -51,9 +51,9 @@ jobs:path: |~/.cache/pdm.venv- key: pdm-${{ runner.os }}-${{ hashFiles('pdm.lock') }}+ key: mypy-pdm-${{ runner.os }}-${{ hashFiles('requirements/bootstrap-ci.txt') }}-${{ hashFiles('pdm.lock') }}restore-keys: |- pdm-${{ runner.os }}-+ mypy-pdm-${{ runner.os }}-${{ hashFiles('requirements/bootstrap-ci.txt') }}-- name: Install project dependenciesrun: |diff --git a/requirements/README.md b/requirements/README.mdindex 581ce50420..89a3d84bad 100644--- a/requirements/README.md+++ b/requirements/README.md@@ -5,6 +5,10 @@ with SHA256 hashes. Regenerate `.in` files using the pip-tools command in theirheaders on Python 3.12, and review version and hash changes before committingthe input and export together. Installs use `--require-hashes`.+Mypy and Milvus use the existing `bootstrap-ci.txt` toolchain on Python 3.12.+The mypy environment cache includes the bootstrap hash so changes to that+toolchain cannot reuse an environment created by an older bootstrap.+Semgrep is pinned with `==` in `semgrep.in`, and`tests/ci/test_semgrep_workflow.py` checks that `semgrep.txt` locks the samerelease (and a PyJWT release satisfying the floor below). The report integritydiff --git a/requirements/bootstrap-ci.txt b/requirements/bootstrap-ci.txtindex 32caf85f9c..966a127e37 100644--- a/requirements/bootstrap-ci.txt+++ b/requirements/bootstrap-ci.txt@@ -18,7 +18,7 @@# Rotate by bumping the roots to the reviewed versions and regenerating;# a drifted mirror or wheel-tag makes the install FAIL loudly (by design).#-# Used by: .github/workflows/milvus-tests.yml - pip + pdm on the Python 3.12 runner.+# Used by: milvus-tests.yml and mypy-type-check.yml on Python 3.12 runners.anyio==4.15.1 \diff --git a/tests/ci/test_dependabot_config.py b/tests/ci/test_dependabot_config.pyindex 0e15dec1d0..d05448376d 100644--- a/tests/ci/test_dependabot_config.py+++ b/tests/ci/test_dependabot_config.py@@ -1,8 +1,10 @@"""Regression tests for bounded Dependabot PR generation."""import re+from fnmatch import fnmatchcasefrom pathlib import Path+from packaging.requirements import Requirementimport pytestimport yaml@@ -110,7 +112,7 @@ def _entries(ecosystem):[("/", "python"), ("/requirements", "requirements")],)def test_pip_minor_patch_and_security_updates_are_grouped(directory, prefix):- """Each pip directory gets one minor+patch PR and one security PR.+ """Pip updates retain catch-all groups after any coupled family.Majors are deliberately outside every version-updates group, so eachbreaking upgrade still arrives as its own PR.@@ -118,10 +120,16 @@ def test_pip_minor_patch_and_security_updates_are_grouped(directory, prefix):entry = next(entry for entry in _entries("pip") if entry["directory"] == directory)- assert list(entry["groups"]) == [+ expected = [f"{prefix}-minor-and-patch",f"{prefix}-security",]+ if directory == "/requirements":+ expected[:0] = [+ "mcp-runtime-minor-and-patch",+ "mcp-runtime-security",+ ]+ assert list(entry["groups"]) == expected_assert_group(entry,f"{prefix}-minor-and-patch",@@ -145,6 +153,94 @@ def test_pip_grouping_keeps_existing_filters():assert requirements["allow"] == [{"dependency-type": "all"}]+def test_requirements_files_have_one_update_owner():+ entries = _entries("pip")+ for path in sorted((REPO_ROOT / "requirements").iterdir()):+ if path.suffix not in {".in", ".txt"}:+ continue+ owners = []+ for entry in entries:+ directory = entry["directory"]+ base = REPO_ROOT / directory.lstrip("/")+ if not path.is_relative_to(base):+ continue+ relative = path.relative_to(base).as_posix()+ if not any(+ fnmatchcase(relative, pattern)+ for pattern in entry.get("exclude-paths", [])+ ):+ owners.append(directory)+ if path.name == "pip-vendor-refresh.txt":+ expected = []+ elif path.name.startswith("bootstrap-"):+ expected = ["/"]+ else:+ expected = ["/requirements"]+ assert owners == expected, (path.name, owners)+++def test_mcp_groups_follow_the_extra_and_application_bounds():+ requirements = next(+ entry+ for entry in _entries("pip")+ if entry["directory"] == "/requirements"+ )+ names = {+ Requirement(line).name.casefold().replace("_", "-")+ for line in (REPO_ROOT / "requirements/mcp-extra.in")+ .read_text()+ .splitlines()+ if line.strip() and not line.lstrip().startswith("#")+ }+ for name, kind in (+ ("mcp-runtime-minor-and-patch", "version-updates"),+ ("mcp-runtime-security", "security-updates"),+ ):+ group = requirements["groups"][name]+ assert group["applies-to"] == kind+ assert set(group["patterns"]) == names+ for dependency in names:+ matching = [+ key+ for key, candidate in requirements["groups"].items()+ if candidate.get("applies-to", "version-updates") == kind+ and any(+ _glob_matches(pattern, dependency)+ for pattern in candidate["patterns"]+ )+ ]+ assert matching[0] == name, (dependency, matching)+ assert requirements["groups"]["mcp-runtime-minor-and-patch"][+ "update-types"+ ] == ["minor", "patch"]+++def test_math_rendering_peers_are_grouped_before_other_frontend_updates():+ root = next(+ entry for entry in _npm_entries() if entry.get("directory") == "/"+ )+ peers = {"marked", "marked-katex-extension", "katex"}+ for name, kind in (+ ("math-rendering", "version-updates"),+ ("math-rendering-security", "security-updates"),+ ):+ group = root["groups"][name]+ assert group.get("applies-to", "version-updates") == kind+ assert set(group["patterns"]) == peers+ assert "update-types" not in group+ for dependency in peers:+ matching = [+ key+ for key, candidate in root["groups"].items()+ if candidate.get("applies-to", "version-updates") == kind+ and any(+ _glob_matches(pattern, dependency)+ for pattern in candidate["patterns"]+ )+ ]+ assert matching[0] == name, (dependency, matching)++def test_github_actions_are_grouped_behind_codeql_lockstep_groups():"""Every action update lands in one PR; codeql-action keeps its own.@@ -451,7 +547,7 @@ def test_guard_accepts_orderings_that_hide_nothing(groups):assert _hidden_groups({"groups": groups}) == []-def test_guard_flags_the_real_vitest_groups_moved_below_the_wildcards():+def test_guard_flags_real_specific_groups_moved_below_the_wildcards():"""The guard bites on this repository's own groups, not only stand-ins."""root = next(entry for entry in _npm_entries() if entry.get("directory") == "/"@@ -459,6 +555,11 @@ def test_guard_flags_the_real_vitest_groups_moved_below_the_wildcards():reversed_groups = dict(reversed(list(root["groups"].items())))assert _hidden_groups(root) == []+ expected = {+ name+ for name, group in root["groups"].items()+ if group["patterns"] != ["*"]+ }assert {later for _, later, _ in _hidden_groups({"groups": reversed_groups})- } == {"vitest", "vitest-security"}+ } == expecteddiff --git a/tests/ci/test_label_workflow_contracts.py b/tests/ci/test_label_workflow_contracts.pyindex c83167ce80..a2eca8454f 100644--- a/tests/ci/test_label_workflow_contracts.py+++ b/tests/ci/test_label_workflow_contracts.py@@ -98,6 +98,9 @@ def test_label_catalog_is_valid_and_has_no_placeholder_descriptions():assert re.fullmatch(r"[0-9a-fA-F]{6}", entry["color"]), nameassert entry["description"].strip(), nameassert len(entry["description"]) <= 100, name+ assert all(ord(char) <= 0xFFFF for char in entry["description"]), (+ f"{name}: the pinned label synchronizer rejects non-BMP descriptions"+ )assert entry["description"] != "Auto-created by AI reviewer", namediff --git a/tests/ci/test_package_installer_bootstrap.py b/tests/ci/test_package_installer_bootstrap.pyindex 21cf0b5144..351af9c3cb 100644--- a/tests/ci/test_package_installer_bootstrap.py+++ b/tests/ci/test_package_installer_bootstrap.py@@ -112,14 +112,17 @@ def test_dockerfile_hash_checked_installs_enforce_wheels_only():assert "--only-binary=:all:" in arguments-def test_milvus_bootstrap_install_enforces_wheels_only():- """The milvus CI bootstrap install is wheels-only for the same reason.+ "workflow_name", ["milvus-tests.yml", "mypy-type-check.yml"]+)+def test_ci_bootstrap_install_enforces_wheels_only(workflow_name):+ """CI bootstrap consumers preserve the lock's wheel-only contract.The revert this catches: dropping ``--only-binary=:all:`` from the- ``requirements/bootstrap-ci.txt`` install in milvus-tests.yml.+ ``requirements/bootstrap-ci.txt`` installs in CI workflows."""workflow = yaml.safe_load(- (ROOT / ".github/workflows/milvus-tests.yml").read_text()+ (ROOT / ".github/workflows" / workflow_name).read_text())scripts = [step["run"]