Skip to content

Show pending checkpoint processing in status - #2052

Open
svarlamov wants to merge 1 commit into
mainfrom
feat/status-cmd-async-jul-30
Open

Show pending checkpoint processing in status#2052
svarlamov wants to merge 1 commit into
mainfrom
feat/status-cmd-async-jul-30

Conversation

@svarlamov

@svarlamov svarlamov commented Jul 30, 2026

Copy link
Copy Markdown
Member

What changed

  • expose the daemon's existing outstanding checkpoint count through the non-blocking family status response
  • show a warning in human-readable git-ai status output while checkpoint processing is pending
  • add checkpoint_processing_pending to JSON status output
  • treat daemon configuration, connection, response, and decoding failures as a best-effort false result

Why

Async checkpoint receipts can return before the working log is updated, so git-ai status may otherwise display incomplete information with no indication that more attribution is still being processed.

Validation

  • task fmt
  • task lint
  • task test

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@svarlamov
svarlamov marked this pull request as ready for review July 30, 2026 23:27

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View 1 additional finding in Devin Review.

Open in Devin Review

Comment thread src/daemon.rs
@@ -6544,6 +6544,7 @@ impl ActorDaemonCoordinator {
last_error: status
.last_error
.or_else(|| self.latest_side_effect_error(&family_key).ok().flatten()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Status warns about pending work even when the pending work belongs to a different repository

The pending-work count reported for a specific repository is actually the background service's global count of unfinished checkpoints across every repository (self.outstanding_checkpoint_state().0 at src/daemon.rs:6546), so a repository with nothing in flight can still be reported as busy.
Impact: Users can see a "processing still in progress, status may be incomplete" warning in a repository that has no pending work, simply because another repository on the machine is being processed.

Global ingress quota vs. family-scoped response field

FamilyStatus is a per-family (per-repo) response (src/daemon/control_api.rs:139-146), but outstanding_checkpoint_state() returns self.checkpoint_ingress_quota.outstanding() (src/daemon.rs:6788-6790), which is a single process-wide counter incremented in the checkpoint receive loop (src/daemon.rs:7404) and released on reservation drop (src/daemon.rs:225). It has no family/repo dimension. The production daemon is shared system-wide, so git-ai status in repo A reports checkpoint_processing_pending = true while repo B's checkpoints are still queued (src/commands/status.rs:242-249).

A family-scoped count would need to be derived from per-family sequencer state (e.g. counting FamilySequencerEntry::Checkpoint entries for the resolved family) rather than the global quota.

Prompt for agents
status_for_family in src/daemon.rs returns pending_checkpoints from self.outstanding_checkpoint_state(), which delegates to the process-wide checkpoint_ingress_quota (src/daemon.rs:6788). Because the daemon is shared across all repositories, a StatusFamily response for repo A reports checkpoints that are queued for repo B, causing git-ai status (src/commands/status.rs) to print a spurious 'processing still in progress' warning. Consider deriving a family-scoped pending count, e.g. by counting outstanding FamilySequencerEntry::Checkpoint entries (and in-flight checkpoint side effects) for the resolved family key, and use that for the family status response.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread src/commands/status.rs

fn run_status(json: bool, diff_only: bool) -> Result<(), GitAiError> {
let repo = find_repository(&[])?;
let checkpoint_processing_pending = checkpoint_processing_pending(&repo);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Pending-work warning can be missed for work that arrives while status is being computed

Whether background processing is still pending is checked (checkpoint_processing_pending(&repo) at src/commands/status.rs:61) before the attribution data is read rather than after, so work that starts during the read is displayed without any warning.
Impact: Users can occasionally see incomplete attribution numbers with no indication that more processing was still happening.

Ordering of the pending probe relative to the working-log read

The probe happens first at src/commands/status.rs:61, while the working log and checkpoints are read afterwards at src/commands/status.rs:70-72 and the diff stats later still. If a checkpoint is accepted by the daemon between the probe and the reads, the printed status reflects a partially-processed state but checkpoint_processing_pending is false. Probing after all reads closes that window: the worst case then becomes a harmless false-positive warning (work that finished during the read) instead of a silently incomplete report.

Prompt for agents
In run_status (src/commands/status.rs), checkpoint_processing_pending(&repo) is evaluated before the working log, checkpoints and diff stats are read. A checkpoint admitted by the daemon during those reads yields incomplete output with no warning. Move the pending probe so it runs after the data used for the output has been gathered (both in the early-return empty branch and in the main path), so the flag conservatively reports pending work that overlapped the read.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant