fix: resolve path expression on Any-typed variable as Any, not Null#98
fix: resolve path expression on Any-typed variable as Any, not Null#98
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts Zeebe FEEL variable resolution so that unresolved path expressions (e.g. =agent.context) do not get typed as Null when their root variable is effectively unknown (Any), preserving the original FEEL expression in info for UI display.
Changes:
- Extend
resolveReferencesto convert certainnullevaluation results intoAny(atomicValueundefined) when the referenced root variable isAny-typed. - Preserve the original FEEL expression as
infofor these “unknown” results (aligning with #87 expectations).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| return entry instanceof EntriesContext && | ||
| getType(entry.value) === 'Any'; |
nikku
left a comment
There was a problem hiding this comment.
Makes sense.
We could add an additional test to verify nested behavior =agent.foo.bar with agent.foo being defined vs. agent being defined vs. agent not being defined - I am not sure how the current roots detection will handle such scenarios.
Research question: If agent = { bar: 10 } exists, what is the value of agentFooBar = agent.foo.bar?
We can also leave that for another day. Overall, good stuff. Good to start from solid test coverage ⭐
Related to #87 Path FEEL expressions like `=agent.context` on an `Any`-typed variable incorrectly resolve as `null` with `Null` type instead of `Any`.
Related to #87
Proposed Changes
This pull request aims to mark unresolved FEEL path expression variables as any preserving their FEEL expression as
info.Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool