From b362d39ebbca3a8ccc4aadc199caca78e517f916 Mon Sep 17 00:00:00 2001 From: Mac Anderson Date: Thu, 6 Aug 2026 19:45:06 -0700 Subject: [PATCH 1/4] =?UTF-8?q?fix(stella-pipeline):=20unbreak=20main=20?= =?UTF-8?q?=E2=80=94=20drop=20the=20dead=20`spend`=20local=20in=20plan=5Fw?= =?UTF-8?q?ith=5Freview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `plan_with_review` binds `let mut spend = Spend { budget, total };` and never reads it: the re-planning loop builds a fresh `Spend` by reborrowing `budget`/`total` on every iteration, which is the only construction the code actually uses. The binding is a leftover from #1971 and is dead. It was invisible until now because clippy stops at the first hard error in a crate. #1985 removed the `plan_stage` arg-count error immediately above it, which let the linter reach line 34 and fail `main`'s required job on `unused_mut` + `unused_variables` under `-D warnings`. Refs #1972, #1986 --- crates/stella-pipeline/src/pipeline/scope_stage.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/stella-pipeline/src/pipeline/scope_stage.rs b/crates/stella-pipeline/src/pipeline/scope_stage.rs index 77fc84abc..6e97ab9ca 100644 --- a/crates/stella-pipeline/src/pipeline/scope_stage.rs +++ b/crates/stella-pipeline/src/pipeline/scope_stage.rs @@ -31,7 +31,6 @@ impl Pipeline<'_> { let repo_structure = self.repo.structure_summary().await; let mut revision: Option = None; let mut spent_revisions = 0usize; - let mut spend = Spend { budget, total }; loop { let plan = match self From 174bce054df0d4ce7c03ff2bec4dc60e14509542 Mon Sep 17 00:00:00 2001 From: Mac Anderson Date: Thu, 6 Aug 2026 19:52:01 -0700 Subject: [PATCH 2/4] =?UTF-8?q?fix(stella-pipeline):=20unbreak=20main=20?= =?UTF-8?q?=E2=80=94=20two=20parallel-merge=20duplicates=20in=20the=20test?= =?UTF-8?q?=20targets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both are the same shape: a merge landed the same addition twice, and clippy could not see either until the lib-level errors above them were cleared. management_prompt/tests.rs listed `ModelCallRole::Research` twice in one match arm (`unreachable_patterns`). Kept the documented placement beside `Unknown`, whose comment explains why Research is never dispatched through the chokepoint; dropped the copy appended after `Summarization`. verification_hardening.rs defined `SHELL_TOOL`, `shell_call_result` and `PassingShell` that nothing constructs (`dead_code`): the child `flip_halt_arming` module defines its own, which shadow the parent's through `use super::*`. The child's are the live pair and the newer one — a per-command `call_id` the halt correlates on, and a `1 passed` body — so the parent's stale copies go. Its `mod` doc claimed the child existed to reach the parent's fakes, which was the pre-split rationale and is now false; rewritten to point at the child's own doc, where the anti-clobber reason for colocating them lives. Refs #1972, #1986, #1997 --- .../src/management_prompt/tests.rs | 3 +- .../pipeline/tests/verification_hardening.rs | 59 +++---------------- 2 files changed, 8 insertions(+), 54 deletions(-) diff --git a/crates/stella-pipeline/src/management_prompt/tests.rs b/crates/stella-pipeline/src/management_prompt/tests.rs index 4af33f99f..dc6513c7b 100644 --- a/crates/stella-pipeline/src/management_prompt/tests.rs +++ b/crates/stella-pipeline/src/management_prompt/tests.rs @@ -94,8 +94,7 @@ fn management_system_block(role: ModelCallRole) -> Option { | ModelCallRole::SkillAuthor | ModelCallRole::DomainInference | ModelCallRole::Reflection - | ModelCallRole::Summarization - | ModelCallRole::Research => None, + | ModelCallRole::Summarization => None, } } diff --git a/crates/stella-pipeline/src/pipeline/tests/verification_hardening.rs b/crates/stella-pipeline/src/pipeline/tests/verification_hardening.rs index aaf9990aa..ea63ff374 100644 --- a/crates/stella-pipeline/src/pipeline/tests/verification_hardening.rs +++ b/crates/stella-pipeline/src/pipeline/tests/verification_hardening.rs @@ -7,59 +7,14 @@ use super::*; use crate::LineMutation; -/// The shell tool `flip_halt_arming` scripts its revision against. +/// Both arming witnesses for the mid-turn flip halt (#1793), and the shell +/// doubles they share. /// -/// A distinct name from [`WRITING_TOOL`] because the two fakes answer -/// differently and a flip must be attributable: only this one emits the exit -/// marker [`crate::flip_halt::exit_status`] reads. -const SHELL_TOOL: &str = "bash"; - -/// One model turn that runs `command` through the shell tool. -/// -/// The `command` key is what [`crate::flip_halt::command_of`] looks for, so a -/// call built any other way would be invisible to the halt and the test would -/// pass for the wrong reason. -fn shell_call_result(command: &str) -> CompletionResult { - CompletionResult { - tool_calls: vec![ToolCall { - call_id: "call-shell".into(), - name: SHELL_TOOL.into(), - input: serde_json::json!({ "command": command }), - }], - ..text_result("") - } -} - -/// A shell whose every command succeeds, reported the way the real bash tool -/// reports it — the trailing `[exit code: 0]` marker. -/// -/// That marker is the whole point: [`crate::flip_halt::FlipHalt::observe`] -/// latches only on a tracked command that exited zero, and output without a -/// marker can never stop a turn. A fake returning bare prose would leave the -/// halt unlatched and the arming test green for no reason. -struct PassingShell; -#[async_trait] -impl ToolExecutor for PassingShell { - fn schemas(&self) -> Vec { - vec![ToolSchema { - name: SHELL_TOOL.into(), - description: "run a shell command".into(), - input_schema: serde_json::json!({ "type": "object" }), - read_only: false, - speculation_safe: false, - }] - } - async fn execute(&self, _name: &str, _input: &Value) -> ToolOutput { - ToolOutput::Ok { - content: "ok\n[exit code: 0]".into(), - } - } -} - -/// The authored-witness arming of the mid-turn flip halt (#1793) — a child -/// rather than a sibling module so it reaches the shared fakes through this -/// file's own `use super::*`, and so the already-oversized `tests.rs` does -/// not grow another module declaration. +/// A child rather than a sibling module so the already-oversized `tests.rs` +/// does not grow another module declaration. The doubles deliberately live +/// *inside* it rather than here: see that file's own module doc for why +/// colocating them with the two witnesses is what turns a wholesale rewrite +/// of this parent into a merge conflict instead of a silent deletion. mod flip_halt_arming; /// #860 acceptance: a baseline that TIMES OUT observed no failing assertion, From f37d24d9d420641b8d03caa001b02cabbd0ee249 Mon Sep 17 00:00:00 2001 From: Mac Anderson Date: Thu, 6 Aug 2026 19:57:02 -0700 Subject: [PATCH 3/4] =?UTF-8?q?fix(stella-protocol):=20unbreak=20main=20?= =?UTF-8?q?=E2=80=94=20qualify=20the=20CompactionRewrite=20intra-doc=20lin?= =?UTF-8?q?k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `AgentEvent::Compaction::rewrites` documents itself with [`CompactionRewrite`], but `event.rs` never imports the type — the field spells it `crate::CompactionRewrite` inline — so rustdoc cannot resolve the bare name and `broken_intra_doc_links` fails the doc-warnings gate under -D warnings. Written as a linked path rather than a bare qualified one so the rendered text stays `CompactionRewrite`, matching how compaction_rewrite.rs's own module doc links back to `AgentEvent::Compaction`. This is the fourth recurrence of the private/out-of-scope intra-doc shape that #1986 tracks: the doc gate reports one crate at a time, so each unbreak PR can only ever surface the next one. Refs #1986 --- crates/stella-protocol/src/event.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/stella-protocol/src/event.rs b/crates/stella-protocol/src/event.rs index f0615935c..151b951e1 100644 --- a/crates/stella-protocol/src/event.rs +++ b/crates/stella-protocol/src/event.rs @@ -513,7 +513,8 @@ pub enum AgentEvent { /// The replacement bytes each in-place rewrite left behind, one entry /// per digest — what lets reconstruction resolve a compacted block to /// the bytes the model received rather than the pre-compaction output - /// under the same `call_id` (#1667); see [`CompactionRewrite`]. + /// under the same `call_id` (#1667); see + /// [`CompactionRewrite`](crate::CompactionRewrite). /// `serde(default)` — absent on journals written before rewrites were /// journaled, whose compacted blocks surface as digest mismatches. #[serde(default, skip_serializing_if = "Vec::is_empty")] From de554b459c983fed13d84025bb03a815294c606d Mon Sep 17 00:00:00 2001 From: Mac Anderson Date: Thu, 6 Aug 2026 20:02:38 -0700 Subject: [PATCH 4/4] chore(repo): regenerate the wire artifacts and the file-size baseline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two gate steps were red for reasons the compile tiers cannot see. wire-schema: docs/wire is generated from the protocol types, and a type's doc comment IS part of that contract — the previous commit's intra-doc fix changed the emitted `description` text. Regenerated with scripts/export-agentevent-schema.sh. The diff is comment-only: no field added, removed, renamed or re-tagged, and no optional field made required, so the additive-only contract is intact. file-size: two grandfathered files sit one line over their recorded ceiling on main already — driver.rs at 2572/2571 and pipeline/tests.rs at 2537/2536 — neither of which this branch touches. Parallel merges grew them without regenerating, which is the baseline skew that keeps main red. Regenerated with make file-size-update rather than hand-edited. Called out explicitly because a raised ceiling is normally a defect: those two +1s are other PRs' growth, not this branch's, and this branch adds no lines to any god file. The same regeneration TIGHTENS pipeline.rs from 3451 to 3181, recording a 270-line shrink the baseline had not yet captured. Refs #1972, #1986 --- docs/wire/agentevent.d.ts | 3 ++- docs/wire/agentevent.schema.json | 2 +- docs/wire/serveframe.d.ts | 3 ++- docs/wire/serveframe.schema.json | 2 +- scripts/file-size-baseline.txt | 6 +++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/wire/agentevent.d.ts b/docs/wire/agentevent.d.ts index 066b55012..6a8ec146d 100644 --- a/docs/wire/agentevent.d.ts +++ b/docs/wire/agentevent.d.ts @@ -1257,7 +1257,8 @@ export type AgentEvent = { * The replacement bytes each in-place rewrite left behind, one entry * per digest — what lets reconstruction resolve a compacted block to * the bytes the model received rather than the pre-compaction output - * under the same `call_id` (#1667); see [`CompactionRewrite`]. + * under the same `call_id` (#1667); see + * [`CompactionRewrite`](crate::CompactionRewrite). * `serde(default)` — absent on journals written before rewrites were * journaled, whose compacted blocks surface as digest mismatches. */ diff --git a/docs/wire/agentevent.schema.json b/docs/wire/agentevent.schema.json index ed433c76f..d8ec01aac 100644 --- a/docs/wire/agentevent.schema.json +++ b/docs/wire/agentevent.schema.json @@ -2095,7 +2095,7 @@ "type": "array" }, "rewrites": { - "description": "The replacement bytes each in-place rewrite left behind, one entry\nper digest — what lets reconstruction resolve a compacted block to\nthe bytes the model received rather than the pre-compaction output\nunder the same `call_id` (#1667); see [`CompactionRewrite`].\n`serde(default)` — absent on journals written before rewrites were\njournaled, whose compacted blocks surface as digest mismatches.", + "description": "The replacement bytes each in-place rewrite left behind, one entry\nper digest — what lets reconstruction resolve a compacted block to\nthe bytes the model received rather than the pre-compaction output\nunder the same `call_id` (#1667); see\n[`CompactionRewrite`](crate::CompactionRewrite).\n`serde(default)` — absent on journals written before rewrites were\njournaled, whose compacted blocks surface as digest mismatches.", "items": { "$ref": "#/$defs/CompactionRewrite" }, diff --git a/docs/wire/serveframe.d.ts b/docs/wire/serveframe.d.ts index 0bf534c8f..3254fa46c 100644 --- a/docs/wire/serveframe.d.ts +++ b/docs/wire/serveframe.d.ts @@ -189,7 +189,8 @@ export type AgentEvent = { * The replacement bytes each in-place rewrite left behind, one entry * per digest — what lets reconstruction resolve a compacted block to * the bytes the model received rather than the pre-compaction output - * under the same `call_id` (#1667); see [`CompactionRewrite`]. + * under the same `call_id` (#1667); see + * [`CompactionRewrite`](crate::CompactionRewrite). * `serde(default)` — absent on journals written before rewrites were * journaled, whose compacted blocks surface as digest mismatches. */ diff --git a/docs/wire/serveframe.schema.json b/docs/wire/serveframe.schema.json index 0a8c23fb8..1e1b65919 100644 --- a/docs/wire/serveframe.schema.json +++ b/docs/wire/serveframe.schema.json @@ -396,7 +396,7 @@ "type": "array" }, "rewrites": { - "description": "The replacement bytes each in-place rewrite left behind, one entry\nper digest — what lets reconstruction resolve a compacted block to\nthe bytes the model received rather than the pre-compaction output\nunder the same `call_id` (#1667); see [`CompactionRewrite`].\n`serde(default)` — absent on journals written before rewrites were\njournaled, whose compacted blocks surface as digest mismatches.", + "description": "The replacement bytes each in-place rewrite left behind, one entry\nper digest — what lets reconstruction resolve a compacted block to\nthe bytes the model received rather than the pre-compaction output\nunder the same `call_id` (#1667); see\n[`CompactionRewrite`](crate::CompactionRewrite).\n`serde(default)` — absent on journals written before rewrites were\njournaled, whose compacted blocks surface as digest mismatches.", "items": { "$ref": "#/$defs/CompactionRewrite" }, diff --git a/scripts/file-size-baseline.txt b/scripts/file-size-baseline.txt index 960881fef..1196660a6 100644 --- a/scripts/file-size-baseline.txt +++ b/scripts/file-size-baseline.txt @@ -20,14 +20,14 @@ 4621 crates/stella-cli/src/command_deck.rs 1507 crates/stella-cli/src/fleet_cmd.rs 2126 crates/stella-core/src/bus.rs -2571 crates/stella-core/src/driver.rs +2572 crates/stella-core/src/driver.rs 3681 crates/stella-core/src/driver/tests.rs 1781 crates/stella-model/src/anthropic/tests.rs 2093 crates/stella-model/src/openai.rs 1565 crates/stella-model/src/zai.rs 1895 crates/stella-model/src/zai/tests.rs -3451 crates/stella-pipeline/src/pipeline.rs -2536 crates/stella-pipeline/src/pipeline/tests.rs +3181 crates/stella-pipeline/src/pipeline.rs +2537 crates/stella-pipeline/src/pipeline/tests.rs 1996 crates/stella-store/src/lib.rs 2266 crates/stella-store/src/tests.rs 1916 crates/stella-store/src/usage.rs