fix(crow): make the trial-build gate no-op when the auto-patch branch is absent #132
Loading…
Reference in a new issue
No description provided.
Delete branch "t3code/gate-resilient-missing-branch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The trial pipeline errored:
I deleted the stale
auto/registry-patch-proposalsbranch during cleanup, and — now that cascade detection (#128) makes the proposer correctly find no candidates — the proposer exits before ever recreating it. So the branch is legitimately absent, and the gate's hardgit clone --branchfails.Fix
"Branch absent" = "no pending auto-patch proposals" = nothing to verify, which should be a clean no-op, not a failure. Clone
main, then fetch + checkout the patch branch only if it exists; otherwise log andexit 0. A present branch is verified exactly as before (checkout its tip, diff registry vsmain).This also means the gate now runs
main'strial-build-registry.R(with the #130 fix) rather than a possibly-stale copy on the branch.The gate hard-cloned `--branch ${patch_branch}`, so when that branch does not exist it failed with "Remote branch ... not found in upstream origin". With cascade detection live the proposer often has no candidates and never (re)creates the branch, so "branch absent" is the normal "nothing to verify" state, not an error. Clone main, then fetch+checkout the patch branch only if it exists; otherwise log and exit 0. A present branch is verified as before.