Skip to content

Conversation

@khvn26
Copy link
Member

@khvn26 khvn26 commented Sep 11, 2025

Due to ambiguous scoping when using the walrus operator, the engine incorrectly attributed all targeting matches to the last segment in the evaluation context.

This PR adds a test to reproduce the problem, and fixes it.

@github-actions
Copy link

File Coverage Missing
All files 100%

Minimum allowed coverage is 100%

Generated by 🐒 cobertura-action against b428d55

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 11, 2025

CodSpeed Performance Report

Merging #258 will improve performances by 22.38%

Comparing fix/incorrect-targeting-match-reasons (b428d55) with main (fa37c6c)

Summary

⚡ 1 improvement

Benchmarks breakdown

Benchmark BASE HEAD Change
test_engine_benchmark 15.2 ms 12.4 ms +22.38%

Copy link
Contributor

@emyller emyller left a comment

Choose a reason for hiding this comment

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

bad walrus

@khvn26 khvn26 merged commit 3f12e5f into main Sep 11, 2025
9 checks passed
@khvn26 khvn26 deleted the fix/incorrect-targeting-match-reasons branch September 11, 2025 17:39
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.

3 participants