How a change makes it into main (or any protected ref) without a central platform gate.
The simplest option is a pre-receive hook on the bare git repo: every push to a protected branch is intercepted, the hook checks for valid attestations, push is accepted or rejected. This works.
But it makes integration a different shape from the rest of the system. Everything else is "controllers reacting to events on the log." A pre-receive hook is a synchronous gate at the git boundary — a special case. And its failure mode is a terse line of stderr to whoever ran git push.
The alternative — and the one this design adopts — is a pull-based integrator: a controller subscribing to events, performing integration as a reaction, emitting outcome events back into the log.
| Pre-receive gate | Pull-based integrator | |
|---|---|---|
| Where policy lives | Hook script on git server | Controller subscribing to events |
| Failure mode | Push error to stderr | Outcome event in log, threadable |
| Multiple policies | Hard (one hook per repo) | Trivial (multiple subscribers) |
| Async validation | No — must answer before push completes | Yes — controller takes its time |
| Re-running on transient failure | Re-push | Re-fire the event |
| Architectural consistency | Special case | Same pattern as everything else |
The bare git repo still needs to prevent direct writes to protected refs (refs/heads/main, deploy branches, anything authoritative). Otherwise contributors bypass the integrator by pushing directly.
But the gate this requires is trivial: only the integrator's key may write protected refs. Everything else — topic branches, attestation refs, integration request refs — is wide open to anyone with push access.
That's a one-line pre-receive hook, or just filesystem ACLs on the bare repo. The complex policy lives in the integrator; the git boundary only enforces the one structural invariant.
contributor bus integrator
─────────────────────────────────────────────────────────────────────
push topic + attestations ──► refs updated
──► integration-requested
│
├──► fetch topic + attestations
├──► verify signatures, attestations
├──► check trust score
├──► await witness confirmation (if policy)
├──► check conflicts with main
├──► integrate (FF / rebase / merge)
└──► emit outcome
◄── integration-succeeded / -failed
Steps in more detail:
integration-requested { repo, branch, attestations, target }. Most consistent with the rest of the architecture. Canonical mechanism.refs/integration-requests/<name> alongside the topic branch. Atomic with the push, observable via git, can be queued/dequeued by deleting the ref.integrate/<name>. UX shorthand only. Tooling translates this into one of the above when the contributor runs git push --integrate.
The system probably wants the bus event as the canonical signal, with the request ref as a durable backup that can be replayed if the bus is rebuilt.integration-requested events for repos it owns. Fetches the topic branch and attestations.integration-succeeded { commit, signer, attestations } on success, or request-stale { reason } when the request cannot progress against current policy. Downstream subscribers (deploy controller, thread view, notification routing) consume the outcome. See integrator-internals.md for the staleness model and the integrator's loop.divergence-detected event, which downstream feeds trust-score recalculation, potential revert events, and a thread for human attention.See openquestions.md — items raised here live under Workflow patterns, Cross-repo coordination, and Identity & trust bootstrapping. The "Signaling" question was resolved by contribute.md.