Skip to content

Add workspace sync operation contracts and DecisionCard conflict semantics#19

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/integrate-sourceos-syncd-daemon
Draft

Add workspace sync operation contracts and DecisionCard conflict semantics#19
Copilot wants to merge 3 commits intomainfrom
copilot/integrate-sourceos-syncd-daemon

Conversation

Copy link
Copy Markdown

Copilot AI commented May 7, 2026

This PR integrates sourceos-syncd into the local-first workspace sync contract surface by introducing explicit operation/task state for sync workflows and tightening conflict handling semantics. It also aligns fixtures/docs so downstream integrations can consume policy-gated, evidence-linked sync records consistently.

  • Workspace sync state contracts

    • Added sourceos.workspace-operation/v1alpha1 via WorkspaceOperationRecord
    • Added sourceos.operation-task/v1alpha1 via OperationTaskRecord
    • Captures required local-first sync responsibilities:
      • local_operation_idremote_operation_id
      • provisional artifact IDs + final reconciliation
      • checkpoint refs + causal parent linkage
      • stale task / lease expiry / replay safety flags
      • policy, artifact admission, and ledger evidence references
  • Required operation type enforcement

    • Added controlled values for required operation types:
      • sync.operation.enqueue
      • sync.operation.replay
      • sync.operation.reconcile
      • sync.conflict.detect
      • sync.conflict.resolve
      • sync.repair.apply
      • sync.tombstone.apply
      • sync.checkpoint.write
    • Applied to both workspace operations and operation tasks.
  • Conflict DecisionCard semantics

    • Extended ConflictRecord to require a decision_card object.
    • Added validation for option-set semantics (merge / fork / skip) and selected/recommended option consistency.
  • Fixtures and contract coverage

    • Added new fixtures:
      • examples/contracts/workspace-operation.alpha.json
      • examples/contracts/operation-task.alpha.json
    • Updated conflict fixture to include decision_card.
    • Extended contract tests to:
      • validate and round-trip new schemas
      • reject invalid operation types
      • reject invalid DecisionCard options
  • Contract documentation updates

    • Updated docs/contracts.md with:
      • new schema families
      • new fixture inventory
      • workspace operation type set
      • DecisionCard option semantics
{
  "schema": "sourceos.workspace-operation/v1alpha1",
  "operation_type": "sync.operation.reconcile",
  "local_operation_id": "local-op:0001",
  "remote_operation_id": "remote-op:9931",
  "provisional_artifact_ids": { "artifact:temp-1": "object:alpha" },
  "artifact_reconciliation": { "artifact:temp-1": "artifact:final-44" },
  "checkpoint_ref": "checkpoint:workspace-default-0001",
  "causal_parent_ids": ["local-op:0000"],
  "policy_decision_ref": "policy-decision:review-alpha",
  "ledger_evidence_refs": ["evidence:operation-0001"],
  "replay_safe": true
}

Copilot AI changed the title [WIP] Integrate sourceos-syncd as the State Integrity daemon Add workspace sync operation contracts and DecisionCard conflict semantics May 7, 2026
Copilot AI requested a review from mdheller May 7, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate sourceos-syncd as the local-first State Integrity daemon for Workspace Operations

2 participants