Repository navigation
fix: Compare a copied input by the settle count of the value it holds - #1251
Merged
Merged
Conversation
Assisted-by: Claude Code:claude-opus-5-5
Assisted-by: Claude Code:claude-opus-5-5
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1251 +/- ##
=======================================
Coverage 89.78% 89.79%
=======================================
Files 10 10
Lines 7078 7082 +4
=======================================
+ Hits 6355 6359 +4
Misses 723 723 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Since #1210, a pipe could end up permanently stale when one of its arguments is a reference bound to the same source. In this case
outstayed at(1, ('B', 2))aftersrcchanged to 2:out's previous node is a copy ofsrc. Whensrcchanges, the bound reference updates first and makesoutrecompute while the copy still holds 1._settle_statereported the settle count ofsrcitself, which had already moved to 2, sooutrecorded that it had seen the newsrc. Whensrc's own change reachedout, nothing looked new and the recompute was skipped.A clean copy now reports the source's settle count for the value it holds: the count at which it adopted the value, or at which it was created.
outrecomputes oncesrc's change arrives, so it ends at(2, ('B', 2))again, as in 2.4.2. The intermediate call with the oldsrcvalue is the same glitch 2.4.2 has.I added a regression test that fails without the change. The full test suite passes.
All four variants of the reported case, before and after
p.param.x.rx()(1, ('B', 2))p.param.xp.param.x.rx()p.param.xAI Disclosure
Tool & Model: Claude Code + Claude Opus 5.5
Usage: Bisected the regression to #1210, traced the settle counts and wrote the fix and test.