Test Inventory¶
This document inventories test files and manual test scripts identified in the available WhiteLotusAI repository snapshot. It records their locations, apparent testing scope, execution considerations, and areas requiring further verification.
The inventory supports test discovery and maintenance. It does not independently establish test correctness, verified coverage, or release readiness.
Note
Documentation status: This inventory is based on repository source inspection. Test execution results have not been independently verified as part of this documentation task. Treat the coverage descriptions as preliminary until the corresponding assertions and test results have been reviewed.
1. Inventory at a glance¶
| Category | Identified artifacts | Primary purpose |
|---|---|---|
| Chat service tests | 3 | Agent behavior, query routing, and service health |
| User service tests | 1 | Service health |
| RAG service tests | 3 | Retrieval, knowledge-base behavior, and service health |
| Integrations service tests | 1 | Service health |
| REST API tests | 1 | Gateway health |
| Session service tests | 1 | Service health |
| Repository-level scripts | 6 | Plugin connections, OAuth workflows, and related integration checks |
Counting note: These figures reflect the files listed in this inventory, not a verified count of all test files in the repository. Repository-level scripts may overlap with service-level test coverage, and the inventory should be reconciled against the current checkout before release.
2. Service test inventory¶
The following table identifies the service-level test modules and their apparent scope.
| Service | Test file | Apparent coverage |
|---|---|---|
| Chat | chat/package/tests/test_smoke.py |
Agent safety and intent nodes, tool dispatch, plugin permissions, confirmation flow, and related smoke scenarios |
| Chat | chat/package/tests/test_email_tab_queries.py |
Gmail folder and category query parsing and routing |
| Chat | chat/package/tests/test_health.py |
Chat service ping endpoint |
| User | user/package/tests/test_health.py |
User service ping endpoint |
| RAG | rag/package/tests/test_qa_system.py |
Document Q&A behavior, retrieval isolation, chunking, citations, ownership, and related scenarios stated in the test module |
| RAG | rag/package/tests/test_knowledge_base.py |
Knowledge-base test module; individual assertions require review before more specific coverage claims can be made |
| RAG | rag/package/tests/test_health.py |
RAG service health endpoint |
| Integrations | integrations/package/tests/test_health.py |
Integrations service health endpoint |
| REST API | rest_api/package/tests/test_health.py |
Gateway health endpoint; the test allows several outcomes in its documented test environment |
| Session | session/package/tests/test_health.py |
Session service ping endpoint |
Review guidance¶
Before assigning a test module to a specific coverage requirement:
- Inspect the test implementation and its assertions.
- Review
conftest.pyfiles, fixtures, mocks, and shared configuration. - Confirm that tests fail when the behavior they protect is deliberately broken.
- Distinguish isolated unit tests from tests requiring external services.
- Record execution results separately from repository inspection findings.
Tip
Start with the relevant service's test module and configuration. Inspect fixtures and dependency overrides before running tests that may connect to databases, message brokers, OAuth providers, or other external systems.
3. Repository-level test scripts¶
The repository snapshot also contains scripts that exercise integration workflows. These are operationally different from isolated unit tests and may modify persistent connection state.
| Script | Apparent purpose | Execution considerations |
|---|---|---|
tests/test_plugin_callbacks.py |
Exercises storage and retrieval of OAuth token records for several providers through the user service | Requires the appropriate service environment and dependencies. Review test data and credential handling before execution. |
tests/test_plugin_connections.sh |
Exercises plugin connection status and OAuth authorization redirects | Requires running application services and valid test configuration. |
tests/test_e2e_plugin_connect.sh |
Exercises a Gmail connection lifecycle using service APIs and token-storage calls | Changes connection state and depends on running containers and services. Never run against production resources. |
tests/test_gcal.sh |
Checks Google Calendar authorization redirection and related connection/token records | Requires running services and database access. Never run against production resources. |
test_gmail.sh |
Gmail-related test script at the repository root | Inspect the complete script and its prerequisites before execution. |
tests/connect_google_cal.sh |
Google Calendar connection-related script | Inspect the complete script and its prerequisites before execution. |
Security requirements before execution¶
Warning
A filename containing test does not establish that a script is safe. Some scripts can access credentials, change integration state, or interact with real services.
Before executing or committing a manual test script:
- Inspect the complete script, including sourced files and subprocesses.
- Check for passwords, OAuth tokens, internal secrets, and production identifiers.
- Replace sensitive literals with environment variables and use dedicated test credentials.
- Confirm that API endpoints, database connections, and service URLs target an isolated test environment.
- Identify all possible side effects, including token persistence and connection-state changes.
- Ensure the script cannot send messages, modify real user resources, or affect production data.
- Rotate any real credential found in source control according to the organization's incident-response process.
4. Test workflow and evidence¶
The following diagram illustrates the recommended process for turning an identified test artifact into recorded verification evidence.
flowchart TD
A["Identify test artifact"] --> B["Inspect implementation and fixtures"]
B --> C["Review dependencies and side effects"]
G -- "Yes" --> H["Record command, environment, and result"]
H --> L["Update verification status"]
D -- "Yes" --> F["Execute approved test command"]
F --> G{"Expected result observed?"}
G -- "No" --> I["Record failure and investigate"]
I --> J["Create or link a defect"]
J --> K["Add regression coverage after fix"]
C --> D{"Safe isolated environment?"}
D -- "No" --> E["Isolate dependencies and test data"]
E --> C
K --> F
classDef work fill:#DCEBFA,stroke:#3975B7,color:#17365D,stroke-width:1.3px
classDef decision fill:#FCE8CF,stroke:#B7791F,color:#704214,stroke-width:1.3px
classDef issue fill:#F9DEDC,stroke:#B3261E,color:#7F1D1D,stroke-width:1.3px
classDef done fill:#D9F2E6,stroke:#23835B,color:#174B37,stroke-width:1.3px
class A,B,C,E,F,H work
class D,G decision
class I,J,K issue
class L done
Recommended evidence record¶
For each meaningful test run, retain the following information in the team's approved reporting system:
| Field | Required evidence |
|---|---|
| Test target | Service, module, script, or test selection |
| Revision | Git commit or other immutable revision identifier |
| Command | Exact command executed |
| Environment | Relevant runtime, dependency, and configuration details |
| Dependencies | Database, Redis, RabbitMQ, provider APIs, and other required services |
| Result | Passed, failed, blocked, or not verified |
| Failure details | Relevant output, error, and linked defect, where applicable |
| Execution date | Date and time of the run |
| Side effects | State changes or cleanup performed, if any |
Do not include secret values, access tokens, private message content, or other sensitive data in execution logs.
5. Coverage gaps requiring verification¶
The following areas are recommended verification targets. Their inclusion does not prove that tests are absent elsewhere in the repository.
5.1 Integration security¶
| Verification target | Evidence to seek |
|---|---|
| User-to-user data isolation across all six supported integrations | Tests demonstrating that one user cannot retrieve another user's connected data |
| Authentication and authorization failures | Negative tests for missing, invalid, expired, or insufficient authorization |
| Credential lifecycle | Tests for missing, expired, revoked, and malformed credentials |
| OAuth protections | Tests for state validation, callback replay, and PKCE where applicable |
| Provider failure handling | Tests for rate limits, timeouts, malformed responses, and upstream errors |
| Sensitive-data handling | Tests or inspection evidence demonstrating that secrets and confidential content are not exposed in logs or client responses |
5.2 Read-only policy enforcement¶
| Verification target | Evidence to seek |
|---|---|
| Write-capable tools | Tests confirming that disallowed operations are rejected when read-only mode is enabled |
| Write-capable API endpoints | Server-side enforcement tests for every relevant exposed route |
| Confirmation and planner inputs | Tests showing that model-generated flags or arguments cannot bypass authorization |
| Alternate execution paths | Tests confirming that fallback paths preserve the same policy checks |
| Provider-side effects | Negative tests verifying that rejected operations never reach the provider |
5.3 AI orchestration and agent behavior¶
| Verification target | Evidence to seek |
|---|---|
| Intent handling | Ambiguous, unsupported, and incorrectly classified requests |
| Tool validation | Invalid tool names, malformed arguments, and schema violations |
| Prompt injection | Adversarial instructions in user input and retrieved external content |
| Authorization order | Tests proving authentication and authorization occur before protected tool execution |
| Failure handling | Retry exhaustion, timeouts, and provider failures |
| Context isolation | Tests preventing conversation and tool-result leakage across users |
5.4 Operational reliability¶
| Verification target | Evidence to seek |
|---|---|
| Startup validation | Missing or invalid required configuration |
| Health checks | Dependency outages and unavailable providers |
| Infrastructure failures | Database, Redis, and messaging-service failures |
| Token lifecycle | Token refresh and persistence failures |
| Resource limits | Request-size bounds, pagination, and bounded execution time |
| Cleanup and shutdown | Safe handling of incomplete requests and resource cleanup |
Important
A requirement should be marked verified only when the relevant implementation has been reviewed and suitable test results or other accepted evidence have been recorded. Documentation alone is not implementation evidence.
6. Running tests safely¶
There is no single test command that can be assumed to work for every service and script. Determine the supported command from the relevant project configuration and dependency setup.
6.1 Execution checklist¶
- Confirm the correct repository revision and working tree.
- Inspect the test module, fixtures, configuration, and setup instructions.
- Identify required environment variables and external dependencies.
- Use isolated databases, dedicated test accounts, and non-production credentials.
- Verify that the test cannot modify real user resources or trigger unintended external actions.
- Run the supported command and capture the actual exit status.
- Review failures, skipped tests, warnings, and unexpected side effects.
- Store the execution evidence and update the inventory only when justified.
6.2 Command template¶
Use the command appropriate to the selected service and its project configuration. The following is a template, not a claim that this exact command has been validated for every service.
# Run from the relevant service/package directory.
# Replace the placeholder with an actual test module.
pytest <path-to-test-module> -v
For a shell-based integration test, first inspect its contents and prerequisites:
# Review the script before execution.
sed -n '1,240p' tests/test_plugin_connections.sh
# Execute only after confirming that its target environment is isolated.
bash tests/test_plugin_connections.sh
The second command is intentionally conditional: do not execute the script until its endpoints, credentials, and possible state changes have been reviewed.
7. Reporting and verification status¶
Use the following terminology consistently across testing documentation and release reports.
| Status | Meaning |
|---|---|
| Identified | A test file or test scenario exists in the inspected repository |
| Reviewed | The relevant implementation, assertions, and dependencies have been inspected |
| Executed | The test command was run in a recorded environment |
| Passed | Execution completed successfully with the expected result |
| Failed | Execution produced a failure or unexpected result |
| Blocked | Execution could not proceed because a required dependency, configuration, or prerequisite was unavailable |
| Not verified | Available evidence is insufficient to establish the current verification status |
These statuses are evidence labels, not a substitute for a test report. For example, a test can be Identified without being Reviewed, and a successful command does not establish that the assertions provide adequate coverage.
Coverage reporting rules¶
- Do not report coverage percentages unless they come from a reproducible coverage process.
- Do not equate the number of test files or test cases with verified code coverage.
- Distinguish skipped tests from passing tests.
- Do not describe a test as passed without an actual execution result.
- Record the revision and environment associated with every reported result.
- Keep source-inspection findings separate from runtime verification evidence.
8. Maintenance and release review¶
Update this inventory whenever test files are added, removed, renamed, or materially changed.
Before each release:
- Reconcile the listed paths with the actual repository.
- Review test descriptions against current assertions.
- Reassess script prerequisites and security implications.
- Identify new or unresolved coverage requirements.
- Link the latest relevant test execution evidence.
- Confirm that failed, blocked, and unverified tests are represented accurately.
For maintainability, keep this inventory focused on what testing artifacts exist and what they establish. Detailed test procedures belong in the testing strategy or service-specific documentation; release acceptance decisions belong in the release process.
Related documentation: Testing Strategy · Test Cases · Read-Only Integration Security Policy
Document scope: This inventory records testing artifacts identified in the available repository snapshot. It does not certify production readiness, replace a security review, or establish that the documented requirements are implemented.