Skip to content

Implement CapabilityLedger contract and UI/runtime capability reconciliation #12

@mdheller

Description

@mdheller

Parent spec

SourceOS-Linux/sourceos-spec#99

Intent

sourceos-shell must implement the CapabilityLedger ledger to ensure that any feature flag, runtime, or plugin capability is reconciled across config, UI, runtime, server, plugin, policy, schema, and transport planes. This prevents split-brain where a feature is locally claimed as enabled but rejected elsewhere.

Required behavior

  • Each capability flag/state change must emit a CapabilityLedger receipt.
  • Ledger must track declared, requested, negotiating, available, enabled, degraded, blocked_by_policy, unsupported_by_runtime, unsupported_by_server, missing_plugin, missing_schema, failed states.
  • Reconciliation occurs at runtime startup, on feature toggle, and on plugin load/unload.
  • Conflicts must be logged as warnings in the ledger with references to evidence.
  • Receipt schema and example must be validated against sourceos-spec.

UI/runtime requirements

  • Display effective capability state per feature.
  • Indicate owner (UI, runtime, server, plugin, policy).
  • Show policyDecisionRef and evidenceRefs.
  • Prevent feature use until ledger reports enabled.

Acceptance criteria

  • Ledger exists with runtime tests covering at least: enabling, denying, unsupported, missing plugin, failed reconciliation.
  • UI surfaces effective state with owner and policy/evidence refs.
  • Conflicting feature attempts generate receipts with correct state.
  • Ledger and UI validate against sourceos-spec schema/examples.

Notes

This implements the CapabilityLedger portion of SourceOS-Linux/sourceos-spec#99. Ledger entries become the single source of truth for all capability state.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions