Skip to content
quarry History Of Ticket f6acf6b547318f765d60caff7f39dedb30687ae4
Login

History Of Ticket f6acf6b547318f765d60caff7f39dedb30687ae4

Artifacts Associated With Ticket f6acf6b547318f765d60caff7f39dedb30687ae4

  1. Ticket change [03b8abff2e] (rid 2277) by ai-local on 2026-08-23 22:14:28:

    1. Untracked field cmimetype: "text/x-markdown"
    2. comment initialized to:
      zit#133 shipped `landing show` with the branch's check-ins, and its own e2e test caught a bug worth inheriting rather than repeating. Quarry has the same bug in the check-in list I added to the landing page today.
      
      ## The bug zit found
      
      > The first implementation sorted check-ins by mtime, hash as tiebreak. The e2e test failed — because two commits made in the same second tie on mtime and then order by hash, which is arbitrary with respect to ancestry. A branch's own commits displayed in the wrong order is exactly the kind of quiet wrongness a reviewer would trust.
      
      Its fix was to stop hand-rolling the order: `repository.zig`'s `ancestryLinearized` gives "a topological order in which every parent precedes its child … so same-mtime and non-monotone parent/child pairs never invert", and states the rule outright — **the verb owns no ancestry ordering of its own.**
      
      ## Where quarry has it
      
      The landing page lists the branch's check-ins through `timeline.list` with a branch filter, which orders by `(date DESC, hash DESC)` — exactly the sort zit just removed. Two commits in the same second render in hash order, which has nothing to do with which is the parent. Our own commits land back-to-back routinely, so this is not a rare shape.
      
      ## Second difference, smaller
      
      zit lists check-ins "on the branch and not on the target", excluding the shared root. Quarry lists by branch TAG. For an ordinary branch these coincide; they diverge once a branch has been merged and continued, where a tagged commit may already be on the target.
      
      ## Fix shape
      
      Walk ancestry, do not sort by date. quarry's index carries `checkin_parent(child, parent, ord)`, so the branch's commits are a walk from the branch tip along parents, stopping at the first commit reachable from the target — a recursive CTE, and the same answer zit computes.
      
      Worth doing as its own change rather than folded into a UI tweak: ordering that is right by construction is the point, and a test that commits twice in one second is what proves it. That test is the whole reason zit caught this and review did not.
      
    3. severity initialized to: "Important"
    4. status initialized to: "Open"
    5. subsystem initialized to: "web"
    6. title initialized to:
      a landing's check-ins are ordered by date, which is arbitrary with respect to ancestry
      
    7. type initialized to: "Code_Defect"
  2. Ticket change [9bbd13fda8] (rid 2845) by dmestas on 2026-08-26 12:59:18:

    1. comment changed to:
      Fixed with a recursive walk from the branch tip ordered by longest path back, stopping where the branch diverges — zit's rule inherited rather than re-derived. The test commits three times in one second with hashes whose order reverses ancestry; the old sort returns them exactly backwards.
      
    2. resolution changed to: "Fixed"
    3. status changed to: "Fixed"
  3. Ticket change [599431cda8] (rid 12518) by zeitgeist on 2026-09-24 00:54:00:

    1. Untracked field number: "83"