Skip to content

chore: add mise git:worksync (gws) task to reconcile worktrees with main#2969

Open
bflad wants to merge 1 commit into
mainfrom
bflad-age-2441-reconcile-existing-worktrees-with-main-port-mappings-and-db-oOHf
Open

chore: add mise git:worksync (gws) task to reconcile worktrees with main#2969
bflad wants to merge 1 commit into
mainfrom
bflad-age-2441-reconcile-existing-worktrees-with-main-port-mappings-and-db-oOHf

Conversation

@bflad
Copy link
Copy Markdown
Member

@bflad bflad commented May 20, 2026

https://linear.app/speakeasy/issue/AGE-2441/reconcile-existing-worktrees-with-main-port-mappings-and-db-migrations

git:workinit (gwi) is one-shot, so existing worktrees drift as main evolves: new _PORT dependents added to mise.toml never propagate into mise.local.toml (silent breakage — e.g. dashboard OAuth redirects to the default port instead of the remapped one), and new DB migrations aren't applied locally.

This adds git:worksync (alias gws), safe to run repeatedly:

  • Extends zero:remap-ports with --preserve mode: keeps already-assigned _PORT values, randomizes any newly-introduced ports, emits dependent declarations only when absent from mise.local.toml (preserves manual edits). Dedupe via insertion-order Map ensures dependents land after the latest port they reference.
  • Applies pending Postgres + ClickHouse migrations (--no-migrate to skip).
  • ./zero detects worktrees and invokes gws --no-migrate so users who re-run the bootstrap script also get port reconcile (migrations stay in ./zero's existing flow).

https://linear.app/speakeasy/issue/AGE-2441/reconcile-existing-worktrees-with-main-port-mappings-and-db-migrations

git:workinit (gwi) is one-shot, so existing worktrees drift as main
evolves: new _PORT dependents added to mise.toml never propagate into
mise.local.toml (silent breakage — e.g. dashboard OAuth redirects to the
default port instead of the remapped one), and new DB migrations aren't
applied locally.

This adds git:worksync (alias gws), safe to run repeatedly:

- Extends zero:remap-ports with --preserve mode: keeps already-assigned
  _PORT values, randomizes any newly-introduced ports, emits dependent
  declarations only when absent from mise.local.toml (preserves manual
  edits). Dedupe via insertion-order Map ensures dependents land after
  the latest port they reference.
- Applies pending Postgres + ClickHouse migrations (--no-migrate to
  skip).
- ./zero detects worktrees and invokes gws --no-migrate so users who
  re-run the bootstrap script also get port reconcile (migrations stay
  in ./zero's existing flow).
@bflad bflad requested a review from a team as a code owner May 20, 2026 20:21
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 20, 2026

AGE-2441

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

⚠️ No Changeset found

Latest commit: ec64d7c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment May 20, 2026 8:21pm

Request Review

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