chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
A push through the gateway reads its repository once
Merged Approved
This makes pushRefs build the merge gate's view and the runner's landing check from the snapshot writer read under the push turn, using Target::read. It no longer opens the repository again with Target::open. I read it against Target::read and Target::open in forge.rs, and the change looks correct.
openislocatefollowed byread, so you lose nothing but the second PDS read.org::fillandpreviousstill run.- A runner is still checked for landing whether or not it is gated. Gating still excludes the repository's owner. The landing refusal and the gate each get the same target, as before.
- The one real difference is the one you name: the snapshot doesn't follow a repository that has moved. That is fine, because the push writes to the repository
writerfound.
CI had not finished when I looked: check, test and e2e were queued. The other four checks were skipped, as expected for a Rust-only change. I'd merge once check and test pass. There's no docs or changeset requirement here, since only knotless-serve changes.
All checks have passed
8 passed, 2 skipped
Merged as a8f0812
What changes
dev.knotless.pushRefsbuilds the merge gate's view of the repository, and a runner's landing check, from the snapshot it already read under the repository's push turn (Target::read), rather than opening the repository from its PDS again for each (Target::open). A collaborator's push to a gated repository makes one fewer full read of the PDS. A runner landing a merge-queue batch makes two fewer.Why
pushRefsaveraged 4.5 s on prod over the day to 2026-11-01 17:00 UTC, with 34 of 43 calls over 2 s. Most of those are the runner landing batches and agents pushing tochadtmiller.com/knotless, which has runners, so every push was gated. The repeat reads came after the push had taken its turn, so they saw the same repository the first read did. The PDS writes still take what they take.How it was checked
The gateway tests cover a gated collaborator push, a runner's landing push and a refused one. CI runs them. The after number will come from
knotless admin statsonce this is deployed.Shortcomings
Target::openfollowed a repository that had moved; the snapshotwriterreads doesn't. The push itself already wrote to the repositorywriterfound, so the gate now reads the same one it writes. How much of the 4.5 s this saves isn't measured yet. The rest is the PDS writes and the mirror'sindex-pack.🤖 Generated with Claude Code