Catch up a moved main in the delivery gate before landing
When canonical main is not an ancestor of the item HEAD, the gate now merges main into the item workspace under the delivery lock, re-runs the declared checks on the merged commit, and fast-forwards main to it. A conflicting merge is aborted with the workspace verified unchanged and a diagnostic naming the files. Successful catch-ups are logged.
This commit is contained in:
@@ -1917,8 +1917,14 @@ func (r *runner) runLoop(ctx context.Context, id int64, graph protocol.Graph, na
|
||||
err = checksErr
|
||||
} else {
|
||||
gateCtx, gateCancel := context.WithTimeout(stageCtx, modelConfig.Timeout)
|
||||
err = verifyDelivery(gateCtx, workspace, landing, checks)
|
||||
var catchUp string
|
||||
catchUp, err = verifyDelivery(gateCtx, workspace, landing, checks)
|
||||
gateCancel()
|
||||
// A failed gate already carries the note in its diagnostic. A step
|
||||
// diagnostic on success renders as a stop, so success is logged.
|
||||
if catchUp != "" {
|
||||
log.Printf("run %d stage %s: %s", id, key, catchUp)
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
step.Status = "failed"
|
||||
|
||||
Reference in New Issue
Block a user