~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: remove 3 redundant/broken workflows (round 2) (#2087)
LearningCircuit4ed28f7da713
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERSindex 8c80bc0031..ba9988c4b5 100644--- a/.github/CODEOWNERS+++ b/.github/CODEOWNERS@@ -53,7 +53,6 @@# Test workflows (excluding security-tests.yml)/.github/workflows/tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti-/.github/workflows/accessibility-compliance-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti/.github/workflows/api-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti/.github/workflows/critical-ui-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti/.github/workflows/extended-ui-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti@@ -64,7 +63,6 @@/.github/workflows/metrics-analytics-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti/.github/workflows/mobile-ui-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti/.github/workflows/news-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti-/.github/workflows/performance-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti/.github/workflows/ui-tests.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpetti/.github/workflows/fuzz.yml @scottvr @tombii @prashant-sharma-cmd @shreydekate @LearningCircuit @hashedviking @djpettidiff --git a/.github/workflows/accessibility-compliance-tests.yml b/.github/workflows/accessibility-compliance-tests.ymldeleted file mode 100644index 9e995414ea..0000000000--- a/.github/workflows/accessibility-compliance-tests.yml+++ /dev/null@@ -1,83 +0,0 @@-name: Accessibility Tests--on:- pull_request:- branches: [ main, dev, develop ]- workflow_dispatch:--permissions:- contents: read--jobs:- accessibility-tests:- runs-on: ubuntu-latest- timeout-minutes: 20-- steps:- - name: Harden the runner (Audit all outbound calls)- uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1- with:- egress-policy: audit-- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2-- with:- persist-credentials: false-- - name: Set up PDM- uses: pdm-project/setup-pdm@94a823180e06fcde4ad29308721954a521c96ed0 # v4- with:- python-version: '3.11'-- - name: Cache pip packages- uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2- with:- path: ~/.cache/pip- key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}- restore-keys: |- ${{ runner.os }}-pip--- - name: Install system dependencies for SQLCipher- run: |- sudo apt-get update- sudo apt-get install -y libsqlcipher-dev-- - name: Install Python dependencies- run: |- pdm sync -d-- - name: Run accessibility compliance tests- run: |- # Run all accessibility tests- pdm run pytest tests/accessibility/ -v --tb=short || true-- # Run specific accessibility test files that exist- pdm run pytest tests/ui_tests/test_accessibility_compliance.py -v --tb=short || true- pdm run pytest tests/ui_tests/test_wcag_compliance.py -v --tb=short || true- pdm run pytest tests/ui_tests/test_keyboard_navigation.py -v --tb=short || true- pdm run pytest tests/ui_tests/test_screen_reader.py -v --tb=short || true-- # Run HTML structure tests that may contain accessibility checks- pdm run pytest tests/test_html_structure.py -v --tb=short || true-- - name: Generate accessibility report- if: always()- run: |- echo "Accessibility Tests Report"- echo "=========================="- echo "Tests check for:"- echo "- WCAG 2.1 Level AA compliance"- echo "- Keyboard navigation support"- echo "- Screen reader compatibility"- echo "- Color contrast ratios"- echo "- ARIA labels and roles"- echo "- Focus management"-- - name: Upload accessibility test results- if: failure()- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0- with:- name: accessibility-test-results- path: |- tests/accessibility/- .pytest_cache/diff --git a/.github/workflows/check-css-classes.yml b/.github/workflows/check-css-classes.ymldeleted file mode 100644index 8d9aa892dd..0000000000--- a/.github/workflows/check-css-classes.yml+++ /dev/null@@ -1,179 +0,0 @@-name: Check CSS Class Naming--on:- pull_request:- branches: [main, develop]- paths:- - "src/local_deep_research/web/**/*.html"- - "src/local_deep_research/web/**/*.css"- - "src/local_deep_research/web/**/*.js"- - ".pre-commit-hooks/check-css-class-prefix.py"- workflow_dispatch: # Allow manual triggering--permissions:- contents: read- pull-requests: write--jobs:- check-css-classes:- name: Check CSS Class Prefixes- runs-on: ubuntu-latest-- steps:- - name: Harden the runner (Audit all outbound calls)- uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1- with:- egress-policy: audit-- - name: Checkout repository- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2-- with:- persist-credentials: false-- - name: Set up Python- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0- with:- python-version: "3.10"-- - name: Create check script- run: |- cat > check_all_css.py << 'EOF'- #!/usr/bin/env python3- import subprocess- import sys- from pathlib import Path-- def main():- # Find all relevant files- web_dir = Path("src/local_deep_research/web")- if not web_dir.exists():- print(f"Warning: Web directory not found at {web_dir}")- return 0-- files_to_check = []- for pattern in ["*.html", "*.css", "*.js"]:- files_to_check.extend(web_dir.rglob(pattern))-- # Filter out test/vendor files- files_to_check = [- f for f in files_to_check- if not any(x in str(f) for x in ["test", "spec", "vendor", "node_modules", "dist", "build"])- ]-- if not files_to_check:- print("No files to check")- return 0-- print(f"Checking {len(files_to_check)} files for CSS class naming compliance...")-- # Show first few files being checked for debugging- print("\nFirst 10 files being checked:")- for f in files_to_check[:10]:- print(f" - {f}")- if len(files_to_check) > 10:- print(f" ... and {len(files_to_check) - 10} more files")-- # Run the check- cmd = [sys.executable, ".pre-commit-hooks/check-css-class-prefix.py"] + [str(f) for f in files_to_check]- result = subprocess.run(cmd, capture_output=True, text=True)-- print(result.stdout)- if result.stderr:- print(result.stderr, file=sys.stderr)-- if result.returncode != 0:- print("\n❌ CSS class violations found!")- print("All custom CSS classes must be prefixed with 'ldr-' to prevent conflicts.")- print("This includes CSS in <style> tags within HTML files.")- return 1-- print("\n✅ All CSS classes are properly prefixed!")- return 0-- if __name__ == "__main__":- sys.exit(main())- EOF- chmod +x check_all_css.py-- - name: Run CSS class check- id: css_check- run: |- # Capture output to both display and save for later- python check_all_css.py 2>&1 | tee css_check_output.txt- exit_code="${PIPESTATUS[0]}"-- # Save the output to GitHub environment for later steps- {- echo 'CSS_CHECK_OUTPUT<<EOF'- cat css_check_output.txt- echo 'EOF'- } >> "$GITHUB_ENV"-- if [ "$exit_code" -ne 0 ]; then- echo "CSS_CHECK_FAILED=true" >> "$GITHUB_ENV"- fi-- exit "$exit_code"- continue-on-error: true-- - name: Show CSS check results- if: always()- env:- STEP_OUTCOME: ${{ steps.css_check.outcome }}- STEP_CONCLUSION: ${{ steps.css_check.conclusion }}- run: |- echo "=== CSS Check Results ==="- echo "Step outcome: $STEP_OUTCOME"- echo "Step conclusion: $STEP_CONCLUSION"- echo ""- if [ "$CSS_CHECK_FAILED" = "true" ]; then- echo "❌ CSS check failed - violations were found:"- echo "================================================"- echo "$CSS_CHECK_OUTPUT"- echo "================================================"- else- echo "✅ CSS check passed - no violations found"- fi-- - name: Comment on PR (if failed)- if: env.CSS_CHECK_FAILED == 'true' && github.event_name == 'pull_request'- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8- with:- script: |- const output = `- ⚠️ **CSS Class Naming Issues Found**-- Some CSS classes are not prefixed with \`ldr-\`. This can cause conflicts when bundling.-- Please run locally to see details:- \`\`\`bash- ./scripts/check-css-classes.sh- \`\`\`-- Or check the [workflow logs](${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}) for details.- `;-- github.rest.issues.createComment({- issue_number: context.issue.number,- owner: context.repo.owner,- repo: context.repo.repo,- body: output- });-- - name: Set exit code- if: env.CSS_CHECK_FAILED == 'true'- run: |- echo "==============================================="- echo "❌ WORKFLOW FAILED: CSS Class Naming Violations"- echo "==============================================="- echo ""- echo "The following CSS class naming violations were found:"- echo ""- echo "$CSS_CHECK_OUTPUT" | grep -E "❌|Line [0-9]+:" || echo "$CSS_CHECK_OUTPUT"- echo ""- echo "==============================================="- echo "To fix: Add 'ldr-' prefix to all custom CSS classes"- echo "Example: .custom-button → .ldr-custom-button"- echo "==============================================="- exit 1diff --git a/.github/workflows/performance-tests.yml b/.github/workflows/performance-tests.ymldeleted file mode 100644index dee87ceef9..0000000000--- a/.github/workflows/performance-tests.yml+++ /dev/null@@ -1,263 +0,0 @@-name: Performance Tests--on:- pull_request:- branches: [ main, dev, develop ]- workflow_dispatch:--permissions:- contents: read--jobs:- performance-tests:- runs-on: ubuntu-latest- timeout-minutes: 30-- services:- redis:- image: redis:alpine@sha256:8360960f5fb56a282d78686203dd875862cd4b52a4184c17ac753690252d6d31 # redis:alpine- options: >-- --health-cmd "redis-cli ping"- --health-interval 10s- --health-timeout 5s- --health-retries 5- ports:- - 6379:6379-- steps:- - name: Harden the runner (Audit all outbound calls)- uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1- with:- egress-policy: audit-- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2- with:- persist-credentials: false-- - name: Set up PDM- uses: pdm-project/setup-pdm@94a823180e06fcde4ad29308721954a521c96ed0 # v4- with:- python-version: '3.11'-- - name: Cache pip packages- uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2- with:- path: ~/.cache/pip- key: ${{ runner.os }}-pip-perf-${{ hashFiles('**/requirements.txt') }}- restore-keys: |- ${{ runner.os }}-pip-perf-- ${{ runner.os }}-pip--- - name: Install system dependencies- run: |- sudo apt-get update- sudo apt-get install -y redis-tools-- - name: Install system dependencies for SQLCipher- run: |- sudo apt-get update- sudo apt-get install -y libsqlcipher-dev-- - name: Install Python dependencies- run: |- pdm sync -d-- - name: Set up test directories- run: |- mkdir -p ~/.local/share/local-deep-research/encrypted_databases- mkdir -p ~/.local/share/local-deep-research-- - name: Initialize database with test data- run: |- cd src- cat > init_perf_db.py << 'EOF'- import os- from pathlib import Path- # Ensure data directory exists- data_dir = Path.home() / '.local' / 'share' / 'local-deep-research'- data_dir.mkdir(parents=True, exist_ok=True)- (data_dir / 'encrypted_databases').mkdir(parents=True, exist_ok=True)-- from local_deep_research.database.auth_db import init_auth_database, get_auth_db_session- from local_deep_research.database.models.auth import User- from local_deep_research.database.encrypted_db import db_manager-- # Initialize auth database- init_auth_database()-- # Create test users and their databases- session = get_auth_db_session()- for i in range(10):- username = f'perftest{i}'- # Create user in auth database (no password stored)- user = User(username=username)- session.add(user)- session.commit()-- # Create user's encrypted database with password- engine = db_manager.create_user_database(username, 'testpass123')- session.close()- print('Databases initialized successfully')- EOF- pdm run python init_perf_db.py-- - name: Start application server- env:- CI: true- DISABLE_RATE_LIMITING: true- REDIS_URL: redis://localhost:6379- FLASK_ENV: testing- SECRET_KEY: perf-test-secret-key- run: |- cd src- # Start server and get its PID- pdm run python -m local_deep_research.web.app > server.log 2>&1 &- SERVER_PID=$!- echo "Server PID: $SERVER_PID"-- # Wait for server to start- for i in {1..30}; do- if curl -f http://127.0.0.1:5000 2>/dev/null; then- echo "Server is ready after $i seconds"- break- fi- # Check if process is still running- if ! kill -0 $SERVER_PID 2>/dev/null; then- echo "Server process died!"- echo "Server log:"- cat server.log- exit 1- fi- echo "Waiting for server... ($i/30)"- sleep 1- done-- # Final check- if ! curl -f http://127.0.0.1:5000 2>/dev/null; then- echo "Server failed to start after 30 seconds"- echo "Server log:"- cat server.log- exit 1- fi-- - name: Run database performance tests- run: |- # Note: No dedicated performance test directory exists- # Run any available database tests- pdm run pytest tests/database/test_benchmark_models.py -v || true-- - name: Run API performance tests- run: |- # Note: No dedicated API performance tests exist- echo "Skipping API performance tests - no test files available"-- - name: Run load tests with Locust- run: |- # Note: No performance test directory or locustfile exists- echo "Skipping Locust load tests - no test files available"-- - name: Run memory profiling- run: |- # Profile memory usage of key operations- cat > memory_profile.py << 'EOFSCRIPT'- import tracemalloc- import requests- import json-- tracemalloc.start()-- # Simulate API calls- base_url = 'http://127.0.0.1:5000'- session = requests.Session()-- # Login- session.post(f'{base_url}/auth/login', json={'username': 'perftest0', 'password': 'testpass123'})-- # Make various API calls- for i in range(10):- session.get(f'{base_url}/api/research/history')- session.get(f'{base_url}/api/user/stats')-- current, peak = tracemalloc.get_traced_memory()- print(f'Current memory usage: {current / 1024 / 1024:.2f} MB')- print(f'Peak memory usage: {peak / 1024 / 1024:.2f} MB')-- tracemalloc.stop()- EOFSCRIPT- pdm run python memory_profile.py-- - name: Run frontend performance tests- run: |- cd tests/ui_tests- npm ci-- # Run available metrics tests as performance indicators- echo "Running metrics tests as performance indicators..."- node test_metrics.js || true-- - name: Analyze Python performance hotspots- run: |- # Profile a typical request flow- cat > profile_requests.py << 'EOFSCRIPT'- import requests- import time-- session = requests.Session()- base_url = 'http://127.0.0.1:5000'-- # Login- session.post(f'{base_url}/auth/login', json={'username': 'perftest0', 'password': 'testpass123'})-- # Simulate typical user actions- for _ in range(5):- session.get(f'{base_url}/api/research/history')- session.get(f'{base_url}/api/models')- time.sleep(0.5)- EOFSCRIPT- pdm run py-spy record -d 10 -o profile.svg -- pdm run python profile_requests.py || true-- - name: Generate performance report- if: always()- run: |- echo "Performance Test Report"- echo "======================"- echo ""- echo "Test Categories:"- echo "- Database query performance"- echo "- API response times"- echo "- Memory usage profiling"- echo "- Load testing results"- echo "- Frontend rendering performance"- echo ""-- # Check for performance regression- if [ -d .benchmarks ]; then- echo "Benchmark History Available"- cat > check_benchmarks.py << 'EOFSCRIPT'- import json- import os-- if os.path.exists('.benchmarks'):- benchmark_files = [f for f in os.listdir('.benchmarks') if f.endswith('.json')]- if benchmark_files:- latest = sorted(benchmark_files)[-1]- with open(f'.benchmarks/{latest}') as f:- data = json.load(f)- if 'benchmarks' in data:- print('Recent benchmark results:')- for bench in data['benchmarks'][:5]:- print(f" {bench.get('name', 'N/A')}: {bench.get('stats', {}).get('mean', 'N/A'):.4f}s")- EOFSCRIPT- pdm run python check_benchmarks.py || true- fi-- - name: Upload performance artifacts- if: always()- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0- with:- name: performance-test-artifacts- path: |- .benchmarks/- profile.svg- tests/performance/*.html- src/server.logdiff --git a/docs/CI_CD_INFRASTRUCTURE.md b/docs/CI_CD_INFRASTRUCTURE.mdindex 0927ba978f..5691ba2222 100644--- a/docs/CI_CD_INFRASTRUCTURE.md+++ b/docs/CI_CD_INFRASTRUCTURE.md@@ -90,7 +90,6 @@ pre-commit install-hooks| `library-ui-tests.yml` | PR, push | Research library UI tests || `news-tests.yml` | PR, push | News subscription tests || `metrics-analytics-tests.yml` | PR, push | Analytics tests |-| `performance-tests.yml` | PR, push | Performance benchmarks || `followup-research-tests.yml` | PR, push | Follow-up research tests || `fuzz.yml` | Schedule | Fuzzing tests |@@ -130,10 +129,8 @@ pre-commit install-hooks| Workflow | Trigger | Purpose ||----------|---------|---------|-| `accessibility-compliance-tests.yml` | PR, push | WCAG compliance (axe-core) || `responsive-ui-tests-enhanced.yml` | PR, push | Responsive design tests || `mobile-ui-tests.yml` | PR, push | Mobile viewport tests |-| `check-css-classes.yml` | PR, push | CSS class naming validation |### Build & Deploy