Order PR stack tables by base chain#20
Open
fjord-oai wants to merge 2 commits into
Open
Conversation
magus
added a commit
that referenced
this pull request
Apr 29, 2026
150172b to
8ae3932
Compare
8ae3932 to
92efd2c
Compare
Owner
|
Do you have a repro? I spent some time thinking about this and I don't think it's possible for things to ever be out of order actually they are always the order of the commits in the local branch. I added some instructions for running locally, maybe you move your fork to master briefly, build it and run it locally for awhile and see Either we will get a repro or we might have confidence the coverage landed is sufficient now. |
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.
Summary
Order PR stack tables from the explicit base chain instead of relying on the current
commit_range.group_listorder.This fixes cases where the stack table in PR descriptions can appear reversed or otherwise misordered after sync.
range()still returns groups in git-log-oriented order, but the PR body update path needs base-to-tip stack order. Since each stack group already records its intended base, we can derive the display order directly from those base links.Details
CommitMetadata.stack_order(...)to derive canonical stack order fromgroup.baserelationships.ManualRebaseandrebase_order()with the new canonical ordering semantics so callers do not reinterpretstack_order()inconsistently.group_listis reversed, the rendered stack table rows still come out in base-chain order.Test plan
bun test src/app/SyncGithub.test.ts src/core/CommitMetadata.order.test.ts./node_modules/.bin/tsc