Skip to content

fix(qa): WebChat media proof counts message revisions as duplicate turns - #169475

Merged
obviyus merged 1 commit into
mainfrom
fix/qa-webchat-message-revisions
Oct 12, 2026
Merged

obviyus merged 1 commit into
mainfrom
fix/qa-webchat-message-revisions

Conversation

@obviyus

@obviyus obviyus commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

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 #169434: this scenario sends an ordinary Reply exactly ... request, not an inline slash-command acknowledgement.

Evidence

Baseline: 5889e62f4902b8f3fa4b6eb2cecbbd26f5b8ceb0.

  • 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.

@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

The 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.

  • Before: The media matrix fails because it receives two user-message events.
  • After: Both revisions are accepted while distinct message IDs and duplicate persisted user turns still fail.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Source inspection supports the focused repair and reported matrix result; direct execution evidence is limited to the author's report.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only repair is outside the ordinary runtime-proof gate; the body reports a passing Gateway media matrix, which this review did not execute.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: The media QA matrix reports a duplicate turn when one user message receives a legitimate revision.
Reason: The maintainer-authored repair corrects an invalid test assumption without weakening attachment checks or changing product behavior.

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
Reviewed head: 15769e37157d381c23552a7d851547d30c8ac506

Before merge

None.

Findings

None.

Agent review details

How this fits together

The 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]
Loading

Technical review

Best 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

  • User-event cardinality assertion changes intended behavior with a stated reason (16a3200: Protect initial assistant publication from exposing managed-media directives while preserving literal user prompts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 16a3200 adds test/e2e/qa-lab/runtime/webchat-media-artifacts.e2e.test.ts:381 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 16a3200cd32c; files: test/e2e/qa-lab/runtime/webchat-media-artifacts.e2e.test.ts)
  • Vyctor H. Brzezowski: Raw commit a178285 adds test/e2e/qa-lab/runtime/webchat-media-artifacts.e2e.test.ts:20 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a1782855a25a; files: test/e2e/qa-lab/runtime/webchat-media-artifacts.e2e.test.ts)

PR surface

Tests +14. Total +14 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 15 1 +14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 15 1 +14

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A false failure in the WebChat media QA matrix warrants a focused correction without changing runtime behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-12T00:28:59.216Z sha 15769e3 :: needs maintainer review before merge. :: none

Reviewed October 11, 2026, 8:35 PM ET / October 12, 2026, 00:35 UTC (Revision 2).

@obviyus
obviyus merged commit 9a7a9f4 into main Oct 12, 2026
81 checks passed
@obviyus
obviyus deleted the fix/qa-webchat-message-revisions branch October 12, 2026 00:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant