Skip to content

Rewording commits can silently break Entire linkage when Entire-Checkpoint trailers are dropped #834

@SvenMeyer

Description

@SvenMeyer

Summary

Rewording existing commits (for example via git rebase -i/reword or git filter-branch --msg-filter) can silently break Entire session linkage if the rewrite replaces the full commit message and drops the Entire-Checkpoint: trailer.

I hit this in a repo using Entire + Factory AI Droid. After renaming three commit subjects, those three commits lost their [Factory AI Droid] label and session link in the Entire UI, while two adjacent rewritten commits remained linked.

Image

Environment

  • Entire CLI: 0.5.2 (5affe173)
  • OS: Linux (Manjaro)
  • Agent: Factory AI Droid
  • Git remote: GitHub

What I observed

We intended to rename only 3 of the last 5 commits.

The history-rewrite command rewrote the full 5-commit range, so all 5 commits got new hashes. However, 2 of those commits kept their exact original message and Entire-Checkpoint: trailer and remained correctly linked in Entire, while the 3 commits whose message text was replaced lost their trailer and therefore lost the Entire/agent label in the UI.

The resulting rewritten 5-commit segment looked like this:

old commit old subject new commit new subject trailer after rewrite? Entire label in UI?
211e583 feat: complete retirement flow with ProjectStore records 5ce6a31 feat: task-060.3-implement-retirement-metadata-split no no
a340deb chore: add combined quiet validator gate 96155f5 chore: add combined quiet validator gate yes yes
c68b67b chore: streamline validator output 837f1fc chore: streamline validator output yes yes
39f8ad0 feat: store project verification records in ProjectStore dd24525 feat: task-060.2-implement-verification-records-in-project-store no no
ae92a5c refactor: centralize issuance records in ProjectStore ec034b9 refactor: task-060.1-migrate-issuance-records-into-project-store no no

The difference was not code content or author identity. The difference was that the three renamed commits had their full message replaced, so their Entire-Checkpoint: trailer disappeared.

Evidence from git

Before rewrite, the affected commits had trailers:

211e583
feat: complete retirement flow with ProjectStore records

Entire-Checkpoint: 85eda2fe566e

39f8ad0
feat: store project verification records in ProjectStore

Entire-Checkpoint: c63eb21633ef

ae92a5c
refactor: centralize issuance records in ProjectStore

Entire-Checkpoint: a4c7fecd47a5

After rewrite, the renamed commits no longer had trailers:

5ce6a31
feat: task-060.3-implement-retirement-metadata-split

dd24525
feat: task-060.2-implement-verification-records-in-project-store

ec034b9
refactor: task-060.1-migrate-issuance-records-into-project-store

But the rewritten commits whose messages were preserved still retained their trailers:

96155f5
chore: add combined quiet validator gate

Entire-Checkpoint: 0e30151eed18

837f1fc
chore: streamline validator output

Entire-Checkpoint: e19149854b98

Also, the repo still has Entire session refs keyed to the original commit prefixes, e.g.:

refs/heads/entire/a340deb-e3b0c4
refs/heads/entire/39f8ad0-e3b0c4
refs/heads/entire/ae92a5c-e3b0c4

Why I think this is worth fixing/documenting

I understand that a rewritten commit gets a new SHA, so simple SHA tracking alone cannot survive rewording.

But from a user perspective this is still pretty surprising:

  • the commit still represents the same logical work/session
  • Entire metadata clearly existed before the rewrite
  • a normal history-cleanup operation can silently orphan the session link if the trailer line is lost
  • there is no obvious warning or repair flow

Expected behavior

Any of these would help:

  1. Document this limitation clearly: if users reword or rewrite commits, they must preserve Entire-Checkpoint: trailers manually.
  2. Warn or auto-preserve: provide guidance when Entire detects a rewritten commit flow that removed a known trailer.
  3. Repair tooling: add a command to relink/reimport checkpoints after a history rewrite.
  4. More robust linkage: if possible, use additional metadata so commit rewording is not so easy to orphan.

Minimal reproduction

  1. Create a commit during an active Entire-linked agent session so the commit gets an Entire-Checkpoint: trailer.
  2. Rewrite that commit message with a method that replaces the full message body, e.g.:
    • git rebase -i + manual edit that removes trailers, or
    • git filter-branch --msg-filter that outputs only a new one-line subject.
  3. Force-push the rewritten branch.
  4. Observe that the rewritten commit no longer shows the Entire agent/session label in the UI.

If useful, I can provide a more exact command transcript from this repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions