Skip to content

fix: resolve wasm broadcast merge conflicts with staging (#395)#1460

Merged
ilblackdragon merged 5 commits intostagingfrom
fix/wasm-telegram-broadcast
Mar 20, 2026
Merged

fix: resolve wasm broadcast merge conflicts with staging (#395)#1460
ilblackdragon merged 5 commits intostagingfrom
fix/wasm-telegram-broadcast

Conversation

@ilblackdragon
Copy link
Copy Markdown
Member

Summary

Takeover of #395 — merges staging and fixes CI failures.

  • Remove duplicate broadcast() impls from WasmChannel and SharedWasmChannel (staging already has the generic call_on_broadcast path)
  • Remove obsolete telegram-specific test helper and tests that tested the old telegram-only broadcast logic
  • Add test_broadcast_delegates_to_call_on_broadcast for the generic path
  • Fix missing fallback_deliverable field in job_monitor test SseEvent::JobResult constructors

Supersedes #395 (original by @davidpty).

Test plan

  • cargo fmt -- --check clean
  • cargo clippy --all --benches --tests --examples --all-features zero warnings
  • cargo test broadcast — all 14 broadcast tests pass

🤖 Generated with Claude Code

davidpty and others added 5 commits February 27, 2026 17:47
- Remove duplicate broadcast() impls from WasmChannel and SharedWasmChannel
  (staging already has the generic call_on_broadcast path)
- Remove obsolete telegram-specific test helpers and tests that tested
  the old telegram-only broadcast logic
- Add test_broadcast_delegates_to_call_on_broadcast for the generic path
- Fix missing fallback_deliverable field in job_monitor test SseEvents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 20, 2026 07:37
@github-actions github-actions Bot added size: S 10-49 changed lines risk: medium Business logic, config, or moderate-risk modules scope: agent Agent core (agent loop, router, scheduler) scope: channel/wasm WASM channel runtime contributor: core 20+ merged PRs and removed risk: medium Business logic, config, or moderate-risk modules labels Mar 20, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves merge conflicts related to WASM broadcast functionality by integrating changes from staging and addressing CI failures. It streamlines the broadcast mechanism by removing duplicate implementations, cleans up outdated Telegram-specific tests, and ensures test coverage for the generic broadcast path, while also fixing a minor field omission in job monitor tests.

Highlights

  • Duplicate broadcast() implementations: Removed redundant broadcast() implementations from WasmChannel and SharedWasmChannel, leveraging the generic call_on_broadcast path already present in staging.
  • Obsolete Telegram-specific tests: Eliminated an obsolete Telegram-specific test helper and associated tests that targeted the old Telegram-only broadcast logic.
  • New broadcast delegation test: Introduced test_broadcast_delegates_to_call_on_broadcast to verify the generic broadcast path.
  • job_monitor test fix: Corrected missing fallback_deliverable field in job_monitor test SseEvent::JobResult constructors.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request resolves merge conflicts from staging, primarily related to the broadcast functionality in WASM channels. The changes include removing duplicate implementations, cleaning up obsolete tests, and adding a new test for the generic broadcast path. Additionally, it fixes compilation errors in job_monitor tests by adding the missing fallback_deliverable field. The changes are correct and improve test coverage and code consistency. I have no specific feedback on the code changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR resolves staging merge conflicts around WASM channel broadcast behavior and unblocks CI by aligning tests with the current generic call_on_broadcast path and updated SSE event shapes.

Changes:

  • Adds a WASM wrapper regression test around broadcast() behavior.
  • Updates job_monitor tests to include the newly required fallback_deliverable field in SseEvent::JobResult.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/channels/wasm/wrapper.rs Adds a broadcast-related test and imports OutgoingResponse for test usage.
src/agent/job_monitor.rs Fixes test constructors for SseEvent::JobResult by adding fallback_deliverable: None.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3405 to +3413
#[tokio::test]
async fn test_broadcast_delegates_to_call_on_broadcast() {
let channel = create_test_channel();
// With `component: None`, call_on_broadcast short-circuits to Ok(()).
let result = channel
.broadcast("146032821", OutgoingResponse::text("hello"))
.await;
assert!(result.is_ok());
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_broadcast_delegates_to_call_on_broadcast doesn’t actually verify delegation: with component: None, both WasmChannel::broadcast() (via call_on_broadcast short-circuit) and the Channel trait’s default broadcast() would return Ok(()). This makes the test name/intent misleading and weak as a regression test. Consider either renaming it to reflect what it asserts (e.g., broadcast succeeds with no WASM module) or strengthening it to assert non-default behavior (e.g., an observable side effect or an error condition that only the WasmChannel override can produce).

Copilot uses AI. Check for mistakes.
@ilblackdragon ilblackdragon merged commit 1b97ef4 into staging Mar 20, 2026
17 checks passed
@ilblackdragon ilblackdragon deleted the fix/wasm-telegram-broadcast branch March 20, 2026 07:41
zmanian pushed a commit that referenced this pull request Mar 21, 2026
* channels/wasm: implement telegram broadcast path for message tool

* channels/wasm: tighten telegram broadcast contract and tests

* fix: resolve merge conflicts with staging for wasm broadcast

- Remove duplicate broadcast() impls from WasmChannel and SharedWasmChannel
  (staging already has the generic call_on_broadcast path)
- Remove obsolete telegram-specific test helpers and tests that tested
  the old telegram-only broadcast logic
- Add test_broadcast_delegates_to_call_on_broadcast for the generic path
- Fix missing fallback_deliverable field in job_monitor test SseEvents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: davidpty <127684147+davidpty@users.noreply.github.com>
Co-authored-by: firat.sertgoz <f@nuff.tech>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
zmanian pushed a commit that referenced this pull request Mar 21, 2026
* channels/wasm: implement telegram broadcast path for message tool

* channels/wasm: tighten telegram broadcast contract and tests

* fix: resolve merge conflicts with staging for wasm broadcast

- Remove duplicate broadcast() impls from WasmChannel and SharedWasmChannel
  (staging already has the generic call_on_broadcast path)
- Remove obsolete telegram-specific test helpers and tests that tested
  the old telegram-only broadcast logic
- Add test_broadcast_delegates_to_call_on_broadcast for the generic path
- Fix missing fallback_deliverable field in job_monitor test SseEvents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: davidpty <127684147+davidpty@users.noreply.github.com>
Co-authored-by: firat.sertgoz <f@nuff.tech>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bkutasi pushed a commit to bkutasi/ironclaw that referenced this pull request Mar 28, 2026
…nearai#1460)

* channels/wasm: implement telegram broadcast path for message tool

* channels/wasm: tighten telegram broadcast contract and tests

* fix: resolve merge conflicts with staging for wasm broadcast

- Remove duplicate broadcast() impls from WasmChannel and SharedWasmChannel
  (staging already has the generic call_on_broadcast path)
- Remove obsolete telegram-specific test helpers and tests that tested
  the old telegram-only broadcast logic
- Add test_broadcast_delegates_to_call_on_broadcast for the generic path
- Fix missing fallback_deliverable field in job_monitor test SseEvents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: davidpty <127684147+davidpty@users.noreply.github.com>
Co-authored-by: firat.sertgoz <f@nuff.tech>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
drchirag1991 pushed a commit to drchirag1991/ironclaw that referenced this pull request Apr 8, 2026
…nearai#1460)

* channels/wasm: implement telegram broadcast path for message tool

* channels/wasm: tighten telegram broadcast contract and tests

* fix: resolve merge conflicts with staging for wasm broadcast

- Remove duplicate broadcast() impls from WasmChannel and SharedWasmChannel
  (staging already has the generic call_on_broadcast path)
- Remove obsolete telegram-specific test helpers and tests that tested
  the old telegram-only broadcast logic
- Add test_broadcast_delegates_to_call_on_broadcast for the generic path
- Fix missing fallback_deliverable field in job_monitor test SseEvents

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: davidpty <127684147+davidpty@users.noreply.github.com>
Co-authored-by: firat.sertgoz <f@nuff.tech>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs scope: agent Agent core (agent loop, router, scheduler) scope: channel/wasm WASM channel runtime size: S 10-49 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants