oficina / equipo Public

headless 4c_rebase: wait for Done, not the moment at Ready to merge

Ready to merge reports Needs you "merge" briefly before Equipo's merge
step starts; the wait ended there under load and read the task
mid-merge. Wait for Done or a real decision, as the other merge wait
already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev e49f08773de505d4d287934a947088d4cee595f0 parent a489df2
2 files changed, +12 −1
  • docs/superpowers/plans/UX1-PROGRESS.md +8 −0
  • internal/headless/merge_test.go +4 −1

CI failed — run details

diff --git a/docs/superpowers/plans/UX1-PROGRESS.md b/docs/superpowers/plans/UX1-PROGRESS.md
index c6a687ac..6b735c4c 100644
--- a/docs/superpowers/plans/UX1-PROGRESS.md
+++ b/docs/superpowers/plans/UX1-PROGRESS.md
@@ -289,6 +289,14 @@ pass". Conventions as in `SLICE1-PROGRESS.md` to `SLICE4C-PROGRESS.md`.
- Seen, not caused here: `TestBrowserTaskThread` (headless, browser
tag) fails at fa3860a too, waiting for the answered question to
settle in the thread.
+ - CI: `4c_rebase` (headless) failed three times on this branch under
+ load. Cause: its wait ended on any Needs you, and Ready to merge says
+ Needs you "merge" for a moment before Equipo's merge step starts, so
+ the test sometimes read the task mid-merge. It now waits for Done or
+ a real decision, as the scenario's other wait already did.
+ `tryequipo`'s Review expired-account tests also flake on CI with
+ `provider_account_busy` (their home lock is released for the check
+ and taken again without waiting); not touched here.
- The sets, for Paul (all copy for review, original wording; no
quoted lines, names or catchphrases):
- **Professional** (Calm and plain: says what Equipo is doing.):
diff --git a/internal/headless/merge_test.go b/internal/headless/merge_test.go
index 83757688..0ea87596 100644
--- a/internal/headless/merge_test.go
+++ b/internal/headless/merge_test.go
@@ -193,8 +193,11 @@ func scenarioRebase(t *testing.T, env *Env) {
gitRun(t, work+"/w", "commit", "-q", "-m", "main moves")
gitRun(t, work+"/w", "push", "-q", "origin", "main")
moved := forgeHead(t, bare, "main")
+ // Ready to merge says Needs you "merge" for a moment before Equipo's
+ // merge step starts: only Done or a real decision ends the wait.
s.wait(t, "merged after the rebase", 3*time.Minute, func(c *thintest.Conversation) bool {
- return c.Tasks[id].Stage == wire.StageDone || c.Tasks[id].NeedsYou != ""
+ k := c.Tasks[id]
+ return k.Stage == wire.StageDone || k.NeedsYou != "" && k.NeedsYou != wire.NeedsMerge
})
k, _ := env.Client.Task(s.ctx, id)
var kinds []string