ci: add GitHub Actions workflows with semantic-release auto-versioning

chore: fix all 702 clippy warnings across codebase
- auto-fix 475 via cargo clippy --fix
- fix remaining 227 manually: uninlined_format_args, redundant_closure, match_same_arms,
  underscore_binding, format_push_string, items_after_statements, needless_pass_by_value,
  clone_on_copy, case_sensitive_extension, single_match/let-else, write_with_newline,
  and other clippy lints
This commit is contained in:
asepharyana
2026-07-13 08:12:12 +07:00
parent be921d6836
commit 29a9fae3f6
79 changed files with 826 additions and 904 deletions
+9 -12
View File
@@ -21,6 +21,7 @@
//! ```
use std::collections::HashMap;
use std::fmt::Write;
use std::sync::{Arc, Mutex};
use crate::app::workflow::engine::{execute_primitive, LiveStateFn, AgentStatus};
use crate::app::workflow::script::{ScriptPrimitive, ScriptOptions, WorkflowScript};
@@ -64,9 +65,7 @@ pub fn run_company_pipeline(
let wf = WorkflowScript {
name: "company-pipeline".to_string(),
description: format!(
"Company Pipeline (full): Strategy → Engineering → Quality → Security → Documentation",
),
description: "Company Pipeline (full): Strategy → Engineering → Quality → Security → Documentation".to_string(),
script: ScriptPrimitive::Pipeline(pipeline_scripts),
options: ScriptOptions {
max_concurrency: 1, // sequential by design
@@ -197,21 +196,19 @@ fn build_executive_summary(
divisions: &[division::Division],
) -> String {
let mut summary = String::new();
summary.push_str(&format!("Pipeline for: {}\n", request));
writeln!(summary, "Pipeline for: {request}").unwrap();
for (i, div) in divisions.iter().enumerate() {
let verdict = results.get(i)
.map(|r| {
let verdict = results.get(i).map_or_else(|| "".to_string(), |r| {
r.lines().next().unwrap_or(r)
.chars().take(100).collect::<String>()
})
.unwrap_or_else(|| "".to_string());
});
summary.push_str(&format!(" {}: {}\n", div.name, verdict));
writeln!(summary, " {}: {}", div.name, verdict).unwrap();
}
if !findings.is_empty() {
summary.push_str(&format!(" Notes: {} cross-division finding(s)\n", findings.len()));
writeln!(summary, " Notes: {} cross-division finding(s)", findings.len()).unwrap();
}
summary
@@ -223,7 +220,7 @@ fn build_executive_summary(
/// Simple = single file, minor fix, quick lookup, config change.
/// Complex = new feature, multi-file refactor, architecture change.
///
/// Used by the auto-CEO pipeline trigger in run_agent_turn to decide
/// Used by the auto-CEO pipeline trigger in `run_agent_turn` to decide
/// whether to delegate to the full company pipeline or handle directly.
///
/// Heuristics:
@@ -249,7 +246,7 @@ pub fn is_complex_request(request: &str) -> bool {
return false;
}
// Multi-line/multi-sentence → likely complex
let sentences = trimmed.split(|c| c == '.' || c == '!' || c == '?')
let sentences = trimmed.split(['.', '!', '?'])
.filter(|s| !s.trim().is_empty())
.count();
if sentences >= 3 {