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(mut self) -> Self {
111 self.commit = None;
112 self
113 }
114
115 #[must_use]
117 pub fn with_planning_cleared(mut self) -> Self {
118 self.planning = None;
119 self
120 }
121
122 #[must_use]
124 pub fn with_development_cleared(mut self) -> Self {
125 self.development = None;
126 self
127 }
128
129 #[must_use]
131 pub fn with_review_cleared(mut self) -> Self {
132 self.review = None;
133 self
134 }
135
136 #[must_use]
138 pub fn with_xsd_retry_cleared(mut self) -> Self {
139 self.xsd_retry_last_output = None;
140 self
141 }
142}
143
144#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
145pub struct MaterializedPlanningInputs {
146 pub iteration: u32,
147 pub prompt: MaterializedPromptInput,
148}
149
150#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
151pub struct MaterializedDevelopmentInputs {
152 pub iteration: u32,
153 pub prompt: MaterializedPromptInput,
154 pub plan: MaterializedPromptInput,
155}
156
157#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
158pub struct MaterializedReviewInputs {
159 pub pass: u32,
160 pub plan: MaterializedPromptInput,
161 pub diff: MaterializedPromptInput,
162}
163
164#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
165pub struct MaterializedCommitInputs {
166 pub attempt: u32,
167 pub diff: MaterializedPromptInput,
168}
169
170#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)]
171pub struct MaterializedXsdRetryLastOutput {
172 pub phase: PipelinePhase,
173 pub scope_id: u32,
174 pub last_output: MaterializedPromptInput,
175}