Skip to content

fix: resolve path expression on Any-typed variable as Any, not Null#98

Open
barinali wants to merge 2 commits intomainfrom
issue-87-fix
Open

fix: resolve path expression on Any-typed variable as Any, not Null#98
barinali wants to merge 2 commits intomainfrom
issue-87-fix

Conversation

@barinali
Copy link
Contributor

@barinali barinali commented Mar 13, 2026

Related to #87

Proposed Changes

This pull request aims to mark unresolved FEEL path expression variables as any preserving their FEEL expression as info.

image

Checklist

Ensure you provide everything we need to review your contribution:

  • Contribution meets our definition of done
  • Pull request establishes context
    • Link to related issue(s), i.e. Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}
    • Brief textual description of the changes
    • Screenshots or short videos showing UI/UX changes
    • Steps to try out, i.e. using the @bpmn-io/sr tool

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 resolveReferences to convert certain null evaluation results into Any (atomicValue undefined) when the referenced root variable is Any-typed.
  • Preserve the original FEEL expression as info for 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.

Comment on lines +115 to +116
return entry instanceof EntriesContext &&
getType(entry.value) === 'Any';
@nikku nikku changed the base branch from issue-87 to main March 16, 2026 22:00
@nikku nikku requested review from a team and Buckwich March 16, 2026 22:00
Copy link
Member

@nikku nikku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Review pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants