Quiet, threshold-gated pre-push checkpoint progress (supersedes #1684) - #1883
Quiet, threshold-gated pre-push checkpoint progress (supersedes #1684)#1883gtrrz-victor wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 43605ba. Configure here.
There was a problem hiding this comment.
Pull request overview
This PR refines pre-push checkpoint sync UX to be silent for non-interactive environments (agents/CI) while still providing threshold-gated, in-place progress feedback for humans on a TTY, and moves detailed git transfer progress into .entire/logs/ for debuggability.
Changes:
- Introduces a TTY- and time-threshold-gated
pushReporterfor git-refs checkpoint pushes (no scrollback residue; zero bytes on non-TTY). - Reworks legacy git-branch progress output to be TTY-only while preserving unconditional actionable warnings/hints.
- Captures/parses
git push --progressstderr for file logging on both backends and selectively displays human-friendly transfer summaries on TTY.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/strategy/push_reporter.go | Adds threshold-gated, in-place progress reporter (TTY-only) for pre-push checkpoint sync. |
| cmd/entire/cli/strategy/push_reporter_test.go | Adds tests for reporter silence on non-TTY and reveal/clear behavior on TTY. |
| cmd/entire/cli/strategy/push_progress.go | Adds parsing/formatting for session summaries and git transfer progress; adds file logging helper. |
| cmd/entire/cli/strategy/push_progress_test.go | Adds tests for push summary parsing/tree formatting and git --progress parsing/logging behavior. |
| cmd/entire/cli/strategy/push_common.go | Wires progress gating for legacy git-branch backend; adds file logging of git transfer progress. |
| cmd/entire/cli/strategy/push_common_test.go | Updates tests to assert non-TTY silence while warnings still print; adds regression guard for file-logged progress. |
| cmd/entire/cli/strategy/metadata_reconcile.go | Extends cherry-pick helper to optionally report replay progress (current/total). |
| cmd/entire/cli/strategy/manual_commit_push.go | Wires git-refs queue flushing to pushReporter; adds session-summary printing on TTY. |
| cmd/entire/cli/strategy/manual_commit_push_test.go | Adds non-TTY regression test ensuring git-refs queue push remains silent while still pushing refs. |
| cmd/entire/cli/strategy/common.go | Updates cherry-pick helper call sites for the new optional progress callback parameter. |
| cmd/entire/cli/checkpoint/remote/git.go | Splits git push stdout/stderr capture and always enables --progress for parsing/logging. |
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
- session tree: drop trailer valueonly so Entire-Session prefix matches the parser (was bucketing all commits to 'unknown') - gate progress ANSI on ShouldStyle, not IsTerminalWriter (respects NO_COLOR / TERM=cygwin) - style the session tree against the real output writer instead of io.Discard - dedupe the duplicate 'counting objects' line in displayGitProgress - isolate git config in the new push tests (IsolateGitConfigEnv) - make the reporter reveal test deterministic (kill CI flake) Co-Authored-By: snowingfox <snowingfox@users.noreply.github.com> Entire-Checkpoint: 01KZ3ER62N63BETRDA7QFR0F88
Reveal at ~1s and stream git's --progress transfer stats live into the reporter line (counting/compressing/writing) alongside the checkpoint count, ending with a persistent "pushed N checkpoints" summary. Non-TTY, non-ShouldStyle, and sub-1s pushes stay silent. Co-Authored-By: snowingfox <snowingfox@users.noreply.github.com>
The SSH-auth-failure path calls finish("") then prints its own error; with
the new persistent-summary finish this emitted a content-less '[entire] (Ns)'
line. Clear the line instead when summary is empty.
Co-Authored-By: snowingfox <snowingfox@users.noreply.github.com>
43605ba to
1611bd0
Compare
…ync recovery The per-ref recovery path (batch push rejected as non-fast-forward) is slow — one fetch+replay+push per ref — and 'resolving N diverged checkpoint(s)' was opaque. Show an advancing 'syncing checkpoint i/N with remote' counter so the user can see progress. Co-Authored-By: snowingfox <snowingfox@users.noreply.github.com> Entire-Checkpoint: 01KZ3KBDTT8MKFZ4J9JZVXF8VS

https://entire.io/gh/entireio/cli/trails/965
Problem / intent
Supersedes #1684 (builds on @SnowingFox's work — kept as co-author).
The pre-push checkpoint sync can sit for a while (fetch, replay, retry), so a slow push feels stuck. #1684 addressed this with phased progress + a session tree, but since then git-refs became the default checkpoint backend:
flushCheckpointRefsQueue(git-refs), which Add detailed checkpoint push progress during pre-push #1684's session-tree UX didn't cover — it emitted an unconditional[entire] Pushing N checkpoint ref(s)...line + dot spinner.git pushes are run by agents and CI, which never read that stderr — so progress there is pure terminal noise.Principle: useful to a human at a terminal, silent for everyone else.
Approach
pushReporter(new): gated oninteractive.ShouldStyle— a non-TTY /NO_COLOR/cygwinwriter receives zero bytes. On a styled terminal it reveals a single in-place line after ~1s (sub-1s pushes stay silent).--progressstats in real time, alongside the checkpoint count and elapsed:.entire/logs/, operational metadata only) on both backends regardless of TTY.Result
NO_COLOR.entire/logs/)pushed Nsyncing i/N with remotecounterTest plan
pushReporter: non-TTY/unstyled writes nothing; reveal → live detail → persistent summary; empty-summary clears; deterministic (notime.Sleep), race-clean--progressstreamer: chunk-split parsinglogGitProgress: file-logs on both backends, no terminal writes (real fd-capture guard)mise run fmt, lint (golangci-lint v2.11.3), full-racesuite — CI green🤖 Generated with Claude Code
Note
Low Risk
Display and logging only around existing push/sync paths; push semantics and error handling boundaries are explicitly preserved with new regression tests.
Overview
Reworks pre-push checkpoint progress so agents/CI see no stderr noise while interactive pushes get clearer, less chatty feedback. Push behavior (fast-forward-only, fail-soft) is unchanged.
git-refs path: Replaces the unconditional “Pushing N ref(s)…” banner and dot spinner with a
pushReporterthat writes nothing unless stderr is a TTY and the sync runs longer than ~2s, then shows one in-place line that clears on completion.git-branch (v1) path: Routes phased “Pushing / Syncing / done” lines and the session-tree summary through
pushProgressOutput()(TTY-only); warnings and hints (SSH auth, protected refs, sync failures) still go toos.Stderrunconditionally.fetchAndRebaseRefCommoncan stream fetch/rebase sub-steps to the progress writer and reports cherry-pick progress via an optional callback oncherryPickOnto.Git push plumbing:
PushWithOptionsadds--progressand splits stdout/stderr; callers parse stderr for human display (displayGitProgress) and always file-log transfer phases vialogGitProgress(including when the terminal is gated off).Tests lock in non-TTY silence, actionable errors still printing, and log-only progress capture.
Reviewed by Cursor Bugbot for commit 43605ba. Configure here.