Skip to content

chore(tests): remove orphaned v1 tests for removed /api/projects endpoint - #667

Merged
frankbria merged 1 commit into
mainfrom
chore/remove-dead-v1-tests
Jun 14, 2026
Merged

chore(tests): remove orphaned v1 tests for removed /api/projects endpoint#667
frankbria merged 1 commit into
mainfrom
chore/remove-dead-v1-tests

Conversation

@frankbria

Copy link
Copy Markdown
Owner

What

Deletes two orphaned test files targeting the v1 POST /api/projects endpoint, removed in 66241c2 (refactor: remove orphaned v1 web layer):

Why

The route no longer exists, so these fail with 404 on a full local run. They carry no v2 marker, so CI's -m v2 suite never ran them — silently dead since the v1 web layer was removed. v2-equivalent coverage lives under tests/ui/.

tests/cli/test_api_client.py is intentionally kept (mocked CLI client-helper tests; still passes).

Scope note

Narrow cleanup. The broader CI blind spot — -m v2 deselects ~535 tests (~40% of files lack the marker) — is tracked in a separate issue.

Deletions only; no production code changed.

…oint

test_project_creation_api.py (cf-11) and test_workspace_cleanup.py (Issue #7)
exercise the v1 POST /api/projects route removed in 66241c2 (remove orphaned v1
web layer). No v2 marker, so CI's -m v2 suite never ran them; they 404 on a full
local run. Dead weight. v2-equivalent coverage lives in tests/ui. Kept
tests/cli/test_api_client.py (mocked CLI client helper, still passes).
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@frankbria, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 hour, 42 minutes, and 34 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f405766d-82ab-4817-bb05-19e098b16a51

📥 Commits

Reviewing files that changed from the base of the PR and between d65b313 and 594bceb.

📒 Files selected for processing (2)
  • tests/api/test_project_creation_api.py
  • tests/api/test_workspace_cleanup.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-dead-v1-tests

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

@claude

claude Bot commented Jun 14, 2026

Copy link
Copy Markdown

Code Review

Verdict: Approve — clean, well-justified deletion.


What this PR does

Removes 496 lines across two dead test files that targeted the v1 POST /api/projects endpoint removed in 66241c2. Both files carry only @pytest.mark.unit / @pytest.mark.integration markers — never @pytest.mark.v2 — so the CI -m v2 suite skipped them, leaving them silently broken since the v1 web layer was removed.


Verification

  • tests/api/ is not emptied: test_session_chat_ws.py, test_health_endpoint.py, and conftest.py remain — no orphaned directory.
  • The deleted tests are truly dead: both files patch v1-specific internals (app.state.workspace_manager, app.state.db) that no longer exist in v2. Even with the fixture, they'd 404 or crash on import.
  • No v2 coverage gap: tests/ui/ has no counterpart for the workspace-cleanup failure scenarios in test_workspace_cleanup.py, but v2 replaced that architecture entirely (WorkspaceManagercreate_or_load_workspace), so those scenarios are architecture-specific and don't represent a gap.

One minor note

The PR description mentions the broader CI blind spot (~535 tests without a v2 marker, ~40% of files) as a tracked follow-on. Worth confirming that issue exists and is linked here for traceability — but that's out of scope for this PR and not a blocker.


No production code is touched. Deletions only. LGTM.

@frankbria
frankbria merged commit 7b2803b into main Jun 14, 2026
10 checks passed
@frankbria
frankbria deleted the chore/remove-dead-v1-tests branch June 14, 2026 05:35
frankbria added a commit that referenced this pull request Jun 19, 2026
* fix(ci): run full non-e2e suite in CI, drop -m v2 blind spot (#669)

The backend CI gate ran `pytest -m v2`, but the root conftest never
auto-marked v2, so ~514 legit tests (40% of files) were silently
deselected and never gated a PR. The v1->v2 refactor that the filter
existed for is done.

Categorized the 514 deselected tests: 497 pass, 16 skip, 1 is a
real-LLM `lifecycle` test (correctly excluded). No dead tests remain
(the v1 /api/projects pair was removed in #667).

Changes:
- CI: `-m v2` -> `-m "not lifecycle"` so every non-e2e test gates PRs;
  only real-LLM lifecycle tests (run locally via scripts/lifecycle) are
  excluded. Timeout 15->20m for the ~500 extra tests under coverage.
- pytest.ini: document the new two-tier gate; v2 marker kept for
  back-compat but no longer gates.
- tests/auth/test_query_param_token.py: sign JWTs with the LIVE
  manager.SECRET instead of the import-time binding. Un-hiding the
  suite surfaced this order-dependent flake: any test that starts the
  app via TestClient refreshes SECRET from .env (lifespan), which made
  import-bound tokens unverifiable.

Full non-e2e run: 3830 passed, 11 skipped, 6 deselected (lifecycle), 0 failed.

* docs: point CLAUDE.md test commands at the new CI gate (#669)

* docs: match CI gate command to workflow (explicit tests/) (#669)
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