From a2a4899c714e5dc52bf41e942182b94474f77378 Mon Sep 17 00:00:00 2001 From: Mac Anderson Date: Thu, 6 Aug 2026 19:09:58 -0700 Subject: [PATCH] =?UTF-8?q?fix(stella-pipeline,stella-cli):=20unbreak=20ma?= =?UTF-8?q?in=20=E2=80=94=20clippy=20arg=20count=20and=20a=20dangling=20bo?= =?UTF-8?q?ot.rs=20doc=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `main`'s required CI job has been red since #1951, and every open PR inherits it. Four distinct errors are involved; this change fixes the two that no open PR covers. - `cargo clippy -D warnings`: #1953 gave `plan_stage` a `research` argument, taking it to 8 (limit 7). `Spend<'_>` already groups the `budget`/`total` pair for seven sibling stage methods (`pipeline/stage_budget.rs`); `plan_stage` was the last one carrying them loose. Adopting it takes the count to 7 and *shrinks* `pipeline.rs`, which is closed to growth — an `#[allow]` would have been an expedient with no argument that the lint is wrong here. - `cargo doc -D warnings`: #1939 left `[`SkipReason::NoResumePoint`]` in boot.rs's module doc unresolvable. Qualified to the full path, the same remedy #1927 applied to the same file for the same reason. The other two errors — `flip_halt_arming.rs` referencing test helpers that #1945 never landed, and the `ModelCallRole::Research` match arm #1953 never added — are fixed by the open PR #1964, deliberately not duplicated here. `main` needs both changes: this one alone leaves `cargo test` red, and #1964 alone leaves clippy and rustdoc red. Verified: `cargo check -p stella-pipeline --all-targets` reports only the three #1964-owned errors, and `RUSTDOCFLAGS="-D warnings" cargo doc -p stella-cli --no-deps` exits 0. Refs #1953, #1939, #1964 --- crates/stella-cli/src/daemon/boot.rs | 3 ++- crates/stella-pipeline/src/pipeline.rs | 11 +++++------ crates/stella-pipeline/src/pipeline/scope_stage.rs | 9 +++++++-- .../src/pipeline/tests/management_accounting.rs | 6 ++++-- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/crates/stella-cli/src/daemon/boot.rs b/crates/stella-cli/src/daemon/boot.rs index 53bb8443..c13fc9ca 100644 --- a/crates/stella-cli/src/daemon/boot.rs +++ b/crates/stella-cli/src/daemon/boot.rs @@ -56,7 +56,8 @@ //! the checkpoint on every terminal path, abort included, so a policy stop //! retracts its resume point on the way out. A row written by a build that //! predates #1653 — where a policy stop really did store `Error` — is -//! therefore filtered by [`SkipReason::NoResumePoint`] anyway, without this +//! therefore filtered by [`crate::daemon::boot::SkipReason::NoResumePoint`] +//! anyway, without this //! module having to trust its status. //! - **The attempt bound still applies.** An `Error` that resumes into //! another `Error` is counted like any other continuation and retired diff --git a/crates/stella-pipeline/src/pipeline.rs b/crates/stella-pipeline/src/pipeline.rs index e4b6c598..70a6c4f0 100644 --- a/crates/stella-pipeline/src/pipeline.rs +++ b/crates/stella-pipeline/src/pipeline.rs @@ -1462,8 +1462,7 @@ impl<'a> Pipeline<'a> { research: &[ResearchFinding], repo_structure: &str, revision: Option<&str>, - budget: &mut BudgetGuard, - total: &mut f64, + spend: &mut Spend<'_>, ) -> Result, PipelineBudgetAbort> { self.emit(AgentEvent::Stage { name: StageKind::Plan, @@ -1491,8 +1490,8 @@ impl<'a> Pipeline<'a> { overrides: &worker_overrides, timeout: self.config.engine.model_timeout, }, - budget, - total, + spend.budget, + spend.total, ) .await { @@ -1516,8 +1515,8 @@ impl<'a> Pipeline<'a> { overrides: &worker_overrides, timeout: self.config.engine.model_timeout, }, - budget, - total, + spend.budget, + spend.total, ) .await { diff --git a/crates/stella-pipeline/src/pipeline/scope_stage.rs b/crates/stella-pipeline/src/pipeline/scope_stage.rs index 77d4e273..6e97ab9c 100644 --- a/crates/stella-pipeline/src/pipeline/scope_stage.rs +++ b/crates/stella-pipeline/src/pipeline/scope_stage.rs @@ -40,8 +40,13 @@ impl Pipeline<'_> { research, &repo_structure, revision.as_deref(), - budget, - total, + // Reborrowed per iteration: the loop replans after a + // rejected scope card, and a moved `Spend` could not be + // handed to the next attempt. + &mut Spend { + budget: &mut *budget, + total: &mut *total, + }, ) .await { diff --git a/crates/stella-pipeline/src/pipeline/tests/management_accounting.rs b/crates/stella-pipeline/src/pipeline/tests/management_accounting.rs index 7e03e3fd..62990230 100644 --- a/crates/stella-pipeline/src/pipeline/tests/management_accounting.rs +++ b/crates/stella-pipeline/src/pipeline/tests/management_accounting.rs @@ -453,8 +453,10 @@ async fn a_late_plan_is_abandoned_and_falls_back_to_the_single_step_plan() { &[], "", None, - &mut budget, - &mut total, + &mut Spend { + budget: &mut budget, + total: &mut total, + }, ) .await .expect("a wedged planner is never a run-ending failure");