From cbd2a3185582ffd4b3ba29577bdcfa5998f39b69 Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Fri, 3 Jul 2026 22:19:45 +0800 Subject: [PATCH] style(ai): rustfmt line-wraps in prompt and spawn tests --- crates/op-orchestrator/src/prompt.rs | 6 +++++- crates/op-orchestrator/src/prompt_tests.rs | 7 +++++-- crates/op-orchestrator/src/spawn_concurrent_tests.rs | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/crates/op-orchestrator/src/prompt.rs b/crates/op-orchestrator/src/prompt.rs index 438f93df3..ba673f863 100644 --- a/crates/op-orchestrator/src/prompt.rs +++ b/crates/op-orchestrator/src/prompt.rs @@ -917,7 +917,11 @@ fn build_subagent_prompt_core( // (MiniMax M2.7/M3 are Basic) emit clean `_parent` trees with it. The // `jsonl-format` + `jsonl-format-simplified` skills both teach `_parent`, // so this agrees with whichever skill the tier loads (no contradiction). - system_prompt.push_str(if script_on { SCRIPT_FORMAT } else { NODE_FORMAT }); + system_prompt.push_str(if script_on { + SCRIPT_FORMAT + } else { + NODE_FORMAT + }); // Append the selected style guide's palette/fonts so the sub-agent follows // it instead of inventing a conflicting one. if let Some(sg) = &style_guide_instruction { diff --git a/crates/op-orchestrator/src/prompt_tests.rs b/crates/op-orchestrator/src/prompt_tests.rs index bb9fd1153..5e0395922 100644 --- a/crates/op-orchestrator/src/prompt_tests.rs +++ b/crates/op-orchestrator/src/prompt_tests.rs @@ -136,7 +136,8 @@ fn subagent_prompt_carries_subtask_and_script_format() { let (cr, _) = bsp(&st, &plan(), &req(), AbortFlag::new(), false, false); assert!(cr.user_prompt.contains("Hero")); assert!( - cr.system_prompt.contains("OUTPUT PROTOCOL: JAVASCRIPT PROGRAM"), + cr.system_prompt + .contains("OUTPUT PROTOCOL: JAVASCRIPT PROGRAM"), "full attempt must use SCRIPT_FORMAT by default:\n{}", cr.system_prompt ); @@ -370,7 +371,9 @@ fn subagent_prompt_reduced_complexity_flips_protocol_even_on_full_tier() { let (full_cr, _) = bsp(&st, &plan(), &req(), AbortFlag::new(), false, false); let (reduced_cr, _) = bsp(&st, &plan(), &req(), AbortFlag::new(), true, false); assert!( - full_cr.system_prompt.contains("OUTPUT PROTOCOL: JAVASCRIPT PROGRAM"), + full_cr + .system_prompt + .contains("OUTPUT PROTOCOL: JAVASCRIPT PROGRAM"), "full attempt uses script-gen even on Full tier" ); assert!( diff --git a/crates/op-orchestrator/src/spawn_concurrent_tests.rs b/crates/op-orchestrator/src/spawn_concurrent_tests.rs index da1168afa..fd8c543a4 100644 --- a/crates/op-orchestrator/src/spawn_concurrent_tests.rs +++ b/crates/op-orchestrator/src/spawn_concurrent_tests.rs @@ -225,7 +225,10 @@ fn run_spawned_agents_replays_in_spec_order() { .collect(); assert_eq!( insert_names, - vec![Some("Sec-first".to_string()), Some("Sec-second".to_string())] + vec![ + Some("Sec-first".to_string()), + Some("Sec-second".to_string()) + ] ); }