📝 Add docstrings to test/challenge-orchestrator#12
Closed
coderabbitai[bot] wants to merge 1 commit intomainfrom
Closed
📝 Add docstrings to test/challenge-orchestrator#12coderabbitai[bot] wants to merge 1 commit intomainfrom
test/challenge-orchestrator#12coderabbitai[bot] wants to merge 1 commit intomainfrom
Conversation
Docstrings generation was requested by @cuteolaf. * #11 (comment) The following files were modified: * `crates/challenge-orchestrator/src/backend.rs` * `crates/challenge-orchestrator/src/docker.rs` * `crates/challenge-orchestrator/src/evaluator.rs` * `crates/challenge-orchestrator/src/health.rs` * `crates/challenge-orchestrator/src/lib.rs` * `crates/challenge-orchestrator/src/lifecycle.rs`
Author
|
Important Review skippedCodeRabbit bot authored PR detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
echobt
added a commit
that referenced
this pull request
Feb 21, 2026
#12) Shift the challenge execution model to prioritize WASM over Docker by making docker_image optional, adding WASM module discovery, enriching WASM metadata with resource limits and network policy, and deprecating Docker-based code paths. Challenge registry (crates/challenge-registry/): - Make ChallengeEntry.docker_image an Option<String> with serde(default) instead of a required String, allowing WASM-only challenges. - Add validation in register() requiring at least one of docker_image or wasm_module, and log preference for WASM when both are present. - Add WasmModuleMetadata::verify_hash() using SHA-256 to verify module bytes against the stored hash. - Add ChallengeEntry::is_wasm_ready() helper method. - Add WasmModuleDiscovery: new DiscoverySource::WasmDirectory variant, wasm_paths config field, and discover_from_wasm_dir() that scans a directory for .wasm files and creates DiscoveredChallenge entries. - Emit deprecation warnings when Docker registry discovery is used. Core models (crates/core/): - Add ResourceLimits struct (max_memory_bytes, max_fuel, max_execution_time_secs) with sensible defaults (256MB memory, 300s timeout). - Extend WasmModuleMetadata with network_policy and resource_limits fields, both with serde(default) for backward compatibility. - Add ChainState helper methods: get_wasm_challenge(), register_wasm_challenge(), and list_wasm_challenges() making wasm_challenge_configs the canonical source. Challenge orchestrator (crates/challenge-orchestrator/): - Add docker-legacy feature flag (enabled by default) to gate Docker cleanup. - Add deprecation warnings on pull_image(), start_challenge(), and cleanup_stale_task_containers() Docker code paths. Breaking change: ChallengeEntry.docker_image is now Option<String>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docstrings generation was requested by @cuteolaf.
challenge-orchestrator#11 (comment)The following files were modified:
crates/challenge-orchestrator/src/backend.rscrates/challenge-orchestrator/src/docker.rscrates/challenge-orchestrator/src/evaluator.rscrates/challenge-orchestrator/src/health.rscrates/challenge-orchestrator/src/lib.rscrates/challenge-orchestrator/src/lifecycle.rsThese files were kept as they were
crates/challenge-orchestrator/src/config.rsThese file types are not supported
crates/challenge-orchestrator/Cargo.tomlℹ️ Note