eval_invalid_string_array_op

Diagnostic `nanook::eval::invalid_string_array_op`

Summary

invalid operator for string array

Help

string arrays only support is and not

Details

When this fires

The evaluator hit a string-array RHS with an operator that isn't is or not. String arrays are bag-of-strings checks, so only equality-style ops apply. Anything else (contains, like, matches, ...) gets rejected at runtime.

What to check

For substring or pattern matching across many candidates, fold them into a regex with matches.

# broken
expr = "host.name like [\"web-*\", \"db-*\"]"
# fixed
expr = "host.name matches \"^(web|db)-.*\""

See @/docs/nanook-expr.md for the full operator table.