From 5bccb4f65b7b4a82a90f95ea63032c1a20e166f8 Mon Sep 17 00:00:00 2001 From: YoVinchen Date: Sat, 11 Apr 2026 23:48:45 +0800 Subject: [PATCH] Keep cache-control merge regressions easy to review Reflow the two long cache-control regression assertions in transform.rs so the neighboring merge cases stay rustfmt-aligned and easier to scan. This keeps the preserved code change separate from the untracked Markdown design notes the user did not want committed. Constraint: Exclude Markdown design files from the commit while preserving the local code change Rejected: Include docs in the same commit | user explicitly asked to leave Markdown files out Confidence: high Scope-risk: narrow Reversibility: clean Directive: Treat this as a readability-only test change; do not infer runtime behavior changes from it Tested: cargo test --manifest-path src-tauri/Cargo.toml test_anthropic_to_openai_drops_ --lib Tested: cargo check --manifest-path src-tauri/Cargo.toml --tests Tested: pnpm format:check Tested: pnpm typecheck Not-tested: Full application integration and manual flows --- src-tauri/src/proxy/providers/transform.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/proxy/providers/transform.rs b/src-tauri/src/proxy/providers/transform.rs index e2656d9eb..42a97d297 100644 --- a/src-tauri/src/proxy/providers/transform.rs +++ b/src-tauri/src/proxy/providers/transform.rs @@ -670,7 +670,10 @@ mod tests { let result = anthropic_to_openai(input, None).unwrap(); assert_eq!(result["messages"][0]["role"], "system"); - assert_eq!(result["messages"][0]["content"], "You are Claude Code.\nBe concise."); + assert_eq!( + result["messages"][0]["content"], + "You are Claude Code.\nBe concise." + ); assert!(result["messages"][0].get("cache_control").is_none()); } @@ -688,7 +691,10 @@ mod tests { let result = anthropic_to_openai(input, None).unwrap(); assert_eq!(result["messages"][0]["role"], "system"); - assert_eq!(result["messages"][0]["content"], "You are Claude Code.\nBe concise."); + assert_eq!( + result["messages"][0]["content"], + "You are Claude Code.\nBe concise." + ); assert!(result["messages"][0].get("cache_control").is_none()); }