Skip to content

Ensure support for checkpoint creation in SHA-256 repositories#1150

Merged
pjbgf merged 4 commits into
mainfrom
sha256
May 8, 2026
Merged

Ensure support for checkpoint creation in SHA-256 repositories#1150
pjbgf merged 4 commits into
mainfrom
sha256

Conversation

@pjbgf
Copy link
Copy Markdown
Member

@pjbgf pjbgf commented May 8, 2026

https://entire.io/gh/entireio/cli/trails/325

Fixes #1133.


Note

Medium Risk
Upgrades core go-git dependencies and adjusts worktree filesystem accessors across checkpoint/clean/migrate/review code paths, which could subtly affect repository path resolution. Adds an integration test to catch regressions in SHA-256 object-format repos, reducing but not eliminating risk.

Overview
Ensures the CLI can create and persist checkpoints in SHA-256 object-format git repositories by adding an integration test that runs enable, creates a first checkpoint via hooks, and asserts SHA-256-length object IDs and metadata branch updates.

Updates go-git/go-billy (and sha1cd) and refactors various call sites to use the newer Worktree.Filesystem() API (replacing direct Filesystem.Root()/Filesystem.MkdirAll access) across checkpointing, cleaning, migration, and review scope logic.

Reviewed by Cursor Bugbot for commit f50e6e9. Configure here.

Copilot AI review requested due to automatic review settings May 8, 2026 04:54
@pjbgf pjbgf requested a review from a team as a code owner May 8, 2026 04:54
Signed-off-by: Paulo Gomes <paulo@entire.io>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses failures when creating/writing checkpoints in SHA-256 Git repositories (Fixes #1133) by upgrading the go-git stack to a version that supports SHA-256 object formats and adding an integration test that exercises the enable + first-checkpoint path in a SHA-256 repo.

Changes:

  • Bump github.com/go-git/go-git/v6 (and related go-git deps) to pick up SHA-256 repository support.
  • Update code to the new go-git worktree filesystem accessor API (Filesystem().Root()).
  • Add an integration test that initializes a SHA-256 repo and verifies the first checkpoint is created and condensed successfully.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go.mod Updates go-git/go-billy versions and bumps indirect sha1cd.
go.sum Syncs checksums for updated go-git/go-billy/go-git-fixtures and sha1cd.
cmd/entire/cli/strategy/metadata_reconcile.go Adjusts worktree filesystem root access for updated go-git API.
cmd/entire/cli/strategy/manual_commit_hooks.go Adjusts worktree filesystem root access for updated go-git API.
cmd/entire/cli/strategy/content_overlap.go Adjusts worktree filesystem root access for updated go-git API.
cmd/entire/cli/review/scope.go Adjusts worktree filesystem root access for updated go-git API.
cmd/entire/cli/reset_test.go Updates tests for updated go-git API (Filesystem().Root()).
cmd/entire/cli/migrate.go Adjusts worktree filesystem root access for updated go-git API.
cmd/entire/cli/migrate_test.go Updates tests to use Filesystem().Root() for chdir.
cmd/entire/cli/integration_test/sha256_repo_test.go New integration test covering enable + first checkpoint in a SHA-256 repo.
cmd/entire/cli/explain_test.go Updates tests for updated go-git API (Filesystem().Root()).
cmd/entire/cli/clean_test.go Updates tests for updated go-git API (Filesystem().Root() / Filesystem().MkdirAll).
cmd/entire/cli/checkpoint/v2_read_test.go Updates test for updated go-git API (Filesystem().Root()).
cmd/entire/cli/checkpoint/temporary.go Updates worktree root discovery for git subprocesses with updated go-git API.
cmd/entire/cli/checkpoint/checkpoint_test.go Updates tests for updated go-git API (Filesystem().Root()).

Signed-off-by: Paulo Gomes <paulo@entire.io>
Entire-Checkpoint: 30df7fcff4f5
pjbgf added 2 commits May 8, 2026 11:45
Signed-off-by: Paulo Gomes <paulo@entire.io>
Signed-off-by: Paulo Gomes <paulo@entire.io>
@pjbgf pjbgf enabled auto-merge May 8, 2026 11:56
@pjbgf pjbgf merged commit 018edea into main May 8, 2026
9 checks passed
@pjbgf pjbgf deleted the sha256 branch May 8, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Entire CLI 0.6.0 appears to corrupt/checkpoint-fail in a SHA-256 Git repo

3 participants