ci: delete five pre-thin browser drives; drop the Broken: quarantine
Coordinator review of 44927a9: a test that runs, always fails and never turns anything red is noise. So the five browser drives of pre-thin pages are deleted instead of quarantined as known broken: TestFoundationBrowserWalk, TestChatBrowser, TestOptimisticChat and TestRunnerTaskBrowserWalk (equipotest, with browserSignin and checkChatStyle, used by nothing else), and TestConversationLayout (plan3test, its browser drive, conversationBrowserWait and the !browser stub). The pages and routes they covered are named in the slice 7 sweep list (thin v1 spec section 8), to be deleted with them. The Broken: handling is out of scripts/ci-test.py and scripts/ci-quarantine.txt; ordinary flake quarantine is as it was. The runner reference allowlist loses the four entries for the deleted files. equipotest has no browser tests now; browser-rest runs plan3test's TestTeamsHierarchyBrowser.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 files changed,
+37
−767
docs/superpowers/plans/HOSTED-CI-PROGRESS.md+5 −6docs/superpowers/specs/2026-11-06-equipo-thin-v1.md+23 −0internal/equipotest/browser_test.go+0 −192internal/equipotest/chat_browser_test.go+0 −144internal/equipotest/chat_style_browser_test.go+0 −40internal/equipotest/optimistic_browser_test.go+0 −84internal/equipotest/task_browser_test.go+0 −94internal/plan3test/conversation_layout_browser_test.go+0 −123internal/plan3test/conversation_layout_test.go+0 −17scripts/ci-quarantine.txt+0 −10scripts/ci-test.py+9 −29scripts/runner-reference-allowlist.json+0 −28
CI passed — run details
Intent
diff --git a/docs/superpowers/plans/HOSTED-CI-PROGRESS.md b/docs/superpowers/plans/HOSTED-CI-PROGRESS.md| index 7ed53b4d..27f19a2c 100644 |
| --- a/docs/superpowers/plans/HOSTED-CI-PROGRESS.md |
| +++ b/docs/superpowers/plans/HOSTED-CI-PROGRESS.md |
| @@ -69,12 +69,11 @@ between two delegated cgroups. So: |
| `/opt/chromium-<version>`, and the box sets `RASTRILLO_CHROME` to its |
| launcher, which `harness.ChromePath` reads first. Raise it with |
| `scripts/ci-chromium-pin.py VERSION SNAPSHOT SECURITY_SNAPSHOT`. The |
| - quarantine runs a quarantined browser test with the browser tag. A |
| - quarantine line whose reason starts `Broken:` is a test that fails every |
| - time because the pages it drives were replaced (five pre-thin walks in |
| - equipotest and plan3test): the quarantine shard runs it every time and |
| - prints `QUARANTINE BROKEN`, without going red for it, and says |
| - `QUARANTINE BROKEN TEST PASSES` when its line can go. |
| + quarantine runs a quarantined browser test with the browser tag. |
| + Five browser drives of pre-thin pages (four in equipotest, |
| + TestConversationLayout in plan3test) failed every time once they ran; |
| + they were deleted, and their pages are on the slice 7 sweep list |
| + (thin v1 spec §8). |
| ## Caches across fresh machines |
diff --git a/docs/superpowers/specs/2026-11-06-equipo-thin-v1.md b/docs/superpowers/specs/2026-11-06-equipo-thin-v1.md| index 25e103f4..e6f2d8c1 100644 |
| --- a/docs/superpowers/specs/2026-11-06-equipo-thin-v1.md |
| +++ b/docs/superpowers/specs/2026-11-06-equipo-thin-v1.md |
| @@ -339,6 +339,29 @@ journal, `runner/journal*.go`, `supervisor.go`, `witness.go`, `planflow`, |
| about 35,000 lines. Security regression tests are ported first (§5) and old |
| suites deleted last. |
| +Their browser drives went first (ci-browser-lane, 2026-11-11): once CI |
| +ran them they failed every time against the thin pages, so they were |
| +deleted, and the pre-thin pages they covered go in this sweep with them: |
| + |
| +- `TestFoundationBrowserWalk` (equipotest): the old rail destinations |
| + (`railPaths` in equipotest: `/journey`, `/needs-you`, `/specialists/*`, |
| + `/playbooks`, `/templates`, `/preferences`, `/settings/coordinator`, |
| + `/connections`, `/settings`), `/work`, `/projects/accounts` and its |
| + `/accounts` form, the old project form (`/projects/new`, |
| + `/projects/{id}/edit`) and the empty pre-thin `/conversation`. |
| +- `TestChatBrowser` (equipotest): the pre-thin conversation page |
| + (coordinator and specialist messages, `#conversation-feed`) and |
| + `/tasks/{id}/thread`. |
| +- `TestOptimisticChat` (equipotest): the pre-thin chat's optimistic send |
| + into `#conversation-feed`. |
| +- `TestRunnerTaskBrowserWalk` (equipotest): the pre-thin task page |
| + (`taskDetail`, page key `journey`), `/tasks/new` and its scriptless form, |
| + `/settings/recovery` and `/settings/recovery/release`, the specialist |
| + instruction pages. |
| +- `TestConversationLayout` (plan3test, and its `!browser` stub): plan 3's |
| + conversation layout, messages through the pre-thin conversation store, |
| + and the plan proposal page `/tasks/{id}/plan`. |
| + |
| Each slice lands headless first (contracts, runner, fake scenario green in CI |
| and on staging with real CLIs), then UI, then deploy; Paul says hello. |
diff --git a/internal/equipotest/browser_test.go b/internal/equipotest/browser_test.go| deleted file mode 100644 |
| index ee06226f..00000000 |
| --- a/internal/equipotest/browser_test.go |
| +++ /dev/null |
| @@ -1,192 +0,0 @@ |
| -//go:build browser |
| - |
| -package equipotest |
| - |
| -import ( |
| - "amadan.net/oficina/equipo/internal/browsertest" |
| - "amadan.net/oficina/equipo/internal/testci" |
| - "context" |
| - "fmt" |
| - "io" |
| - "log/slog" |
| - "net/http" |
| - "os" |
| - "path/filepath" |
| - "strings" |
| - "testing" |
| - |
| - "amadan.net/oficina/equipo/internal/equipo" |
| - "amadan.net/rastrillo/rastrillo/db" |
| - "amadan.net/rastrillo/rastrillo/harness" |
| - "github.com/chromedp/cdproto/cdp" |
| - "github.com/chromedp/cdproto/emulation" |
| - "github.com/chromedp/cdproto/network" |
| - "github.com/chromedp/chromedp" |
| - "github.com/chromedp/chromedp/kb" |
| -) |
| - |
| -func TestFoundationBrowserWalk(t *testing.T) { |
| - testci.Quarantine(t) |
| - mailer := &capturingMailer{} |
| - rig := harness.New(t, func(origin string) http.Handler { |
| - logger := slog.New(slog.NewTextHandler(io.Discard, nil)) |
| - d, err := db.Open(filepath.Join(t.TempDir(), "app.db"), logger) |
| - if err != nil { |
| - t.Fatal(err) |
| - } |
| - t.Cleanup(func() { d.Close() }) |
| - mux, err := equipo.App(d, testConfig(origin), mailer, logger) |
| - if err != nil { |
| - t.Fatal(err) |
| - } |
| - return mux |
| - }, harness.WithScrollbars()) |
| - noJS := os.Getenv("EQUIPO_BROWSER_NO_JS") == "1" |
| - // The pinned harness treats Chromium's native cancelled-transition |
| - // promise as an app exception, even with scripts disabled. Reduced motion |
| - // keeps this walk about navigation and forms; shell focus scripts still run. |
| - rig.Run(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| - _, err := cdp.Call(ctx, target, emulation.SetScriptExecutionDisabled, emulation.SetScriptExecutionDisabledParams{Value: noJS}) |
| - if err != nil { |
| - return err |
| - } |
| - motion := "reduce" |
| - if os.Getenv("EQUIPO_BROWSER_NORMAL_MOTION") == "1" { |
| - motion = "no-preference" |
| - } |
| - _, err = cdp.Call(ctx, target, emulation.SetEmulatedMedia, emulation.SetEmulatedMediaParams{Features: []*emulation.MediaFeature{{Name: "prefers-reduced-motion", Value: motion}}}) |
| - return err |
| - })) |
| - t.Logf("scripts disabled: %t", noJS) |
| - browserSignin(t, rig, mailer) |
| - |
| - check := func(expression, reason string) { |
| - t.Helper() |
| - ok := harness.Evaluate[bool](rig, expression) |
| - if !ok { |
| - t.Fatal(reason) |
| - } |
| - } |
| - screen := func(note string) { |
| - t.Helper() |
| - t.Log(note) |
| - rig.Screen("body", note) |
| - rig.Run(browsertest.Wait(`!document.documentElement.matches(":active-view-transition") && document.getAnimations().every(a => a.playState !== "running")`)) |
| - check(`document.documentElement.scrollWidth <= document.documentElement.clientWidth && document.body.scrollWidth <= document.documentElement.clientWidth`, "horizontal overflow: "+note) |
| - } |
| - goTo := func(path string) { |
| - t.Helper() |
| - rig.Run(chromedp.Navigate(rig.Origin + path)) |
| - screen(path) |
| - } |
| - clickTo := func(selector, path string) { |
| - t.Helper() |
| - rig.Run(browsertest.Click(selector), browsertest.Wait(fmt.Sprintf(`location.pathname + location.hash === %q`, path))) |
| - screen(path) |
| - } |
| - shot := func(name string) { browsertest.Screenshot(t, rig, name) } |
| - for _, width := range []int64{1280, 390} { |
| - rig.Run(chromedp.EmulateViewport(width, 900)) |
| - goTo("/conversation") |
| - check(`!!document.querySelector('[data-empty-state]')`, "missing conversation empty state") |
| - shot(fmt.Sprintf("empty-%d", width)) |
| - for _, path := range railPaths { |
| - if width == 390 { |
| - goTo("/work") |
| - } |
| - selector := fmt.Sprintf(`[rst-shell-nav] a[href=%q]`, path) |
| - clickTo(selector, path) |
| - check(fmt.Sprintf(`document.querySelector('[aria-current="page"]').getAttribute('href') === %q`, path), "wrong active destination") |
| - if strings.HasPrefix(path, "/specialists/") && width == 390 { |
| - key := strings.TrimPrefix(path, "/specialists/") |
| - rig.Run(chromedp.Click(chromedp.CSS(`[rel="up"]`)), browsertest.Wait(`location.pathname === '/work'`)) |
| - selected := "document.activeElement" |
| - if noJS { |
| - selected = "document.querySelector(':target')" |
| - } |
| - rig.Run(browsertest.Wait(fmt.Sprintf(`%s?.id === %q`, selected, "nav-"+key))) |
| - check(fmt.Sprintf(`%s?.id === %q && %s.getBoundingClientRect().bottom <= innerHeight && %s.getBoundingClientRect().top >= 0`, selected, "nav-"+key, selected, selected), "back link missed visible index row") |
| - rig.Run(browsertest.Wait(`!document.documentElement.matches(":active-view-transition") && document.getAnimations().every(a => a.playState !== "running")`)) |
| - check(`document.documentElement.scrollWidth <= innerWidth`, "parent index overflow") |
| - shot("parent-" + key) |
| - // The pinned chromedp can retain stale DOM node IDs after a |
| - // back/forward-cache restoration. Assert the restored page |
| - // above, then reload before Screen uses its node queries. |
| - rig.Run(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| - _, err := chromedp.RunResponse(ctx, chromedp.Reload()) |
| - return err |
| - })) |
| - screen("specialist parent reloaded") |
| - } |
| - if path == "/conversation" { |
| - check(`!!document.querySelector('[data-empty-state]')`, "empty destination missing") |
| - } |
| - } |
| - goTo("/work") |
| - shot(fmt.Sprintf("index-%d", width)) |
| - // Content pages start keyboard traversal at the skip link. |
| - goTo("/conversation") |
| - rig.Run(chromedp.KeyEvent(kb.Tab)) |
| - check(`document.activeElement.matches('[rst-skip]')`, "skip link not first in keyboard order") |
| - shot(fmt.Sprintf("focus-%d", width)) |
| - rig.Run(chromedp.KeyEvent(kb.Enter)) |
| - check(`location.hash === '#main'`, "skip link did not reach main") |
| - |
| - goTo("/settings") |
| - label := fmt.Sprintf("Browser account %d", width) |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`form[action="/accounts"]:has(input[name="id"][value="0"]) input[name="label"]`), label), browsertest.Click(`form[action="/accounts"]:has(input[name="id"][value="0"]) button`), browsertest.Wait(fmt.Sprintf(`Array.from(document.querySelectorAll('h2')).some(e => e.textContent === %q)`, label))) |
| - screen("account saved") |
| - for _, kind := range []string{"app", "website", "repository"} { |
| - goTo("/projects/new") |
| - name := fmt.Sprintf("%s %d %s", kind, width, strings.Repeat("LongProjectName", 12)) |
| - rig.Run( |
| - chromedp.SetValue(chromedp.CSS(`[name="account_id"]`), fmt.Sprint(map[int64]int{1280: 1, 390: 2}[width])), |
| - chromedp.SendKeys(chromedp.CSS(`[name="name"]`), name), |
| - chromedp.SetValue(chromedp.CSS(`[name="kind"]`), kind), |
| - chromedp.SendKeys(chromedp.CSS(`[name="repository"]`), fmt.Sprintf("amadan.net/browser/%s-%d", kind, width)), |
| - chromedp.SendKeys(chromedp.CSS(`[name="default_branch"]`), "main"), |
| - chromedp.SetValue(chromedp.CSS(`[name="owner_work"]`), ownerAddress), |
| - chromedp.SetValue(chromedp.CSS(`[name="owner_merge"]`), ownerAddress), |
| - ) |
| - if kind != "repository" { |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`[name="app_name"]`), fmt.Sprintf("%s-%d", kind, width))) |
| - } |
| - rig.Run(browsertest.Click(`[equipo-form] button[type="submit"]`), browsertest.Wait(` /^\/projects\/\d+$/.test(location.pathname)`)) |
| - screen("created " + kind) |
| - check(fmt.Sprintf(`document.querySelector('main h1').textContent === %q && !!document.querySelector('[data-project-kind="%s"]')`, name, kind), "project metadata missing") |
| - path := harness.Read(rig, chromedp.Location()) |
| - path = strings.TrimPrefix(path, rig.Origin) |
| - goTo("/projects/accounts") |
| - check(fmt.Sprintf(`document.querySelector('h3 a[href=%q]').getClientRects().length > 1`, path), "long project name does not wrap") |
| - clickTo(fmt.Sprintf(`h3 a[href=%q]`, path), path) |
| - clickTo(fmt.Sprintf(`a[href=%q]`, path+"/edit"), path+"/edit") |
| - rig.Run(chromedp.SetValue(chromedp.CSS(`[name="name"]`), name+" edited"), chromedp.SetValue(chromedp.CSS(`[name="default_branch"]`), "release/browser"), browsertest.Click(`[equipo-form] button[type="submit"]`), browsertest.Wait(fmt.Sprintf(`location.pathname === %q`, path))) |
| - screen("edited " + kind) |
| - goTo(path) |
| - check(fmt.Sprintf(`document.querySelector('main h1').textContent === %q && document.querySelector('[equipo-metadata]').textContent.includes('release/browser')`, name+" edited"), "edit did not persist") |
| - } |
| - goTo("/projects/accounts") |
| - check(fmt.Sprintf(`document.querySelectorAll('[data-project-kind]').length === %d`, map[int64]int{1280: 3, 390: 6}[width]), "project count mismatch") |
| - shot(fmt.Sprintf("projects-%d", width)) |
| - goTo("/specialists/engineering") |
| - check(`document.querySelectorAll('#activity > section').length === 4 && document.querySelectorAll('#activity [data-empty-state]').length === 1 && document.querySelectorAll('#activity [data-task]').length === 0`, "specialist work is not empty") |
| - shot(fmt.Sprintf("specialist-%d", width)) |
| - } |
| - goTo("/work") |
| - rig.Run(chromedp.Click(chromedp.CSS(`[rst-shell-profile] summary`))) |
| - clickTo(`form[action="/signout"] button`, "/signin") |
| - goTo("/projects") |
| - check(`location.pathname === '/signin' && !document.querySelector('[data-project-count]')`, "signout retained project access") |
| -} |
| - |
| -func browserSignin(t *testing.T, rig *harness.Rig, mailer *capturingMailer) { |
| - t.Helper() |
| - c := signinClient(t, rig.Origin) |
| - signinEmail(t, c, rig.Origin, rig.Origin, mailer, ownerAddress) |
| - for _, cookie := range c.Jar.Cookies(mustURL(t, rig.Origin)) { |
| - rig.Run(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| - _, err := cdp.Call(ctx, target, network.SetCookie, network.SetCookieParams{Name: cookie.Name, Value: cookie.Value, URL: rig.Origin, Path: "/"}) |
| - return err |
| - })) |
| - } |
| -} |
diff --git a/internal/equipotest/chat_browser_test.go b/internal/equipotest/chat_browser_test.go| deleted file mode 100644 |
| index e85a4baa..00000000 |
| --- a/internal/equipotest/chat_browser_test.go |
| +++ /dev/null |
| @@ -1,144 +0,0 @@ |
| -//go:build browser |
| - |
| -package equipotest |
| - |
| -import ( |
| - "amadan.net/oficina/equipo/internal/browsertest" |
| - "amadan.net/oficina/equipo/internal/equipo" |
| - "amadan.net/oficina/equipo/internal/testci" |
| - "amadan.net/rastrillo/rastrillo/harness" |
| - "context" |
| - "fmt" |
| - "github.com/chromedp/cdproto/cdp" |
| - "github.com/chromedp/cdproto/emulation" |
| - "github.com/chromedp/chromedp" |
| - "github.com/chromedp/chromedp/kb" |
| - "net/http" |
| - "os" |
| - "testing" |
| -) |
| - |
| -func TestChatBrowser(t *testing.T) { |
| - testci.Quarantine(t) |
| - f, _ := questionFixture(t) |
| - task := f.a.TaskID |
| - mustSQL(t, f.d, "UPDATE questions SET raw_request=?", `{"provider":"claude","name":"AskUserQuestion","input":{"questions":[{"question":"Which invoice total should appear?","options":[{"label":"Net"},{"label":"Subtotal"}]}]}}`) |
| - mustSQL(t, f.d, "UPDATE tasks SET description=? WHERE id=?", "Fix the invoice total", task) |
| - mustSQL(t, f.d, "UPDATE projects SET name=?", "Comercio") |
| - for _, thread := range []string{"", task} { |
| - for i, body := range []string{"The invoice total changes after adding delivery.", "I’ll trace the calculation and ask Engineering to reproduce it.", "Please keep the existing tax rules.", "The reproduction is ready. Delivery is being counted twice.", "Include a check for invoices without delivery too.", "Engineering is adding that check before the independent review."} { |
| - m, err := f.s.SendMessage(connectionContext, ownerActor, thread, body, equipo.Mutation{RequestID: fmt.Sprintf("seed-%s-%d", thread, i)}) |
| - executionMust(t, err) |
| - if i%2 == 1 { |
| - kind, author := "coordinator", "coordinator" |
| - if thread != "" { |
| - kind, author = "specialist", "engineering" |
| - } |
| - mustSQL(t, f.d, "UPDATE conversation_messages SET author_kind=?,author_id=? WHERE id=?", kind, author, m.ID) |
| - } |
| - mustSQL(t, f.d, "UPDATE conversation_messages SET created_at=? WHERE id=?", fmt.Sprintf("2026-11-05 10:%02d:00", i), m.ID) |
| - } |
| - } |
| - mustSQL(t, f.d, "INSERT INTO conversation_cards(id,stream_id,kind,resource_id,sequence,revision) SELECT 'chat-task',id,'task',?,2,1 FROM conversations WHERE person=?", task, ownerAddress) |
| - mailer := &capturingMailer{} |
| - var router http.Handler |
| - rig := harness.New(t, func(origin string) http.Handler { |
| - cfg := testConfig(origin) |
| - var err error |
| - router, err = equipo.RouterWithStore(f.d, cfg, mailer, nil, f.s) |
| - executionMust(t, err) |
| - mux := http.NewServeMux() |
| - mux.Handle("/mockups/", http.StripPrefix("/mockups/", http.FileServer(http.Dir("../../docs/mockups")))) |
| - mux.Handle("/", equipo.Mux(router)) |
| - return mux |
| - }, harness.WithScrollbars()) |
| - t.Cleanup(func() { equipo.CloseLive(router) }) |
| - noJS := os.Getenv("EQUIPO_BROWSER_NO_JS") == "1" |
| - rig.Run(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| - _, err := cdp.Call(ctx, target, emulation.SetScriptExecutionDisabled, emulation.SetScriptExecutionDisabledParams{Value: noJS}) |
| - if err != nil { |
| - return err |
| - } |
| - _, err = cdp.Call(ctx, target, emulation.SetEmulatedMedia, emulation.SetEmulatedMediaParams{Features: []*emulation.MediaFeature{{Name: "prefers-reduced-motion", Value: "reduce"}}}) |
| - return err |
| - })) |
| - browserSignin(t, rig, mailer) |
| - check := func(expression, reason string) { |
| - t.Helper() |
| - if !harness.Evaluate[bool](rig, expression) { |
| - t.Fatal(reason) |
| - } |
| - } |
| - shot := func(name string) { browsertest.Screenshot(t, rig, name) } |
| - baseline := os.Getenv("EQUIPO_CHAT_BASELINE") == "1" |
| - for _, width := range []int64{1280, 390} { |
| - rig.Run(chromedp.EmulateViewport(width, 900)) |
| - for _, screen := range []struct{ name, path string }{{"conversation", "/conversation"}, {"thread", "/tasks/" + task + "/thread"}, {"nav", "/work"}} { |
| - rig.Run(chromedp.Navigate(rig.Origin+screen.path), browsertest.Wait(`!document.documentElement.matches(":active-view-transition")`)) |
| - shot(fmt.Sprintf("%s-%d", screen.name, width)) |
| - if baseline { |
| - continue |
| - } |
| - check(`document.documentElement.scrollWidth<=innerWidth`, "horizontal overflow") |
| - checkChatStyle(t, rig, screen.name == "nav") |
| - if screen.name == "nav" { |
| - continue |
| - } |
| - if screen.name == "conversation" { |
| - check(`document.querySelector("[data-card=chat-task]").parentElement.previousElementSibling.dataset.sequence === "2"`, "task card detached from its message") |
| - } |
| - rig.Screen("body", fmt.Sprintf("chat %s %d", screen.name, width)) |
| - check(`!!document.querySelector('ol[equipo-feed]') && !!document.querySelector('[aria-live="polite"]')`, "missing accessible chat feed") |
| - check(`document.querySelectorAll('[equipo-message] time[datetime]').length>=6`, "missing message times") |
| - check(`document.querySelector('#composer').getBoundingClientRect().bottom<=innerHeight && document.querySelector('#composer textarea').getBoundingClientRect().top>0`, "composer outside viewport") |
| - if noJS { |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`#composer textarea`), "Scriptless reply"), browsertest.Click(`#composer button`)) |
| - check(`document.querySelector('#conversation-feed').textContent.includes('Scriptless reply')`, "scriptless reply missing") |
| - continue |
| - } |
| - check(`document.querySelectorAll('[equipo-message="incoming"] .icon').length>=3`, "missing sender icons") |
| - harness.Evaluate[bool](rig, `(window.chatDocument=true)`) |
| - thread := "" |
| - if screen.name == "thread" { |
| - thread = task |
| - } |
| - liveText := fmt.Sprintf("Live reply %s %d", screen.name, width) |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`#composer textarea`), "Keep this draft")) |
| - _, err := f.s.SendMessage(connectionContext, ownerActor, thread, liveText, equipo.Mutation{RequestID: liveText}) |
| - executionMust(t, err) |
| - rig.Run(browsertest.Wait(fmt.Sprintf(`document.querySelector('#conversation-feed').textContent.includes(%q)`, liveText))) |
| - check(`window.chatDocument && document.querySelector('#chat-body').value==='Keep this draft' && document.activeElement.id==='chat-body'`, "live update lost document, draft or focus") |
| - check(`(()=>{const s=document.querySelector('[equipo-scroll]');return s.scrollHeight-s.clientHeight-s.scrollTop<3})()`, "live update did not follow bottom") |
| - harness.Evaluate[bool](rig, `(()=>{const s=document.querySelector('[equipo-scroll]');s.scrollTop=0;return true})()`) |
| - rig.Run(browsertest.Wait(`document.querySelector('[equipo-scroll]').scrollTop===0`)) |
| - _, err = f.s.SendMessage(connectionContext, ownerActor, thread, liveText+" while reading", equipo.Mutation{RequestID: liveText + "-reading"}) |
| - executionMust(t, err) |
| - rig.Run(browsertest.Wait(fmt.Sprintf(`document.querySelector('#conversation-feed').textContent.includes(%q)`, liveText+" while reading"))) |
| - check(`document.querySelector('[equipo-scroll]').scrollTop<3`, "live update pulled reader to bottom") |
| - check(`document.querySelector('[equipo-announcements]').textContent.includes('while reading')`, "new message not announced") |
| - harness.Evaluate[bool](rig, `(()=>{const t=document.querySelector("#chat-body");t.value="Browser reply";t.focus();return true})()`) |
| - rig.Run(chromedp.KeyEvent(kb.Enter, chromedp.KeyModifiers(chromedp.ModifierShift))) |
| - check(`document.querySelector('#composer textarea').value.endsWith('\n')`, "Shift+Enter did not add a newline") |
| - rig.Run(chromedp.KeyEvent(kb.Enter), browsertest.Wait(`document.querySelector('#composer button').disabled && document.querySelector('#chat-body').readOnly`)) |
| - rig.Run(browsertest.Wait(`document.querySelector('#composer textarea').value==='' && document.querySelector('#conversation-feed').textContent.includes('Browser reply')`)) |
| - check(`document.activeElement.id==='chat-body' && window.chatDocument`, "composer lost focus or reloaded") |
| - check(`(()=>{const s=document.querySelector('[equipo-scroll]');return s.scrollHeight-s.clientHeight-s.scrollTop<3})()`, "send did not reach bottom") |
| - } |
| - if baseline { |
| - for _, name := range []string{"conversation", "nav", "journey", "native"} { |
| - rig.Run(chromedp.Navigate(rig.Origin + "/mockups/" + name + ".html")) |
| - shot(fmt.Sprintf("mockup-%s-%d", name, width)) |
| - } |
| - } |
| - } |
| - if !baseline && !noJS { |
| - rig.Run(chromedp.Navigate(rig.Origin+"/tasks/"+task+"/thread"), browsertest.Click(`[equipo-choice] button[value="Net"]`)) |
| - if scalar(t, f.d, "SELECT count(*) FROM questions WHERE state='answered' AND answer LIKE '%Net%'") != 1 { |
| - t.Fatal("one-tap answer was not saved") |
| - } |
| - rig.Run(chromedp.Navigate(rig.Origin + "/tasks/" + task + "/thread")) |
| - _, err := f.s.CancelTask(connectionContext, ownerActor, task) |
| - executionMust(t, err) |
| - rig.Run(browsertest.Wait(`document.querySelector('[equipo-chat-task]').textContent.includes('Cancelled')`)) |
| - } |
| -} |
diff --git a/internal/equipotest/chat_style_browser_test.go b/internal/equipotest/chat_style_browser_test.go| deleted file mode 100644 |
| index 2dc2fa96..00000000 |
| --- a/internal/equipotest/chat_style_browser_test.go |
| +++ /dev/null |
| @@ -1,40 +0,0 @@ |
| -//go:build browser |
| - |
| -package equipotest |
| - |
| -import ( |
| - "amadan.net/rastrillo/rastrillo/harness" |
| - "testing" |
| -) |
| - |
| -func checkChatStyle(t *testing.T, rig *harness.Rig, nav bool) { |
| - t.Helper() |
| - checks := map[string]string{ |
| - "one team header with switch": `!!document.querySelector('[equipo-team-heading] #nav-teams') && document.querySelectorAll('[rst-shell-rail] > [rst-shell-brand]').length===0`, |
| - "one specialists heading": `Array.from(document.querySelectorAll('[equipo-nav-group]')).filter(e=>e.textContent==='Specialists').length===1`, |
| - "compact sidebar counts": `Array.from(document.querySelectorAll('[equipo-count]')).every(e=>e.parentElement.matches('a') && getComputedStyle(e).whiteSpace==='nowrap' && e.scrollWidth<=e.clientWidth)`, |
| - "project and attention counts": `!!document.querySelector('#nav-projects [equipo-count]') && !!document.querySelector('#nav-needs-you [equipo-count]')`, |
| - } |
| - if !nav { |
| - for name, expression := range map[string]string{ |
| - "no page scrolling": `document.documentElement.scrollHeight<=innerHeight && document.body.scrollHeight<=innerHeight`, |
| - "plain incoming text": `Array.from(document.querySelectorAll('[equipo-message="incoming"] [equipo-bubble]')).every(e=>getComputedStyle(e).borderTopWidth==='0px' && getComputedStyle(e).paddingTop==='0px')`, |
| - "own name hidden": `Array.from(document.querySelectorAll('[equipo-message="own"] [equipo-message-meta] strong')).every(e=>getComputedStyle(e).clipPath==='inset(50%)')`, |
| - "compact message menu": `location.pathname!=="/conversation" || !!document.querySelector('[equipo-message-actions] summary[aria-label]')`, |
| - "date separator": `!!document.querySelector('[equipo-day] time[datetime]')`, |
| - "slim header": `!document.querySelector('[equipo-chat-header] > p')`, |
| - "compact question": `!!document.querySelector('[equipo-question] textarea[rows="1"]') && !document.querySelector('[equipo-question] [equipo-badge]')`, |
| - "question options": `document.querySelectorAll('[equipo-question] [equipo-choice] button').length>=2`, |
| - "task age": `!!document.querySelector('[equipo-chat-task] time[datetime]')`, |
| - "task plan actions": `!!document.querySelector('[equipo-models]') && !!document.querySelector('[equipo-task-link]')`, |
| - "composer placeholder and project": `!!document.querySelector('#chat-body[placeholder][aria-label]') && (location.pathname!=='/conversation' || !!document.querySelector('#composer select[name="project_id"]')) && !document.querySelector('#composer label')`, |
| - } { |
| - checks[name] = expression |
| - } |
| - } |
| - for name, expression := range checks { |
| - if !harness.Evaluate[bool](rig, expression) { |
| - t.Fatal(name) |
| - } |
| - } |
| -} |
diff --git a/internal/equipotest/optimistic_browser_test.go b/internal/equipotest/optimistic_browser_test.go| deleted file mode 100644 |
| index 67bf1158..00000000 |
| --- a/internal/equipotest/optimistic_browser_test.go |
| +++ /dev/null |
| @@ -1,84 +0,0 @@ |
| -//go:build browser |
| - |
| -package equipotest |
| - |
| -import ( |
| - "amadan.net/oficina/equipo/internal/testci" |
| - "net/http" |
| - "testing" |
| - |
| - "amadan.net/oficina/equipo/internal/browsertest" |
| - "amadan.net/oficina/equipo/internal/equipo" |
| - "amadan.net/rastrillo/rastrillo/harness" |
| - "github.com/chromedp/chromedp" |
| - "github.com/chromedp/chromedp/kb" |
| -) |
| - |
| -func TestOptimisticChat(t *testing.T) { |
| - testci.Quarantine(t) |
| - d, _ := foundationDB(t) |
| - mailer := &capturingMailer{} |
| - var router http.Handler |
| - rig := harness.New(t, func(origin string) http.Handler { |
| - cfg := testConfig(origin) |
| - var err error |
| - router, err = equipo.Router(d, cfg, mailer, nil) |
| - executionMust(t, err) |
| - return equipo.Mux(router) |
| - }) |
| - t.Cleanup(func() { equipo.CloseLive(router) }) |
| - browserSignin(t, rig, mailer) |
| - rig.Run(chromedp.Navigate(rig.Origin + "/conversation")) |
| - // Hold only the POST. Live refreshes still race with the optimistic bubble. |
| - harness.Evaluate[bool](rig, `(()=>{window.beforeSend=document.getElementById('conversation-feed').cloneNode(true);const real=window.realFetch=window.fetch;window.posts=0;window.fetch=(u,o)=>{if(o&&o.method==='POST'){window.posts++;window.postedAt=performance.now();return new Promise((resolve,reject)=>{window.deliver=()=>real(u,o).then(resolve,reject);window.fail=()=>reject(new TypeError('offline'))})}return real(u,o)};return true})()`) |
| - check := func(expression, why string) { |
| - t.Helper() |
| - if !harness.Evaluate[bool](rig, expression) { |
| - t.Fatal(why) |
| - } |
| - } |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`#chat-body`), "Immediate <safe> message"), chromedp.KeyEvent(kb.Enter)) |
| - check(`document.querySelector('[data-pending]').textContent.includes('Immediate <safe> message')`, "sent message missing before HTTP completes") |
| - check(`document.querySelector('[data-pending] [equipo-send-status]').textContent===''`, "sending state appeared before 500 ms") |
| - rig.Run(browsertest.Wait(`performance.now()-window.postedAt>=250`)) |
| - check(`document.querySelector('[data-pending] [equipo-send-status]').textContent===''`, "sending state appeared within 250 ms") |
| - rig.Run(browsertest.Wait(`document.querySelector('[data-pending] [equipo-send-status]').textContent.length>0`)) |
| - harness.Evaluate[bool](rig, `(()=>{const feed=document.getElementById('conversation-feed');const copy=feed.cloneNode(true);copy.querySelectorAll('[data-pending]').forEach(n=>n.remove());feed.replaceWith(copy);return true})()`) |
| - rig.Run(browsertest.Wait(`document.querySelectorAll('[data-pending]').length===1`)) |
| - harness.Evaluate[bool](rig, `(window.fail(),true)`) |
| - rig.Run(browsertest.Wait(`!!document.querySelector('[data-pending] button')`)) |
| - rig.Run(chromedp.Click(chromedp.CSS(`[data-pending] button`))) |
| - check(`window.posts===2`, "retry did not post") |
| - harness.Evaluate[bool](rig, `(window.deliver(),true)`) |
| - rig.Run(browsertest.Wait(`!document.querySelector('[data-pending]') && document.querySelector('[data-message] [equipo-message-body]').textContent==='Immediate <safe> message'`)) |
| - check(`document.querySelectorAll('[data-message]').length>=1 && !document.querySelector('safe')`, "message HTML was interpreted") |
| - if scalar(t, d, "SELECT count(*) FROM conversation_messages WHERE body='Immediate <safe> message'") != 1 { |
| - t.Fatal("retry duplicated message") |
| - } |
| - // A live GET started before the send can arrive after its POST response. |
| - harness.Evaluate[bool](rig, `(document.getElementById('conversation-feed').replaceWith(window.beforeSend),true)`) |
| - rig.Run(browsertest.Wait(`Array.from(document.querySelectorAll('[data-message] [equipo-message-body]')).filter(n=>n.textContent==='Immediate <safe> message').length===1`)) |
| - // Identical text in separate sends must keep separate identities. |
| - harness.Evaluate[bool](rig, `(()=>{const real=window.fetch;window.fetch=(u,o)=>real(u,o);return true})()`) |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`#chat-body`), "Same body"), chromedp.KeyEvent(kb.Enter)) |
| - harness.Evaluate[bool](rig, `(window.deliver(),true)`) |
| - rig.Run(browsertest.Wait(`!document.querySelector('[data-pending]')`)) |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`#chat-body`), "Same body"), chromedp.KeyEvent(kb.Enter)) |
| - harness.Evaluate[bool](rig, `(window.deliver(),true)`) |
| - rig.Run(browsertest.Wait(`!document.querySelector('[data-pending]')`)) |
| - if scalar(t, d, "SELECT count(*) FROM conversation_messages WHERE body='Same body'") != 2 { |
| - t.Fatal("identical messages were conflated") |
| - } |
| - // A committed write with a lost response retries the original request ID. |
| - harness.Evaluate[bool](rig, `(()=>{let drop=true;window.fetch=(u,o)=>{if(o&&o.method==='POST')return window.realFetch(u,o).then(r=>{if(drop){drop=false;throw new TypeError('lost response')}return r});if(o&&o.headers&&new Headers(o.headers).has('Rastrillo-Fragment'))return new Promise(()=>{});return window.realFetch(u,o)};return true})()`) |
| - rig.Run(chromedp.SendKeys(chromedp.CSS("#chat-body"), "Committed once"), chromedp.KeyEvent(kb.Enter)) |
| - rig.Run(browsertest.Wait(`!!document.querySelector('[data-pending] button')`)) |
| - if scalar(t, d, "SELECT count(*) FROM conversation_messages WHERE body='Committed once'") != 1 { |
| - t.Fatal("lost-response control did not commit") |
| - } |
| - rig.Run(chromedp.Click(chromedp.CSS(`[data-pending] button`)), browsertest.Wait(`!document.querySelector('[data-pending]')`)) |
| - if scalar(t, d, "SELECT count(*) FROM conversation_messages WHERE body='Committed once'") != 1 { |
| - t.Fatal("lost-response retry duplicated message") |
| - } |
| - |
| -} |
diff --git a/internal/equipotest/task_browser_test.go b/internal/equipotest/task_browser_test.go| deleted file mode 100644 |
| index 8e258ed0..00000000 |
| --- a/internal/equipotest/task_browser_test.go |
| +++ /dev/null |
| @@ -1,94 +0,0 @@ |
| -//go:build browser |
| - |
| -package equipotest |
| - |
| -import ( |
| - "amadan.net/oficina/equipo/internal/browsertest" |
| - "amadan.net/oficina/equipo/internal/testci" |
| - "context" |
| - "fmt" |
| - "net/http" |
| - "os" |
| - "strings" |
| - "testing" |
| - |
| - "amadan.net/oficina/equipo/internal/equipo" |
| - "amadan.net/rastrillo/rastrillo/harness" |
| - "github.com/chromedp/cdproto/cdp" |
| - "github.com/chromedp/cdproto/emulation" |
| - "github.com/chromedp/chromedp" |
| - "github.com/chromedp/chromedp/kb" |
| -) |
| - |
| -func TestRunnerTaskBrowserWalk(t *testing.T) { |
| - testci.Quarantine(t) |
| - f := bugFixture(t) |
| - task := bugTask(t, f) |
| - long := strings.Repeat("Long bug description ", 30) |
| - mustSQL(t, f.d, "UPDATE tasks SET description=? WHERE id=?", long, task.ID) |
| - mailer := &capturingMailer{} |
| - var router http.Handler |
| - rig := harness.New(t, func(origin string) http.Handler { |
| - cfg := testConfig(origin) |
| - r, err := equipo.RouterWithStore(f.d, cfg, mailer, nil, f.s) |
| - executionMust(t, err) |
| - router = r |
| - return equipo.Mux(r) |
| - }, harness.WithScrollbars()) |
| - t.Cleanup(func() { equipo.CloseLive(router) }) |
| - noJS := os.Getenv("EQUIPO_BROWSER_NO_JS") == "1" |
| - rig.Run(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| - _, err := cdp.Call(ctx, target, emulation.SetScriptExecutionDisabled, emulation.SetScriptExecutionDisabledParams{Value: noJS}) |
| - return err |
| - })) |
| - // Normal motion is retained: shell transitions run in this walk. |
| - rig.Run(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| - _, err := cdp.Call(ctx, target, emulation.SetEmulatedMedia, emulation.SetEmulatedMediaParams{Features: []*emulation.MediaFeature{{Name: "prefers-reduced-motion", Value: "no-preference"}}}) |
| - return err |
| - })) |
| - browserSignin(t, rig, mailer) |
| - |
| - check := func(expression, reason string) { |
| - t.Helper() |
| - if !harness.Evaluate[bool](rig, expression) { |
| - t.Fatal(reason) |
| - } |
| - } |
| - for _, width := range []int64{1280, 390} { |
| - rig.Run(chromedp.EmulateViewport(width, 900)) |
| - for _, path := range []string{"/work", "/journey", "/needs-you", "/tasks/" + task.ID, "/connections", "/settings/recovery", "/settings/recovery/release", "/specialists/product", "/specialists/design", "/specialists/copy", "/specialists/engineering", "/specialists/review", "/tasks/new"} { |
| - rig.Run(chromedp.Navigate(rig.Origin+path), browsertest.Wait(`!document.documentElement.matches(":active-view-transition") && document.getAnimations().every(a=>a.playState!=="running")`)) |
| - check(`document.documentElement.scrollWidth<=innerWidth && document.body.scrollWidth<=innerWidth`, fmt.Sprintf("overflow %s at %d", path, width)) |
| - if path != "/work" { |
| - check(`document.querySelectorAll('[aria-current="page"]').length===1`, fmt.Sprintf("one active destination %s at %d", path, width)) |
| - } |
| - rig.Screen("body", fmt.Sprintf("task16 %s %d", path, width)) |
| - if path == "/journey" { |
| - browsertest.Screenshot(t, rig, fmt.Sprintf("task16-%d", width)) |
| - } |
| - } |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`[name="description"]`), "Keep my draft")) |
| - _, err := f.s.CreateBug(connectionContext, ownerActor, f.project.ID, "another task", fmt.Sprintf("browser-%d", width)) |
| - executionMust(t, err) |
| - check(`document.querySelector('[name="description"]').value==='Keep my draft' && document.activeElement.name==='description'`, "draft or focus lost") |
| - rig.Run(browsertest.Click(`form[action="/tasks"] button`), browsertest.Wait(`location.pathname.startsWith('/tasks/') && location.pathname!=='/tasks/new'`)) |
| - check(`document.querySelector('#activity').textContent.includes('Keep my draft')`, "scriptless form did not reach task detail") |
| - rig.Run(chromedp.Navigate(rig.Origin+"/specialists/engineering"), browsertest.Wait(`!document.documentElement.matches(":active-view-transition")`)) |
| - rig.Run(chromedp.SendKeys(chromedp.CSS(`[name="standing_instructions"]`), "Keep specialist edit")) |
| - _, err = f.s.CreateBug(connectionContext, ownerActor, f.project.ID, fmt.Sprintf("live visible %d", width), fmt.Sprintf("live-%d", width)) |
| - executionMust(t, err) |
| - if !noJS { |
| - rig.Run(browsertest.Wait(fmt.Sprintf(`document.querySelector('#activity').textContent.includes(%q)`, fmt.Sprintf("live visible %d", width)))) |
| - } |
| - check(`document.querySelector('[name="standing_instructions"]').value.includes('Keep specialist edit') && document.activeElement.name==='standing_instructions'`, "live region replaced form focus or edits") |
| - rig.Run(chromedp.Navigate(rig.Origin+"/journey"), browsertest.Wait(`!document.documentElement.matches(":active-view-transition")`), chromedp.KeyEvent(kb.Tab)) |
| - check(`document.activeElement.matches('[rst-skip]')`, "keyboard skip order") |
| - if width == 390 { |
| - rig.Run(chromedp.KeyEvent(kb.Tab)) |
| - check(`document.activeElement.rel==='up'`, "phone back keyboard order") |
| - rig.Run(chromedp.KeyEvent(kb.Enter), browsertest.Wait(`location.pathname==='/work'`)) |
| - check(`location.hash==='#nav-journey'`, "phone back target") |
| - } |
| - } |
| - t.Logf("normal motion, 1280 and 390, scripts disabled: %t", noJS) |
| -} |
diff --git a/internal/plan3test/conversation_layout_browser_test.go b/internal/plan3test/conversation_layout_browser_test.go| deleted file mode 100644 |
| index 6671a804..00000000 |
| --- a/internal/plan3test/conversation_layout_browser_test.go |
| +++ /dev/null |
| @@ -1,123 +0,0 @@ |
| -//go:build browser |
| - |
| -package plan3test |
| - |
| -import ( |
| - "amadan.net/oficina/equipo/internal/equipo" |
| - "amadan.net/oficina/equipo/internal/testci" |
| - "amadan.net/rastrillo/rastrillo/harness" |
| - "context" |
| - "fmt" |
| - "github.com/chromedp/cdproto/cdp" |
| - "github.com/chromedp/cdproto/network" |
| - "github.com/chromedp/chromedp" |
| - "github.com/chromedp/chromedp/kb" |
| - "net/http" |
| - "os" |
| - "os/exec" |
| - "strings" |
| - "testing" |
| - "time" |
| -) |
| - |
| -func TestConversationLayout(t *testing.T) { |
| - testci.Quarantine(t) |
| - // The browser harness.ChromePath finds: RASTRILLO_CHROME (the CI box |
| - // sets it to its pinned Chromium), or one on PATH. |
| - found := os.Getenv("RASTRILLO_CHROME") != "" |
| - for _, name := range []string{"chromium", "chromium-browser", "google-chrome", "google-chrome-stable"} { |
| - if _, err := exec.LookPath(name); err == nil { |
| - found = true |
| - break |
| - } |
| - } |
| - if !found { |
| - testci.Absent(t, "Chrome/Chromium is unavailable locally; conversation layout requires the existing chromedp browser fixture") |
| - } |
| - f := newFixture(t) |
| - p := proposed(t, f) |
| - p.Steps[1].SelectionReason = strings.Repeat("A long reason for this selection ", 30) |
| - var err error |
| - p, err = f.Store.EditPlan(ctx, owner, p, equipo.Mutation{RequestID: "browser-reason", Revision: p.Revision}) |
| - must(t, err) |
| - liveFixture(t, f) |
| - rig := harness.New(t, func(string) http.Handler { return f.Handler }, harness.WithScrollbars()) |
| - cookie := f.Cookies[owner.Address] |
| - rig.Run(chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| - _, err := cdp.Call(ctx, target, network.SetCookie, network.SetCookieParams{Name: cookie.Name, Value: cookie.Value, URL: rig.Origin, Path: "/"}) |
| - return err |
| - })) |
| - for _, width := range []int64{390, 1280} { |
| - for _, scale := range []int{100, 200} { |
| - rig.Run(chromedp.EmulateViewport(width, 900), chromedp.Navigate(rig.Origin+"/conversation")) |
| - harness.Evaluate[bool](rig, fmt.Sprintf(`(document.documentElement.style.fontSize='%d%%',true)`, scale)) |
| - if !harness.Evaluate[bool](rig, `document.documentElement.scrollWidth<=innerWidth && getComputedStyle(document.querySelector('[equipo-conversation]')).flexDirection==='column'`) { |
| - t.Fatal("conversation overflow or split screen") |
| - } |
| - if !harness.Evaluate[bool](rig, `Array.from(document.querySelectorAll('[equipo-value],[equipo-badge]')).every(e=>getComputedStyle(e).whiteSpace==='nowrap')`) { |
| - t.Fatal("wrapping values or badges") |
| - } |
| - if !harness.Evaluate[bool](rig, `Array.from(document.querySelectorAll('[equipo-card],[equipo-note]')).every(e=>{let s=getComputedStyle(e);return s.borderLeftColor===s.borderRightColor && s.borderLeftWidth===s.borderRightWidth})`) { |
| - t.Fatal("coloured left accent") |
| - } |
| - rig.Run(chromedp.KeyEvent(kb.Tab)) |
| - if !harness.Evaluate[bool](rig, `document.activeElement.matches('[rst-skip]')`) { |
| - t.Fatal("lost keyboard focus") |
| - } |
| - if !harness.Evaluate[bool](rig, `Array.from(document.querySelectorAll('[equipo-secondary]')).every(e=>getComputedStyle(e).textOverflow==='ellipsis' && getComputedStyle(e).whiteSpace==='nowrap') && Array.from(document.querySelectorAll('[rst-person-av]')).every(e=>e.textContent.trim()==='')`) { |
| - t.Fatal("secondary text wraps or initials shown") |
| - } |
| - rig.Run(chromedp.Focus(chromedp.CSS(`#composer textarea`)), chromedp.SendKeys(chromedp.CSS(`#composer textarea`), "Keep this draft")) |
| - msg, err := f.Store.SendMessage(ctx, owner, "", "live arrival", equipo.Mutation{RequestID: fmt.Sprintf("arrival-%d-%d", width, scale)}) |
| - must(t, err) |
| - rig.Run(conversationBrowserWait(fmt.Sprintf(`!!document.querySelector('[data-message="%s"]')`, msg.ID))) |
| - if !harness.Evaluate[bool](rig, `document.activeElement.matches('#composer textarea') && document.activeElement.value==='Keep this draft'`) { |
| - t.Fatal("live invalidation lost composer draft or focus") |
| - } |
| - |
| - if width == 390 && scale == 100 { |
| - for i := 0; i < 8; i++ { |
| - _, err = f.Store.SendMessage(ctx, owner, "", fmt.Sprintf("Warm history %d", i), equipo.Mutation{RequestID: fmt.Sprintf("warm-%d", i)}) |
| - must(t, err) |
| - } |
| - rig.Run(conversationBrowserWait(`document.querySelector('#conversation-feed').textContent.includes('Warm history 7') && document.querySelector('[equipo-scroll]').scrollHeight>document.querySelector('[equipo-scroll]').clientHeight`)) |
| - |
| - harness.Evaluate[bool](rig, `(()=>{const s=document.querySelector('[equipo-scroll]');s.scrollTop=0;s.dispatchEvent(new Event('scroll'));return true})()`) |
| - harness.Evaluate[bool](rig, fmt.Sprintf(`(window.readOffset=document.querySelector('[data-message="%s"]').getBoundingClientRect().top,true)`, msg.ID)) |
| - for i := 0; i < 55; i++ { |
| - _, err = f.Store.SendMessage(ctx, owner, "", fmt.Sprintf("History arrival %d", i), equipo.Mutation{RequestID: fmt.Sprintf("history-%d", i)}) |
| - must(t, err) |
| - } |
| - rig.Run(conversationBrowserWait(`document.querySelector('#conversation-feed').textContent.includes('History arrival 54')`)) |
| - if !harness.Evaluate[bool](rig, fmt.Sprintf(`!!document.querySelector('[data-message="%s"]') && Math.abs(document.querySelector('[data-message="%s"]').getBoundingClientRect().top-window.readOffset)<3`, msg.ID, msg.ID)) { |
| - t.Fatalf("live window discarded the message being read: %s", harness.Evaluate[string](rig, fmt.Sprintf(`JSON.stringify({present:!!document.querySelector('[data-message="%s"]'),before:window.readOffset,after:document.querySelector('[data-message="%s"]')?.getBoundingClientRect().top,top:document.querySelector('[equipo-scroll]').scrollTop,items:Array.from(document.querySelector('[equipo-feed]').children).slice(0,5).map(e=>[e.dataset.sequence,e.dataset.message,e.dataset.entry,e.getBoundingClientRect().top])})`, msg.ID, msg.ID))) |
| - } |
| - } |
| - rig.Run(chromedp.Navigate(rig.Origin + "/tasks/" + p.TaskID + "/plan")) |
| - harness.Evaluate[bool](rig, fmt.Sprintf(`(document.documentElement.style.fontSize='%d%%',true)`, scale)) |
| - if !harness.Evaluate[bool](rig, `document.documentElement.scrollWidth<=innerWidth`) { |
| - t.Fatal("plan overflow") |
| - } |
| - } |
| - } |
| -} |
| - |
| -func conversationBrowserWait(expression string) chromedp.Action[chromedp.Void] { |
| - return chromedp.Func(func(ctx context.Context, target *chromedp.Target) error { |
| - ctx, cancel := context.WithTimeout(ctx, 5*time.Second) |
| - defer cancel() |
| - tick := time.NewTicker(20 * time.Millisecond) |
| - defer tick.Stop() |
| - for { |
| - ok, err := chromedp.Evaluate[bool](expression)(ctx, target) |
| - if err == nil && ok { |
| - return nil |
| - } |
| - select { |
| - case <-ctx.Done(): |
| - return fmt.Errorf("waiting for %s: %w", expression, ctx.Err()) |
| - case <-tick.C: |
| - } |
| - } |
| - }) |
| -} |
diff --git a/internal/plan3test/conversation_layout_test.go b/internal/plan3test/conversation_layout_test.go| deleted file mode 100644 |
| index 94d8bb76..00000000 |
| --- a/internal/plan3test/conversation_layout_test.go |
| +++ /dev/null |
| @@ -1,17 +0,0 @@ |
| -//go:build !browser |
| - |
| -package plan3test |
| - |
| -import ( |
| - "os/exec" |
| - "testing" |
| -) |
| - |
| -func TestConversationLayout(t *testing.T) { |
| - for _, name := range []string{"chromium", "chromium-browser", "google-chrome", "google-chrome-stable"} { |
| - if _, err := exec.LookPath(name); err == nil { |
| - t.Skip("Run with -tags browser to enable the existing chromedp fixtures") |
| - } |
| - } |
| - t.Skip("Chrome/Chromium is unavailable locally; conversation layout requires the existing chromedp browser fixture") |
| -} |
diff --git a/scripts/ci-quarantine.txt b/scripts/ci-quarantine.txt| index c1ae7a3c..ca0f37c8 100644 |
| --- a/scripts/ci-quarantine.txt |
| +++ b/scripts/ci-quarantine.txt |
| @@ -8,11 +8,6 @@ |
| # on oficina/equipo. A quarantine is a holding pen, not a fix: each line |
| # says what would let it leave. CI-PROGRESS.md has the history. |
| # |
| -# A reason starting "Broken:" is a test that fails every time, not a |
| -# flake: written for pages a later design replaced. The quarantine shard |
| -# still runs it and prints QUARANTINE BROKEN, but does not go red for it; |
| -# when it passes, the shard says to take its line out. |
| -# |
| # package test why |
| ./internal/headless TestMixedVersions M8 builds the staging line from git history and runs both version pairs. One cause found and fixed on ci-speed (the task read as merging after ready to merge); leaves after a clean week here. |
| @@ -27,8 +22,3 @@ |
| ./internal/headless TestHeadlessConnections/C5_review_other_family_first As C5_engineering_failover. |
| ./internal/runner/thin TestRunnerCancelAndSupersede The runner closed the stream right after acking the message (twice in CI on a45234a); 800 isolated local runs pass. The link now logs why a stream ends, so the next failure here names it. |
| ./internal/runner/checks TestCheckSandboxDeniedPathsTampering "child survived cancellation" under load; cancelling at 1 to 60 ms after start left no survivor in 50 local runs at load 50 to 78, so the cause is not the start-up window. Leaves when a failing log names it. |
| -./internal/equipotest TestFoundationBrowserWalk Broken: walks the pre-thin foundation pages and rail (/work paths, specialists), which the thin rail replaced; it times out on /conversation. Leaves when rewritten for the thin pages or deleted with them (slice 7 sweep). |
| -./internal/equipotest TestChatBrowser Broken: the pre-thin conversation page (coordinator messages, /tasks/ID/thread), which the thin chat replaced. Leaves as TestFoundationBrowserWalk. |
| -./internal/equipotest TestOptimisticChat Broken: drives #conversation-feed, the pre-thin chat feed; the thin chat has no such element (headless TestBrowserChatSendStaysOnPage drives the thin send). Leaves as TestFoundationBrowserWalk. |
| -./internal/equipotest TestRunnerTaskBrowserWalk Broken: a pre-thin task page renders with page key journey, which the thin rail no longer lists, so no destination is current. Leaves as TestFoundationBrowserWalk. |
| -./internal/plan3test TestConversationLayout Broken: sends through the pre-thin conversation store, whose messages the thin /conversation no longer shows. Leaves as TestFoundationBrowserWalk. |
diff --git a/scripts/ci-test.py b/scripts/ci-test.py| index 63d79f34..1e3a2d48 100755 |
| --- a/scripts/ci-test.py |
| +++ b/scripts/ci-test.py |
| @@ -102,7 +102,7 @@ BROWSER_LANES = [ |
| ("browser-headless-work", [HEADLESS], ["TestBrowserTaskCard", "TestBrowserReceiptFollowsReview", "TestBrowserRailFollowsWork", "TestBrowserTaskThread", "TestBrowserAskAfterMerge", "TestBrowserReceiptsDesktop", "TestBrowserReceiptsTouch", "TestBrowserNotebook", "TestBrowserEmptyExplore", "TestNotebookScreenshots", "TestBrowserNotebookLook"]), # 75 |
| ("browser-headless-rest", [HEADLESS], None), # 74: the connections pages, thinking and cards, any new one |
| ("browser-thintest", ["./internal/thintest"], None), # 80 |
| - ("browser-rest", None, None), # equipotest, plan3test and any new package |
| + ("browser-rest", None, None), # plan3test and any new package |
| ] |
| # Shards after the lanes: work that is not a lane of packages but runs |
| @@ -553,17 +553,8 @@ def run_shard(): |
| return status |
| -# A quarantine line whose reason starts with this is a test known to fail |
| -# every time, not a flake: one written for pages a later design replaced, |
| -# kept on record until it is rewritten or deleted. The quarantine shard |
| -# still runs it on every run and says so loudly, but its failure does not |
| -# turn the shard red; when it passes, the shard says to take its line out. |
| -BROKEN = "Broken:" |
| - |
| - |
| -def quarantined(broken=False): |
| - """(package, test) pairs from the quarantine file; with broken, only |
| - those whose reason starts with BROKEN.""" |
| +def quarantined(): |
| + """(package, test) pairs from the quarantine file.""" |
| entries = [] |
| with open(os.path.join(root(), QUARANTINE)) as f: |
| for number, line in enumerate(f, 1): |
| @@ -573,8 +564,7 @@ def quarantined(broken=False): |
| fields = line.split(None, 2) |
| if len(fields) < 3 or not fields[0].startswith("./") or not fields[1].startswith("Test"): |
| sys.exit(f"{QUARANTINE}:{number}: want: ./package TestName[/Subtest] reason") |
| - if not broken or fields[2].startswith(BROKEN): |
| - entries.append((fields[0], fields[1])) |
| + entries.append((fields[0], fields[1])) |
| return entries |
| @@ -728,7 +718,7 @@ def run_group(package, tests, env, tags=TAGS): |
| report.append(tail(retry_out)) |
| for t in sorted(passed - failed): |
| report.append(f"ok {package} {t}") |
| - return report, flaky, broken, missing |
| + return report, flaky, broken |
| def run_quarantine(): |
| @@ -748,24 +738,14 @@ def run_quarantine(): |
| with ThreadPoolExecutor(max_workers=max(1, len(groups))) as pool: |
| futures = [pool.submit(run_group, p, tests, env, tags(p, top)) for (p, top), tests in sorted(groups.items())] |
| results = [f.result() for f in futures] |
| - known = set(quarantined(broken=True)) |
| - flakes, broken, still = [], [], [] |
| - for ((package, _), tests), (report, flaky, bad, missing) in zip(sorted(groups.items()), results): |
| + flakes, broken = [], [] |
| + for report, flaky, bad in results: |
| print("\n".join(report), flush=True) |
| flakes += flaky |
| - for t in bad: |
| - # Known broken counts only when it ran and failed: one that no |
| - # longer runs at all (renamed, skipped) is red like any other. |
| - (still if (package, t) in known and t not in missing else broken).append(f"{package} {t}") |
| - for t in tests: |
| - if (package, t) in known and t not in bad: |
| - print(f"QUARANTINE BROKEN TEST PASSES {package} {t}: take its line out of {QUARANTINE}", flush=True) |
| - print(f"quarantine: {len(flakes)} flaked (passed on the retry), {len(broken)} failed, " |
| - f"{len(still)} known broken failed as recorded", flush=True) |
| + broken += bad |
| + print(f"quarantine: {len(flakes)} flaked (passed on the retry), {len(broken)} failed", flush=True) |
| for t in flakes: |
| print(f"quarantine flake: {t}") |
| - for t in still: |
| - print(f"QUARANTINE BROKEN {t}: fails, as its line in {QUARANTINE} records; not counted") |
| return 1 if broken else 0 |
diff --git a/scripts/runner-reference-allowlist.json b/scripts/runner-reference-allowlist.json| index dfadfc85..08a1c17e 100644 |
| --- a/scripts/runner-reference-allowlist.json |
| +++ b/scripts/runner-reference-allowlist.json |
| @@ -5270,20 +5270,6 @@ |
| "count": 1, |
| "reason": "Regression test fixture or assertion; no production legacy dependency." |
| }, |
| - { |
| - "path": "internal/equipotest/browser_test.go", |
| - "line_sha256": "5a02c7956bb347c04eca1966e5a4f09b4884631c8d720004879e519a74cb7d01", |
| - "match": "node", |
| - "count": 1, |
| - "reason": "DOM element identity in browser tests, not a runtime dependency." |
| - }, |
| - { |
| - "path": "internal/equipotest/browser_test.go", |
| - "line_sha256": "247069bc5249ee46df7d5c01ce83adbbe7908d51a07bde5c04abde841e0af816", |
| - "match": "node", |
| - "count": 1, |
| - "reason": "DOM element identity in browser tests, not a runtime dependency." |
| - }, |
| { |
| "path": "internal/equipotest/connections_test.go", |
| "line_sha256": "4ed9e39a71b23c27465ea46c7bfea527af953dfcc68b2dfad0f5ade31491c8fe", |
| @@ -7965,13 +7951,6 @@ |
| "count": 1, |
| "reason": "Opt-in local end-to-end harness builds and runs the retained production runner executable in scratch storage." |
| }, |
| - { |
| - "path": "internal/equipotest/optimistic_browser_test.go", |
| - "line_sha256": "f5292f806516e2cc91a49573249aa237210f4035e88b419c1bb2e579e706070e", |
| - "match": "Node", |
| - "count": 1, |
| - "reason": "Browser DOM node operations in the optimistic chat implementation or its browser test; no external runtime." |
| - }, |
| { |
| "path": "docs/superpowers/plans/CONTROLLER-REPORT-e2e-coordinator.md", |
| "line_sha256": "012afb80e4abcdf1f01d242b8b6fae41764f17bbb27a861aab11138b8f733dba", |
| @@ -7979,13 +7958,6 @@ |
| "count": 1, |
| "reason": "Controller report references the retained runner service configuration; no execution authority." |
| }, |
| - { |
| - "path": "internal/equipotest/optimistic_browser_test.go", |
| - "line_sha256": "306c966eddd03b346567cda84dfc3c6de3c202b353dcec8c7fe78d5c9b9eff2c", |
| - "match": "Node", |
| - "count": 1, |
| - "reason": "Browser DOM node operations in optimistic chat or its tests; no external runtime." |
| - }, |
| { |
| "path": "internal/equipo/connections.go", |
| "line_sha256": "0f7f2e64554e8eb66d4706757a1dce1c7504a85054a31e27d47ebba139857614", |