[PR #9] [CLOSED] test: cover orphaned assistant parent repair on continuation #11

Closed
opened 2026-10-18 21:09:33 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/tests/pull/9
Author: @vanwho
Created: 8/29/2026
Status: ❌ Closed

Base: main ← Head: fix/assistant-parent-repair-test


📝 Commits (1)

  • 4bb655f test: cover orphaned assistant parent on continuation

📊 Changes

1 file changed (+119 additions, -0 deletions)

View changed files

➕ unit/chat/test_assistant_parent_repair.py (+119 -0)

📄 Description

Summary

Adds source-level regression coverage for open-webui/open-webui #29216 issue and PR open-webui/open-webui#29218

The test drives the real chat_completion persistence path with an existing assistant response and verifies that:

  • An orphaned assistant message receives only the missing parentId.
  • Existing content and output are not replaced by an empty placeholder.
  • An assistant message that already has the correct parent is left unchanged.

The test uses the suite's existing owui_module fixture, regression marker, async test conventions, and generic chat-model model ID.

Verification

Against the fixed Open WebUI branch:

2 passed

Against the pre-fix Open WebUI dev revision:

1 failed, 1 passed

The orphan-repair case discriminates by failing on the old unconditional continuation skip. The correctly linked nearby case passes on both revisions.

Formatting and linting:

ruff format --check: passed
ruff check: passed
git diff --check: passed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/tests/pull/9 **Author:** [@vanwho](https://github.com/vanwho) **Created:** 8/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/assistant-parent-repair-test` --- ### 📝 Commits (1) - [`4bb655f`](https://github.com/open-webui/tests/commit/4bb655f7d780c22bfed8bba2be95bdcc8eee01fd) test: cover orphaned assistant parent on continuation ### 📊 Changes **1 file changed** (+119 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `unit/chat/test_assistant_parent_repair.py` (+119 -0) </details> ### 📄 Description ## Summary Adds source-level regression coverage for open-webui/open-webui [#29216](https://github.com/open-webui/open-webui/issues/29216) issue and PR [open-webui/open-webui#29218](https://github.com/open-webui/open-webui/pull/29218) The test drives the real `chat_completion` persistence path with an existing assistant response and verifies that: - An orphaned assistant message receives only the missing `parentId`. - Existing content and output are not replaced by an empty placeholder. - An assistant message that already has the correct parent is left unchanged. The test uses the suite's existing `owui_module` fixture, `regression` marker, async test conventions, and generic `chat-model` model ID. ## Verification Against the fixed Open WebUI branch: ```text 2 passed ``` Against the pre-fix Open WebUI `dev` revision: ```text 1 failed, 1 passed ``` The orphan-repair case discriminates by failing on the old unconditional continuation skip. The correctly linked nearby case passes on both revisions. Formatting and linting: ```text ruff format --check: passed ruff check: passed git diff --check: passed ``` ## Related - Issue: open-webui/open-webui [#29216](https://github.com/open-webui/open-webui/issues/29216) - Product fix: [open-webui/open-webui#29218](https://github.com/open-webui/open-webui/pull/29218) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:09:33 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/tests#11
No description provided.