Repository navigation
feat(mcp): show running sync progress in sync_status - #46
Merged
kyle-elliott merged 1 commit intoOct 10, 2026
Merged
kyle-elliott merged 1 commit into
kyle-elliott merged 1 commit into
Conversation
kyle-elliott
added this pull request to stack #45
October 9, 2026 23:44
This was referenced Oct 9, 2026
A first index returns from index_codebase at once, so an agent has only sync_status to follow it. The first-index phase said "syncing" and nothing more. The agent could not tell a stalled upload from a slow one. The coordinator now keeps the latest milestone of the reconcile that runs. SyncReconciler publishes each SyncProgress step to that slot. A guard clears the slot when the reconcile ends, fails, or is cancelled. - CoordinatorStatus carries the milestone as sync_progress. The field has a serde default, so a status from an older daemon still decodes. - SyncProgress is the wire type and has one Display. semctl index, the sync_status "current sync:" line, and semctl daemon status all use it. - CoordinatorStatus moves to coordinator/status.rs, because coordinator.rs was at the file size limit. - sync::sync, the quiet wrapper, had no caller left and is removed. Refs #37
kyle-elliott
force-pushed
the
feat/first-index-upload-progress
branch
from
October 10, 2026 00:05
d15a867 to
1da2fd5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 4 of the #37 stack: #42 → #43 → #44 → this PR. It is a follow-up to #44.
Problem
After #44,
index_codebasereturns immediately and agents pollsync_status. During thefirst index: syncingphase,sync_statusdid not say how far the scan or upload had come. The background reconcile used the quietsync::sync, so its progress went nowhere.Change
src/engine/coordinator/progress.rs, atokio::sync::watchsender).ReconcileRuncarries it, andSyncReconcilercallssync_with_progressand publishes each milestone. A drop guard around the reconcile clears the slot on success, failure, panic, and cancellation.CoordinatorStatus.sync_progress: Option<SyncProgress>(#[serde(default)], so a status body from an older daemon still decodes).SyncProgressitself is the wire type (snake_casetags); no second shape exists.impl Display for SyncProgress.semctl index, thesync_statusline, andsemctl daemon statususe it. The upload text changes fromuploading: 3/8 filestouploading 3/8 files, so the status line does not readcurrent sync: uploading: ….sync_statusprintscurrent sync: <milestone>after thefirst index:line while a reconcile runs, for examplecurrent sync: uploading 1200/3607 files. The line is absent when nothing runs.CoordinatorStatusand itsDisplaymove tosrc/engine/coordinator/status.rs, becausecoordinator.rswas at the 1,000-line limit (983 → 956).sync::syncwrapper had no caller left, so it is removed.Verification
fmt,test,clippy,doc,git diff --check).Uploading { 3, 10 }while a fake reconcile runs, and the slot is empty after success, failure, and cancellation.current sync:line insync_status, and that it is absent when idle.~/napbat/symtreewith an isolated runtime directory and polledsync_status. It showedcurrent sync: scanned 1294 files (0 filter decisions reused) — checking for changesduring the startup reconcile, then no line after the reconcile ended. The checkout had no changed files, so the live run did not reach the upload step. Unit tests cover the upload counts.