Did you check docs and existing issues?
Python version (python --version)
Python 3.11.2
Operating system/version
macOS 26.2
NeMo-Guardrails version (if you must use a specific version and not the latest
No response
Describe the bug
create_event in nemoguardrails/actions/core.py checks v[0] == "$" after confirming v is a string. When v is an empty string (""), this raises IndexError: string index out of range.
This looks like an edge case in the $ prefix check for string values. Similar checks in other parts of the codebase use .startswith("$"), which handles empty strings safely.
Steps To Reproduce
import asyncio
from nemoguardrails.actions.core import create_event
asyncio.run(create_event(event={"_type": "SomeEvent", "param": ""}))
Expected Behavior
Empty string values should pass through unchanged without raising an error.
Actual Behavior
create_event raises IndexError: string index out of range when an event contains an empty string value.
Did you check docs and existing issues?
Python version (python --version)
Python 3.11.2
Operating system/version
macOS 26.2
NeMo-Guardrails version (if you must use a specific version and not the latest
No response
Describe the bug
create_eventinnemoguardrails/actions/core.pychecksv[0] == "$"after confirmingvis a string. Whenvis an empty string (""), this raisesIndexError: string index out of range.This looks like an edge case in the
$prefix check for string values. Similar checks in other parts of the codebase use.startswith("$"), which handles empty strings safely.Steps To Reproduce
import asyncio
from nemoguardrails.actions.core import create_event
asyncio.run(create_event(event={"_type": "SomeEvent", "param": ""}))
Expected Behavior
Empty string values should pass through unchanged without raising an error.
Actual Behavior
create_eventraisesIndexError: string index out of rangewhen an event contains an empty string value.