Skip to content

[#2079] Use first-parent chain for next checkout #2092

Description

@alanpeixinho

Parent

#2079
Schema: #2089
Backfill: #2091
Related: #1958

Issue extras “next checkout” currently picks the earliest later checkout on the same tree by start_time (#2054). That is CI clock order, not git history.

Once commits has parent data, use the first-parent chain instead.

In scope

  • For last-seen checkout hash H, find a later checkout on the same tree/branch whose commit is the first-parent successor of H (commit whose first parent is H, or the next such commit that we actually ingested).
  • Use parent storage from #2089 (ord = 0 or parent_hashes[0], depending on that decision).
  • If the hash is missing from commits or there is no successor with a checkout, keep the current start_time behaviour.
  • Same NextCheckout payload / API shape unless a field is clearly wrong.

Tests

Linear history: next checkout is the first-parent child, not an older start_time neighbour. Merge: first parent, not second. Missing commits row: fallback to start_time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BackendMost or all of the changes for this issue will be in the backend code.Data QualityenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions