| name | consolidating-commits |
| description | Regroup commits since a base into logical commits, keeping any version bump last; not squash-to-one. |
| model | haiku |
| metadata | {"internal":true} |
Consolidating commits
When the user says "consolidate commits" they mean: regroup the work since
a base ref into LOGICAL commits (one per concern, the auto-lander's grouping),
with a trailing chore: bump version to X.Y.Z commit preserved last. They do
NOT mean squashing to a single commit (squashing-history owns that).
Run
node scripts/fleet/consolidate-commits.mts --dry-run
node scripts/fleet/consolidate-commits.mts
node scripts/fleet/consolidate-commits.mts --base v6.0.9
The script refuses a dirty worktree (land dirty files first:
node scripts/fleet/land-work.mts --commit), verifies the final tree is
byte-identical to the original tip, and hard-restores the original history on
any failure. It never pushes: a rewritten branch needs a separately authorized
lease force-push.
Contract
- Grouping engine is shared with the auto-lander (
land-work.mts
groupPaths/commitMessage) — one source of truth for what "logical"
means.
- Bump-last invariant: a
chore: bump version to … tip is peeled before
grouping and cherry-picked back as the final commit.
- Nothing is ever lost: byte-identical tree or full restore, no third state.