style(ai): rustfmt line-wraps in prompt and spawn tests

This commit is contained in:
Kayshen-X 2026-07-03 22:19:45 +08:00
parent 8dc7d8e276
commit cbd2a31855
3 changed files with 14 additions and 4 deletions

View file

@ -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 {

View file

@ -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!(

View file

@ -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())
]
);
}