Seed optional history values from explicit constructors

This commit is contained in:
Codex
2026-09-10 11:38:44 -07:00
parent eb5161b207
commit 4ecad78433
2 changed files with 35 additions and 1 deletions
@@ -120,7 +120,9 @@ fn seed(schema: &'static Value, depth: usize) -> Result<Value, &'static str> {
if let Some(options) = alternatives(schema) {
if options
.iter()
.any(|s| matches_value(s, &json!("NotApplicable"), 0))
.filter_map(|s| resolve(s).ok())
.filter_map(|s| s.get("enum").and_then(Value::as_array))
.any(|values| values.contains(&json!("NotApplicable")))
{
return Ok(json!("NotApplicable"));
}