Skip to content

refactor(test): consolidate media dedupe coverage - #184832

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-media-dedupe-20261026
Oct 26, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-media-dedupe-20261026

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

A leftover media-retirement probe runs in a separate file instead of the existing reply-payload deduplication suite.

User Impact

No user-visible behavior changes. The lowercase ReplyPayload.mediaUrl and mediaUrls compatibility contract remains covered.

Why This Change Was Made

Move the mixed single/array media case into the existing owner table with identical HTTP inputs and expected output, then remove the standalone file. The original array-only, unmatched-media, delivery-operation, voice-metadata, empty-evidence and Windows cases remain unchanged.

This completes the owner consolidation started in #161144 while preserving the non-goal contract introduced in #113496. No production code or test helpers change. Test case count is unchanged; one test file and nine net test lines are removed.

Evidence

  • Baseline and candidate: 65 tests passed with the same two Windows-only skips across the owner, immediate/queued delivery and media-reference suites.
  • Negative control: preserving an already-sent array item when removing the single URL makes the moved case fail on the retained two.png. Production source was then restored byte-for-byte.
  • Targeted lint, formatting, the core messaging test typecheck graph and git diff --check passed.
  • Independent preservation review found no actionable P2-or-higher findings.
  • All required dependency, unused-file and export scan phases completed on signed head 45b58de158d25ee97f132799431fa13ddf37d8c9. Script exports and production unused files passed.
  • Production/full-tree dependency and export scans remain red on the unchanged isCliRoutedConfigPatch export. Its separate cleanup is owned by chore: keep CLI config patch predicate module-local #184824.
  • The full-tree unused-file scan reports the unchanged standalone scripts/perf/session-actor-receipt-measure.ts benchmark. Neither finding is caused by or suppressed in this test-only patch; their owning files and Knip inputs are unchanged.
  • Hosted exact-head CI supplies broad proof through the native merge gates.

@vincentkoc vincentkoc self-assigned this Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review October 26, 2026 17:15
@vincentkoc
vincentkoc enabled auto-merge (squash) October 26, 2026 17:25
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Moves the mixed single-URL and URL-array deduplication case into the reply-payload test table and removes its standalone file.

Example: A reply contains one.png plus [two.png, three.png], and one.png and two.png were already sent.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-verified test consolidation with appropriate unit validation and no actionable findings; shipped-entry-point proof is unnecessary for the unchanged runtime.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored test-only relocation changes no shipped behavior; preserved fixtures, assertions, reported negative control, and exact-head changed-test checks support coverage preservation.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored consolidation preserves an independent contract in its existing owner suite and removes redundant file-level setup.

Merge readiness

✅ Ready for maintainer review

This PR preserves the media-deduplication contract while consolidating its coverage into the existing owner suite; no actionable defects were found.

Priority: P3
Reviewed head: 45b58de158d25ee97f132799431fa13ddf37d8c9

Before merge

None.

Findings

None.

Agent review details

How this fits together

Reply deduplication receives outgoing payloads and previously sent media references, removes matching media, and passes remaining content to delivery.

flowchart LR
  A[Outgoing reply payloads] --> C[Media deduplication]
  B[Previously sent media references] --> C
  C --> D[Remaining reply content]
  D --> E[Reply delivery]
  F[Consolidated owner tests] --> C
Loading

Technical review

Best possible solution:

Keep the mixed-field contract in the existing deduplication table and remove the redundant standalone suite as proposed.

Do we have a high-confidence way to reproduce the issue?

There is no reported runtime bug to reproduce; source inspection confirms the same mixed-field case is exercised before and after relocation.

Is this the best way to solve the issue?

The smallest complete change is the proposed table insertion and standalone-file removal, preserving the distinct mixed-field failure without adding helpers or production machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 99f7a303e3ff.

Provenance checked

  • Media-retirement non-goal coverage keeps the original intent (7eb9fa3: Keep lowercase outbound ReplyPayload media and deduplication independent of persisted inbound-media retirement.)
  • Reply-payload deduplication table keeps the original intent (75e7c0d: Consolidate repeated test setup and assertions while preserving distinct behavioral cases.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 75e7c0d adds src/auto-reply/reply/reply-payloads.test.ts:81 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 75e7c0dc7c1a; files: src/auto-reply/reply/reply-payloads.test.ts)
  • Yaroslav Boiko: Raw commit 8382593 adds src/auto-reply/reply/reply-payloads.test.ts:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 838259331f84; files: src/auto-reply/reply/reply-payloads.test.ts)

PR surface

Tests -9. Total -9 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 9 18 -9
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 9 18 -9

Labels

Label changes:

  • add P3: This is a behavior-preserving test consolidation with no production changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a behavior-preserving test consolidation with no production changes.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • 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.

Reviewed October 26, 2026, 1:35 PM ET / 17:35 UTC.

@vincentkoc
vincentkoc merged commit dc95098 into main Oct 26, 2026
199 checks passed
@vincentkoc
vincentkoc deleted the refactor/test-audit-media-dedupe-20261026 branch October 26, 2026 17:48
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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