Skip to content

test(reply): seed channel fixtures for dedupe tests#93104

Merged
RomneyDa merged 1 commit into
mainfrom
dallin/fix-auto-reply-cross-target-flake
Jun 15, 2026
Merged

test(reply): seed channel fixtures for dedupe tests#93104
RomneyDa merged 1 commit into
mainfrom
dallin/fix-auto-reply-cross-target-flake

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Seed lightweight telegram and discord channel fixtures in agent-runner-payloads.test.ts.
  • Keep the #90943 route/thread dedupe behavior intact, including bundled Telegram fallback matching when the active registry omits Telegram.
  • Avoid cold-loading bundled Telegram/Discord runtime from this integration suite when it only needs generic route-dedupe fixtures.

Root cause: the flaky agent-runner-payloads.test.ts cases used Telegram/Discord provider ids without installing those channels in the active test registry. The first route-dedupe test could therefore fall through to bundled channel loading, which is expensive enough to trip the 120s CI timeout depending on shard timing. The test now provides lightweight loaded channel fixtures, so the integration tests exercise reply-payload dedupe without materializing bundled channel runtime.

Refs #91587.

Verification

  • Recent-intent check: inspected c67dc59b02 / fix(reply): deliver final reply when queued follow-up claims session; scope dedupe to routed thread #90943; preserved its intentional Telegram bundled-fallback behavior and restored the existing omitted-registry Telegram unit coverage.
  • Cold local repro with lightweight fixtures: first target-dedupe call was about 0.45s, subsequent calls were sub-millisecond.
  • git diff --check
  • pnpm exec oxfmt --check --threads=1 src/auto-reply/reply/agent-runner-payloads.test.ts src/auto-reply/reply/reply-payloads-dedupe.ts src/auto-reply/reply/reply-payloads.test.ts
  • node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-payloads.test.ts src/auto-reply/reply/reply-payloads.test.ts src/auto-reply/reply/followup-delivery.test.ts -- --reporter=dot
  • node scripts/run-vitest.mjs --config test/vitest/vitest.auto-reply-reply.config.ts src/auto-reply/reply/abort.test.ts src/auto-reply/reply/acp-projector.test.ts src/auto-reply/reply/acp-stream-settings.test.ts src/auto-reply/reply/agent-runner-cli-dispatch.test.ts src/auto-reply/reply/agent-runner-direct-runtime-config.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/agent-runner-helpers.test.ts src/auto-reply/reply/agent-runner-memory.dedup.test.ts src/auto-reply/reply/agent-runner-memory.test.ts src/auto-reply/reply/agent-runner-payloads.test.ts src/auto-reply/reply/agent-runner-reminder-guard.test.ts src/auto-reply/reply/agent-runner-runtime-config.test.ts src/auto-reply/reply/agent-runner-session-reset.test.ts src/auto-reply/reply/agent-runner-usage-line.test.ts src/auto-reply/reply/agent-runner-utils.secret-resolution.test.ts src/auto-reply/reply/agent-runner-utils.test.ts src/auto-reply/reply/agent-runner.final-media-runreplyagent.test.ts src/auto-reply/reply/agent-runner.media-paths.test.ts src/auto-reply/reply/agent-runner.misc.runreplyagent.test.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts src/auto-reply/reply/bash-command.stop.test.ts src/auto-reply/reply/block-reply-pipeline.test.ts src/auto-reply/reply/block-streaming.test.ts -- --reporter=dot

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jun 15, 2026
@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 14, 2026, 9:07 PM ET / 01:07 UTC.

Summary
This PR switches reply message-tool dedupe from bundled channel-plugin fallback reads to loaded-registry reads and updates the omitted-Telegram unit expectation.

PR surface: Source +1, Tests -11. Total -10 across 2 files.

Reproducibility: Partly: source inspection confirms current main can fall from reply dedupe into getChannelPlugin's bundled fallback when the active registry omits the provider. I did not run the flaky 120-second shard in this read-only review, so the timeout magnitude rests on the PR's reported benchmark and CI context.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • No automated repair is needed; this should proceed through normal maintainer review and required check gates.

Security
Cleared: The diff only changes TypeScript reply-dedupe code and tests; it does not touch workflows, dependencies, lockfiles, package scripts, secrets handling, or downloaded code execution paths.

Review details

Best possible solution:

Land this narrow loaded-registry dedupe fix after the normal required check gates pass, preserving provider-specific matching only from the active plugin registry.

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

Partly: source inspection confirms current main can fall from reply dedupe into getChannelPlugin's bundled fallback when the active registry omits the provider. I did not run the flaky 120-second shard in this read-only review, so the timeout magnitude rests on the PR's reported benchmark and CI context.

