feat(challenges): add term-challenge WASM module - #19
Conversation
Add a new WASM challenge crate for the terminal benchmark challenge (v2), along with the cloned term-challenge v2 reference repository and SDK improvements to support the new pattern. Core changes: - New crate challenges/term-challenge-wasm/ targeting wasm32-unknown-unknown (cdylib) that implements the Challenge trait with evaluate() and validate() methods. The evaluate() method deserializes agent task results via bincode, computes a pass-rate score (0-100), and returns structured output. The validate() method checks for non-empty agent data and challenge ID. - Updated register_challenge!() macro in challenge-sdk-wasm to use a const fn new() constructor instead of Default::default(), enabling static initialization required by no_std WASM modules. - Added challenges/term-challenge/ as a reference clone of the PlatformNetwork/term-challenge v2 branch. - Added term-challenge-wasm to workspace members in root Cargo.toml. - Updated Cargo.lock with the new crate and its dependencies.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ge-wasm-module # Conflicts: # Cargo.lock # crates/challenge-sdk-wasm/src/lib.rs
…ge-wasm-module # Conflicts: # challenges/term-challenge-wasm/Cargo.toml # challenges/term-challenge-wasm/src/lib.rs
Summary
Introduces a new
term-challenge-wasmcrate that compiles the terminal benchmark challenge as a WASM module targetingwasm32-unknown-unknown.Changes
challenges/term-challenge-wasm/:cdylibcrate implementing theChallengetrait fromplatform-challenge-sdk-wasm, withevaluate()(scores agent task pass-rate) andvalidate()methods, registered viaregister_challenge!macro under#![no_std]crates/challenge-sdk-wasm):register_challenge!now uses<$ty>::new()instead of<$ty as Default>::default()forstaticinitialization, requiring aconst fn new()constructorchallenges/term-challenge-wasmto workspace memberschallenges/term-challenge(v2 branch) as a reference submoduleNotes
const fn new()requirement for challenge types