Skip to content

khepri_tree: Ignore keep_while conditions on children on node creation#351

Merged
dumbbell merged 1 commit into
v0.17.xfrom
skip-keep_while-on-children-when-parent-created
Dec 3, 2025
Merged

khepri_tree: Ignore keep_while conditions on children on node creation#351
dumbbell merged 1 commit into
v0.17.xfrom
skip-keep_while-on-children-when-parent-created

Conversation

@dumbbell
Copy link
Copy Markdown
Collaborator

@dumbbell dumbbell commented Nov 6, 2025

Why

If a parent has a keep_while condition on a child node, the child node can't possibly exist when the parent is created. Therefore, ignore this condition when the parent is created because it will always be false.

How

Drop keep_while conditions on nodes that have the created node as prefix.

While here, move this logic to its own function.

@dumbbell dumbbell added this to the v0.17.3 milestone Nov 6, 2025
@dumbbell dumbbell self-assigned this Nov 6, 2025
@dumbbell dumbbell added the bug Something isn't working label Nov 6, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.43%. Comparing base (39e1b90) to head (2a8e7a0).
⚠️ Report is 2 commits behind head on v0.17.x.

Additional details and impacted files
@@             Coverage Diff             @@
##           v0.17.x     #351      +/-   ##
===========================================
+ Coverage    86.12%   86.43%   +0.30%     
===========================================
  Files           22       22              
  Lines         3460     3465       +5     
===========================================
+ Hits          2980     2995      +15     
+ Misses         480      470      -10     
Flag Coverage Δ
erlang-26 86.40% <100.00%> (+0.30%) ⬆️
erlang-27 86.11% <100.00%> (+0.02%) ⬆️
erlang-28 86.06% <100.00%> (-0.04%) ⬇️
os-ubuntu-latest 86.43% <100.00%> (+0.30%) ⬆️
os-windows-latest 86.43% <100.00%> (+0.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dumbbell dumbbell marked this pull request as ready for review November 6, 2025 21:14
@dumbbell dumbbell marked this pull request as draft November 6, 2025 21:14
@dumbbell dumbbell force-pushed the skip-keep_while-on-children-when-parent-created branch from d2f9b90 to d9d458e Compare December 3, 2025 16:04
[Why]
If a parent has a `keep_while` condition on a child node, the child node
can't possibly exist when the parent is created. Therefore, ignore this
condition when the parent is created because it will always be false.

[How]
Drop `keep_while` conditions on nodes that have the created node as
prefix.

While here, move this logic to its own function.
@dumbbell dumbbell force-pushed the skip-keep_while-on-children-when-parent-created branch from d9d458e to 2a8e7a0 Compare December 3, 2025 16:16
@dumbbell dumbbell marked this pull request as ready for review December 3, 2025 16:24
@dumbbell dumbbell merged commit a197bf0 into v0.17.x Dec 3, 2025
26 checks passed
@dumbbell dumbbell deleted the skip-keep_while-on-children-when-parent-created branch December 3, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant