Skip to content

Add detailed checkpoint push progress during pre-push - #1684

Open
SnowingFox wants to merge 4 commits into
entireio:mainfrom
SnowingFox:feat/add-push-progress-details
Open

Add detailed checkpoint push progress during pre-push#1684
SnowingFox wants to merge 4 commits into
entireio:mainfrom
SnowingFox:feat/add-push-progress-details

Conversation

@SnowingFox

@SnowingFox SnowingFox commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Problem / intent

Closes #1683.

When git push runs Entire's pre-push hook, checkpoint sync can sit there for a long time — fetch, cherry-pick rebase onto remote tip, retry push, OPF, etc. Previously users only saw:

[entire] Pushing entire/checkpoints/v1 to origin...
.....
 done

No phase labels, no commit/session context, no transfer stats. A slow push feels stuck even when it's working.

This PR aligns Entire's stderr UX with Story CLI (story/apps/cli): structured, phased progress on stderr so users always know what phase is running. Display-only — failures still degrade gracefully (user's main push continues) except existing OPF privacy aborts.

Before → after

Before After
Dot spinner (.....) Named phases with elapsed time
No pre-push context Session tree: how many commits/sessions are pending
Opaque sync/rebase fetching…, remote is N ahead, rebasing i/M…
Git transfer invisible counting / compressing / writing from git --progress

Example output (happy path + sync recovery)

[entire] Checkpoint push: 12 commits, 3 sessions
         ├─ sess-2026-06-12-abc123  3 checkpoints  (12:30 ~ 14:05)
         └─ sess-2026-06-11-def456  2 checkpoints  (yesterday)
[entire] Pushing entire/checkpoints/v1 to origin...
         counting objects: 47
         compressing: 38/38
         writing: 42 objects, 156.23 KiB, 312.00 KiB/s... done
         done (3s)
         conflict (2s)
[entire] Syncing with remote...
         fetching from origin... done (1s)
         remote is 3 commits ahead, rebasing 2 local commits...
         rebasing 1/2... (0s)
         rebasing 2/2... (1s)
         rebasing done (2s)
[entire] Pushing entire/checkpoints/v1 to origin...
         done (1s)

Notes on the labels:

  • Checkpoint push: N commits, M sessions — pre-push summary from unpushed entire/checkpoints/v1 commits, grouped by Entire-Session trailer.
  • counting / compressing / writing — parsed from git push --progress stderr (done state only, avoids spam).
  • conflict (Xs) — generic marker that the first push failed and we're entering sync/recovery (not a merge-conflict UI; cherry-pick is conflict-free by design).
  • rebasing i/M — in-memory cherry-pick onto remote tip, not git rebase.

What changed

New: push_progress.go + tests

Pure parsing/formatting (no I/O), TDD'd against Story's reference:

  • parsePushSummaryFromLog — group checkpoint commits by session
  • formatSessionTree — tree display (max 5 sessions, new branch label)
  • parseGitProgressLine / displayGitProgress — git transfer stderr → indented lines
  • Styled via interactive.ShouldStyle (respects NO_COLOR)

push_common.go

  • Replaced startProgressDots with phased output + elapsed seconds
  • doPushRef: push → on failure conflict + Syncing with remote... → retry push
  • fetchAndRebaseRefCommon: fetch done line, remote-ahead summary, per-commit rebasing i/M, rebasing done

manual_commit_push.go

  • printPushSummary() before push loop — silent on any failure, never blocks push

checkpoint/remote/git.go

  • Add --progress to git push; capture stdout (porcelain) and stderr (progress) separately

metadata_reconcile.go

  • cherryPickOnto accepts optional progress callback for rebasing i/M lines

Out of scope

  • OPF progress lines (unchanged; already has its own notices in redact/batch.go)
  • Real merge-conflict resolution UI (not applicable to checkpoint cherry-pick path)

Test plan

  • mise run check (unit + integration + Vogon canary)
  • push_progress_test.go — parsers/formatters
  • push_common_test.goalready up-to-date / done output updated
  • Manual: git push with unpushed v1 commits → session tree + transfer lines
  • Manual: two clones, diverge entire/checkpoints/v1 → full sync sequence above

Replace the dot spinner with phased stderr output aligned with Story CLI: session summary, git transfer progress, sync/rebase steps, and elapsed times. Closes entireio#1683.

Co-authored-by: Cursor <cursoragent@cursor.com>
@SnowingFox
SnowingFox requested a review from a team as a code owner July 8, 2026 12:56
SnowingFox and others added 3 commits July 8, 2026 23:29
Resolve the push pipeline conflict by preserving main's git-refs safety and SSH auth handling while retaining phased checkpoint push progress.

Co-authored-by: Cursor <cursoragent@cursor.com>
gtrrz-victor added a commit that referenced this pull request Aug 3, 2026
Rework of the pre-push checkpoint-sync progress UX so it is useful to a
human at a terminal but silent for the agents and CI that actually run
most `git push`es. Now that git-refs is the default checkpoint backend,
the old path printed an unconditional "[entire] Pushing N checkpoint
ref(s)..." line plus a dot spinner to stderr that nothing downstream reads.

- New pushReporter: presence-gated on IsTerminalWriter (non-TTY writes
  zero bytes), reveals a single in-place line only after a ~2s threshold,
  and clears it on completion (no scrollback residue).
- git-refs default path (flushCheckpointRefsQueue) rewired to the reporter;
  removed the now-dead startProgressDots.
- git --progress transfer detail routed to .entire/logs/ (operational
  metadata only) on BOTH backends, regardless of TTY.
- Legacy git-branch path also silenced for non-TTY; error/actionable-hint
  lines still print unconditionally on both paths.
- Push semantics unchanged (display only, fast-forward-only, never blocks
  the user's push).

Builds on and supersedes #1684.

Co-Authored-By: snowingfox <snowingfox@users.noreply.github.com>
Entire-Checkpoint: 01KYW08431VR6EKA854NP1A0SR
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.

Pre-push checkpoint sync shows no progress during long pushes

2 participants