Description
The project currently has zero unit tests or integration tests for any backend module. There is no tests/ directory in backend/ or at the project root, and no test_*.py files exist for any of the core modules (main.py, agents.py, retrieval.py, knowledgespace_api.py, ks_search_tool.py).
Without tests, there is no automated way to verify that new PRs do not break existing functionality. This makes code review harder, increases the risk of regressions, and blocks CI/CD automation.
Verification
I searched the entire project directory and confirmed there are no project-specific test files:
- ❌ No
tests/ directory in project root
- ❌ No
tests/ directory in backend/
- ❌ No
test_*.py files anywhere in backend/
- ❌ No
*.test.tsx or *.test.ts files in frontend/src/
- ❌ No
pytest.ini or conftest.py
- ❌ No
[tool.pytest.ini_options] section in pyproject.toml
- ❌ No CI workflow running tests in
.github/
The only test files in the repository are inside .venv/Lib/site-packages/ and frontend/node_modules/, which belong to third-party libraries, not this project.
Why This Matters
- No regression protection — PRs could silently break the
/health, /api/health, or /api/query endpoints without detection
- Code review burden — reviewers must manually verify correctness for every change
- CI/CD blocked — cannot set up automated test pipelines without tests to run
- Contributor confidence — new contributors hesitate to refactor code when there are no tests to catch breakage
- Production risk — the existing health check endpoints (
/health, /api/health) and the query pipeline have zero test coverage
Proposed Solution
Add a tests/ directory inside backend/ with initial test coverage for the existing endpoints and modules.
Suggested structure:
backend/
└── tests/
├── init.py
├── conftest.py # Shared fixtures (test client, mock env)
├── test_health.py # Tests for /health and /api/health
├── test_query.py # Tests for the query endpoint
└── test_knowledgespace_api.py # Tests for the KS API wrapper
Minimum initial tests should cover:
GET /health returns 200 with {"status": "healthy"}
GET /api/health returns 200 with status and feature flags
- Query endpoint exists and accepts POST
- Invalid or empty queries return appropriate error codes not 500
- Unknown routes return 404
Also add pytest to dev dependencies in pyproject.toml, a [tool.pytest.ini_options] configuration section, and a Run Tests section in the README.
I'd Like to Work on This
I'm happy to submit a PR with the initial test setup and baseline tests for the health endpoints. This would establish the testing foundation that other contributors can build on as the project grows.
Description
The project currently has zero unit tests or integration tests for any backend module. There is no
tests/directory inbackend/or at the project root, and notest_*.pyfiles exist for any of the core modules (main.py,agents.py,retrieval.py,knowledgespace_api.py,ks_search_tool.py).Without tests, there is no automated way to verify that new PRs do not break existing functionality. This makes code review harder, increases the risk of regressions, and blocks CI/CD automation.
Verification
I searched the entire project directory and confirmed there are no project-specific test files:
tests/directory in project roottests/directory inbackend/test_*.pyfiles anywhere inbackend/*.test.tsxor*.test.tsfiles infrontend/src/pytest.iniorconftest.py[tool.pytest.ini_options]section inpyproject.toml.github/The only test files in the repository are inside
.venv/Lib/site-packages/andfrontend/node_modules/, which belong to third-party libraries, not this project.Why This Matters
/health,/api/health, or/api/queryendpoints without detection/health,/api/health) and the query pipeline have zero test coverageProposed Solution
Add a
tests/directory insidebackend/with initial test coverage for the existing endpoints and modules.Suggested structure:
backend/
└── tests/
├── init.py
├── conftest.py # Shared fixtures (test client, mock env)
├── test_health.py # Tests for /health and /api/health
├── test_query.py # Tests for the query endpoint
└── test_knowledgespace_api.py # Tests for the KS API wrapper
Minimum initial tests should cover:
GET /healthreturns 200 with{"status": "healthy"}GET /api/healthreturns 200 with status and feature flagsAlso add
pytestto dev dependencies inpyproject.toml, a[tool.pytest.ini_options]configuration section, and a Run Tests section in the README.I'd Like to Work on This
I'm happy to submit a PR with the initial test setup and baseline tests for the health endpoints. This would establish the testing foundation that other contributors can build on as the project grows.