Skip to content

chore(audit): remove deleted-backend entrypoints, scripts and deploy files - #2567

Merged
groupthinking merged 4 commits into
mainfrom
cursor/remove-deleted-backend-entrypoints-a2db
Nov 4, 2026
Merged

groupthinking merged 4 commits into
mainfrom
cursor/remove-deleted-backend-entrypoints-a2db

Conversation

@kk-agent

@kk-agent kk-agent commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Canonical issue

Closes #2325

#2325 ("Remove unwired Python backend and duplicate Video Pack emitter") was filed alongside #2319, whose backend and emitter deletion shipped in #2320. The pieces that still booted, packaged or deployed that deleted backend (entrypoints, console scripts, alembic.ini, Cloud Run and compose tombstones) are what this PR removes, which completes #2325. Related: #2328.

Outcome

Entrypoints, scripts, and deploy files that still boot, package, or target the Python backend deleted in #2320 are gone. /readyz reports only that the remaining process is accepting traffic. The live UVAI backend at api.uvai.io (BACKEND_URL) runs outside this repo and is not redeployed or reconfigured by this diff.

Scope

  • Included:
    • src/youtube_extension/main.py: removed the four silent imports of deleted backend modules, _API_V1_ROUTER_LOADED, ensure_api_cost_ready, and the sqlite bootstrap helper that only that probe called. /readyz returns {"status": "ready", "service": "uvai-backend"}.
    • src/youtube_extension/cli.py: removed api-cost-worker, migrate, and the doctor probe that imported HealthMonitoringService from the deleted backend.
    • pyproject.toml: removed console scripts uvai.api, uvai.core, youtube-worker, and youtube-migrate (the last one pointed at the deleted migrate callable). Project URLs now point at https://github.com/groupthinking/EventRelay. Dependency lists are unchanged.
    • Deleted alembic.ini (script_location was the missing src/youtube_extension/backend/migrations).
    • README.md: Video Pack sentence no longer calls the Python backend a canonical writer. Removed the paragraph that described the deleted sqlite readiness bootstrap. BACKEND_URL sentence kept.
    • scripts/nightly_audit_agent.py: removed the dead youtube_extension.backend.services.* import block and rewrote the module docstring to the log scan the script still performs. Script kept.
    • scripts/skill_builder.py: removed the __main__ seed that named deleted api_cost_monitor.
    • infrastructure/database/index_analysis.py: removed the dead backend import, the no-op track_database_query_time shim, and the two timing blocks that existed only to call it. Analysis queries stay.
    • Deleted scripts that imported missing backend modules or resolved their targets under the wrong root: scripts/utilities/test_cicd_pipeline.py, scripts/utilities/fix_syspath_issues.py, scripts/utilities/calibrate_env.py, scripts/testing/verify_real_api_integration.py.
    • Deleted tombstones that already print RETIRED and exit 1, or point at the missing deploy-cloud-run.yml: scripts/deployment/deploy-cloud-run.sh, infrastructure/cloudrun/{service.yaml,setup.sh,deploy.sh,cloudbuild.yaml}.
    • Deleted infrastructure/docker/Dockerfile.autonomous (simple_real_processor.py does not exist).
    • Deleted infrastructure/docker/docker-compose.prod.yml and docker-compose.full.yml after confirming default compose-file-relative paths do not resolve (infrastructure/docker/Dockerfile, infrastructure/docker/infrastructure/database/init.sql, and factory/celery_app.py are missing). Neither file names api.uvai.io.
    • .github/dependabot.yml: removed the pip directory /src/youtube_extension/backend. Root / and /sdk/python pip blocks stay.
    • tests/unit/test_dependabot_automation_workflow.py: dropped the parametrize case for that deleted directory.
  • Explicitly excluded:
    • .env.example keys, including API_COST_TRACKING and BACKEND_URL. Skipped: env keys can still configure the live host outside this repo.
    • scripts/dev_backend.sh. Skipped: it execs python -m uvicorn youtube_extension.main:app, which still exists. The brief finding does not hold.
    • infrastructure/cloudrun/domain-mapping.yaml and infrastructure/cloudrun/setup-secrets.sh. Skipped: they route and name credentials for the live api.uvai.io Cloud Run service.
    • Root Dockerfile, infrastructure/docker/Dockerfile.production, infrastructure/terraform/, infrastructure/k8s/, scripts/deployment/one-click-deploy.sh, .github/workflows/*, src/agents/*.
    • src/youtube_extension/services/ai/hybrid_processor_service.py still imports deleted youtube_extension.backend.services.api_cost_monitor.track_api_call inside _record_api_usage. Observed and left in place; it is not an entrypoint, script, or deploy file in the brief.

Findings

Done:

  • main.py silent backend imports and _API_V1_ROUTER_LOADED.
  • ensure_api_cost_ready and the /readyz call into it, plus the sqlite bootstrap helper and the README paragraph that described it.
  • CLI api-cost-worker, migrate, and the doctor HealthMonitoringService import.
  • pyproject.toml scripts uvai.api, uvai.core, youtube-worker, and the follow-through removal of youtube-migrate. Project URLs rewritten to groupthinking/EventRelay, including Changelog.
  • alembic.ini.
  • README sentence that called the Python backend a canonical Video Pack writer.
  • scripts/nightly_audit_agent.py dead imports and docstring.
  • scripts/skill_builder.py __main__ seed.
  • infrastructure/database/index_analysis.py dead backend import, the no-op query-time shim, and the timing that only fed that call.
  • scripts/utilities/test_cicd_pipeline.py, fix_syspath_issues.py, calibrate_env.py, and scripts/testing/verify_real_api_integration.py.
  • scripts/deployment/deploy-cloud-run.sh and infrastructure/cloudrun/{service.yaml,setup.sh,deploy.sh,cloudbuild.yaml} after confirming they are retired tombstones and do not name api.uvai.io.
  • infrastructure/docker/Dockerfile.autonomous.
  • infrastructure/docker/docker-compose.prod.yml and docker-compose.full.yml after confirming broken relative paths and no live-host reference.
  • Dependabot pip block for /src/youtube_extension/backend, and the unit test case that asserted it.

Skipped:

  • .env.example key removals. The live backend at api.uvai.io may still consume them. BACKEND_URL stays.
  • scripts/dev_backend.sh. It still starts the remaining FastAPI app.
  • infrastructure/cloudrun/domain-mapping.yaml and setup-secrets.sh. They configure routing and secrets for the live host.

Risk

  • Risk level: low
  • Failure mode: a caller of the removed console scripts (uvai.api, uvai.core, youtube-worker, youtube-migrate) or of the deleted compose/cloudrun tombstones fails at invocation. Those targets already failed or exited 1.
  • Rollback: revert this PR. No dependency list, workflow, domain, or secret change to unwind.

Verification

Head e6c6fb64bbc15e2baa985d21d9b814a348d8b1d2.

  • python -m compileall -q src/
  • uv lock --check with uv 0.12.1 (Resolved 346 packages). Dependency lists were not edited.
  • Focused: nightly audit, index analysis, local pipeline readiness, legacy module cleanup (17 passed) on the previous head. After removing the query-time shim, PYTHONPATH=src python -m pytest tests/unit/test_index_analysis.py -q --timeout=120 -o addopts='' — 5 passed.
  • PYTHONPATH=src python -m pytest tests/unit/ -q --timeout=120 --cov=src/youtube_extension --cov-fail-under=0 --ignore=tests/unit/test_transcript_action_workflow.py -k "not integration" — 3051 passed on 508abce70. One failure was the dependabot case for the deleted directory, removed in 508abce70. Eleven other failures were python: command not found on this VM (python3 only); the same tests passed with /tmp/er-venv/bin on PATH. CI runners provide python.
  • python -m pytest tests/security/test_local_mcp_config.py tests/security/test_mcp_catalog_approval.py -q -o addopts='' — 38 passed.
  • GitHub CI on 508abce70: Python 3.11 and 3.12 unit tests, lint-python, lint-frontend, build, guards, MCP catalog, coverage, dependency review, CodeQL, bandit, safety, trivy, npm audit, gitleaks, and E2E passed. e6c6fb64b only deletes the index-analysis shim and its two call sites.
  • Closing keyword to open issue: body closes Remove unwired Python backend and duplicate Video Pack emitter #2325.
  • CI / test-frontend failed on home-sell-surface.test.ts, which expects the page source to contain prepares proposed work and build rails for you to review in Studio. apps/web/src/app/page.tsx says Studio prepares proposed work and build rails for you to review. This PR does not change apps/web. The same job is already the only failure on main at cd7e1998f (https://github.com/groupthinking/EventRelay/actions/runs/41659258955). Left unfixed.

Production evidence

Not applicable. This deletes in-repo leftovers of a backend that already does not live in this tree. It does not deploy, change domains, change secrets, or change BACKEND_URL. api.uvai.io stays on its existing host outside the repo.

Agent handoff

Open in Web Open in Cursor 

cursoragent and others added 2 commits November 3, 2026 16:04
Drop silent imports, CLI commands, console scripts, and retired deploy
files that still targeted the backend package removed in #2320.

Co-authored-by: KK <kk-agent@users.noreply.github.com>
The pip directory /src/youtube_extension/backend no longer exists.

Co-authored-by: KK <kk-agent@users.noreply.github.com>
@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
v0-uvai Ready Ready Preview, v0 Nov 4, 2026 6:57am UTC

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T16:12:31.996870Z 508abce PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added documentation Improvements or additions to documentation python labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ Repository reconciliation: this PR does not reference exactly one canonical issue.

Please add a Closes #<issue> reference in the PR description so it can be tracked against the delivery plan.

See governance: #898

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🔍 PR Validation

⚠️ Large PR detected (1859 lines changed)

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Delete the no-op tracker and the timing that existed only to call it.

Co-authored-by: KK <kk-agent@users.noreply.github.com>
@groupthinking
groupthinking merged commit a26de9c into main Nov 4, 2026
30 checks passed
@groupthinking
groupthinking deleted the cursor/remove-deleted-backend-entrypoints-a2db branch November 4, 2026 07:09

This branch was successfully deployed

1 active deployment
Preview — 9a168049 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unwired Python backend and duplicate Video Pack emitter

3 participants