Skip to content

Add Seq: N monotonic sequence trailer #131

@remenoscodes

Description

@remenoscodes

Add a monotonic sequence number to each issue commit as a Seq: trailer. The root commit gets Seq: 1, each subsequent commit gets parent_seq + 1.

Implementation: In git-issue-create, git-issue-comment, git-issue-state, git-issue-edit:
parent_seq=$(git log -1 --format='%(trailers:key=Seq,valueonly)' $parent)
new_seq=$(( ${parent_seq:-0} + 1 ))
Add 'Seq: $new_seq' trailer to the commit.

In git-issue-merge resolve_scalar(): use Seq as primary ordering key instead of timestamps. Fall back to timestamp when Seq values are equal (concurrent edits from divergent clones).

Limitations (document in spec):

  • Seq only improves ordering for sequential edits within one clone
  • For truly concurrent edits (both sides increment from same base), Seq values are equal and timestamps remain the tiebreaker
  • This is NOT a full Lamport clock -- it is scoped to a single issue ref

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions