Settle clippy on the fabro-petri refactors

Four doc comments the projection split cut in half, the scope ledger's
cache miss over an Option<Option>, the Pebble envelope passed by value,
and the Progress enum's large Pebble variant, now boxed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-09-20 15:17:04 -04:00
parent 12483e081e
commit f471676802
No known key found for this signature in database
4 changed files with 8 additions and 8 deletions

View file

@ -340,6 +340,10 @@ impl ScopeEnvs {
/// The inherited workspace of an invocation, once resolved: `None`
/// when not resolved yet, `Some(None)` when it inherits none.
#[expect(
clippy::option_option,
reason = "the outer option is the cache miss; the inner is an invocation that inherits no workspace"
)]
fn inherited(&self, invocation: InvocationId) -> Option<Option<String>> {
sync::lock(&self.inherited).get(&invocation).cloned()
}

View file

@ -127,7 +127,6 @@ impl RunView {
}
/// The run's conclusion, from its recorded finish and what the stages
/// The run's conclusion, from its recorded finish and what the stages
/// summed to.
fn conclude(&mut self, status: &str, at: DateTime<Utc>) {

View file

@ -197,7 +197,6 @@ impl RunView {
}
/// The projection, when `event` is a scope record of the root
/// The projection, when `event` is a scope record of the root
/// invocation: the run's own sandbox, not a child invocation's.
fn root_scope_projection(&mut self, event: &RunEvent) -> Option<&mut RunProjection> {
@ -304,7 +303,6 @@ impl RunView {
}
/// A firing exists: register its stage and, when it is a logical stage,
/// A firing exists: register its stage and, when it is a logical stage,
/// show it.
pub(super) fn start_visit(

View file

@ -56,7 +56,7 @@ impl RunView {
};
match progress {
Progress::Pebble { event: envelope } => {
self.fold_pebble(execution, event, envelope, at);
self.fold_pebble(execution, event, &envelope, at);
}
Progress::Prompt { prompt, model } => {
if let Some(stage) = self.stage_of(execution, event.subject.as_ref()) {
@ -195,7 +195,6 @@ impl RunView {
}
/// Close one question by id, or every question of a firing, and unblock
/// Close one question by id, or every question of a firing, and unblock
/// the run when none is left.
pub(super) fn close_questions(
@ -235,14 +234,14 @@ impl RunView {
&mut self,
execution: ExecutionId,
event: &RunEvent,
envelope: CodingAgentEvent,
envelope: &CodingAgentEvent,
at: DateTime<Utc>,
) {
let Some(stage) = self.stage_of(execution, event.subject.as_ref()) else {
return;
};
let agent = stage.agent.get_or_insert_default();
agent.apply(&envelope);
agent.apply(envelope);
if stage.completion.is_none() {
stage.usage = agent.usage.saturating_add(agent.descendant_usage());
}
@ -341,7 +340,7 @@ impl RunView {
enum Progress {
/// Pebble's coding-agent envelope, forwarded by the agent step.
#[serde(rename = "pebble")]
Pebble { event: CodingAgentEvent },
Pebble { event: Box<CodingAgentEvent> },
/// The prompt step before its first model call: the prompt, and the
/// `provider/model` selector it runs on.
#[serde(rename = "attractor.prompt")]