mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
Same-second lower-ID replacements could be ignored by served-repository de-listing and superseded-history capture. Rollback's active-state lookup and post-deletion alignment instead preferred higher IDs, while history selection let capture time override the original event's replacement order. Share the later-timestamp/lower-ID comparator across these lifecycle paths and the existing purgatory decisions. Archive a same-second predecessor only when the incoming event wins, and only apply de-list deletion for a winning replacement. Select active and authorized alignment states with the same ordering. Rank history records by original timestamp and original event ID before capture metadata; keep timestamp cutoffs and author checks intact. Extract the authorized-state selection used by realignment to exercise both arrival orders with different authorized authors and an unauthorized newer state. Add served de-list, history-capture and history-candidate regressions. All four new regressions fail before the fixes and pass afterward. Extend the LMDB restart scenario to delete the same-second winner and observe its archived predecessor restored, with a bounded deadline and no new sleeps. This changes replacement preference, not deletion request ownership, coordinate cutoff semantics, repository membership or archive format. Existing capture metadata remains readable. Update the changelog and repository lifecycle documentation. Validation: focused ordering regressions and LMDB restart/rollback test; full ngit-grasp suite, all-target workspace Clippy with warnings denied, formatting and diff checks pass. Assisted-by: GPT-6