integration: Auto-rebuild integration branch after restack#1175
Open
ed-irl wants to merge 2 commits into
Open
Conversation
Collaborator
Author
This was referenced May 19, 2026
Open
e828daf to
2d4078d
Compare
a4cb1b2 to
ff9626c
Compare
2d4078d to
73d812f
Compare
3d69746 to
b244544
Compare
e34e5ac to
8fa5e62
Compare
b244544 to
2ef2338
Compare
8fa5e62 to
cf6c41c
Compare
2ef2338 to
f05a942
Compare
This was referenced Jun 12, 2026
cf6c41c to
792dee0
Compare
f05a942 to
236b9b1
Compare
792dee0 to
5e16a7e
Compare
236b9b1 to
22fa68b
Compare
a879484 to
3d5e823
Compare
3825398 to
fb9a0e5
Compare
After a successful restack or sync, branch_restack / stack_restack / upstack_restack / repo_restack / repo_sync now invoke IntegrationHandler.MaybeRebuild. When integration is configured and at least one tracked tip's hash has drifted from the recorded value, the integration branch is regenerated; otherwise this is a no-op. repo sync is included because it restacks tips onto an advanced trunk (and deletes merged tips), drifting integration state exactly as the restack commands do. It was the only restack-capable command the original hook missed. Submit commands intentionally remain unhooked: submit is the user's signal that work is ready to share, and silently rebuilding/merging the integration branch — which may conflict — is a surprising side effect that does not belong in the submit path. Failures in the hook are logged as warnings and do not poison the outer command.
be83443 to
0ab15a3
Compare
d3de5c3 to
a89d717
Compare
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.
branch_restack / stack_restack / upstack_restack / repo_restack now
invoke IntegrationHandler.MaybeRebuild after a successful restack. When
integration is configured and a tracked tip's hash has drifted from the
recorded value, the integration branch is regenerated; otherwise it is a
no-op.
A test script exercises the drift-then-rebuild flow and confirms a
second restack with no drift does not rebuild again. merge_wt_test.go
gains explicit git user config so its commits succeed in a clean
environment.
Part of #1244