Skip to content

Commit 74aa011

Browse files
test: correct mislabelled vacuous test in src/compile/types.rs (#1518)
Rename test_front_matter_safe_outputs_triggers_conclusion_job → test_front_matter_safe_outputs_noop_object_form and replace the near-vacuous assert!(!fm.safe_outputs.is_empty()) assertion with a meaningful check that noop: {} parses as a JSON object (not a bool or null). The old assertion trivialy passed for any non-empty safe-outputs block and said nothing about conclusion-job triggering, which happens in the compiler, not the front-matter parser. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2657ad9 commit 74aa011

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/compile/types.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4360,8 +4360,9 @@ Body
43604360
}
43614361

43624362
#[test]
4363-
fn test_front_matter_safe_outputs_triggers_conclusion_job() {
4364-
// Any non-empty safe-outputs triggers the conclusion job
4363+
fn test_front_matter_safe_outputs_noop_object_form() {
4364+
// `noop: {}` must parse as an empty mapping — distinct from
4365+
// `noop: false` (disable) and bare `noop:` (null/default).
43654366
let content = r#"---
43664367
name: "Test Agent"
43674368
description: "Test"
@@ -4372,6 +4373,11 @@ safe-outputs:
43724373
Body
43734374
"#;
43744375
let (fm, _) = super::super::common::parse_markdown(content).unwrap();
4375-
assert!(!fm.safe_outputs.is_empty(), "safe_outputs should be non-empty");
4376+
let noop = fm.safe_outputs.get("noop").expect("noop key must be present");
4377+
assert!(
4378+
noop.is_object(),
4379+
"noop: {{}} must parse as an object, not bool or null; got: {:?}",
4380+
noop
4381+
);
43764382
}
43774383
}

0 commit comments

Comments
 (0)