Concepts · Architecture

Git truth and coordination truth stay separate.

Cloudflare Artifacts owns the repository. Trestle owns Switchyard's durable collaboration state. The control plane connects them without making either pretend to be the other.

Git truth

Cloudflare Artifacts

The actual remote Git server: repositories, objects, commits, branches, tags and canonical refs.

git clone · fetch · push
Coordination + policy

Switchyard

Work, Attempts, Pull Requests, review, workflows, Integration Queue, permissions, provenance and the browser experience.

Coordination truth

Trestle

Durable records for Switchyard state: idempotency, optimistic concurrency, workflow steps, findings, queue state, policy and audit.

records · If-Match · events

Who does what?

OperationResponsible layer
Clone / fetch / pushGit, talking to the Artifacts remote.
Store commits, trees, branches and tagsCloudflare Artifacts.
Create Work / Attempts / findings / workflow runsSwitchyard, durably recorded in Trestle.
Reject a stale non-force pushGit/Artifacts; Switchyard interprets the rejection and reconciles.
Decide whether canonical may moveSwitchyard Integration Queue after checks, review and policy.
Move canonicalSwitchyard performs a real Git ref mutation against Artifacts.

Why two truths?

If a branch exists, its SHA comes from Git/Artifacts—not from a Trestle row. If an Attempt is waiting for review, that collaboration state comes from Trestle—not from a magic Git ref. Keeping those responsibilities explicit means ordinary Git remains interoperable while the agent-native workflow can be much richer than Git metadata alone.

External pushes stay coherent

A direct git push changes Artifacts first. Switchyard learns about that movement through the Cloudflare event fast path and its reconciliation safety net. Both feed the same idempotent ingest, so external Git activity becomes visible coordination state without turning Switchyard into the repository authority.

Event delivery vs repository authorityEven if event delivery is delayed, Artifacts is still the Git truth. Reconciliation reads the actual refs back from the remote and converges Switchyard's coordination state.