From e65b7b9a38aa1c5fdc5d2cd0a0f0e93f9c76685c Mon Sep 17 00:00:00 2001 From: Dotta Date: Wed, 28 Oct 2026 16:14:53 -0500 Subject: [PATCH] test(tasks): reuse the saved startup reproduction without document writes Co-Authored-By: Paperclip --- .../2026-10-28-stable-task-anchor-loading.md | 6 +++--- tests/perf/issue-detail/compact-startup.spec.ts | 17 ++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/doc/plans/2026-10-28-stable-task-anchor-loading.md b/doc/plans/2026-10-28-stable-task-anchor-loading.md index 8f9eec4e465..2ea9901e466 100644 --- a/doc/plans/2026-10-28-stable-task-anchor-loading.md +++ b/doc/plans/2026-10-28-stable-task-anchor-loading.md @@ -23,13 +23,13 @@ visible cards after reveal, and thread height grew from 690 to 1,432 pixels. The first candidate keeps all 7 saved cards present and height constant. A second regression showed delayed PR counts changing card heights from 62 to 82 pixels; reserving that statistics line makes both states 82 pixels. -Focused UI tests: 551 pass before the added retention regression. Focused server tests: 16 pass. Token and map checks pass. -Eight initial browser checks, full workspace typecheck and build pass. Full local tests and hosted CI remain in progress. Review found that document navigation dropped a separately fetched older comment. The fix retains target comments in the observed compact window without advancing its cursor. Its added unit and browser checks pass, including row position. Hosted acceptance is recorded in PR #18092. One early candidate browser run exceeded the initial 5-second dev +Final focused UI tests: 552 pass. Focused server tests: 16 pass. Token and map checks pass. +All nine browser checks, full workspace typecheck and build pass. The full local suite was stopped after about 15 minutes in the serialized server lane; it is not a full local pass. Hosted CI supplies whole-suite acceptance. Review found that document navigation dropped a separately fetched older comment. The fix retains target comments in the observed compact window without advancing its cursor. Its added unit and browser checks pass, including row position. Hosted acceptance is recorded in PR #18092. One early candidate browser run exceeded the initial 5-second dev readiness deadline; later runs use 10 seconds. No reliable latency gain is claimed. The initial 503 linked-comment fixture exercised the app's global reconnect and 30-second retry policy. The target-specific failure check uses a terminal 404. -Local reproduction: http://127.0.0.1:3223/TAS/issues/TAS-1#document-investigation. +Local reproduction: http://127.0.0.1:3223/TASAAAAA/issues/TASAAAAA-1#document-investigation. Synthetic task data only; no live provider execution. Restart with `PAPERCLIP_HOME=/tmp/paperclip-stable-task-loading PAPERCLIP_INSTANCE_ID=task-loading PAPERCLIP_UI_DEV_MIDDLEWARE=true node cli/node_modules/tsx/dist/cli.mjs cli/src/index.ts run`. Evidence is retained under `/tmp/task-loading-proof/`; the generated report is also attached to the disposable local instance. The canonical PR is https://github.com/paperclipai/paperclip/pull/18092. diff --git a/tests/perf/issue-detail/compact-startup.spec.ts b/tests/perf/issue-detail/compact-startup.spec.ts index b0adef1926d..d9b2c34fee8 100644 --- a/tests/perf/issue-detail/compact-startup.spec.ts +++ b/tests/perf/issue-detail/compact-startup.spec.ts @@ -8,15 +8,14 @@ test.use({ video: "on", trace: "retain-on-failure", serviceWorkers: "block", vie let fixture: { id: string; identifier: string; prefix: string; oldestCommentId: string }; const fixturePath = path.resolve("test-results/compact-startup-fixture.json"); test.beforeAll(async ({ request }) => { - try { - const saved = JSON.parse(await fs.readFile(fixturePath, "utf8")); - if ((await request.get(`/api/issues/${saved.id}`)).ok()) { - fixture = saved; - const summary = await request.put(`/api/issues/${fixture.id}/documents/continuation-summary`, { data: { title: "Continuation summary", format: "markdown", body: "# Continuation summary\n\nSaved handoff evidence." } }); - expect(summary.ok()).toBeTruthy(); - return; - } - } catch { /* A fresh local instance needs its own synthetic task. */ } + const saved = await fs.readFile(fixturePath, "utf8").then(text => JSON.parse(text)).catch(() => null); + if (saved) { + const existing = await request.get(`/api/issues/${saved.id}`); + if (existing.ok()) { fixture = saved; return; } + // A different disposable instance needs a new fixture. Server failures + // must fail the test rather than silently creating another company. + expect(existing.status(), await existing.text()).toBe(404); + } const company = await (await request.post("/api/companies", { data: { name: "Task loading reproduction" } })).json(); const response = await request.post(`/api/companies/${company.id}/issues`, { data: { title: "Review the latest investigation", status: "backlog", description: "Investigate the latest reported pattern and keep the saved evidence together.",