-
-
Notifications
You must be signed in to change notification settings - Fork 78
Description
Context
- Part 2 of 2.
- Depends on Part 1 ([Enh] Add E2E test scaffolding: directory structure, stub fixtures, and smoke test #193 ) merging first.
This PR builds on the E2E scaffolding introduced in Part 1 and adds lifecycle coverage plus a minimal CI step. No Java/Maven changes.
What This PR Adds
tests/e2e/test_chat_lifecycle.pywith 5 lifecycle scenarios- A non-breaking E2E step appended to CI
Scenarios
-
test_session_survives_restart
Markedxfail
Blocked by session_exists() only checks in-memory store, ignores persisted sessions on disk #175 —session_exists()does not check disk -
test_websocket_stream_persists
Markedxfail
Blocked by WebSocket streaming messages are not persisted to disk #173 — WebSocket handler does not callpersist_session() -
test_upload_without_message_returns_200
Passing — validates fix from Upload endpoint returns 422 when message field is omitted with files #184 -
test_agentic_pipeline_no_type_error
Passing — validates [Enh] get_chatbot_reply_new_architecture() is never called — agentic pipeline is unreachable dead code #189 / [Bug] _execute_search_tools() crashes with TypeError — unguarded TOOL_REGISTRY miss and missing logger injection for 3/4 tools #190 -
test_cross_user_upload_blocked
Passing — validates [DESIGN GAP] Multipart file uploads bypass user_id injection — authenticated users skip ownership validation #168
On xfail
Scenarios 1 and 2 are marked:
@pytest.mark.xfail(strict=False, reason="Blocked by #NNN: ...")strict=Falsekeeps CI green while the underlying bug exists- If the bug is fixed and the test unexpectedly passes, it shows as XPASS
These tests serve as acceptance gates for #175 and #173.
They are intentionally added before the fixes land.
Do not remove xfail without confirming the blocking issue is resolved.
CI Addition
Append a single step to ci-backend-test.yml after integration tests:
- name: Run E2E tests
working-directory: chatbot-core
env:
PYTHONPATH: ${{ github.workspace }}/chatbot-core
E2E_STUB_LLM: "true"
E2E_SEED_FAISS: "true"
run: pytest tests/e2e -m e2e -v- No model downloads
- No API keys
- Runtime ~30s
- Does not modify existing CI behavior
xfail → Pass Conversion
-
test_session_survives_restartconverts when session_exists() only checks in-memory store, ignores persisted sessions on disk #175 is fixed
(session_exists()falls back to disk) -
test_websocket_stream_persistsconverts when WebSocket streaming messages are not persisted to disk #173 is fixed
(WebSocket path callspersist_session())
Acceptance Criteria
- All 5 scenarios implemented in
tests/e2e/test_chat_lifecycle.py - Scenarios 1 & 2 marked
xfail(strict=False)with correct issue reference tests/e2e/fixtures/sample.txtpresentpytest tests/e2e -m e2e -vpasses locally
(Scenarios 1 & 2 showxfail, not FAILED)- CI step added in
ci-backend-test.yml - Zero Java/Maven changes
Related Issues
- Depends on: [Enh] Add E2E test scaffolding: directory structure, stub fixtures, and smoke test #193 (Part 1)
Are you interested in contributing this feature?
Yes — I will raise the PR for this issue.
- This depends on [Enh] Add E2E test scaffolding: directory structure, stub fixtures, and smoke test #193 (Part 1) merging first.