Add workspace sync operation contracts and DecisionCard conflict semantics#19
Add workspace sync operation contracts and DecisionCard conflict semantics#19Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/SourceOS-Linux/sourceos-syncd/sessions/744c639e-1999-4873-80c6-cbc4b6f037f1 Co-authored-by: mdheller <21163552+mdheller@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SourceOS-Linux/sourceos-syncd/sessions/744c639e-1999-4873-80c6-cbc4b6f037f1 Co-authored-by: mdheller <21163552+mdheller@users.noreply.github.com>
|
Supersession note: this PR is not discarded. Its sync operation contract payload has been replayed onto current #29 carries forward the intended contract payload from this PR:
Reason for replacement: this PR reported Do not close this PR until #29 lands, or until #29 is explicitly abandoned with another durable capture location. |
Clean replay of the contract payload from #19 onto current main. Adds workspace sync operation contracts, OperationTask records, conflict DecisionCard semantics, fixtures, docs, and tests. Avoids overwriting the newer mainline Makefile validation targets. Validated on PR head fbb3360 with ci, Control Plane Validation, and Trust Surface passing.
|
Closing after capture/replay. Replacement PR #29 landed the intended sync operation contract payload on current Merged replacement commit: Content carried forward:
Content intentionally omitted: the stale Makefile edit, because current main already had a corrected |
This PR integrates
sourceos-syncdinto 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
sourceos.workspace-operation/v1alpha1viaWorkspaceOperationRecordsourceos.operation-task/v1alpha1viaOperationTaskRecordlocal_operation_id↔remote_operation_idRequired operation type enforcement
sync.operation.enqueuesync.operation.replaysync.operation.reconcilesync.conflict.detectsync.conflict.resolvesync.repair.applysync.tombstone.applysync.checkpoint.writeConflict DecisionCard semantics
ConflictRecordto require adecision_cardobject.merge/fork/skip) and selected/recommended option consistency.Fixtures and contract coverage
examples/contracts/workspace-operation.alpha.jsonexamples/contracts/operation-task.alpha.jsondecision_card.Contract documentation updates
docs/contracts.mdwith:{ "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 }