Repository navigation
[v5] Let commits be on a branch, with ordinals unique per branch - #667
Merged
Merged
Conversation
A suite could only track one line of history: ordinals were unique across the suite, so a release branch whose commits overlap `main`'s ordinals could not be submitted to it. A commit now has an optional `branch`, a free-form string like its tag, and ordinals are unique within each branch, the commits without a branch counting as one. Everything that compares ordinals stays within a branch: a commit's `previous`/`next`, the `after_commit`/`before_commit` bounds of the commit list and of the series. The commit list, series and trends take `branch=` and `has_branch=` filters, and the commit object, series lines and trend items carry `branch`. This is the API side. The web UI only follows along so far; it learns to show and pick branches in later PRs. Deviations from the design in the issue: - The uniqueness is a partial unique index, `(branch, ordinal) NULLS NOT DISTINCT WHERE ordinal IS NOT NULL`, rather than `UNIQUE NULLS NOT DISTINCT (branch, ordinal)`, which would allow only one commit without an ordinal per branch. `ordinal` also keeps an index of its own, since the commit list sorted by ordinal interleaves the branches. - Commits without a branch are asked for with `has_branch=false`, as with `has_ordinal`, rather than through a default branch. - Without a branch filter, a trend's `last_n` window is shared by every branch, by ordinal, rather than required or per branch. - `lnt v5 submit` gets no `--branch` option: it sends the submissions it reads as they are, and has no option for the ordinal or the tag either. A submission carries the branch in its `commit` object. - `search=` does not match the branch: many commits share one, and `branch=` selects them. - Listing a suite's branches, for the Graph's branch selector, is left to the PR that adds the selector. Part of llvm#665.
- Word the 409 for an ordinal taken on an unknown branch without presupposing the commit exists, and drop the sentinel it used. - Don't read the commit on a PATCH that clears its ordinal. - Spell out commit_bounds, and tighten E3, I3, D5, O6 and llms.txt.
`search=` on the commit list now matches the branch the way it matches the tag: case-insensitive substring. The run list's `search=` follows, since it matches a run's commit as the commit list does. This reverses the earlier choice to leave the branch to `branch=`, so that a commit picker can find a release branch's commits by typing its name.
ldionne
marked this pull request as ready for review
November 17, 2026 17:40
- Test that a run list's `search=` matches the branch of a run's commit. - Name the branch among a commit's always-searched columns in `search_condition`'s docstring. - Say why a branch's name falling back to the run list's unresolved search stays bounded.
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.
A suite could only track one line of history: ordinals were unique
across the suite, so a release branch whose commits overlap
main'sordinals could not be submitted to it. A commit now has an optional
branch, a free-form string like its tag, and ordinals are uniquewithin each branch, the commits without a branch counting as one.
Everything that compares ordinals stays within a branch: a commit's
previous/next, theafter_commit/before_commitbounds of thecommit list and of the series. The commit list, series and trends take
branch=andhas_branch=filters, and the commit object, series linesand trend items carry
branch.search=on commits matches the branch,as it does the tag.
This is the API side. The web UI only follows along so far; it learns to
show and pick branches in later PRs.
Deviations from the design in the issue:
(branch, ordinal) NULLS NOT DISTINCT WHERE ordinal IS NOT NULL,rather than
UNIQUE NULLS NOT DISTINCT (branch, ordinal), which wouldallow only one commit without an ordinal per branch.
ordinalalsokeeps an index of its own, since the commit list sorted by ordinal
interleaves the branches.
has_branch=false, aswith
has_ordinal, rather than through a default branch.last_nwindow is shared by everybranch, by ordinal, rather than required or per branch.
lnt v5 submitgets no--branchoption: it sends the submissions itreads as they are, and has no option for the ordinal or the tag
either. A submission carries the branch in its
commitobject.to the PR that adds the selector.
Part of #665.