Is this the best way to solve the issue?

Yes, this appears to be the best narrow fix: dedupe already uses loaded-only target normalization, and switching the remaining matcher/thread hooks to the same loaded-registry reader removes the cold bundled load without adding a new contract. A lightweight bundled matcher would preserve more fallback behavior, but it would keep special fallback semantics in the hot path that the scoped policy is trying to avoid.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e82d19fb06b5.

Label changes

Label changes:

  • add P2: This is a bounded reply-dedupe/test-performance fix with limited blast radius and no evidence of a live user-facing outage in this PR.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a MEMBER-authored maintainer PR, so the external contributor real-behavior proof gate does not apply; the PR body lists focused local validation commands and CI is the appropriate proof lane here.

Label justifications:

  • P2: This is a bounded reply-dedupe/test-performance fix with limited blast radius and no evidence of a live user-facing outage in this PR.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a MEMBER-authored maintainer PR, so the external contributor real-behavior proof gate does not apply; the PR body lists focused local validation commands and CI is the appropriate proof lane here.
Evidence reviewed

PR surface:

Source +1, Tests -11. Total -10 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 5 4 +1
Tests 1 3 14 -11
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 8 18 -10

What I checked:

  • Repository policy applied: Read the full root policy plus scoped channel, plugin, agent, and Telegram notes; the relevant guidance favors avoiding full bundled runtime loading in hot agent/channel paths and using loaded-only mode when callers only need registered fixtures. (src/agents/AGENTS.md:19, e82d19fb06b5)
  • PR-head implementation: At PR head, reply dedupe uses getLoadedChannelPluginForRead for target normalization, reply-suppression matching, reply transport resolution, and the thread-matcher guard; the getChannelPlugin import is gone. (src/auto-reply/reply/reply-payloads-dedupe.ts:191, 8406cff6eae8)
  • Current-main root cause: Current main's getChannelPlugin returns a loaded plugin or falls back to getBundledChannelPlugin, which is the fallback path this PR removes from the dedupe hot path. (src/channels/plugins/registry.ts:49, e82d19fb06b5)
  • Loaded registry contract: getLoadedChannelPluginForRead reads only the active plugin channel registry state and returns undefined when the provider is not loaded, avoiding bundled materialization. (src/channels/plugins/registry-loaded-read.ts:30, e82d19fb06b5)
  • Regression coverage shape: The PR test keeps provider-specific Telegram topic matching when a Telegram plugin is installed, and changes the omitted-registry case to generic route matching with no bundled Telegram mock. (src/auto-reply/reply/reply-payloads.test.ts:193, 8406cff6eae8)
  • Call path checked: buildReplyPayloads calls resolveMessagingToolPayloadDedupe only after message-tool evidence exists, so the changed lookup sits on the reply payload dedupe path described by the PR. (src/auto-reply/reply/agent-runner-payloads.ts:296, e82d19fb06b5)

Likely related people:

  • vincentkoc: git blame shows d28691d added the loaded channel reader, the split reply dedupe helper, and most of the current dedupe test/helper surface this PR adjusts. (role: recent loaded-registry and dedupe contributor; confidence: high; commits: d28691da97fc; files: src/channels/plugins/registry-loaded-read.ts, src/auto-reply/reply/reply-payloads-dedupe.ts, src/auto-reply/reply/reply-payloads.test.ts)
  • sandieman2: git blame and PR history tie the current routed-thread guard and resolveReplyTransport dedupe path to the merged route/thread reply fix in c67dc59. (role: routed-thread dedupe behavior author; confidence: high; commits: c67dc59b02b0; files: src/auto-reply/reply/reply-payloads-dedupe.ts)
  • steipete: The merged route/thread fix includes extensive adjacent reply-delivery and dedupe work attributed to steipete in the PR commit history and co-authored merge body, making this a useful routing candidate for review. (role: adjacent route/thread reply contributor; confidence: medium; commits: c67dc59b02b0; files: src/auto-reply/reply/reply-payloads-dedupe.ts, src/auto-reply/reply/agent-runner-payloads.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. labels Jun 15, 2026
@RomneyDa
RomneyDa merged commit cae64ee into main Jun 15, 2026
199 of 205 checks passed
@RomneyDa
RomneyDa deleted the dallin/fix-auto-reply-cross-target-flake branch June 15, 2026 01:09
@RomneyDa RomneyDa changed the title fix(reply): avoid bundled channel load in dedupe test(reply): seed channel fixtures for dedupe tests Jun 15, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. 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