Skip to content

Add SourceOS State Integrity CLI contract #15

@mdheller

Description

@mdheller

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions