Skip to main content

parse_importance_value

Function parse_importance_value 

Source
pub fn parse_importance_value(
    value: Option<&Value>,
) -> Result<Option<f32>, String>
Expand description

Parse an importance argument leniently.

The pre-2026-09-13 schema advertised a string type, so agents sent "0.9"; the old number-only parse silently fell back to the 0.5 default and the value was lost without a trace (second synthetic-run feedback). Numbers and numeric strings are accepted; absent/null/empty mean “no explicit value”; anything else is a loud error, never a silent default.