Skip to content

Warn users when Partio-Checkpoint trailers are dropped by commit rewrite operations #150

@jcleira

Description

@jcleira

Description

When users reword commits via git rebase -i (reword action), git commit --amend, or git filter-branch --msg-filter, the rewrite operation replaces the entire commit message. If the replacement message does not include the Partio-Checkpoint: trailer, the session link is permanently lost — partio rewind and partio doctor show no checkpoint for those commits, with no explanation of why.

This was reported in entireio/cli#834.

What to fix

In partio doctor, add a check that scans recent commits for this pattern:

  1. Find commits where a Partio-Checkpoint: trailer is missing but the reflog shows a prior version of the commit that had one, or where adjacent commits in the session have trailers but this one does not.
  2. Report these commits with a clear message explaining that git rebase/amend operations can drop Partio trailers and how to avoid it.
  3. The check should be non-fatal and informational — it should not block any git operations.

Acceptance Criteria

  • partio doctor detects commits that are missing Partio-Checkpoint trailers and reports them
  • partio doctor output includes actionable guidance when trailer loss is detected
  • Detection covers git rebase reword, interactive rebase, and git commit --amend scenarios
  • make test passes
  • make lint passes

Source

Inspired by entireio/cli#834

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions