Switch migration commits to the real git user#1215
Open
Soph wants to merge 5 commits into
Open
Conversation
The previous "Entire Migration <migration@entire.dev>" identity had two
problems: we don't own entire.dev, and a fixed tooling identity blocks
any future plan to sign migration/repair commits (signing keys are tied
to real identities).
Every migration and generation-repair commit now uses the migrating
user's git user.name/user.email as author and committer, with a trailer
block carrying the "this was tooling" signal:
Co-Authored-By: Entire Migration <migration@entire.io>
Entire-Migration: true
A single MigrationCommitMessage helper in the checkpoint package keeps
the trailer format consistent across all seven commit sites (five
CreateCommit calls in migrate.go, the batched /main write in
WriteCommittedMainBatch, and the repair commit in generation_repair.go).
buildMigrateWriteOpts no longer hard-codes the author on
WriteCommittedOptions; the batch writer's existing GetGitAuthorFromRepo
fallback now applies to migration too.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 589c91d5f39e
The Co-Authored-By + Entire-Migration trailer block was defined inside cmd/entire/cli/checkpoint/committed.go alongside CreateCommit. That's the wrong package: trailers/trailers.go already owns every other Entire-* trailer key and Format<Concept> helper, and the migration trailer fits the same pattern exactly. Relocates the two value constants and the formatter, keeping the existing naming conventions: MigrationTrailerKey = "Entire-Migration" MigrationCoAuthor = "Entire Migration <migration@entire.io>" func FormatMigration(message string) string All seven call sites now call trailers.FormatMigration directly. No behavior change; the produced commit message is byte-identical to the prior MigrationCommitMessage output. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 6b357863a3aa
Every migration/repair site followed the same four-line shape:
authorName, authorEmail := checkpoint.GetGitAuthorFromRepo(repo)
commitHash, err := checkpoint.CreateCommit(ctx, repo, tree, parent,
trailers.FormatMigration("..."),
authorName, authorEmail)
That's six call sites repeating identical bookkeeping. Introduces
checkpoint.CreateMigrationCommit(ctx, repo, tree, parent, subject) which
wraps the author lookup + FormatMigration + CreateCommit chain so each
site becomes a single expression.
Five sites in migrate.go and one in generation_repair.go collapse to
this helper; both files drop their direct trailers import as a result.
The /main batch path in v2_committed.go keeps calling
trailers.FormatMigration directly because it has its own ref-update
flow that doesn't go through CreateCommit. Also tightens an over-long
explanatory comment on buildMigrateWriteOpts to two lines.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d3910f0d9222
Contributor
There was a problem hiding this comment.
Pull request overview
Updates migration and generation-repair tooling to stop stamping commits with a fixed tool identity and instead use the repository’s configured git author/committer, while preserving “this was tooling” provenance via commit-message trailers.
Changes:
- Add a standardized migration trailer block (
Co-Authored-By+Entire-Migration: true) viatrailers.FormatMigration. - Introduce
checkpoint.CreateMigrationCommit(...)to centralize creation of migration/repair commits using the real git user identity. - Switch migration + generation-repair call sites to use
CreateMigrationCommitand ensure v2/mainbatch writes include the migration trailer block.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/trailers/trailers.go | Adds migration trailer constants and FormatMigration formatter. |
| cmd/entire/cli/strategy/generation_repair.go | Uses CreateMigrationCommit for repair commits instead of a fixed tool author. |
| cmd/entire/cli/migrate.go | Removes fixed migration author constants and uses CreateMigrationCommit + real git user fallback for v2 writes. |
| cmd/entire/cli/checkpoint/v2_committed.go | Ensures migration-only batch commits carry the migration trailer block. |
| cmd/entire/cli/checkpoint/committed.go | Adds CreateMigrationCommit helper that uses repo git author and appends migration trailers. |
golangci-lint's perfsprint rule flagged the formatted subject we pass to CreateMigrationCommit, since candidate.Name is already a string and the format string has only one verb. Switch to plain concatenation. Local 'mise run lint' had silently auto-fixed this with --fix; CI runs without --fix and surfaced the issue. Equivalent runtime output. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 988b07367ccd
computermode
previously approved these changes
May 14, 2026
The migration trailer block (Co-Authored-By identity + Entire-Migration boolean) is the only signal distinguishing tool-produced commits from user work on the checkpoints/v2 refs. Add a focused test, matching the style of TestFormatMetadata, so accidental changes to the email, trailer ordering, or blank-line separation fail at unit-test time rather than landing silently in pushed commits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 90baba88311d
pfleidi
approved these changes
May 14, 2026
computermode
approved these changes
May 14, 2026
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.
https://entire.io/gh/entireio/cli/trails/379
Switch migration commits to the real git user
The migration and generation-repair tooling stamped every commit with
Entire Migration <migration@entire.dev>— a domain we don't own, and a fixed tool identity that would block any future plan to sign these commits.Every migration/repair commit now uses the migrating user's git
user.name/user.emailas author and committer, with a trailer block carrying the "this was tooling" signal:The trailer formatter lives in
cmd/entire/cli/trailers/alongside its peers (FormatStrategy,FormatCheckpoint, etc.) following the existingFormat<Concept>convention. Acheckpoint.CreateMigrationCommit(ctx, repo, tree, parent, subject)helper collapses what was six near-identical 4-line blocks acrossmigrate.goandgeneration_repair.gointo one expression each.Commits
Test plan
mise run test— 5307 unit tests passmise run test:integration— 340 integration tests passentire migrate --checkpoints=v2produces commits with the user's identity in author/committer and the trailer block in the messageNote
Medium Risk
Changes the author/committer and message format for migration/repair commits across v2 checkpoint migration and generation metadata repair, which could affect downstream tooling that inspects commit metadata. Functional behavior of checkpoint data writing is otherwise unchanged.
Overview
Migration and generation-repair tooling now creates commits with the current repo’s git user as both author and committer (enabling normal commit signing), instead of a fixed
Entire Migrationidentity.Tool provenance is preserved by adding a standardized trailer block (
Co-Authored-By: Entire Migration <migration@entire.io>andEntire-Migration: true) via newtrailers.FormatMigration, and call sites are simplified throughcheckpoint.CreateMigrationCommit(used bymigrate.go,generation_repair.go, and v2/mainbatch migration commits).Reviewed by Cursor Bugbot for commit db0ad09. Configure here.