Repository navigation
fix(qa): WebChat media proof counts message revisions as duplicate turns - #169475
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThe WebChat media test counts distinct canonical user-message IDs and separately requires one user turn in chat history. Example: A request containing MEDIA:./artifact.json produces an initial user-message event and a prompt-projection revision with the same message ID.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR: the maintainer-authored test repair matches the transcript revision contract, preserves media coverage, and introduces no actionable defect. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe QA matrix sends requests through the Gateway client and checks transcript events, chat history, attachment outcomes, and hidden media directives. flowchart TD
A[QA media fixtures] --> B[Gateway chat request]
B --> C[Canonical user turn]
C --> D[Append and revision events]
D --> E[Unique message ID assertion]
C --> F[Chat history assertion]
B --> G[Media outcome assertions]
Technical reviewBest possible solution: Retain the canonical-message and history assertions alongside the existing media matrix. Do we have a high-confidence way to reproduce the issue? The current producer republishes the canonical message ID after prompt capture, contradicting the test's one-event assumption; the author reports the matching failure, and this review ran no target code. Is this the best way to solve the issue? Counting canonical identities matches the existing consumer contract, while the separate history assertion preserves protection against actual duplicate user turns. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c8e7f1339f81. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +14. Total +14 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 8:35 PM ET / October 12, 2026, 00:35 UTC (Revision 2). |
…rns (openclaw#169475) ## What Problem This Solves Fixes the WebChat media-artifact proof treating a revision of one user message as a duplicate user turn. This is an explicitly requested main CI repair. ## User Impact No product behavior changes. The proof still rejects duplicate canonical user turns and still checks every supported/rejected media outcome. ## Why This Change Was Made The user-turn owner publishes the initial transcript append and then a revision of that same message when its first-sent model prompt projection is captured. `session.message` therefore is not a one-event-per-message protocol. Check nonempty canonical message IDs and require one unique ID, and independently require one persisted user turn in `chat.history`. This is not openclaw#169434: this scenario sends an ordinary `Reply exactly ...` request, not an inline slash-command acknowledgement. ## Evidence Baseline: `11f576b23cf70615ca4504eb12fdba93591b9c8f`. - Before: `webchat-media-artifacts.e2e.test.ts` failed at `userEvents` length, expected 1 and received 2. - Source: `capturePersistedModelPromptProjection` republishes the same transcript `entryId`; the UI already reconciles same-ID event revisions. - Existing attachment-success, attachment-error, missing-file, mixed-batch and rendered-content checks remain intact. - After: the complete WebChat media matrix passed (1/1), including the new canonical-ID and persisted-user-turn assertions. - A loaded-host attempt timed out; an isolated run finished in 41.5 seconds without changing timeouts. - Independent autoreview: scoped-clean at P2. - Root test typechecks (all four shards), changed-file Oxlint/Oxfmt, and the line-cap ratchet passed. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes the WebChat media-artifact proof treating a revision of one user message as a duplicate user turn. This is an explicitly requested main CI repair.
User Impact
No product behavior changes. The proof still rejects duplicate canonical user turns and still checks every supported/rejected media outcome.
Why This Change Was Made
The user-turn owner publishes the initial transcript append and then a revision of that same message when its first-sent model prompt projection is captured.
session.messagetherefore is not a one-event-per-message protocol. Check nonempty canonical message IDs and require one unique ID, and independently require one persisted user turn inchat.history.This is not #169434: this scenario sends an ordinary
Reply exactly ...request, not an inline slash-command acknowledgement.Evidence
Baseline:
5889e62f4902b8f3fa4b6eb2cecbbd26f5b8ceb0.webchat-media-artifacts.e2e.test.tsfailed atuserEventslength, expected 1 and received 2.capturePersistedModelPromptProjectionrepublishes the same transcriptentryId; the UI already reconciles same-ID event revisions.