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.

The active runtime

LayerResponsibility
NiftBuilds presentation from source and templates.
GoControl plane, Git boundaries and runner adapters.
TrestleDurable coordination, revisions and workflow effects.
ArtifactsAuthoritative Git objects and refs.
Workers / Workflows / CI SandboxNative Git events, approved JavaScript CI and R2 captures.
Cloudflare QueueOptional event transport to the control plane.

Strut appears in historical checkpoints; it is not required by the active deterministic runtime. Workers Builds preview/deployment is a separate conditional provider integration.

Control plane and Agent workers

Real model-backed implementation, review and conflict-resolution runs were exercised on isolated local workers. The current Linode deployment serves the control plane and is not sized for routine Agent execution. These runs do not establish production throughput or distributed-worker scaling.

Releases

Artifacts remains Git truth. Releases retain the resolved immutable target commit; Trestle stores release metadata and R2 stores checksummed binary payloads. Upload reservations and revision checks fence concurrent uploads and publication.