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
+10 -10
View File
@@ -58,14 +58,14 @@ impl Tool for WorkflowRun {
///
/// Return: the workflow engine's output string, or an error if the
/// script argument is missing or fails to parse as JSON.
fn run(&self, _ctx: &ToolCtx, args: &Value) -> Result<String> {
fn run(&self, ctx: &ToolCtx, args: &Value) -> Result<String> {
let script_str = args.get("script")
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow!("missing required argument: script"))?;
let workflow_script: crate::app::workflow::script::WorkflowScript =
serde_json::from_str(script_str)
.map_err(|e| anyhow!("failed to parse workflow script: {}", e))?;
.map_err(|e| anyhow!("failed to parse workflow script: {e}"))?;
let workflow_args: std::collections::HashMap<String, String> = args.get("args")
.and_then(|v| v.as_object())
@@ -77,7 +77,7 @@ impl Tool for WorkflowRun {
.unwrap_or_default();
crate::app::workflow::engine::run_workflow(
&workflow_script, &workflow_args, &_ctx.session_dir, &_ctx.workspaces,
&workflow_script, &workflow_args, &ctx.session_dir, &ctx.workspaces,
)
}
}
@@ -177,7 +177,7 @@ impl Tool for CompanyPipeline {
})
}
fn run(&self, _ctx: &ToolCtx, args: &Value) -> Result<String> {
fn run(&self, ctx: &ToolCtx, args: &Value) -> Result<String> {
let request = args.get("request")
.and_then(|v| v.as_str())
.ok_or_else(|| anyhow!("missing required argument: request"))?;
@@ -190,17 +190,17 @@ impl Tool for CompanyPipeline {
"quick" => {
crate::app::workflow::company::run_company_pipeline_quick(
request,
&_ctx.session_dir,
&_ctx.workspaces,
_ctx.turn_events.as_ref(),
&ctx.session_dir,
&ctx.workspaces,
ctx.turn_events.as_ref(),
)
}
_ => {
crate::app::workflow::company::run_company_pipeline(
request,
&_ctx.session_dir,
&_ctx.workspaces,
_ctx.turn_events.as_ref(),
&ctx.session_dir,
&ctx.workspaces,
ctx.turn_events.as_ref(),
)
}
}