@ondeinference / ed Mirror · read-only / commits / e6d25f3
Fork 0

Read-only mirror of github.com/ondeinference/ed.

Mirrored from https://github.com/ondeinference/ed.git

Synced Nov 23, 01:00 UTC

ed-agent: verify the wasm32 ?Send test impls in CI

Addresses review feedback on #57. The check-wasm32 job ran without --all-targets, so the test module never compiled on wasm32 and the ?Send switches inside it went unchecked. Adding --all-targets exposed that two test impls, CountingExecutor (ToolExecutor) and FixedApproval (ApprovalHandler), still carried a plain async_trait and so kept the Send bound their traits drop on wasm32-unknown-unknown. Give both the same wasm32 cfg_attr switch the production impls use, and run the wasm32 check and clippy with --all-targets so this path stays covered. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si> Co-Authored-By: OndeCode v1.1.2 <noreply@ondeinference.com>

Seto Elkahfi committed Nov 16, 2026 at 12:31 UTC e6d25f3f3330cd0940cf49f0a56afbb7ca7d7b93
2 files changed +12 -4
.github/workflows/ci.yml
+2 -2
@@ -124,8 +124,8 @@ jobs:
124 with:
125 workspaces: ed
126 key: wasm32
127 - - run: cargo check --locked --target wasm32-unknown-unknown -p ed-agent
128 - - run: cargo clippy --locked --target wasm32-unknown-unknown -p ed-agent -- -D warnings
127 + - run: cargo check --locked --target wasm32-unknown-unknown -p ed-agent --all-targets
128 + - run: cargo clippy --locked --target wasm32-unknown-unknown -p ed-agent --all-targets -- -D warnings
129
130 ci:
131 name: CI status
crates/ed-agent/src/ed.rs
+10 -2
@@ -654,7 +654,11 @@ mod tests {
654
655 struct CountingExecutor(AtomicUsize);
656
657 - #[async_trait::async_trait]
657 + #[cfg_attr(all(target_arch = "wasm32", target_os = "unknown"), async_trait::async_trait(?Send))]
658 + #[cfg_attr(
659 + not(all(target_arch = "wasm32", target_os = "unknown")),
660 + async_trait::async_trait
661 + )]
662 impl ToolExecutor for CountingExecutor {
663 async fn execute(&self, tool_name: &str, _: &str) -> Result<String, String> {
664 self.0.fetch_add(1, Ordering::Relaxed);
@@ -664,7 +668,11 @@ mod tests {
668
669 struct FixedApproval(ApprovalDecision);
670
667 - #[async_trait::async_trait]
671 + #[cfg_attr(all(target_arch = "wasm32", target_os = "unknown"), async_trait::async_trait(?Send))]
672 + #[cfg_attr(
673 + not(all(target_arch = "wasm32", target_os = "unknown")),
674 + async_trait::async_trait
675 + )]
676 impl ApprovalHandler for FixedApproval {
677 async fn approve(&self, _: ApprovalRequest) -> ApprovalDecision {
678 self.0