Pin the Rust toolchain to 1.95.0 (#57373)

## What changed

- Replace Rust `1.99.1` pins with `1.95.0` across Cargo, Bazel, CI, release workflows, and Windows setup, and update the Bazel lockfile.
- Adjust Rust APIs, borrowing, and lint-related code for the pinned toolchain, and box MCP tool dispatch to bound compiler async-layout query depth.
- Update the halfwidth sound mark snapshot and allow optional symbol hash suffixes in the code mode host package smoke test.

GitOrigin-RevId: 75460c3d0465dc601811e619bce373a4f7ff2912
This commit is contained in:
Anthony Tafoya
2026-10-27 05:52:01 +00:00
committed by copyberry
parent 155dde7ff6
commit 2cab11ca40
53 changed files with 215 additions and 225 deletions
+4 -7
View File
@@ -269,13 +269,10 @@ pub enum ExecPolicyUpdateError {
JoinBlockingTask { source: tokio::task::JoinError },
#[error("failed to update in-memory rules: {source}")]
AddRule { source: ExecPolicyRuleError },
}
impl From<ExecPolicyRuleError> for ExecPolicyUpdateError {
fn from(source: ExecPolicyRuleError) -> Self {
Self::AddRule { source }
}
AddRule {
#[from]
source: ExecPolicyRuleError,
},
}
pub(crate) struct ExecPolicyManager {
+3 -3
View File
@@ -355,14 +355,14 @@ impl RealtimeStreamedItem {
if self.buffered_text.is_empty() {
return None;
}
let text = std::mem::take(&mut self.buffered_text);
let text = self.buffered_text.drain(..).collect::<String>();
let text = format!("{prefix}{text}");
self.sent_bytes += text.len();
return Some(text);
}
let head = std::mem::take(&mut self.buffered_text);
let tail = std::mem::take(&mut self.tail_text);
let head = self.buffered_text.drain(..).collect::<String>();
let tail = self.tail_text.drain(..).collect::<String>();
let text = format!("{prefix}{head}{HANDOFF_STREAM_TRUNCATION_MARKER}{tail}");
self.sent_bytes += text.len();
Some(text)
@@ -369,7 +369,7 @@ impl ExecutedToolCalls {
fn reserve_direct_call(&self) -> Option<DirectCallPermit> {
let recording = Arc::downgrade(&self.lock_state().as_ref()?.recording);
self.pending_direct_calls
.try_update(Ordering::Relaxed, Ordering::Relaxed, |pending| {
.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |pending| {
(pending < MAX_PENDING_EXECUTED_TOOL_CALLS).then_some(pending + 1)
})
.ok()?;
+3 -2
View File
@@ -278,7 +278,8 @@ impl McpHandler {
.map(TruncationPolicy::Tokens)
.unwrap_or(step_context.settings.model_info.truncation_policy.into());
let started = Instant::now();
let result = handle_mcp_tool_call(
// Bound the compiler's async-layout query depth for approval and dispatch.
let result = Box::pin(handle_mcp_tool_call(
Arc::clone(&session),
&step_context,
&cancellation_token,
@@ -290,7 +291,7 @@ impl McpHandler {
tool_name,
&source,
payload,
)
))
.await;
Ok(boxed_tool_output(McpToolOutput {