Skip to content

chore: delete 1726 lines of dead code, scripts, and config duplication (OPE-95, OPE-73)#257

Merged
DevanshuNEU merged 1 commit into
OpenCodeIntel:mainfrom
DevanshuNEU:chore/dead-file-cleanup
Feb 24, 2026
Merged

chore: delete 1726 lines of dead code, scripts, and config duplication (OPE-95, OPE-73)#257
DevanshuNEU merged 1 commit into
OpenCodeIntel:mainfrom
DevanshuNEU:chore/dead-file-cleanup

Conversation

@DevanshuNEU

@DevanshuNEU DevanshuNEU commented Feb 24, 2026

Copy link
Copy Markdown
Collaborator

What

Pure deletion PR. Removes dead code, unused scripts, and config duplication. Zero logic changes.

Deleted (1726 lines)

What Lines Why
9 benchmark scripts in backend/scripts/ 1589 Dev-only search quality experiments. Not referenced in CI, docs, or README. Recoverable from git history.
backend/.env.example 96 Duplicate of root .env.example. Was out of sync (missing 5 vars the root had).
config/api.py dead code 36 LEGACY_API_PREFIX, DEPRECATION_HEADER, get_versioned_prefix(), get_legacy_prefix(), is_legacy_route() -- none imported anywhere.
routes/init.py stale export 3 Exported auth_router but nobody imports it (main.py imports directly).

Cleaned

What Change
.gitignore Added .coverage, htmlcov/, .pytest_cache/
.env.example Added 5 missing vars: GITHUB_CLIENT_ID/SECRET, FRONTEND_URL, DISCORD_FEEDBACK_WEBHOOK, SENTRY_SEND_PII/INCLUDE_LOCAL_VARS
config/api.py 47 lines -> 9 lines (only API_VERSION + API_PREFIX remain)

Impact

14 files changed. Net -1726 lines. 284 tests pass. Cleaner repo tree for open source first impressions.

Closes OPE-95, OPE-73

Summary by CodeRabbit

  • New Features

    • Added GitHub OAuth authentication support
    • Enabled Search V2 functionality with Cohere integration
    • Added Discord feedback notification system
    • Enhanced error tracking with additional Sentry configuration options
  • Chores

    • Removed legacy API versioning code
    • Removed internal testing and benchmarking scripts
    • Updated test artifact ignores

…nd duplication

Deleted:
- 9 dev-only benchmark scripts (1589 lines) -- search quality
  experiments from v2/v3 sprint. In git history if needed.
- backend/.env.example (96 lines) -- duplicate of root, was out
  of sync. Root .env.example updated with 5 missing vars.
- config/api.py dead code (36 lines) -- LEGACY_API_PREFIX,
  DEPRECATION_HEADER, get_versioned_prefix(), get_legacy_prefix(),
  is_legacy_route(). None were imported anywhere.

Cleaned:
- routes/__init__.py: removed stale auth_router export that nobody
  imports (main.py imports directly from routes.auth).
- .gitignore: added .coverage, htmlcov/, .pytest_cache/.
- .env.example: added GITHUB_CLIENT_ID/SECRET, FRONTEND_URL,
  DISCORD_FEEDBACK_WEBHOOK, SENTRY_SEND_PII, SENTRY_INCLUDE_LOCAL_VARS.

Net: 14 files changed, -1726 lines.
284 tests pass.

Closes OPE-95, OPE-73
@vercel

vercel Bot commented Feb 24, 2026

Copy link
Copy Markdown

@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Feb 24, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR removes search V3 benchmark and test scripts from the backend, consolidates environment configuration to a root .env.example file by deleting backend/.env.example, removes API versioning constants and helper functions from backend configuration, and removes the auth router export from the routes module.

Changes

Cohort / File(s) Summary
Configuration consolidation
.env.example, backend/.env.example, .gitignore
Root .env.example adds GitHub OAuth, enhanced Sentry, Discord feedback webhook, and Cohere/Search V2 configuration; backend/.env.example removed entirely; .gitignore adds test coverage artifacts (.coverage, htmlcov/, .pytest\_cache/).
API versioning removal
backend/config/api.py
Removed API\_VERSION, API\_PREFIX, LEGACY\_API\_PREFIX, LEGACY\_DEPRECATION\_ENABLED constants and get\_versioned\_prefix, get\_legacy\_prefix, is\_legacy\_route helper functions.
Route exports
backend/routes/__init__.py
Removed public export of auth\_router from module's __all__.
Search V3 test scripts
backend/scripts/benchmark_search_v3.py, cross_repo_test.py, edge_case_test.py, extended_query_test.py, extended_v3_test.py, final_v3_test.py, human_query_test.py, manual_ws_test.py, validate_cohere_rerank.py
Removed nine test and benchmark scripts totaling ~1,487 lines; scripts performed V2/V3 search comparison, edge case validation, WebSocket testing, and Cohere reranking verification.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • PR #255: Modifies backend/config/api.py at the same API-version helper level, adjusting the same get_versioned_prefix and related functions being removed here.
  • PR #224: Related to search V3 surface changes; the main PR removes V3 test scripts and related artifacts while this PR previously added V3 scripts and modules.
  • PR #247: Modifies environment variable configuration and root .env.example similarly to the consolidation approach used here.

Poem

🐰 Hop, hop away go the test scripts old,
Config consolidated, a story retold,
API versions fade, auth routers take flight,
Cleaner codebase shines in the moonlight!
✨🧹

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removal of 1726 lines of dead code, scripts, and config duplication, with specific issue references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.env.example:
- Around line 49-53: Dotenv-linter flags the key ordering and the unquoted
ENVIRONMENT value; reorder the SENTRY_* and ENVIRONMENT entries to follow the
project's .env alphabetical ordering (e.g., place SENTRY_DSN,
SENTRY_INCLUDE_LOCAL_VARS, SENTRY_SEND_PII in correct sorted order) and quote
the ENVIRONMENT value (change ENVIRONMENT=development to
ENVIRONMENT="development") so the linter no longer reports ordering/quoting
warnings for the SENTRY_DSN, SENTRY_SEND_PII, SENTRY_INCLUDE_LOCAL_VARS, and
ENVIRONMENT keys.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d6150e and 072be9a.

📒 Files selected for processing (14)
  • .env.example
  • .gitignore
  • backend/.env.example
  • backend/config/api.py
  • backend/routes/__init__.py
  • backend/scripts/benchmark_search_v3.py
  • backend/scripts/cross_repo_test.py
  • backend/scripts/edge_case_test.py
  • backend/scripts/extended_query_test.py
  • backend/scripts/extended_v3_test.py
  • backend/scripts/final_v3_test.py
  • backend/scripts/human_query_test.py
  • backend/scripts/manual_ws_test.py
  • backend/scripts/validate_cohere_rerank.py
💤 Files with no reviewable changes (11)
  • backend/scripts/benchmark_search_v3.py
  • backend/scripts/human_query_test.py
  • backend/scripts/extended_v3_test.py
  • backend/scripts/validate_cohere_rerank.py
  • backend/.env.example
  • backend/scripts/edge_case_test.py
  • backend/config/api.py
  • backend/scripts/final_v3_test.py
  • backend/scripts/cross_repo_test.py
  • backend/scripts/manual_ws_test.py
  • backend/scripts/extended_query_test.py

Comment thread .env.example
@vercel

vercel Bot commented Feb 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
opencodeintel Ignored Ignored Preview Feb 24, 2026 1:11am

@DevanshuNEU DevanshuNEU merged commit a69f505 into OpenCodeIntel:main Feb 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant