Keep merge authorization after the sandbox placeholder check
3 files changed,
+21
−5
.rastrillo/budgets.txt+1 −1internal/runner/thin/mergestep.go+3 −4internal/runner/thin/sandbox_masks_test.go+17 −0
CI failed — run details
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index 30da78ed..0b800a3e 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -38,7 +38,7 @@ time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full |
| perf GET /releases/* skip Verified runner release file downloads, not browser GET screens. |
| perf GET /install.sh skip Mac runners: the one-line bootstrap a terminal pipes to sh, not a browser screen. |
| time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s; |
| -size internal/runner/thin 24051 16462 The thin runner: steps, link, the coordinator and the Assistant, Mac worker, previews, merges, metered models, Research, scheduler, site host, OpenCode. Includes the publish and merge regression fixtures for sandbox placeholders. Measured 24051 source, 16462 test lines. |
| +size internal/runner/thin 24050 16479 The thin runner: steps, link, the coordinator and the Assistant, Mac worker, previews, merges, metered models, Research, scheduler, site host, OpenCode. Includes the publish and merge regression fixtures for sandbox placeholders. Measured 24050 source, 16479 test lines. |
| time internal/thintest 240s Thin contract and page tests, the Assistant's and the models' included, share one harness. Measured 202s on a shared 16 CPU box (2026-11-13); CI runs two lanes. |
| time internal/runner/mac 30s Mac runners (Darwin worker): real process groups killed after a grace and proven gone (SIGTERM, SIGKILL, the marker sweep), and the probes run end to end with fake srt and xcodebuild, P6 killing. |
| time internal/runner/thin 45s Thin v1 slice 4 review: real git repositories for the merge and squash checks, a stalled fetch, and a 16 MiB candidate streamed through the review diff and the checks pack (about 5s). |
diff --git a/internal/runner/thin/mergestep.go b/internal/runner/thin/mergestep.go| index b287ed88..6d15b247 100644 |
| --- a/internal/runner/thin/mergestep.go |
| +++ b/internal/runner/thin/mergestep.go |
| @@ -65,14 +65,13 @@ func (e *Engineer) mergeStep(ctx context.Context, r stepRow, progress func(wire. |
| var maskErr error |
| notAuthorized := false |
| confirmMerge := func(ctx context.Context) error { |
| + if maskErr = e.checkMergeSandboxMasks(ctx, r); maskErr != nil { |
| + return maskErr |
| + } |
| err := confirm(ctx) |
| if errors.Is(err, ErrMergeNotAuthorized) { |
| notAuthorized = true |
| } |
| - if err == nil { |
| - maskErr = e.checkMergeSandboxMasks(ctx, r) |
| - return maskErr |
| - } |
| return err |
| } |
| host := e.Host |
diff --git a/internal/runner/thin/sandbox_masks_test.go b/internal/runner/thin/sandbox_masks_test.go| index 6595c724..c1941bd0 100644 |
| --- a/internal/runner/thin/sandbox_masks_test.go |
| +++ b/internal/runner/thin/sandbox_masks_test.go |
| @@ -7,6 +7,7 @@ import ( |
| "strings" |
| "testing" |
| + "amadan.net/oficina/equipo/internal/runner/forge" |
| "amadan.net/oficina/equipo/internal/runner/workspace" |
| "amadan.net/oficina/equipo/internal/wire" |
| ) |
| @@ -148,3 +149,19 @@ func TestMergeStepSandboxMasks(t *testing.T) { |
| }) |
| } |
| } |
| + |
| +func TestMergeStepSandboxMasksConfirmsLast(t *testing.T) { |
| + e, f, r, _ := hubRig(t) |
| + f.answer = func(_ int, merge func() (forge.HubMergeResult, error)) (forge.HubMergeResult, error) { |
| + e.Clones.Forge = f |
| + return merge() |
| + } |
| + e.ConfirmMerge = func(context.Context, string, int64) error { |
| + e.Clones.Forge = brokenRemote{f} |
| + return nil |
| + } |
| + rep := e.Exec(context.Background(), r, func(wire.StepReport) {}) |
| + if rep.State != wire.StepDone || f.requests != 1 { |
| + t.Fatalf("read the repository after final authorization: %+v", rep) |
| + } |
| +} |