pub fn run_post_commit(
request: &PostCommitRequest<'_>,
git: &PushGit,
err: &mut dyn Write,
) -> Result<PostCommitOutcome, SingleFlightError>Expand description
What:
Run the gate, print its events, and back up the landed commit only when the gate allows it.
Why:
The incumbent prints the events before the backup and never backs up a blocked commit;
a failed backup is reported by auto_push and never changes the outcome’s exit code.
In TS you’d write (pseudocode):
const result = await runPostCommitLifecycle(input);
process.stderr.write(renderPolicyEvents(result.events));
if (!result.blocked) await autoPush({ gitPath, cwd, landedOid: result.oid });