descend_first_k_path(0) compliance fixes - #121
Merged
Merged
Conversation
…rified spec on `descend_first_k_path(0)` behavior, and fixing all implementations that were out of spec
Bench A/B vs base: donejob log · 2026-09-19 07:57:32 UTC base 07382ac → head 1fdd94b, 3 round(s), median of each run averaged; negative is faster
26 case(s) moved more than 5%
Full tables per bench are in the job log and the bench-out artifact. |
Collaborator
|
This might allow us to unmask some things in fuzzer and spec |
…d success ReadZipperCore overrides descend_first_k_path_observed, so the k == 0 guard added to the trait default never reached it: a read zipper at a branching focus or in the middle of a node key returned true. The k_path_zero test only checked a leaf, where the native code happens to return false; it now checks the root as well.
k == 0 is now specified as an unsuccessful descent that leaves the focus alone, which the model's kPathFrom already gives without a special case. skip:k0 remains for join_k_path_into and meet_k_path_into. Also drops the two [act: first_k_path_no_backtrack] KNOWN entries. They matched on op name alone, so they applied to non-ACT runs too and hid ~11.5k real native-zipper divergences in 200k inputs; the ACT bug they described is fixed and they hit nothing in 100k ACT inputs.
Collaborator
|
Unmasking k=0 has revealed a few discrepancies: bugfix/descend_k_path_zero_spec...imlvts:PathMap:bugfix/descend_k_path_zero_spec Note: the fuzzer might regress because we're unmasking new cases, and it's fine. |
Owner
|
I'm struggling to see what this would mean -- why not just disallow 0 as an argument? |
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.
descend_first_k_path(0) behavior clarification exposed a bunch of out-of-spec implementations.
Adding test to ZipperIteration test macro to test compliance with clarified spec on
descend_first_k_path(0)behavior, and fixing all implementations that were out of spec