fix: resolve wasm broadcast merge conflicts with staging (#395)#1460
fix: resolve wasm broadcast merge conflicts with staging (#395)#1460ilblackdragon merged 5 commits intostagingfrom
Conversation
- 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>
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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_monitortests to include the newly requiredfallback_deliverablefield inSseEvent::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.
| #[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()); | ||
| } |
There was a problem hiding this comment.
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).
* 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>
* 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>
…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>
…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>
Summary
Takeover of #395 — merges staging and fixes CI failures.
broadcast()impls fromWasmChannelandSharedWasmChannel(staging already has the genericcall_on_broadcastpath)test_broadcast_delegates_to_call_on_broadcastfor the generic pathfallback_deliverablefield injob_monitortestSseEvent::JobResultconstructorsSupersedes #395 (original by @davidpty).
Test plan
cargo fmt -- --checkcleancargo clippy --all --benches --tests --examples --all-featureszero warningscargo test broadcast— all 14 broadcast tests pass🤖 Generated with Claude Code