From 1526a7df7e0ebbb990c3b89544bb44175be9943d Mon Sep 17 00:00:00 2001 From: Ryan Ward Date: Tue, 19 May 2026 13:06:01 -0500 Subject: [PATCH] fix: gate Error_*.txt snapshots behind GALAXY_BEDROCK_DIAGNOSTICS env var Previously, Bedrock error snapshots were unconditionally written to disk on any API or stream failure. Now they are only written when GALAXY_BEDROCK_DIAGNOSTICS=1 is set, consistent with the rest of the diagnostic logging. Bumps version to 1.2.1. --- Cargo.lock | 2 +- WARP.md | 6 +++--- app/Cargo.toml | 2 +- app/src/ai/bedrock/diagnostic.rs | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 115e61fc..e1545957 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5191,7 +5191,7 @@ dependencies = [ [[package]] name = "galaxy" -version = "1.1.0" +version = "1.2.1" dependencies = [ "addr", "aho-corasick", diff --git a/WARP.md b/WARP.md index 8f080bed..2dde7276 100644 --- a/WARP.md +++ b/WARP.md @@ -37,9 +37,9 @@ Environment variables: - `find . -name "*.wgsl" -exec wgslfmt --check {} +` - Check WGSL shader formatting ### Bedrock Diagnostics -- Bedrock request or stream failures automatically write `Error_.txt` to the repository root. -- The error snapshot file includes the serialized Bedrock context window, tool definitions, protobuf request debug payload, captured Bedrock diagnostic lines, and log tails. -- Set `GALAXY_BEDROCK_DIAGNOSTICS=1` to additionally write per-event Bedrock diagnostic logs to `bedrock-diagnostics.log` in the active Warp log directory. +- Set `GALAXY_BEDROCK_DIAGNOSTICS=1` to enable Bedrock diagnostic output, including: + - `Error_.txt` snapshot files written to the repository root on request/stream failures (includes the serialized Bedrock context window, tool definitions, protobuf request debug payload, captured Bedrock diagnostic lines, and log tails) + - Per-event Bedrock diagnostic logs written to `bedrock-diagnostics.log` in the active Warp log directory ### Platform Setup - `./script/bootstrap` - Platform-specific setup (calls platform-specific bootstrap scripts) diff --git a/app/Cargo.toml b/app/Cargo.toml index 8bfc9424..ce84f276 100644 --- a/app/Cargo.toml +++ b/app/Cargo.toml @@ -5,7 +5,7 @@ description = "Galaxy - AI-powered terminal" edition = "2021" autobins = false name = "galaxy" -version = "1.2.0" +version = "1.2.1" publish.workspace = true license.workspace = true diff --git a/app/src/ai/bedrock/diagnostic.rs b/app/src/ai/bedrock/diagnostic.rs index 1356b8dc..7c714b80 100644 --- a/app/src/ai/bedrock/diagnostic.rs +++ b/app/src/ai/bedrock/diagnostic.rs @@ -211,6 +211,9 @@ impl BedrockDiagnosticLogger { } pub fn dump_error_snapshot(&self, error: &str, debug_error: &str) -> Option { + if !is_enabled() { + return None; + } let conversation_id = self .conversation_id .lock()