Repository navigation
Conversation
mparrett
force-pushed
the
fix/edge-index-timestamp-comparison
branch
from
August 4, 2026 04:50
b353dba to
5e015cf
Compare
Author
|
@nnunley Thanks again for sharing your project. I have a few bug fixes if you're interested. This is the first. |
Owner
|
Awesome. Glad you're trying it out and finding gaps. |
ensure_edge_index_current decides which issues to re-parse by comparing each note ref's commit date against a wall-clock marker. A commit date does not say when a ref changed locally. A note arriving by fetch or import keeps the date it was written with, which can predate the marker, so its dependency headers are skipped permanently. The post-merge hook fetches issue notes on every pull, so this is the ordinary sync path rather than a corner case. Normalizing dates to UTC (e98395e) fixed the offset comparison but cannot fix this. A date cursor also never notices a ref that disappears, so a deleted issue's edges stay in the index until a full rebuild. Snapshot issue ref object IDs in a sibling blob of the edge index and re-parse the refs whose ID moved. Object IDs change whenever a ref does, however it moved and whatever date it carries. Refs that disappeared have their edges dropped. An index with no snapshot reads as "everything changed" and rebuilds in full, so an older index heals on first read with no migration step. Two regression tests cover it: an edit backdated with GIT_COMMITTER_DATE, and a deleted note ref. Both fail against the date cursor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mparrett
force-pushed
the
fix/edge-index-timestamp-comparison
branch
from
October 10, 2026 23:14
5e015cf to
5fd91c9
Compare
Author
|
@nnunley I rebased this onto current main. You fixed the timezone part in e98395e, so I narrowed the PR to the remaining: Notes that come in through a pull keep their original commit date. If that date is earlier than the index's last refresh, the dependencies in those notes never reach For example: a teammate adds |
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.
Why
ensure_edge_index_currentrefreshes the derived dependency graph atrefs/notes/dep-graphbeforedeps,ready, andtoporun. It decides which issues to re-parse by comparing each note ref's commit date against alast_rebuilt_frommarker.e98395e fixed the timezone half of that comparison. The remaining problem is that a commit date does not say when a ref changed locally. A note arriving by fetch or import keeps the date it was written with, which can predate the marker, so its dependency headers are skipped permanently.
hooks/post-mergefetches issue notes on every pull, so this is the ordinary sync path rather than a corner case. Reproduced on current main, with a backdated commit standing in for a fetched note:A date cursor also never notices a ref that disappears, so a deleted issue's edges stay in the index until
dep rebuild.What
Snapshot issue ref object IDs in a
refsblob beside the existingedgesblob, and re-parse the refs whose ID moved. An object ID changes whenever a ref does, however it moved and whatever date it carries. Refs that have disappeared have their edges dropped.The snapshot lives in a sibling blob rather than in the edges text, so existing readers of the index are unaffected. An index with no snapshot reads as "everything changed" and rebuilds in full, so an existing index heals on first read and there is no migration step.
Verification
Two regression tests in
tests/test_deps.sh: a backdated header edit, and a deleted note ref. Both fail on main and pass on this branch. The shell suites undermake test-allpass; the Emacs suite was not run.Rebased onto b823d9c. The earlier TZ-pinned test is dropped, since e98395e covers that case.
🤖 Generated with Claude Code