Skip to main content

Module pulls

Module pulls 

Source
Expand description

Pull requests: the record half.

One control document, PULLS_REF, holding every pull request on the server — the same [DocRef] CAS discipline as the catalog and the PKI document, so two concurrent Creates cannot mint one number twice and a Merge racing a Close loses honestly instead of both winning.

This module stores and transitions records. It never touches a ref: the merge’s ref move lives in the server’s control plane, next to the ancestry check and the store handle it needs — a record that SAYS merged is written only after the ref HAS moved.

§Not sharded, on the PKI document’s reasoning

crate::AuthTable’s maps are sharded because a measurement found a whole-table parse per connection. This document is read when somebody opens a pull request page, not per connection, and a forge’s PR count grows like its repo count, not like its traffic. The day list shows up in a profile, shard it then — the storage is content-addressed either way.

Structs§

PullRecord
One pull request, as stored.
Pulls
The pull-request table. Cheap to clone; every clone is the same document.

Enums§

PullState
Where a pull request is in its life.
Transition
What a state transition found. The caller names the refusal; this module only reports what is true.

Constants§

PULLS_REF
The control document holding every pull request. refs/gunnar/… like crate::CATALOG_REF: not a git reference since the certificate-identity plan, but the name every log line and runbook uses.