Skip to content

fix(tests): repair test suite broken by the PR #4 merge - #22

Merged
man4ish merged 1 commit into
mainfrom
fix/tests-after-pr4-merge
Sep 25, 2026
Merged

man4ish merged 1 commit into
mainfrom
fix/tests-after-pr4-merge

Conversation

@man4ish

@man4ish man4ish commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

After PR #4 merged, main can't run its test suite, and CI fails on it.

  • tests/test_main_api.py doesn't load. Merging main into the PR test: raise dev hub coverage above 95 percent #4 branch combined a regular def with an await body, which is a SyntaxError. The file also has duplicate test names, a docstring attached to the wrong test, and calls to a client that no longer exists.
  • Six stream tests fail. In tests/test_rag_routes.py, the client fixture was switched to SyncASGIClient and the streaming tests fail with it. One test in tests/test_coverage_completion.py targets the old token-event stream format, from before Phase 19.1.

Fix

  • Restore test_main_api.py and test_rag_routes.py to their state just before PR test: raise dev hub coverage above 95 percent #4 (21cb411). That version passed CI at 99.87% coverage.
  • Rewrite the stale stream test for the current event format (status, response, done, and an internal_error event that doesn't expose the exception text).
  • Remove tests/sync_client.py, which nothing uses after the restore.

Test plan

  • pytest --cov: 478 passed, 99.87% coverage (the minimum is 97%).
  • ruff check . passes.
  • CI passes.

🤖 Generated with Claude Code

The merge of main into test/raise-dev-hub-coverage mangled
tests/test_main_api.py (a sync test with an await body, a SyntaxError
that stopped collection; duplicate test names; a removed `client` still
referenced) and swapped test_rag_routes' fixture to a client that the
streaming tests fail with.

- Restore test_main_api.py and test_rag_routes.py to their pre-merge
  versions (21cb411), which pass CI at 99.87% coverage
- Rewrite the stale stream test in test_coverage_completion.py for the
  Phase 19.1 event contract (status/response/done, internal_error)
- Remove tests/sync_client.py, now unused

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@man4ish
man4ish merged commit 34936fe into main Sep 25, 2026
3 checks passed
@man4ish
man4ish deleted the fix/tests-after-pr4-merge branch September 25, 2026 06:50
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