feat(cli): add sync status command#38
Merged
Merged
Conversation
sourceos-syncd sync status shows daemon and sync health at a glance: - daemon field: active | inactive | unknown (via systemctl is-active) - currentVersion: last applied content view version from ReceiptStore - lastReceipt: issuedAt, outcome, ageSeconds since issuedAt - storeReceipts: total receipt count - healthy: true iff daemon==active and last outcome in approved set Exit 0 if healthy, 1 if not. Accepts --store-root and --compact. Used by scripts/doctor.sh in source-os for the full health check.
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.
Summary
sourceos-syncd sync status— one-shot operational view of the daemonhealthybool--store-rootand--compactExample output
```json
{
"daemon": "active",
"currentVersion": "1.2",
"lastReceipt": {
"issuedAt": "2026-06-16T14:23:01Z",
"outcome": "applied",
"ageSeconds": 2520
},
"storeReceipts": 7,
"healthy": true
}
```
Used by
scripts/doctor.shinsource-oscalls this to include daemon health in the full stack health check.Test plan
sourceos-syncd sync statusreturns JSON with expected fieldshealthy: falsewhen daemon is inactive--compactflag works