Skip to content

integration: Add state model for integration branch - #1165

Open
ed-irl wants to merge 1 commit into
ed-irl/scriptrunfrom
integration-state
Open

integration: Add state model for integration branch#1165
ed-irl wants to merge 1 commit into
ed-irl/scriptrunfrom
integration-state

Conversation

@ed-irl

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

Copy link
Copy Markdown
Collaborator

Introduce repo-scoped integrationInfo carrying a singleton integration
branch name, the upstream branch, the last pushed hash for
--force-with-lease leasing, and an ordered list of tips with the hashes
recorded at the last rebuild.

Adds Store.Integration / Store.SetIntegration as the public API and
bumps the state storage layout to VersionThree. The version is upgraded
only when an integration is configured, so existing repos that never opt
in keep V1 or V2.

SetRemote preserves integration through remote changes; clearing the
integration drops the version back to its prior level.

Extends the spice.Service Store interface with Integration and
SetIntegration so the service layer can read and write the
configuration. spice.Service.RenameBranch now rewrites any integration
tip that references the renamed branch; rename failures of the
integration update are surfaced as warnings rather than aborting the
primary rename.

Also adds Store.PendingIntegrationRebuild,
Store.SetPendingIntegrationRebuild, and
Store.ClearPendingIntegrationRebuild for persisting a rebuild that was
paused mid-flight (typically by a merge conflict). The handler uses
this to support resuming after the user resolves conflicts in the
worktree.

@ed-irl
ed-irl force-pushed the integration-state branch from 5f6e857 to fc67eba Compare May 19, 2026 10:19
@ed-irl

ed-irl commented May 19, 2026

Copy link
Copy Markdown
Collaborator Author

@ed-irl
ed-irl changed the base branch from main to ed-irl/scriptrun June 2, 2026 20:12
@ed-irl
ed-irl force-pushed the integration-state branch 2 times, most recently from 2f117ea to 93c644e Compare June 8, 2026 11:15
@ed-irl
ed-irl force-pushed the ed-irl/scriptrun branch from 5d13e29 to 3e9d081 Compare June 12, 2026 20:07
@ed-irl
ed-irl force-pushed the integration-state branch from 93c644e to 512b215 Compare June 12, 2026 20:08
@ed-irl
ed-irl force-pushed the ed-irl/scriptrun branch from 3e9d081 to 1373b7f Compare June 13, 2026 13:39
@ed-irl
ed-irl force-pushed the integration-state branch from 512b215 to 8575070 Compare June 13, 2026 13:40
@ed-irl
ed-irl force-pushed the ed-irl/scriptrun branch from 1373b7f to 4cbacbc Compare June 15, 2026 09:52
@ed-irl
ed-irl force-pushed the integration-state branch from 8575070 to b0c48d9 Compare June 15, 2026 09:53
@ed-irl
ed-irl force-pushed the ed-irl/scriptrun branch from 4cbacbc to f700687 Compare June 19, 2026 01:01
@ed-irl ed-irl changed the title integration: Add state model for integration branch worktree: Add worktree commands, per-worktree trunks, and worktree-aware filtering Jun 19, 2026
@ed-irl
ed-irl force-pushed the integration-state branch from b0c48d9 to e3c8701 Compare June 19, 2026 01:06
Introduce repo-scoped integrationInfo carrying a singleton integration
branch name, the upstream branch, the last pushed hash for
--force-with-lease leasing, and an ordered list of tips with the hashes
recorded at the last rebuild.

Adds Store.Integration / Store.SetIntegration as the public API and
bumps the state storage layout to VersionThree. The version is upgraded
only when an integration is configured, so existing repos that never opt
in keep V1 or V2.

SetRemote preserves integration through remote changes; clearing the
integration drops the version back to its prior level.

Extends the spice.Service Store interface with Integration and
SetIntegration so the service layer can read and write the
configuration. spice.Service.RenameBranch now rewrites any integration
tip that references the renamed branch; rename failures of the
integration update are surfaced as warnings rather than aborting the
primary rename.

Also adds Store.PendingIntegrationRebuild,
Store.SetPendingIntegrationRebuild, and
Store.ClearPendingIntegrationRebuild for persisting a rebuild that was
paused mid-flight (typically by a merge conflict). The handler uses
this to support resuming after the user resolves conflicts in the
worktree.
@diegocostares

Copy link
Copy Markdown

I love the idea

@abhinav abhinav changed the title worktree: Add worktree commands, per-worktree trunks, and worktree-aware filtering integration: Add state model for integration branch Aug 12, 2026
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.

2 participants