Skip to content

_collision_rank falls through to lexical filename order #2532

Closed

Description

@jharris2188ugh

graphify/dedup.py _collision_rank falls through to lexical filename order when two nodes share an ID. plans/_done/ sorts before plans/in-progress/ in ASCII — so the archived copy wins by alphabet. That's why binding doctrine resolved to a dead plan.

Activity

  1. safishamsi commented on Aug 7, 2026

    @safishamsi
    Member

    Fixed in v0.9.36. _collision_rank no longer falls through to raw lexical source_file order: it now ranks by a lifecycle penalty (active over archived) computed on the root-relative path, then a reversed-segment tie-break, so the winner of an id collision (e.g. plans/_done/x.md vs plans/in-progress/x.md) no longer depends on ASCII filename order, absolute-vs-relative path form, or the checkout directory name. Thanks for the sharp root-cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions