fix: pin_map ranking by observables, not hid - #147
Merged
Conversation
Hid stays off the wire and is no longer the ranking key for MATCH_L, BFS/edge emit, outline, Peak_L ties, or shell/max_rows admission. Optional nickname id is excluded from the rank key as well (MN-REQ-04.11). Co-authored-by: chouswei <chouswei@users.noreply.github.com>
Format ranking helpers and assert MATCH_L seed order follows kind plus payload (goal/slug), not slug alphabet and not hid. Co-authored-by: chouswei <chouswei@users.noreply.github.com>
chouswei
marked this pull request as ready for review
September 3, 2026 19:00
This was referenced Sep 4, 2026
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.
Problem
pin_mapranking in 0.19.x used hiddenRecord.hid(_elN) as the sort key. Label sets matched under CREATE-order shuffle; emitted sequences did not. Hid never leaked into the body, but admission order (Lost in the Middle) followed physical CREATE order. That is a gauge anomaly.Verified in this tree (not only the 0.19.3 install hypothesis):
bounded_match_findsorted hits byr.hidMemStore.list_records/_edge_records/neighborsBFS /context_packused hid orderapply_shell_soft_capand session-outline exemplars sorted by hid (and leftover nicknameid)Fix (0.19.c honesty)
Not a usage-method
b, not 0.20, not 1.0. Same operators: Recall =pin_map, Commit =mutate. Hid still off the wire. Package version left at 0.19.3 (c bump is for publish).id— ranking by nickname is the same class of leak)Test
tests/test_pin_map_observable_rank.pybuilds isomorphic sessions (shuffled CREATE order and shuffled nickname ids), cues by kind + locatorslug=(never leftover id), and asserts canonicalised pin_map sequences match. Also asserts_el/_memnet_hidstay off the emit.Proof on this branch: full
pytestgreen (skips are live Agens/Neo4j). Two sessions with reversed CREATE and shuffled nicknames emit the same canonical sequence; hids differ (_el1…vs_el8…) and do not appear on the wire.Honesty