Skip to content

integration: Auto-rebuild integration branch after restack#1175

Open
ed-irl wants to merge 2 commits into
ed-irl/integration-clifrom
ed-irl/integration-hooks
Open

integration: Auto-rebuild integration branch after restack#1175
ed-irl wants to merge 2 commits into
ed-irl/integration-clifrom
ed-irl/integration-hooks

Conversation

@ed-irl

@ed-irl ed-irl commented May 19, 2026

Copy link
Copy Markdown
Collaborator

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

@ed-irl

ed-irl commented May 19, 2026

Copy link
Copy Markdown
Collaborator Author

@ed-irl ed-irl force-pushed the ed-irl/integration-cli branch from e828daf to 2d4078d Compare June 2, 2026 20:07
@ed-irl ed-irl force-pushed the ed-irl/integration-hooks branch from a4cb1b2 to ff9626c Compare June 2, 2026 20:16
@ed-irl ed-irl force-pushed the ed-irl/integration-cli branch from 2d4078d to 73d812f Compare June 2, 2026 22:20
@ed-irl ed-irl force-pushed the ed-irl/integration-hooks branch from 3d69746 to b244544 Compare June 2, 2026 22:23
@ed-irl ed-irl force-pushed the ed-irl/integration-cli branch from e34e5ac to 8fa5e62 Compare June 8, 2026 11:15
@ed-irl ed-irl force-pushed the ed-irl/integration-hooks branch from b244544 to 2ef2338 Compare June 8, 2026 11:15
@ed-irl ed-irl force-pushed the ed-irl/integration-cli branch from 8fa5e62 to cf6c41c Compare June 12, 2026 20:08
@ed-irl ed-irl force-pushed the ed-irl/integration-hooks branch from 2ef2338 to f05a942 Compare June 12, 2026 20:08
@ed-irl ed-irl force-pushed the ed-irl/integration-cli branch from cf6c41c to 792dee0 Compare June 13, 2026 13:40
@ed-irl ed-irl force-pushed the ed-irl/integration-hooks branch from f05a942 to 236b9b1 Compare June 13, 2026 13:40
@ed-irl ed-irl force-pushed the ed-irl/integration-cli branch from 792dee0 to 5e16a7e Compare June 15, 2026 09:53
@ed-irl ed-irl force-pushed the ed-irl/integration-hooks branch from 236b9b1 to 22fa68b Compare June 15, 2026 09:53
@ed-irl ed-irl force-pushed the ed-irl/integration-cli branch from a879484 to 3d5e823 Compare June 19, 2026 01:07
@ed-irl ed-irl changed the title integration: Wire auto-rebuild and auto-submit hooks integration: Auto-rebuild integration branch after restack Jun 19, 2026
@ed-irl ed-irl force-pushed the ed-irl/integration-hooks branch from 3825398 to fb9a0e5 Compare June 19, 2026 01:07
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant