Skip to content

expressions: fixed dependent nodes evaluation inside single entities#348

Merged
SteRiccio merged 3 commits intomasterfrom
fix/dependent-nodes-evaluation
Mar 31, 2026
Merged

expressions: fixed dependent nodes evaluation inside single entities#348
SteRiccio merged 3 commits intomasterfrom
fix/dependent-nodes-evaluation

Conversation

@SteRiccio
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

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 targets correctness of expression/identifier resolution in record updates, specifically to improve dependent node evaluation within single-entity contexts.

Changes:

  • Adjusted common-ancestor detection when resolving referenced nodes in record identifier expressions.
  • Refactored several iterations from forEach/reduce to for...of loops in record update and identifier evaluation paths.
  • Added extra error context (details) when wrapping an ancestor lookup failure.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/record/recordNodesUpdater/recordNodesUpdater.ts Refactors dependent-def node collection to for...of iteration.
src/record/recordExpressionEvaluator/node/identifier/nodesFinder.ts Updates common-ancestor hierarchy comparison used to locate referenced nodes.
src/record/recordExpressionEvaluator/node/identifier/identifier.ts Improves error payload for ancestor lookup and refactors array-context identifier evaluation loop.
src/nodeDefExpressionEvaluator/node/identifier.ts Refactors reachable node-def collection to for...of during traversal (including single entities).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link
Copy Markdown

@SteRiccio SteRiccio merged commit fbdf162 into master Mar 31, 2026
6 checks passed
@SteRiccio SteRiccio deleted the fix/dependent-nodes-evaluation branch March 31, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants