ralph_workflow/reducer/state/pipeline/
phase_fields.rs1#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
13#[serde(rename_all = "kebab-case")]
14pub enum ExcludedFileReason {
15 InternalIgnore,
21 NotTaskRelated,
23 Sensitive,
25 Deferred,
27}
28
29#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
34pub struct ExcludedFile {
35 pub path: String,
37 pub reason: ExcludedFileReason,
39}
40
41#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
42pub struct ReviewValidatedOutcome {
43 pub pass: u32,
44 pub issues_found: bool,
45 pub clean_no_issues: bool,
46 #[serde(default)]
50 pub issues: Box<[String]>,
51 #[serde(default)]
52 pub no_issues_found: Option<String>,
53}
54
55#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
56pub struct PlanningValidatedOutcome {
57 pub iteration: u32,
58 pub valid: bool,
59 #[serde(default)]
60 pub markdown: Option<String>,
61}
62
63#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
64pub struct DevelopmentValidatedOutcome {
65 pub iteration: u32,
66 pub status: DevelopmentStatus,
67 pub summary: String,
68 pub files_changed: Option<Box<[String]>>,
72 pub next_steps: Option<String>,
73}
74
75#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
76pub struct FixValidatedOutcome {
77 pub pass: u32,
78 pub status: FixStatus,
79 pub summary: Option<String>,
80}
81
82#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)]
83pub struct CommitValidatedOutcome {
84 pub attempt: u32,
85 pub message: Option<String>,
86 pub reason: Option<String>,
87}
88
89#[derive(Clone, Serialize, Deserialize, Debug, Default)]
90pub struct PromptInputsState {
91 #[serde(default)]
92 pub planning: Option<MaterializedPlanningInputs>,
93 #[serde(default)]
94 pub development: Option<MaterializedDevelopmentInputs>,
95 #[serde(default)]
96 pub review: Option<MaterializedReviewInputs>,
97 #[serde(default)]
98 pub commit: Option<MaterializedCommitInputs>,
99 #[serde(default)]
103 pub xsd_retry_last_output: Option<MaterializedXsdRetryLastOutput>,
104}
105
106impl PromptInputsState {
107 #[must_use]
110 pub fn with_commit_cleared(self) -> Self {
111 Self {
112 commit: None,
113 ..self
114 }
115 }
116
117 #[must_use]
119 pub fn with_planning_cleared(self) -> Self {
120 Self {
121 planning: None,
122 ..self
123 }
124 }
125
126 #[must_use]
128 pub fn with_development_cleared(self) -> Self {
129 Self {
130 development: None,
131 ..self
132 }
133 }
134
135 #[must_use]
137 pub fn with_review_cleared(self) -> Self {
138 Self {
139 review: None,
140 ..self
141 }
142 }
143
144 #[must_use]
146 pub fn with_xsd_retry_cleared(self) -> Self {
147 Self {
148 xsd_retry_last_output: None,
149 ..self
150 }
151 }
152}
153
154#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
155pub struct MaterializedPlanningInputs {
156 pub iteration: u32,
157 pub prompt: MaterializedPromptInput,
158}
159
160#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
161pub struct MaterializedDevelopmentInputs {
162 pub iteration: u32,
163 pub prompt: MaterializedPromptInput,
164 pub plan: MaterializedPromptInput,
165}
166
167#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
168pub struct MaterializedReviewInputs {
169 pub pass: u32,
170 pub plan: MaterializedPromptInput,
171 pub diff: MaterializedPromptInput,
172}
173
174#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
175pub struct MaterializedCommitInputs {
176 pub attempt: u32,
177 pub diff: MaterializedPromptInput,
178}
179
180#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
181pub struct MaterializedXsdRetryLastOutput {
182 pub phase: PipelinePhase,
183 pub scope_id: u32,
184 pub last_output: MaterializedPromptInput,
185}