Purpose
Implement the operator-facing CLI surface for the SourceOS State Integrity layer.
Canonical spec: SourceOS-Linux/sourceos-spec/docs/architecture/sourceos-state-integrity-layer.md
Program tracker: SourceOS-Linux/sourceos-spec#83
Commands to add
sourceos sync status
sourceos sync doctor
sourceos sync explain <object>
sourceos sync plans
sourceos sync actors
sourceos sync schemas
sourceos sync conflicts
sourceos sync repair --dry-run
sourceos sync repair --apply
sourceos sync profiles
sourceos sync devices
sourceos sync export <workspace|profile|object>
sourceos sync import <bundle>
Requirements
- Commands must be safe-by-default.
- Destructive repair/import/delete operations must require explicit target scope.
doctor must classify durable, rebuildable, and disposable state.
repair --dry-run must produce a repair report before any apply path exists.
- Output must support both human-readable and machine-readable formats.
- CLI should be prepared to speak to
sourceos-syncd through a local API once the daemon exists.
Initial acceptance criteria
- Stub commands exist and return structured JSON with stable fields.
status reports daemon availability, profile, device, workspace, and degraded-state placeholders.
doctor reports derived index health and repair recommendations.
explain <object> returns an explicit not-found or unsupported-object response rather than a generic failure.
Purpose
Implement the operator-facing CLI surface for the SourceOS State Integrity layer.
Canonical spec:
SourceOS-Linux/sourceos-spec/docs/architecture/sourceos-state-integrity-layer.mdProgram tracker:
SourceOS-Linux/sourceos-spec#83Commands to add
Requirements
doctormust classify durable, rebuildable, and disposable state.repair --dry-runmust produce a repair report before any apply path exists.sourceos-syncdthrough a local API once the daemon exists.Initial acceptance criteria
statusreports daemon availability, profile, device, workspace, and degraded-state placeholders.doctorreports derived index health and repair recommendations.explain <object>returns an explicit not-found or unsupported-object response rather than a generic failure.