Expand description
Post-commit auto-push of a landed commit: the push argv, the surfaced output and the failure reporting.
What:
The commit service’s push of a landed commit’s branch: which push runs, what its output shows,
and how a failure is reported without failing the commit.
Why:
Every commit in this repository is backed up (AGENTS.md rule APG),
the service pushes the branch its record names and never reads HEAD,
prints only GitHub remote: lines on success and the full output on failure,
and leaves a notice for the next command when the push fails.
The service is the only pusher of the repositories it serves and coalesces pending pushes of one branch
into one call, so the push needs no lock.
In TS you’d write (pseudocode):
await pushOnce({ gitPath, cwd }, branchRef, landedOid);Structs§
- Auto
Push Result - What:
The result of one auto-push attempt.
Why:
shownis what the terminal received, so tests compare the surfaced text directly.
Enums§
- Auto
Push Outcome - What:
Which branch the auto-push took.
Why:
Skippedcovers both “nowhere to back up to” and a setting under which Git pushes the branch nowhere; the first exits 0 silently, the second with a note that the person must see.
Constants§
- PUSH_
FAILED_ NOTE - Note printed after every failed push: the commit stays local.
- PUSH_
LOCK_ RETRIES - How many times the service pushes again when a held reference lock refused the update of a remote-tracking reference.
Functions§
- filter_
push_ output - What:
Select the output a push shows: only
remote:lines after a clean push, everything after a failure. Why: A rejection, a hook refusal or an offline error stays diagnosable only when the full output shows. - push_
once - What: Push a landed commit’s branch once, with no coordination with other processes. Why: The service’s push consumer is the only pusher of the repositories it serves and coalesces pending pushes of one branch into this single call, so it needs no lock.