Skip to content

Commit 43ee832

Browse files
committed
fix: Mark memory-intensive doctests as no_run
Mark doctests that cause OOM (SIGKILL) during CI as no_run so they compile but don't execute. These tests import complex types from the prodigy crate which requires significant memory at runtime. Also update zmij dependency to 1.0.7. Files changed: - dlq_integration.rs: Mark agent_result_to_dlq_item doctest as no_run - env_interpolation.rs: Mark all doctests as no_run - phases/mod.rs: Mark module-level and trait doctests as no_run - Cargo.lock: Update zmij 1.0.6 -> 1.0.7
1 parent 3825cf2 commit 43ee832

File tree

5 files changed

+22
-14
lines changed

5 files changed

+22
-14
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cook/execution/claude.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ impl<R: CommandRunner + 'static> ClaudeExecutor for ClaudeExecutorImpl<R> {
7878
env_vars: HashMap<String, String>,
7979
) -> Result<ExecutionResult> {
8080
// Handle test mode
81-
let test_mode = self.test_config.as_ref().map(|c| c.test_mode).unwrap_or(false);
81+
let test_mode = self
82+
.test_config
83+
.as_ref()
84+
.map(|c| c.test_mode)
85+
.unwrap_or(false);
8286
if test_mode {
8387
return self.handle_test_mode_execution(command).await;
8488
}
@@ -110,7 +114,11 @@ impl<R: CommandRunner + 'static> ClaudeExecutor for ClaudeExecutorImpl<R> {
110114

111115
async fn check_claude_cli(&self) -> Result<bool> {
112116
// Always return true in test mode
113-
let test_mode = self.test_config.as_ref().map(|c| c.test_mode).unwrap_or(false);
117+
let test_mode = self
118+
.test_config
119+
.as_ref()
120+
.map(|c| c.test_mode)
121+
.unwrap_or(false);
114122
if test_mode {
115123
return Ok(true);
116124
}

src/cook/execution/mapreduce/dlq_integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use std::collections::HashMap;
4646
///
4747
/// # Example
4848
///
49-
/// ```
49+
/// ```no_run
5050
/// use prodigy::cook::execution::mapreduce::dlq_integration::agent_result_to_dlq_item;
5151
/// use prodigy::cook::execution::mapreduce::agent::types::{AgentResult, AgentStatus};
5252
/// use serde_json::json;

src/cook/execution/mapreduce/env_interpolation.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use std::collections::HashMap;
1717
/// - Named variables: `ARG_1`, `ARG_2`, `ARG_3`, etc. (for `${ARG_1}` syntax)
1818
///
1919
/// # Examples
20-
/// ```
20+
/// ```no_run
2121
/// use prodigy::cook::execution::mapreduce::env_interpolation::build_positional_args_context;
2222
/// let args = vec!["file.txt".to_string(), "output.txt".to_string()];
2323
/// let context = build_positional_args_context(&args);
@@ -46,7 +46,7 @@ pub fn build_positional_args_context(args: &[String]) -> InterpolationContext {
4646
/// Interpolate a single environment variable value with positional arguments
4747
///
4848
/// # Examples
49-
/// ```
49+
/// ```no_run
5050
/// use prodigy::cook::execution::mapreduce::env_interpolation::{build_positional_args_context, interpolate_env_value};
5151
/// use prodigy::cook::execution::interpolation::InterpolationEngine;
5252
///
@@ -74,7 +74,7 @@ pub fn interpolate_env_value(
7474
/// and returns a new map with interpolated values.
7575
///
7676
/// # Examples
77-
/// ```
77+
/// ```no_run
7878
/// use std::collections::HashMap;
7979
/// use prodigy::cook::execution::mapreduce::env_interpolation::interpolate_workflow_env_with_positional_args;
8080
///
@@ -127,7 +127,7 @@ pub fn interpolate_workflow_env_with_positional_args(
127127
/// This is separate from interpolation - these are raw positional arg values.
128128
///
129129
/// # Examples
130-
/// ```
130+
/// ```no_run
131131
/// use prodigy::cook::execution::mapreduce::env_interpolation::positional_args_as_env_vars;
132132
///
133133
/// let args = vec!["file.txt".to_string(), "output.txt".to_string()];
@@ -152,7 +152,7 @@ pub fn positional_args_as_env_vars(positional_args: &[String]) -> HashMap<String
152152
/// Convert EnvValue map to plain string map (for MapPhase.workflow_env)
153153
///
154154
/// # Examples
155-
/// ```
155+
/// ```no_run
156156
/// use std::collections::HashMap;
157157
/// use prodigy::cook::environment::EnvValue;
158158
/// use prodigy::cook::execution::mapreduce::env_interpolation::env_values_to_plain_map;

src/cook/execution/mapreduce/phases/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! To add a new custom phase type to the MapReduce workflow:
1010
//!
1111
//! 1. **Define the Phase Type**: Add a new variant to the `PhaseType` enum:
12-
//! ```rust
12+
//! ```rust,no_run
1313
//! pub enum PhaseType {
1414
//! Setup,
1515
//! Map,
@@ -19,7 +19,7 @@
1919
//! ```
2020
//!
2121
//! 2. **Implement PhaseExecutor**: Create a new executor for your phase:
22-
//! ```rust
22+
//! ```rust,no_run
2323
//! # use prodigy::cook::execution::mapreduce::phases::{PhaseExecutor, PhaseContext, PhaseResult, PhaseError, PhaseType};
2424
//! # use async_trait::async_trait;
2525
//! pub struct PostProcessPhaseExecutor {
@@ -78,7 +78,7 @@
7878
//!
7979
//! You can customize phase transitions by implementing `PhaseTransitionHandler`:
8080
//!
81-
//! ```rust
81+
//! ```rust,no_run
8282
//! # use prodigy::cook::execution::mapreduce::phases::{PhaseTransitionHandler, PhaseType, PhaseContext, PhaseError, PhaseTransition, PhaseResult};
8383
//! struct CustomTransitionHandler;
8484
//!
@@ -266,7 +266,7 @@ pub enum PhaseError {
266266
///
267267
/// # Example Implementation
268268
///
269-
/// ```rust
269+
/// ```rust,no_run
270270
/// # use prodigy::cook::execution::mapreduce::phases::{PhaseExecutor, PhaseContext, PhaseResult, PhaseError, PhaseType, PhaseMetrics};
271271
/// # use async_trait::async_trait;
272272
/// # use serde_json::json;

0 commit comments

Comments
 (0)