Merge thin-v1-slice4c final fixes (cfae4f8) into thin-v1-ux1
Not now reversible (quiet Merge on Ready tasks), 14-day ask after merge, merge expiry. Conflicts: Task keeps ask_open and merge_offered then the UX1 fields; fixtures merged key by key; both API routes (duplicate, merge); the quiet Merge joins the creator's menu on the new task rows and page; budgets keep the UX1 records with 4c's note.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 files changed,
+258
−17
.rastrillo/budgets.txt+1 −1docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md+1 −0docs/superpowers/plans/SLICE4C-PROGRESS.md+19 −0internal/equipo/app.go+1 −0internal/equipo/chat/http.go+13 −0internal/equipo/chat/merge.go+61 −0internal/equipo/chat/tasks.go+4 −0internal/equipo/chat_page.go+2 −2internal/equipo/copy.go+1 −0internal/equipo/templates/task_card.html+1 −1internal/equipo/work_pages.go+16 −2internal/equipo/work_views.go+3 −0internal/headless/browser_thread_test.go+35 −2internal/headless/engineering_test.go+4 −0internal/plan3test/person_api_contract_test.go+1 −1internal/runner/thin/ask.go+4 −3internal/runner/thin/ask_test.go+28 −0internal/thintest/client.go+5 −0internal/thintest/merge_contract_test.go+39 −0internal/thintest/questions_contract_test.go+6 −0internal/wire/tasks.go+8 −0internal/wire/wiretest/testdata/api/needs-you.json+1 −1internal/wire/wiretest/testdata/api/task-merged.json+1 −1internal/wire/wiretest/testdata/api/task-ready.json+1 −1internal/wire/wiretest/testdata/api/task.json+1 −1internal/wire/wiretest/testdata/api/tasks.json+1 −1
Intent
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index 8cd307ae..2b51be79 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -36,7 +36,7 @@ perf GET /releases/* skip Verified runner release file downloads, not browser GE |
| time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s; niced serial reruns measured 5.773s and 5.750s. The added coordinator mount check has no repeated launches to remove; 15s leaves 38 percent headroom for namespace, process-exit and recovery assertions. |
| time internal/tryequipo 30s Release starter-set controller K3 records CI runs of 10.8s and 13.1s; 30s retains the guide integration checks with headroom on the shared runner. |
| size internal/runner/thin 8800 - Thin v1 UX1 adds step activity lines from the specialist's stream, the repository head and checks gate in the index and project-tagged notes (about 120 lines); measured 8615 with slice 4c's review fixes. Thin v1 slice 4c adds the merge step (mergestep.go, about 190 lines) and the rebase round beside the slice 4b ask fixes. Thin v1 slice 3 adds Engineering steps beside the coordinator: the durable step state and engine (step.go) and the executor that checks out the task tree, runs the CLI in the implement containment, commits and pushes (engineer.go), about 800 lines sharing the coordinator's launch, tool socket and account selection. Measured 5686 source lines. Splitting would export the launch internals; revisit at the slice 7 sweep. Slice 4 adds checks and review on a candidate (judge.go) and the merge watch (merge.go), about 800 lines, sharing the Engineer launch path; measured 6808, 7035 after review round 1 (branch head watch, deadlines, streamed outputs). Slice 4b keeps Engineering and Review sessions and answers the creator's questions from them (ask.go: kept-session and ask state, read-only git tools, the answer stream), about 700 lines on the same launch path. |
| -time internal/thintest 60s Thin v1 contract tests: a real instance and a scripted runner per test, fixtures replayed against every request, frame and event. Slice 3 adds the task, step-sync and grant contracts; CI measured 14.805s. 30s keeps room for the slice 4 review contracts. UX1 adds step activity, task source and duplicates, coordinator merging and project facts (four contracts, about 6s); the package measured 34s locally under load, so 40s. UX1's inner screens gallery (two owners, seven tasks, every page) adds about 3s; measured 40.9s locally under load, so 60s. |
| +time internal/thintest 60s Thin v1 slice 4c adds the merge, adoption, cancel and retention contract tests (CI measured 35.7s). Thin v1 contract tests: a real instance and a scripted runner per test, fixtures replayed against every request, frame and event. Slice 3 adds the task, step-sync and grant contracts; CI measured 14.805s. 30s keeps room for the slice 4 review contracts. UX1 adds step activity, task source and duplicates, coordinator merging and project facts (four contracts, about 6s); the package measured 34s locally under load, so 40s. UX1's inner screens gallery (two owners, seven tasks, every page) adds about 3s; measured 40.9s locally under load, so 60s. |
| 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). Measured 17.8s locally under load. Slice 4b review adds a 16 MiB git output bound, an injected index-pack failure and stall (3s deadline) and held-answer tests; measured 30.3s locally under load. 45s keeps 33 percent headroom. |
| time internal/headless 240s Thin v1 headless suite: real instance, runner and bubblewrap per scenario (spec 7, under two minutes). Slice 4 adds the review and checks scenarios (4_review with its fix rounds, branch move and merge; 4_checks_honest); loaded CI measured 170s on 2026-11-07. Slice 4b adds 4b_ask (about 12s); loaded CI measured 182.9s. 240s keeps 30 percent headroom. |
| perf GET /api/v1/turns/{id} skip Thin v1 person API: bearer-only JSON for devices, not a browser screen. |
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md| index e94d561d..682ee926 100644 |
| --- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| +++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| @@ -5033,6 +5033,7 @@ records remain unchanged. |
| | `chat.card.merge_adopt` | Merge %s? | Thin v1 slice 4c review (merge card) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `chat.card.not_now` | Not now | Thin v1 slice 4c review (merge card) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `chat.card.merge_chose_not_now` | Not now. | Thin v1 slice 4c review (merge card) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| +| `work.merge_now` | Merge | Thin v1 slice 4c review round 2 (task card and page) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `work.step` | %s, attempt %d: %s | Thin v1 slice 4 review and checks (task card, task and Tasks pages, sidebar) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `work.steps` | Steps | Thin v1 slice 4 review and checks (task card, task and Tasks pages, sidebar) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `chat.card.home_ask` | Use %s for new projects? | Thin v1 slice 2b home card and receipts (chat page) | Runtime; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
diff --git a/docs/superpowers/plans/SLICE4C-PROGRESS.md b/docs/superpowers/plans/SLICE4C-PROGRESS.md| index 37051421..c374f4bf 100644 |
| --- a/docs/superpowers/plans/SLICE4C-PROGRESS.md |
| +++ b/docs/superpowers/plans/SLICE4C-PROGRESS.md |
| @@ -220,6 +220,25 @@ once it has earned Ready to merge. Conventions and scripts as in |
| `frames/forget_task.json` gained `keep_until`. No live run (the |
| staging account's weekly limit). |
| +11. Review round 2 (Astra 4c: the four findings resolved, three new), |
| + each with a test that failed first: |
| + 1. Not now is not final: a task left at Ready to merge (Not now, or |
| + Wait for checks) offers its creator a quiet Merge (task card and |
| + page; `POST /api/v1/tasks/{id}/merge`, `Task.merge_offered`), |
| + validated afresh (Ready, the branch at the judged SHA, no merge yet, |
| + no card open); checks passed records eligibility at that moment. |
| + Teammates get 403; away from the SHA, 409 `not_mergeable`. |
| + `TestContractNoRetroactiveMerge`. |
| + 2. A merge's explicit expiry overrides idle expiry: a session last |
| + used ten days before the merge lasts the 14 days from it. |
| + `TestMergedSessionOutlivesIdleExpiry`. |
| + 3. The task page asks the implementer on a done task within its 14 |
| + days, like the API (`Task.ask_open`). `TestContractAskImplementer` |
| + (page), browser `TestBrowserAskAfterMerge`; |
| + `TestBrowserTaskThread` now asks on the merged task. |
| + New copy: `work.merge_now` "Merge". Fixtures gained `ask_open` and |
| + `merge_offered`. |
| + |
| ## Decisions |
| - The merge is a step (specialist `merge`) in the runner's one queue: it |
diff --git a/internal/equipo/app.go b/internal/equipo/app.go| index 2547a6d7..3c628c64 100644 |
| --- a/internal/equipo/app.go |
| +++ b/internal/equipo/app.go |
| @@ -191,6 +191,7 @@ func RouterWithStore(d *db.DB, cfg Config, mailer mail.Sender, logger *slog.Logg |
| r.Post("/conversation/tasks/{id}/retry", a.workTaskAction(true)) |
| r.Post("/conversation/tasks/{id}/cancel", a.workTaskAction(false)) |
| r.Post("/tasks/{id}/duplicate", a.workDuplicate) |
| + r.Post("/conversation/tasks/{id}/merge", a.workTaskMerge) |
| r.Get("/tasks/new", a.taskForm) |
| r.Get("/tasks/{id}", a.taskDetail) |
| r.Get("/tasks/{id}/rendered-change", a.renderedPage) |
diff --git a/internal/equipo/chat/http.go b/internal/equipo/chat/http.go| index 14c663c8..b7bf3c3e 100644 |
| --- a/internal/equipo/chat/http.go |
| +++ b/internal/equipo/chat/http.go |
| @@ -76,6 +76,7 @@ func (h *HTTP) Mount(r chi.Router) { |
| r.Post("/tasks/{id}/cancel", h.thinOr("POST /tasks/{id}/cancel", thinTask, h.bearer(h.cancelTask))) |
| r.Post("/tasks/{id}/retry", h.bearer(h.retryTask)) |
| r.Post("/tasks/{id}/duplicate", h.bearer(h.markDuplicate)) |
| + r.Post("/tasks/{id}/merge", h.bearer(h.mergeTask)) |
| r.Post("/tasks/{id}/thread", h.bearer(h.postThread)) |
| r.Get("/steps/{id}/log", h.bearer(h.stepLog)) |
| r.Post("/tasks/{id}/questions", h.bearer(h.ask)) |
| @@ -130,6 +131,8 @@ func (h *HTTP) fail(w http.ResponseWriter, r *http.Request, err error) { |
| personapi.WriteError(w, r, 409, "task_ended", nil) |
| case errors.Is(err, ErrNotRetryable): |
| personapi.WriteError(w, r, 409, "not_retryable", nil) |
| + case errors.Is(err, ErrNotMergeable): |
| + personapi.WriteError(w, r, 409, "not_mergeable", nil) |
| case errors.Is(err, ErrMerging): |
| personapi.WriteError(w, r, 409, "task_merging", nil) |
| case errors.Is(err, ErrNotAskable): |
| @@ -466,6 +469,16 @@ func (h *HTTP) markDuplicate(w http.ResponseWriter, r *http.Request, p personapi |
| writeJSON(w, 200, out) |
| } |
| +// mergeTask is the creator's Merge on a task left at Ready to merge. |
| +func (h *HTTP) mergeTask(w http.ResponseWriter, r *http.Request, p personapi.PersonPrincipal) { |
| + attempt, err := h.Store.MergeTask(r.Context(), p.Address, chi.URLParam(r, "id")) |
| + if err != nil { |
| + h.fail(w, r, err) |
| + return |
| + } |
| + writeJSON(w, http.StatusAccepted, wire.TaskAccepted{Attempt: attempt}) |
| +} |
| + |
| func (h *HTTP) postThread(w http.ResponseWriter, r *http.Request, p personapi.PersonPrincipal) { |
| var in wire.PostThread |
| if err := readJSON(r, &in); err != nil { |
diff --git a/internal/equipo/chat/merge.go b/internal/equipo/chat/merge.go| index 074169b3..92cec67f 100644 |
| --- a/internal/equipo/chat/merge.go |
| +++ b/internal/equipo/chat/merge.go |
| @@ -1,6 +1,7 @@ |
| package chat |
| import ( |
| + "context" |
| "encoding/json" |
| "errors" |
| "fmt" |
| @@ -423,3 +424,63 @@ func reportCount(tx *gorm.DB, id string) (int, error) { |
| err := tx.Model(&entryRecord{}).Where("task_id = ? AND kind = ?", id, entryReport).Count(&n).Error |
| return int(n), err |
| } |
| + |
| +// ErrNotMergeable means the task cannot be merged now: not Ready to |
| +// merge, the branch is not at the judged SHA, or a merge ran already. |
| +var ErrNotMergeable = errors.New("chat: task not mergeable") |
| + |
| +// mergeOffered reports whether the creator's Merge action applies now. |
| +func (t *txn) mergeOffered(k taskRecord, p progress) (bool, error) { |
| + if k.Stage != wire.StageReadyToMerge || k.CancelRequested || p.moved || p.merge != nil || !p.mergeAllowed(true) { |
| + return false, nil |
| + } |
| + var open int64 |
| + err := t.db.Model(&cardRecord{}).Where("task_id = ? AND kind = ? AND state = ?", k.ID, wire.CardMerge, wire.CardOpen).Count(&open).Error |
| + return open == 0, err |
| +} |
| + |
| +// MergeTask is the creator's Merge on a task left at Ready to merge (Not |
| +// now on its card, or Wait for checks): validated afresh (the branch at |
| +// the judged SHA as last seen, approved, no merge yet); a candidate with |
| +// checks passed is recorded eligible at that moment. The runner checks |
| +// the head again right before merging. |
| +func (s *Store) MergeTask(ctx context.Context, person, id string) (attempt int64, err error) { |
| + err = s.tx(ctx, func(t *txn) error { |
| + if err := s.authority.CurrentPerson(ctx, t.db); err != nil { |
| + return err |
| + } |
| + if err := t.isOwner(person); err != nil { |
| + return err |
| + } |
| + k, err := t.loadTask(id) |
| + if err != nil { |
| + return err |
| + } |
| + if k.Creator != person { |
| + return ErrForbidden |
| + } |
| + if wire.FinalStage(k.Stage) || k.CancelRequested { |
| + return ErrTaskEnded |
| + } |
| + steps, err := t.steps(k.ID) |
| + if err != nil { |
| + return err |
| + } |
| + p := progressFor(k, steps) |
| + if ok, err := t.mergeOffered(k, p); err != nil { |
| + return err |
| + } else if !ok { |
| + return ErrNotMergeable |
| + } |
| + checks, _, _, _ := p.judged() |
| + if checks == wire.ChecksPassed { |
| + k.MergeEligible = p.candidate |
| + } |
| + if err := t.startMerge(&k, p, steps, checks != wire.ChecksPassed); err != nil { |
| + return err |
| + } |
| + attempt = 1 |
| + return nil |
| + }) |
| + return attempt, err |
| +} |
diff --git a/internal/equipo/chat/tasks.go b/internal/equipo/chat/tasks.go| index 09739748..0385fba8 100644 |
| --- a/internal/equipo/chat/tasks.go |
| +++ b/internal/equipo/chat/tasks.go |
| @@ -340,6 +340,10 @@ func (t *txn) taskView(k taskRecord) (wire.Task, error) { |
| } |
| v.Questions = qs |
| v.Merged = mergedView(k) |
| + v.AskOpen = askOpen(k, t.now()) |
| + if v.MergeOffered, err = t.mergeOffered(k, pr); err != nil { |
| + return v, err |
| + } |
| if v.Reports, err = reportCount(t.db, k.ID); err != nil { |
| return v, err |
| } |
diff --git a/internal/equipo/chat_page.go b/internal/equipo/chat_page.go| index b03fd2f5..5f51c807 100644 |
| --- a/internal/equipo/chat_page.go |
| +++ b/internal/equipo/chat_page.go |
| @@ -112,7 +112,7 @@ func cardView(c wire.Card, choices []string, tasks map[string]wire.Task) chatCar |
| if t, ok := tasks[c.TaskID]; ok { |
| // A task card sits in its creator's own conversation. |
| line := taskLineOf(t, t.Creator) |
| - v.Task, v.Line, v.Open = &line, t.Title, line.Retry || line.Cancel |
| + v.Task, v.Line, v.Open = &line, t.Title, line.Retry || line.Cancel || line.Merge |
| } |
| } |
| return v |
| @@ -316,7 +316,7 @@ func (a *application) chatNotebookReset(w http.ResponseWriter, r *http.Request) |
| } |
| func chatError(err error) error { |
| - for from, to := range map[error]error{chat.ErrBusy: ErrConflict, chat.ErrInvalid: ErrInvalid, chat.ErrConflict: ErrConflict, chat.ErrNotFound: ErrNotFound, chat.ErrForbidden: ErrForbidden, chat.ErrNotAllowed: ErrInvalid, chat.ErrTaskEnded: ErrConflict, chat.ErrNotRetryable: ErrConflict, chat.ErrMerging: ErrConflict, chat.ErrNotAskable: ErrConflict} { |
| + for from, to := range map[error]error{chat.ErrBusy: ErrConflict, chat.ErrInvalid: ErrInvalid, chat.ErrConflict: ErrConflict, chat.ErrNotFound: ErrNotFound, chat.ErrForbidden: ErrForbidden, chat.ErrNotAllowed: ErrInvalid, chat.ErrTaskEnded: ErrConflict, chat.ErrNotRetryable: ErrConflict, chat.ErrMerging: ErrConflict, chat.ErrNotMergeable: ErrConflict, chat.ErrNotAskable: ErrConflict} { |
| if errors.Is(err, from) { |
| return to |
| } |
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go| index ad7f5f97..5f591f65 100644 |
| --- a/internal/equipo/copy.go |
| +++ b/internal/equipo/copy.go |
| @@ -570,6 +570,7 @@ var pageCopy = map[string]string{ |
| "work.stage.merging": "Merging…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| "work.merged": "Merged into %s at %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| "work.merged_without_checks": "Merged into %s at %s, without checks", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| + "work.merge_now": "Merge", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| "work.specialist.merge": "Merge", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| "work.rebase": "rebase", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
| "work.needs.merge_conflict": "Needs you: it still conflicts with the default branch after a rebase", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) |
diff --git a/internal/equipo/templates/task_card.html b/internal/equipo/templates/task_card.html| index 3e560fa3..d24da56c 100644 |
| --- a/internal/equipo/templates/task_card.html |
| +++ b/internal/equipo/templates/task_card.html |
| @@ -8,5 +8,5 @@ |
| {{define "trial-label"}}{{if eq .Mode "owner mode"}}<span equipo-isolation>{{copy "isolation.owner_mode"}}</span>{{end}}{{if .ProfileApprovals}}<span equipo-isolation>{{copy "isolation.approved_beyond_profile"}}</span>{{end}}{{with .Trial}}<span equipo-isolation>{{copy "trial.label"}}: {{range .UnverifiedChecks}}<span>{{copy (printf "trial.check.%s" .)}}</span> {{end}}<span>{{copy "trial.observed_locally"}}</span></span>{{end}}{{end}} |
| -{{define "work-task-actions"}}{{if .Retry}}<form method="post" action="/conversation/tasks/{{.ID}}/retry" data-card-form><button equipo-link type="submit" data-task-retry>{{copy "work.retry"}}</button></form>{{end}}{{if .Cancel}}<form method="post" action="/conversation/tasks/{{.ID}}/cancel" data-card-form><button equipo-link type="submit" data-task-cancel>{{copy "work.cancel"}}</button></form>{{end}}{{end}} |
| +{{define "work-task-actions"}}{{if .Merge}}<form method="post" action="/conversation/tasks/{{.ID}}/merge" data-card-form><button equipo-link type="submit" data-task-merge>{{copy "work.merge_now"}}</button></form>{{end}}{{if .Retry}}<form method="post" action="/conversation/tasks/{{.ID}}/retry" data-card-form><button equipo-link type="submit" data-task-retry>{{copy "work.retry"}}</button></form>{{end}}{{if .Cancel}}<form method="post" action="/conversation/tasks/{{.ID}}/cancel" data-card-form><button equipo-link type="submit" data-task-cancel>{{copy "work.cancel"}}</button></form>{{end}}{{end}} |
| {{define "work-task-row"}}<li equipo-work-task data-task="{{.ID}}" data-stage="{{.Stage}}"><p><a href="/tasks/{{.ID}}">{{.Title}}</a></p><p equipo-card-note><span>{{.Project}}</span><span>{{.StageLine}}</span>{{with .Finding}}{{if .Path}}<span>{{.Path}}:{{.Line}}</span>{{end}}{{end}}<span>{{printf (copy "work.noted_by") .Creator}}</span></p>{{if and .Pushed (not .MergedLine)}}<p equipo-card-note data-pushed><span>{{.Pushed}}</span><a href="{{.URL}}" rel="noopener" target="_blank" data-open-amadan>{{copy "work.open"}}</a></p>{{end}}{{if or .ChecksLine .ReviewLine}}<p equipo-card-note data-judged>{{with .ChecksLine}}<span data-checks>{{.}}</span>{{end}}{{with .ReviewLine}}<span data-verdict>{{.}}</span>{{end}}</p>{{end}}{{if .MergedLine}}<p equipo-card-note data-merged><span>{{.MergedLine}}</span><a href="{{.RepoURL}}" rel="noopener" target="_blank" data-open-amadan>{{copy "work.open"}}</a></p>{{end}}</li>{{end}} |
diff --git a/internal/equipo/work_pages.go b/internal/equipo/work_pages.go| index cf90b50b..0b31b6b9 100644 |
| --- a/internal/equipo/work_pages.go |
| +++ b/internal/equipo/work_pages.go |
| @@ -30,6 +30,8 @@ type taskLine struct { |
| Steps []stepLine |
| Finding *wire.Finding |
| Retry, Cancel bool |
| + // Merge is the creator's quiet Merge on a task left at Ready to merge. |
| + Merge bool |
| // The inner screens' pieces (work_views.go). |
| Mono monoLine |
| Creator personLine |
| @@ -170,8 +172,9 @@ func taskLineOf(t wire.Task, viewer string) taskLine { |
| v.StageLine, v.ChecksLine, v.ReviewLine = copyText("work.needs.branch_moved"), "", "" |
| } |
| v.Cancel = !wire.FinalStage(t.Stage) && t.Stage != wire.StageMerging |
| + v.Merge = t.MergeOffered |
| if t.Creator != viewer { |
| - v.Retry, v.Cancel = false, false |
| + v.Retry, v.Cancel, v.Merge = false, false, false |
| } |
| return v |
| } |
| @@ -255,7 +258,9 @@ func threadOf(t wire.Task, viewer string, cursor int64) threadView { |
| v.Items = append(v.Items, it) |
| } |
| slices.SortStableFunc(v.Items, func(a, b threadItem) int { return a.At.Compare(b.At) }) |
| - if t.Creator != viewer || wire.FinalStage(t.Stage) { |
| + // Asking follows the API: until the task ends, and for 14 days after |
| + // it is done (merged work). |
| + if t.Creator != viewer || !t.AskOpen { |
| return v |
| } |
| for _, sp := range []string{wire.SpecialistEngineering, wire.SpecialistReview} { |
| @@ -543,6 +548,15 @@ func (a *application) workProject(w http.ResponseWriter, r *http.Request) bool { |
| return true |
| } |
| +// workTaskMerge is the quiet Merge on a task left at Ready to merge. |
| +func (a *application) workTaskMerge(w http.ResponseWriter, r *http.Request) { |
| + id := chi.URLParam(r, "id") |
| + a.chatActionTo(w, r, workBack(r, id), func(ctx context.Context, address string) error { |
| + _, err := a.store.Chat().MergeTask(ctx, address, id) |
| + return err |
| + }) |
| +} |
| + |
| // workTaskAction is Retry or Cancel from the task card or the task page: |
| // the same store calls a device makes, as the session's person. |
| func (a *application) workTaskAction(retry bool) http.HandlerFunc { |
diff --git a/internal/equipo/work_views.go b/internal/equipo/work_views.go| index 2805f8dc..bc53a2fc 100644 |
| --- a/internal/equipo/work_views.go |
| +++ b/internal/equipo/work_views.go |
| @@ -420,6 +420,9 @@ func (v *taskLine) richOf(t wire.Task, viewer string, card *wire.Card, now time. |
| if v.Dup != nil && !wire.FinalStage(v.Dup.Stage) { |
| v.Menu = append(v.Menu, menuItem{Action: "duplicate", Value: v.Dup.ID, Label: fmt.Sprintf(copyText("work.menu.fold"), v.Dup.Title), Note: copyText("work.menu.fold_note")}) |
| } |
| + if v.Merge { |
| + v.Menu = append(v.Menu, menuItem{Action: "merge", Label: copyText("work.merge_now")}) |
| + } |
| if v.Retry { |
| v.Menu = append(v.Menu, menuItem{Action: "retry", Label: copyText("work.retry")}) |
| } |
diff --git a/internal/headless/browser_thread_test.go b/internal/headless/browser_thread_test.go| index 71fbda77..99bdef14 100644 |
| --- a/internal/headless/browser_thread_test.go |
| +++ b/internal/headless/browser_thread_test.go |
| @@ -28,9 +28,10 @@ func TestBrowserTaskThread(t *testing.T) { |
| p := openPage(t, inst.URL, c.Name, c.Value, size.w, size.h, size.pointer) |
| p.send("tool:record_task:oficina/sample|Fix the README typo|teh\ntool:start_task:$task|edit:README.md|teh panes|the panes") |
| card := taskCard("Fix the README typo") |
| - // Engineering, checks and review take a while under load. |
| + // Engineering, checks, review and Equipo's merge take a while under |
| + // load. Merged work can still be asked about (Paul, 2026-11-08). |
| for i := 0; ; i++ { |
| - err := chromedp.Do(p.ctx, browsertest.Wait(card+`?.querySelector('[equipo-stage]')?.textContent==='Ready to merge'`)) |
| + err := chromedp.Do(p.ctx, browsertest.Wait(card+`?.querySelector('[equipo-stage]')?.textContent==='Done'`)) |
| if err == nil { |
| break |
| } |
| @@ -78,3 +79,35 @@ func TestBrowserTaskThread(t *testing.T) { |
| p.stop() |
| } |
| } |
| + |
| +// Astra 4c round 2: the task page offers asking the implementer about |
| +// merged work, like the API, for 14 days after the task is done: the |
| +// creator asks Engineering on a Done task and its answer arrives. |
| +func TestBrowserAskAfterMerge(t *testing.T) { |
| + _, inst, r := localEnv(t) |
| + r.start(t) |
| + c := inst.Cookie() |
| + p := openPage(t, inst.URL, c.Name, c.Value, 390, 844, false) |
| + p.send("tool:record_task:oficina/sample|Fix the README typo|teh\ntool:start_task:$task|edit:README.md|teh panes|the panes") |
| + card := taskCard("Fix the README typo") |
| + for i := 0; ; i++ { |
| + err := chromedp.Do(p.ctx, browsertest.Wait(card+`?.querySelector('[equipo-stage]')?.textContent==='Done'`)) |
| + if err == nil { |
| + break |
| + } |
| + if i == 12 { |
| + t.Fatal(err) |
| + } |
| + } |
| + var link string |
| + p.run(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| + var err error |
| + link, err = chromedp.Evaluate[string](card+`.querySelector('a[href^="/tasks/"]').href`)(ctx, target) |
| + return err |
| + })) |
| + p.run(chromedp.Navigate(link), browsertest.Wait(`!!document.querySelector('[data-chat-stream][data-task] #composer')`)) |
| + p.check(`document.querySelector('[data-ask-line]')?.textContent==='Asking Engineering'`, "a merged task offers no asking") |
| + p.check(`(()=>{document.querySelector('#chat-body').value='Now that it is merged, what did you change?';document.querySelector('#composer').requestSubmit();return true})()`, "ask") |
| + p.run(browsertest.Wait(`[...document.querySelectorAll('[equipo-thread] [equipo-message="incoming"][data-turn-id]')].some(a=>!a.hasAttribute('equipo-thinking') && a.textContent.includes('From my session:'))`)) |
| + p.stop() |
| +} |
diff --git a/internal/headless/engineering_test.go b/internal/headless/engineering_test.go| index ce4567bb..ffc2ad9e 100644 |
| --- a/internal/headless/engineering_test.go |
| +++ b/internal/headless/engineering_test.go |
| @@ -93,6 +93,10 @@ func scenarioEngineering(t *testing.T, env *Env) { |
| id := s.taskOf(t, sent.Turn.ID) |
| noted := time.Since(start) |
| step := s.step(t, id, 25*time.Minute, wire.StepDone, wire.StepFailed, wire.StepCancelled) |
| + // The task's own event (with its link) may follow the step's. |
| + if step.Pushed { |
| + s.wait(t, "the task's link", 30*time.Second, func(c *thintest.Conversation) bool { return c.Tasks[id].URL != "" }) |
| + } |
| var task wire.Task |
| var stages []string |
| s.conv.Locked(func(c *thintest.Conversation) { task, stages = c.Tasks[id], c.Stages[id] }) |
diff --git a/internal/plan3test/person_api_contract_test.go b/internal/plan3test/person_api_contract_test.go| index 9bad4358..6f72367f 100644 |
| --- a/internal/plan3test/person_api_contract_test.go |
| +++ b/internal/plan3test/person_api_contract_test.go |
| @@ -56,7 +56,7 @@ func personAPIContractCoverage(t *testing.T) { |
| f := newFixture(t) |
| registered := map[string]bool{} |
| // Thin v1 conversation routes are contracted by internal/wire fixtures. |
| - thin := map[string]bool{"GET /messages": true, "POST /messages": true, "GET /turns/{id}": true, "POST /turns/{id}/cancel": true, "GET /snapshot": true, "GET /events": true, "DELETE /projects/{id}": true, "POST /cards/{id}/answer": true, "GET /notebook": true, "POST /notebook/reset": true, "POST /tasks/{id}/retry": true, "POST /tasks/{id}/duplicate": true, "POST /tasks/{id}/thread": true, "GET /steps/{id}/log": true, "POST /tasks/{id}/questions": true, "POST /questions/{id}/cancel": true} |
| + thin := map[string]bool{"GET /messages": true, "POST /messages": true, "GET /turns/{id}": true, "POST /turns/{id}/cancel": true, "GET /snapshot": true, "GET /events": true, "DELETE /projects/{id}": true, "POST /cards/{id}/answer": true, "GET /notebook": true, "POST /notebook/reset": true, "POST /tasks/{id}/retry": true, "POST /tasks/{id}/merge": true, "POST /tasks/{id}/duplicate": true, "POST /tasks/{id}/thread": true, "GET /steps/{id}/log": true, "POST /tasks/{id}/questions": true, "POST /questions/{id}/cancel": true} |
| must(t, chi.Walk(f.Store.PersonAPIHandler().(chi.Routes), func(method, path string, _ http.Handler, _ ...func(http.Handler) http.Handler) error { |
| if thin[method+" "+path] { |
| return nil |
diff --git a/internal/runner/thin/ask.go b/internal/runner/thin/ask.go| index f3066737..77dddb09 100644 |
| --- a/internal/runner/thin/ask.go |
| +++ b/internal/runner/thin/ask.go |
| @@ -110,12 +110,13 @@ func (s *State) ForgetTask(ctx context.Context, frameID string, c wire.ForgetTas |
| return dirs, err |
| } |
| -// expiredKept drops kept sessions unused since before, returning their |
| +// expiredKept drops kept sessions unused since before (or, kept at a |
| +// merge, past their explicit expiry, which overrides idleness), returning their |
| // directories, and reports what stays kept (sessions and bytes). |
| func (s *State) expiredKept(ctx context.Context, before time.Time) (dirs []string, kept, bytes int64, err error) { |
| err = s.tx(ctx, func(t *sql.Tx) error { |
| cut, now := before.UTC().Format(time.RFC3339Nano), time.Now().UTC().Format(time.RFC3339Nano) |
| - rows, err := t.Query("SELECT dir FROM kept_sessions WHERE used_at < ? OR (expires_at <> '' AND expires_at < ?)", cut, now) |
| + rows, err := t.Query("SELECT dir FROM kept_sessions WHERE (expires_at = '' AND used_at < ?) OR (expires_at <> '' AND expires_at < ?)", cut, now) |
| if err != nil { |
| return err |
| } |
| @@ -128,7 +129,7 @@ func (s *State) expiredKept(ctx context.Context, before time.Time) (dirs []strin |
| dirs = append(dirs, d) |
| } |
| rows.Close() |
| - if _, err = t.Exec("DELETE FROM kept_sessions WHERE used_at < ? OR (expires_at <> '' AND expires_at < ?)", cut, now); err != nil { |
| + if _, err = t.Exec("DELETE FROM kept_sessions WHERE (expires_at = '' AND used_at < ?) OR (expires_at <> '' AND expires_at < ?)", cut, now); err != nil { |
| return err |
| } |
| return t.QueryRow("SELECT COUNT(*), COALESCE(SUM(bytes), 0) FROM kept_sessions").Scan(&kept, &bytes) |
diff --git a/internal/runner/thin/ask_test.go b/internal/runner/thin/ask_test.go| index f1ba7648..9f1d36f8 100644 |
| --- a/internal/runner/thin/ask_test.go |
| +++ b/internal/runner/thin/ask_test.go |
| @@ -326,3 +326,31 @@ func TestForgetTaskKeepsMergedSessions(t *testing.T) { |
| t.Fatalf("past keep_until kept %v", dirs) |
| } |
| } |
| + |
| +// Astra 4c round 2: a session kept at the merge lasts the full 14 days |
| +// from the merge, even if it was last used ten days before it: an |
| +// explicit merge expiry overrides the idle expiry. |
| +func TestMergedSessionOutlivesIdleExpiry(t *testing.T) { |
| + ctx := context.Background() |
| + s, err := OpenState(ctx, t.TempDir()) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + defer s.Close() |
| + r := stepRow{DispatchCommand: dispatchFor("tk1", "s1", 1)} |
| + if err := s.keepSession(ctx, r, wire.SpecialistEngineering, "claude-a", "00000000-0000-4000-8000-000000000001", "/root/a/steps/1", "", 10); err != nil { |
| + t.Fatal(err) |
| + } |
| + day := 24 * time.Hour |
| + if _, err := s.db.Exec("UPDATE kept_sessions SET used_at=?", time.Now().Add(-10*day).UTC().Format(time.RFC3339Nano)); err != nil { |
| + t.Fatal(err) |
| + } |
| + until := time.Now().Add(wire.KeepMergedSessions) |
| + if _, err := s.ForgetTask(ctx, "f1", wire.ForgetTaskCommand{Person: "owner@example.com", TaskID: "tk1", KeepUntil: &until}); err != nil { |
| + t.Fatal(err) |
| + } |
| + // Five days after the merge (idle 15 days, past the idle retention). |
| + if dirs, kept, _, _ := s.expiredKept(ctx, time.Now().Add(5*day-KeptSessionRetention)); len(dirs) != 0 || kept != 1 { |
| + t.Fatalf("a merged session went %v before its 14 days", dirs) |
| + } |
| +} |
diff --git a/internal/thintest/client.go b/internal/thintest/client.go| index a1cd0d02..f57d8d6d 100644 |
| --- a/internal/thintest/client.go |
| +++ b/internal/thintest/client.go |
| @@ -143,6 +143,11 @@ func (c *Client) RetryTask(ctx context.Context, id string) (out wire.TaskAccepte |
| return out, c.do(ctx, "POST", "/api/v1/tasks/"+id+"/retry", nil, &out) |
| } |
| +// MergeTask is the creator's Merge on a task left at Ready to merge. |
| +func (c *Client) MergeTask(ctx context.Context, id string) (out wire.TaskAccepted, err error) { |
| + return out, c.do(ctx, "POST", "/api/v1/tasks/"+id+"/merge", nil, &out) |
| +} |
| + |
| // StepLog reads a step's log tail. |
| func (c *Client) StepLog(ctx context.Context, id string) (out wire.StepLog, err error) { |
| return out, c.do(ctx, "GET", "/api/v1/steps/"+id+"/log", nil, &out) |
diff --git a/internal/thintest/merge_contract_test.go b/internal/thintest/merge_contract_test.go| index 62e37d55..c0e5583a 100644 |
| --- a/internal/thintest/merge_contract_test.go |
| +++ b/internal/thintest/merge_contract_test.go |
| @@ -540,6 +540,45 @@ func TestContractNoRetroactiveMerge(t *testing.T) { |
| if k, _ := r.client.Task(ctx, id); k.Stage != wire.StageReadyToMerge || r.heldKinds(wire.FrameDispatch) != 0 { |
| t.Fatalf("after Not now %+v", k) |
| } |
| + // Astra 4c round 2: Not now is not final. The creator's quiet Merge |
| + // reopens it, validated afresh: refused while the branch is away, then |
| + // merged once it is back at the judged SHA. |
| + if k, _ := r.client.Task(ctx, id); !k.MergeOffered { |
| + t.Fatalf("no Merge offered after Not now %+v", k) |
| + } |
| + if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); !strings.Contains(page, `action="/conversation/tasks/`+id+`/merge"`) || !strings.Contains(page, ">Merge</button>") { |
| + t.Fatalf("task page offers no Merge: %s", page) |
| + } |
| + if p := r.get(r.memberCookie(), "/tasks/"+id, 200); strings.Contains(p, "data-task-merge") { |
| + t.Fatal("a teammate is offered Merge") |
| + } |
| + mate := personToolRig(t, r, "mate@example.com", equipo.RoleOwner) |
| + if _, err := mate.client.MergeTask(ctx, id); Status(err) != http.StatusForbidden { |
| + t.Fatalf("a teammate merged: %v", err) |
| + } |
| + if err := r.runner.Send(ctx, "l-away", wire.FrameBranch, wire.BranchReport{TaskID: id, CandidateSHA: cand, Head: strings.Repeat("8", 40)}); err != nil { |
| + t.Fatal(err) |
| + } |
| + r.wait("away", func(c *Conversation) bool { return c.Tasks[id].NeedsYou == wire.NeedsBranchMoved }) |
| + if _, err := r.client.MergeTask(ctx, id); Status(err) != http.StatusConflict || !strings.Contains(err.Error(), "not_mergeable") { |
| + t.Fatalf("merged while the branch is away: %v", err) |
| + } |
| + if err := r.runner.Send(ctx, "l-home", wire.FrameBranch, wire.BranchReport{TaskID: id, CandidateSHA: cand, Head: cand}); err != nil { |
| + t.Fatal(err) |
| + } |
| + r.wait("back", func(c *Conversation) bool { |
| + return c.Tasks[id].Stage == wire.StageReadyToMerge && c.Tasks[id].NeedsYou == wire.NeedsMerge |
| + }) |
| + if status, loc := r.post(r.inst.Cookie(), "/conversation/tasks/"+id+"/merge", url.Values{"from": {"task"}}); status != http.StatusSeeOther || loc != "/tasks/"+id { |
| + t.Fatalf("page merge %d %s", status, loc) |
| + } |
| + mm := r.dispatched(wire.SpecialistMerge, base, cand, 0) |
| + if k, _ := r.client.Task(ctx, id); k.Stage != wire.StageMerging || k.MergeOffered || mm.TaskID != id { |
| + t.Fatalf("after Merge %+v", k) |
| + } |
| + if _, err := r.client.MergeTask(ctx, id); Status(err) != http.StatusConflict { |
| + t.Fatalf("merged twice: %v", err) |
| + } |
| // Another legacy task, adopted: merged (checks passed, so not labelled |
| // without checks). |
| id2 := r.legacyReady("m", "Fix the second typo", base, strings.Repeat("3", 40)) |
diff --git a/internal/thintest/questions_contract_test.go b/internal/thintest/questions_contract_test.go| index e6c6d7ef..02fc4f6b 100644 |
| --- a/internal/thintest/questions_contract_test.go |
| +++ b/internal/thintest/questions_contract_test.go |
| @@ -261,6 +261,9 @@ func TestContractAskImplementer(t *testing.T) { |
| if _, err := r.client.Ask(ctx, id, "And after the merge?", "", "k6"); err != nil { |
| t.Fatalf("asking about merged work: %v", err) |
| } |
| + if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); !strings.Contains(page, `action="/tasks/`+id+`/ask"`) { |
| + t.Fatalf("the page offers no asking about merged work: %s", page) |
| + } |
| // Fourteen days after it was done, nobody can ask any more. |
| if _, err := r.inst.DB.Writer().Exec("UPDATE chat_tasks SET done_at = ? WHERE id = ?", time.Now().Add(-wire.KeepMergedSessions-time.Hour).UTC(), id); err != nil { |
| t.Fatal(err) |
| @@ -268,6 +271,9 @@ func TestContractAskImplementer(t *testing.T) { |
| if _, err := r.client.Ask(ctx, id, "Too late?", "", "k7"); Status(err) != http.StatusConflict || !strings.Contains(err.Error(), "task_ended") { |
| t.Fatalf("asked 14 days after the merge: %v", err) |
| } |
| + if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); strings.Contains(page, `action="/tasks/`+id+`/ask"`) { |
| + t.Fatal("the page offers asking 14 days after the merge") |
| + } |
| // The task carries its thread of questions. |
| k, _ := mate.client.Task(ctx, id) |
| if len(k.Questions) != 5 || k.Questions[0].Answer != "I fixed the typo." { |
diff --git a/internal/wire/tasks.go b/internal/wire/tasks.go| index ce35777e..1dba3451 100644 |
| --- a/internal/wire/tasks.go |
| +++ b/internal/wire/tasks.go |
| @@ -304,6 +304,14 @@ type Task struct { |
| // Reports counts the person's reports attached to this task after it |
| // was recorded (the same problem reported again). |
| Reports int `json:"reports"` |
| + // AskOpen is whether the task's creator may ask its specialists now: |
| + // until it ends, and for KeepMergedSessions after it is done. |
| + AskOpen bool `json:"ask_open"` |
| + // MergeOffered is whether the creator can have Equipo merge it now |
| + // (POST /api/v1/tasks/{id}/merge): Ready to merge, the branch at the |
| + // judged SHA, no merge yet and no merge card open (after Not now, or |
| + // Wait for checks). |
| + MergeOffered bool `json:"merge_offered"` |
| // CreatorName is the creator's display name (from the address until |
| // people have profiles). |
| CreatorName string `json:"creator_name"` |
diff --git a/internal/wire/wiretest/testdata/api/needs-you.json b/internal/wire/wiretest/testdata/api/needs-you.json| index 7526edf9..00efdb78 100644 |
| --- a/internal/wire/wiretest/testdata/api/needs-you.json |
| +++ b/internal/wire/wiretest/testdata/api/needs-you.json |
| @@ -1 +1 @@ |
| -{"items":[{"id":"tk0001","revision":9,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"ready_to_merge","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]},{"id":"s_0002","revision":2,"task_id":"tk0001","index":2,"specialist":"checks","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"","log_tail":"ok \tamadan.net/oficina/sample/panes\t0.012s","started_at":"2026-11-07T10:01:45Z","finished_at":"2026-11-07T10:02:30Z","round":0,"family":"","account":"","verdict":"","review_label":"","findings":[],"checks":"passed","gate":"make ci","exit_code":0,"askable":false,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]},{"id":"s_0003","revision":2,"task_id":"tk0001","index":3,"specialist":"review","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"The change makes EdgeSwipe go back and keeps the pane order. Approved.","log_tail":"Read panes/swipe.go","started_at":"2026-11-07T10:02:31Z","finished_at":"2026-11-07T10:04:10Z","round":0,"family":"claude","account":"claude-a","verdict":"approve","review_label":"same_family","findings":[{"id":"rf_0001","text":"Consider a test for a swipe that starts mid-screen.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:04:10Z"}],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:04:10Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"passed","checks_reason":"","verdict":"approve","review_label":"same_family","needs_you":"merge","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":null,"reports":0,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null}]} |
| +{"items":[{"id":"tk0001","revision":9,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"ready_to_merge","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]},{"id":"s_0002","revision":2,"task_id":"tk0001","index":2,"specialist":"checks","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"","log_tail":"ok \tamadan.net/oficina/sample/panes\t0.012s","started_at":"2026-11-07T10:01:45Z","finished_at":"2026-11-07T10:02:30Z","round":0,"family":"","account":"","verdict":"","review_label":"","findings":[],"checks":"passed","gate":"make ci","exit_code":0,"askable":false,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]},{"id":"s_0003","revision":2,"task_id":"tk0001","index":3,"specialist":"review","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"The change makes EdgeSwipe go back and keeps the pane order. Approved.","log_tail":"Read panes/swipe.go","started_at":"2026-11-07T10:02:31Z","finished_at":"2026-11-07T10:04:10Z","round":0,"family":"claude","account":"claude-a","verdict":"approve","review_label":"same_family","findings":[{"id":"rf_0001","text":"Consider a test for a swipe that starts mid-screen.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:04:10Z"}],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:04:10Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"passed","checks_reason":"","verdict":"approve","review_label":"same_family","needs_you":"merge","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":null,"reports":0,"ask_open":false,"merge_offered":false,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null}]} |
diff --git a/internal/wire/wiretest/testdata/api/task-merged.json b/internal/wire/wiretest/testdata/api/task-merged.json| index 168216d8..52f64195 100644 |
| --- a/internal/wire/wiretest/testdata/api/task-merged.json |
| +++ b/internal/wire/wiretest/testdata/api/task-merged.json |
| @@ -1 +1 @@ |
| -{"id":"tk0001","revision":9,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"done","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]},{"id":"s_0002","revision":2,"task_id":"tk0001","index":2,"specialist":"checks","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"","log_tail":"ok \tamadan.net/oficina/sample/panes\t0.012s","started_at":"2026-11-07T10:01:45Z","finished_at":"2026-11-07T10:02:30Z","round":0,"family":"","account":"","verdict":"","review_label":"","findings":[],"checks":"passed","gate":"make ci","exit_code":0,"askable":false,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]},{"id":"s_0003","revision":2,"task_id":"tk0001","index":3,"specialist":"review","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"The change makes EdgeSwipe go back and keeps the pane order. Approved.","log_tail":"Read panes/swipe.go","started_at":"2026-11-07T10:02:31Z","finished_at":"2026-11-07T10:04:10Z","round":0,"family":"claude","account":"claude-a","verdict":"approve","review_label":"same_family","findings":[{"id":"rf_0001","text":"Consider a test for a swipe that starts mid-screen.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:04:10Z"}],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]},{"id":"s_0009","revision":2,"task_id":"tk0001","index":4,"specialist":"merge","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"","log_tail":"Read panes/swipe.go","started_at":"2026-11-07T10:02:31Z","finished_at":"2026-11-07T10:04:10Z","round":0,"family":"","account":"","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","into":"main","strategy":"merge","without_checks":false,"activity":[]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:04:10Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"passed","checks_reason":"","verdict":"approve","review_label":"same_family","needs_you":"","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":{"sha":"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","into":"main","strategy":"merge","without_checks":false,"at":"2026-11-07T12:00:00Z"},"reports":0,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null} |
| +{"id":"tk0001","revision":9,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"done","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]},{"id":"s_0002","revision":2,"task_id":"tk0001","index":2,"specialist":"checks","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"","log_tail":"ok \tamadan.net/oficina/sample/panes\t0.012s","started_at":"2026-11-07T10:01:45Z","finished_at":"2026-11-07T10:02:30Z","round":0,"family":"","account":"","verdict":"","review_label":"","findings":[],"checks":"passed","gate":"make ci","exit_code":0,"askable":false,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]},{"id":"s_0003","revision":2,"task_id":"tk0001","index":3,"specialist":"review","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"The change makes EdgeSwipe go back and keeps the pane order. Approved.","log_tail":"Read panes/swipe.go","started_at":"2026-11-07T10:02:31Z","finished_at":"2026-11-07T10:04:10Z","round":0,"family":"claude","account":"claude-a","verdict":"approve","review_label":"same_family","findings":[{"id":"rf_0001","text":"Consider a test for a swipe that starts mid-screen.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:04:10Z"}],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]},{"id":"s_0009","revision":2,"task_id":"tk0001","index":4,"specialist":"merge","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"","log_tail":"Read panes/swipe.go","started_at":"2026-11-07T10:02:31Z","finished_at":"2026-11-07T10:04:10Z","round":0,"family":"","account":"","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","into":"main","strategy":"merge","without_checks":false,"activity":[]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:04:10Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"passed","checks_reason":"","verdict":"approve","review_label":"same_family","needs_you":"","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":{"sha":"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","into":"main","strategy":"merge","without_checks":false,"at":"2026-11-07T12:00:00Z"},"reports":0,"ask_open":false,"merge_offered":false,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null} |
diff --git a/internal/wire/wiretest/testdata/api/task-ready.json b/internal/wire/wiretest/testdata/api/task-ready.json| index 6e5ea2a8..e8f23b2c 100644 |
| --- a/internal/wire/wiretest/testdata/api/task-ready.json |
| +++ b/internal/wire/wiretest/testdata/api/task-ready.json |
| @@ -1 +1 @@ |
| -{"id":"tk0001","revision":9,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"ready_to_merge","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]},{"id":"s_0002","revision":2,"task_id":"tk0001","index":2,"specialist":"checks","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"","log_tail":"ok \tamadan.net/oficina/sample/panes\t0.012s","started_at":"2026-11-07T10:01:45Z","finished_at":"2026-11-07T10:02:30Z","round":0,"family":"","account":"","verdict":"","review_label":"","findings":[],"checks":"passed","gate":"make ci","exit_code":0,"askable":false,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]},{"id":"s_0003","revision":2,"task_id":"tk0001","index":3,"specialist":"review","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"The change makes EdgeSwipe go back and keeps the pane order. Approved.","log_tail":"Read panes/swipe.go","started_at":"2026-11-07T10:02:31Z","finished_at":"2026-11-07T10:04:10Z","round":0,"family":"claude","account":"claude-a","verdict":"approve","review_label":"same_family","findings":[{"id":"rf_0001","text":"Consider a test for a swipe that starts mid-screen.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:04:10Z"}],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:04:10Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"passed","checks_reason":"","verdict":"approve","review_label":"same_family","needs_you":"merge","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":null,"reports":0,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null} |
| +{"id":"tk0001","revision":9,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"ready_to_merge","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]},{"id":"s_0002","revision":2,"task_id":"tk0001","index":2,"specialist":"checks","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"","log_tail":"ok \tamadan.net/oficina/sample/panes\t0.012s","started_at":"2026-11-07T10:01:45Z","finished_at":"2026-11-07T10:02:30Z","round":0,"family":"","account":"","verdict":"","review_label":"","findings":[],"checks":"passed","gate":"make ci","exit_code":0,"askable":false,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]},{"id":"s_0003","revision":2,"task_id":"tk0001","index":3,"specialist":"review","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":false,"terminated":true,"summary":"The change makes EdgeSwipe go back and keeps the pane order. Approved.","log_tail":"Read panes/swipe.go","started_at":"2026-11-07T10:02:31Z","finished_at":"2026-11-07T10:04:10Z","round":0,"family":"claude","account":"claude-a","verdict":"approve","review_label":"same_family","findings":[{"id":"rf_0001","text":"Consider a test for a swipe that starts mid-screen.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:04:10Z"}],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:04:10Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"passed","checks_reason":"","verdict":"approve","review_label":"same_family","needs_you":"merge","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":null,"reports":0,"ask_open":false,"merge_offered":false,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null} |
diff --git a/internal/wire/wiretest/testdata/api/task.json b/internal/wire/wiretest/testdata/api/task.json| index 9b11ec8c..7e3bed07 100644 |
| --- a/internal/wire/wiretest/testdata/api/task.json |
| +++ b/internal/wire/wiretest/testdata/api/task.json |
| @@ -1 +1 @@ |
| -{"id":"tk0001","revision":5,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"in_progress","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:01:40Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"","checks_reason":"","verdict":"","review_label":"","needs_you":"","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":null,"reports":0,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null} |
| +{"id":"tk0001","revision":5,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"in_progress","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:01:40Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"","checks_reason":"","verdict":"","review_label":"","needs_you":"","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":null,"reports":0,"ask_open":false,"merge_offered":false,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null} |
diff --git a/internal/wire/wiretest/testdata/api/tasks.json b/internal/wire/wiretest/testdata/api/tasks.json| index 64014951..d035a849 100644 |
| --- a/internal/wire/wiretest/testdata/api/tasks.json |
| +++ b/internal/wire/wiretest/testdata/api/tasks.json |
| @@ -1 +1 @@ |
| -{"items":[{"id":"tk0001","revision":5,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"in_progress","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:01:40Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"","checks_reason":"","verdict":"","review_label":"","needs_you":"","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":null,"reports":0,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null}]} |
| +{"items":[{"id":"tk0001","revision":5,"project_id":"p_0001","project":"Sample","repo":"amadan.net/oficina/sample","title":"Swipe back from the edge does nothing","brief":"Swiping from the left edge should go back a pane.","stage":"in_progress","branch":"equipo/tk0001-swipe-back-from-the-edge-does-nothing","base_sha":"1111111111111111111111111111111111111111","url":"https://amadan.net/oficina/sample?branch=equipo/tk0001-swipe-back-from-the-edge-does-nothing","creator":"owner@example.com","turn_id":"t_0001","findings":[{"id":"f_0001","text":"The edge-swipe handler returns false, so back never fires.","repo":"amadan.net/oficina/sample","path":"panes/swipe.go","line":4,"at":"2026-11-07T10:00:02Z"}],"steps":[{"id":"s_0001","revision":3,"task_id":"tk0001","index":1,"specialist":"engineering","state":"done","reason":"","attempt":1,"base_sha":"1111111111111111111111111111111111111111","candidate_sha":"2222222222222222222222222222222222222222","pushed":true,"terminated":true,"summary":"EdgeSwipe now goes back on a swipe from the edge.","log_tail":"Edit panes/swipe.go\nDone.","started_at":"2026-11-07T10:00:03Z","finished_at":"2026-11-07T10:01:40Z","round":0,"family":"claude","account":"claude-a","verdict":"","review_label":"","findings":[],"checks":"","gate":"","exit_code":null,"askable":true,"rebase":false,"merge_sha":"","into":"","strategy":"","without_checks":false,"activity":[{"kind":"read","subject":"panes/swipe.go","at":"2026-11-07T10:00:20Z"},{"kind":"edit","subject":"panes/swipe.go","at":"2026-11-07T10:01:02Z"},{"kind":"run","subject":"go test ./panes","at":"2026-11-07T10:01:20Z"}]}],"thread":[{"id":"e_0001","author":"owner@example.com","text":"It happens on the iPhone only.","at":"2026-11-07T10:00:30Z"}],"created_at":"2026-11-07T10:00:01Z","updated_at":"2026-11-07T10:01:40Z","candidate_sha":"2222222222222222222222222222222222222222","checks":"","checks_reason":"","verdict":"","review_label":"","needs_you":"","fix_rounds":0,"branch_head":"","questions":[{"id":"q_0001","revision":3,"task_id":"tk0001","step_id":"s_0001","specialist":"engineering","asker":"owner@example.com","text":"What did you change and why?","state":"answered","reason":"","attempt":1,"answer":"I made the edge swipe return true, so a swipe from the left edge goes back a pane. Before, the handler always said no.","created_at":"2026-11-07T10:05:00Z","updated_at":"2026-11-07T10:05:09Z","timing":null}],"merged":null,"reports":0,"ask_open":false,"merge_offered":false,"creator_name":"Owner","source_message_id":"m_0001","source_at":"2026-11-07T09:59:58Z","duplicate_of":null,"coordinator":null}]} |