From 6d5541b109504cd6c87343f1c5d6327f2b7b9574 Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Tue, 24 Nov 2026 16:34:32 -0600 Subject: [PATCH 1/4] fix(e2e): observe scheduled native retries before grading tasks (#22826) ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Product journeys observe native tasks until their useful result is complete. > - A native session can time out while the server schedules an exact-session retry. > - The run status is temporarily failed while its retry remains scheduled. > - The observer currently grades that temporary state as a final failure. > - This pull request keeps observing a bound scheduled retry within the original deadline. > - The benefit is a grade based on the completed task, with terminal failures and work limits preserved. ## Linked Issues or Issue Description **What happened?** A build-and-revise task prepared its ZIP, then hit a five-minute native session timeout. The API reported agent-owned exact-session recovery on the same run with one of three attempts used and a retry scheduled before the campaign deadline. The journey raised `agent_run_failed` before that retry could occur. **Expected behavior** Observe a proven scheduled retry on the same run within the original deadline. Require a later successful run and the existing independent artifact checks. A pending retry cannot pass the journey. **Steps to reproduce** Run the new agent-recovery regression against the previous observer. A realistic failed native run with a scheduled retry fails immediately. The corrected observer sees the same run succeed and still fails terminal, exhausted, foreign and late recovery states. **Paperclip version or commit** Reproduced from 28aa32e7d7ba72d8f83c03ffd45625c096813e6b. Affected source files were unchanged on current master before publication. The documentation incorporates current master changes. **Deployment mode** Credential-free task-observer calibration on Linux. The observed hosted failure supplied the original diagnosis. No full-stack staging recovery pass is claimed. ## What Changed - Pass the original campaign deadline to agent task validation. - Reuse the existing native recovery predicate after company, task, agent, environment and model checks. - Accept older API projections that omit a successor when no successor exists. Continue to reject an actual successor. - Require succeeded or explicitly checked cancelled runs for settlement. Never settle a failed recovery snapshot. - Add controlled success, deadline and negative recovery tests. Preserve the original budgets and run limits. ## Verification - Red: three new recovery checks failed against the previous observer: premature terminal grading, premature settlement and the wrong deadline failure. - Green: 194 tests pass across agent-recovery, agent-evidence and onboarding-first-task. - Local test-project typecheck could not complete: the host killed the compiler with SIGKILL. `pnpm verify --explain` could not select checks because the managed Git storage guard rejects `git ls-files`. Neither attempt is a pass. - Review follow-up at `b2957a3112df1cbcce80bba441cc0415bed1f86c`: the shared task read now waits for pending recovery before it reaches any consumer. This covers Plan revision, Plan approval, protected-action decisions, replies and artifact reads. Four journey regression checks fail before this gate and pass after it. All 202 focused recovery, agent-evidence, onboarding and Plan checks pass. Fresh CI and review on this head are pending. No new paid test, protected pin update or staging deployment was made. ## Risks - Waiting requires an explicit native retry projection, a matching cause, agent ownership, remaining attempts and a retry time inside the existing deadline. Other failures still stop immediately. - Older projections omit the optional successor field. The compatibility change accepts only null or absent values. - No provider timeout or runtime recovery policy changes. A full authorized staging run must still prove acceptance. ## Model Used OpenAI GPT-6 through Codex, with reasoning, source editing, shell tools and Chromium. The runtime does not expose a more specific model revision. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip Co-authored-by: Claude Opus 5.5 --- tests/runner-e2e/PRODUCT-JOURNEYS.md | 14 +++ .../product-journeys/agent-flows.ts | 27 ++++-- .../agent-recovery-decisions.test.ts | 96 +++++++++++++++++++ .../product-journeys/agent-recovery.test.ts | 75 +++++++++++++++ .../onboarding-first-task.test.ts | 7 +- .../product-journeys/workspace-deferral.ts | 4 +- .../runner-e2e/source-sdk-public-inputs.json | 4 +- 7 files changed, 214 insertions(+), 13 deletions(-) create mode 100644 tests/runner-e2e/product-journeys/agent-recovery-decisions.test.ts create mode 100644 tests/runner-e2e/product-journeys/agent-recovery.test.ts diff --git a/tests/runner-e2e/PRODUCT-JOURNEYS.md b/tests/runner-e2e/PRODUCT-JOURNEYS.md index 6eec3cd43b6..30858434c29 100644 --- a/tests/runner-e2e/PRODUCT-JOURNEYS.md +++ b/tests/runner-e2e/PRODUCT-JOURNEYS.md @@ -557,3 +557,17 @@ retains the five allowlisted task observations. The adjacent Valid, wrong and missing evidence controls calibrate the independent oracle. Registration and local checks do not claim a Cloud staging pass or admission to a daily plan. + + +Agent task journeys keep observing an exact native-session retry when the API +reports a retryable failure, agent-owned recovery, remaining attempts and a retry +time inside the original campaign deadline. Older projections can omit the +optional successor field when there is no successor. The same run must later +succeed; the temporary failed state never counts as completion. Terminal, +unbound, exhausted and out-of-deadline failures still fail immediately. The +original run limit, budgets, deadline and artifact checks stay in effect. + +The recovery wait gates the shared task snapshot before it reaches any journey +consumer. Plan revision, Plan approval and protected-action decisions cannot use +a pending card while its producing run is still recovering. A recovery that +outlives the original campaign deadline fails without making a decision. diff --git a/tests/runner-e2e/product-journeys/agent-flows.ts b/tests/runner-e2e/product-journeys/agent-flows.ts index c1883704e67..48487f4b78c 100644 --- a/tests/runner-e2e/product-journeys/agent-flows.ts +++ b/tests/runner-e2e/product-journeys/agent-flows.ts @@ -19,6 +19,8 @@ import { createTaskThroughUi, submitTaskReply } from "../user-actions.js"; import { agentJourneyRuns } from "./catalog.js"; import { JourneyError, type JourneyContext, type JourneyEvidence, type TargetSession } from "./types.js"; +import { isPendingNativeRecovery } from "./workspace-deferral.js"; + type Row = Record; type AgentJourney = Exclude; interface TaskState { currentIssue: Row & { id: string; status: string }; taskRuns: Array; comments: Row[]; interactions: Array; attachments: StoryDelivery[] } interface Options { deadlineAt: number; directory: string; capture(id: string, label: string, file: string): Promise } -const active = (run: Row) => ["queued", "running"].includes(run.status); +const ACTIVE_RUN_STATUSES = ["queued", "running"]; +const SETTLED_RUN_STATUSES = ["succeeded", "cancelled"]; +const active = (run: Row) => ACTIVE_RUN_STATUSES.includes(run.status); +const settledRun = (run: Row) => SETTLED_RUN_STATUSES.includes(run.status); /** These fixture replies are plain text. The rich editor escapes underscores in * its persisted Markdown; compare the intended text while retaining exact count @@ -59,14 +64,15 @@ export function startedTaskRuns(state: Pick) { return state.taskRuns.filter(run => !retiredBeforeProviderStart(run)); } -/** The task is done after exactly `count` started runs, with nothing active or pending. */ +/** The task is done after exactly `count` started runs, and every run finished as succeeded or cancelled: + * an active run, or a failed run still waiting for its scheduled same-run retry, is not settled. */ export function agentTaskSettled(state: TaskState, count: number) { - return state.currentIssue.status === "done" && startedTaskRuns(state).length === count && state.taskRuns.every(run => !active(run)) + return state.currentIssue.status === "done" && startedTaskRuns(state).length === count && state.taskRuns.every(settledRun) && state.interactions.every(row => row.status !== "pending"); } /** Owned-task observations only: other work in a persistent QA company cannot affect this grade. */ -export function validateAgentTaskState(context: JourneyContext, issueId: string, state: TaskState, maxRuns: number, allowedCancelled: string[] = []) { +export function validateAgentTaskState(context: JourneyContext, issueId: string, state: TaskState, maxRuns: number, allowedCancelled: string[] = [], deadlineAt?: number) { const agent = context.agent!; if (state.currentIssue.id !== issueId || state.currentIssue.companyId !== context.company.id || state.currentIssue.assigneeAgentId !== agent.id || state.taskRuns.length > maxRuns) throw new JourneyError("failed", "agent_task_binding_mismatch"); @@ -78,7 +84,10 @@ export function validateAgentTaskState(context: JourneyContext, issueId: string, if (retiredBeforeProviderStart(run)) continue; if (!active(run) && (run.runtimeMode !== "native" || run.contextSnapshot?.paperclipEnvironment?.id !== context.environmentId || provider?.kind !== agent.provider || provider?.model !== agent.model)) throw new JourneyError("failed", "agent_run_binding_mismatch"); - if (!["queued", "running", "succeeded"].includes(run.status) && !(run.status === "cancelled" && allowedCancelled.includes(run.id))) throw new JourneyError("failed", "agent_run_failed"); + // A projected exact-session retry is still work in progress. Keep observing + // the same run under the original campaign deadline and run limit. + if (deadlineAt !== undefined && isPendingNativeRecovery(run, deadlineAt)) continue; + if (!active(run) && run.status !== "succeeded" && !(run.status === "cancelled" && allowedCancelled.includes(run.id))) throw new JourneyError("failed", "agent_run_failed"); } } @@ -114,7 +123,7 @@ export async function runAgentJourney(id: AgentJourney, context: JourneyContext, await session.own({ kind: "issue", name: title, id: created.issueId, journeyId: id }); return context.api.get(`/api/issues/${created.issueId}`); }; - const read = async (issue: Row): Promise => { + const read = async (issue: Row): Promise => waitFor(options.deadlineAt, async () => { const route = `/api/issues/${issue.id}`; const [currentIssue, summaries, comments, interactions, attachments] = await Promise.all([ context.api.get(route), context.api.get(`${route}/runs`), context.api.get(`${route}/comments?order=asc`), @@ -124,9 +133,11 @@ export async function runAgentJourney(id: AgentJourney, context: JourneyContext, const taskRuns = await Promise.all(summaries.map(summary => context.api.get(`/api/heartbeat-runs/${summary.runId}`))); const state = { currentIssue, taskRuns, comments, interactions, attachments }; await retain(`${issue.id}-latest.json`, state); - validateAgentTaskState(context, issue.id, state, maxRuns, cancelled); + validateAgentTaskState(context, issue.id, state, maxRuns, cancelled, options.deadlineAt); return state; - }; + // No consumer may act on a card, reply or artifact produced by an unsettled + // retry. Gate the shared read so Plan and protected-action waits stay safe too. + }, state => !state.taskRuns.some(run => isPendingNativeRecovery(run, options.deadlineAt)), "agent_recovery_not_completed"); const settled = (issue: Row, count: number) => waitFor(options.deadlineAt, () => read(issue), state => agentTaskSettled(state, count), "agent_task_not_completed"); const finalReply = async (issue: Row, state: TaskState, marker?: string) => { diff --git a/tests/runner-e2e/product-journeys/agent-recovery-decisions.test.ts b/tests/runner-e2e/product-journeys/agent-recovery-decisions.test.ts new file mode 100644 index 00000000000..205aed74ada --- /dev/null +++ b/tests/runner-e2e/product-journeys/agent-recovery-decisions.test.ts @@ -0,0 +1,96 @@ +import { mkdtemp, rm } from "node:fs/promises"; +import os from "node:os"; +import path from "node:path"; +import { afterEach, expect, it, vi } from "vitest"; +import { runAgentJourney } from "./agent-flows.js"; +import { runnerTasks } from "../catalog.js"; +import { createTaskThroughUi } from "../user-actions.js"; +import { decideProtectedActionThroughUi } from "../protected-action-flow.js"; +import type { JourneyContext, JourneyEvidence, TargetSession } from "./types.js"; + +vi.mock("../user-actions.js", async importOriginal => ({ ...await importOriginal(), createTaskThroughUi: vi.fn() })); +vi.mock("../protected-action-flow.js", async importOriginal => ({ ...await importOriginal(), decideProtectedActionThroughUi: vi.fn() })); +vi.mock("@playwright/test", () => ({ expect: () => ({ toBeVisible: async () => {}, toHaveAttribute: async () => {} }) })); +type Row = Record; +const directories: string[] = []; +afterEach(async () => { + vi.clearAllMocks(); + await Promise.all(directories.splice(0).map(directory => rm(directory, { recursive: true, force: true }))); +}); + +async function fixture(journey: "plan-revise-accept" | "protected-actions", neverRecovers = false) { + const directory = await mkdtemp(path.join(os.tmpdir(), "agent-recovery-decision-")); directories.push(directory); + const campaign = "journey-fixture", deadlineAt = Date.now() + (neverRecovers ? 1_500 : 15_000); + const markers = runnerTasks.find(row => row.id === "plan-revise-accept")!.buildPlanMarkers!(campaign.replaceAll("-", "_")); + const now = Date.now(); + let stage = 1, rejects = 0; + const reads = new Map(), decisions: number[] = []; + const stop = new Error("stop-after-proven-decision"); + const issue = { id: "task", identifier: "QA-1", companyId: "company", assigneeAgentId: "agent", status: "in_progress" }; + const recovering = () => neverRecovers || (reads.get(stage) ?? 0) < 3; + const pending = () => ({ id: `card-${stage}`, status: "pending", kind: "request_confirmation", + payload: { target: { type: "issue_document", key: "plan", revisionId: `revision-${stage}` } } }); + const run = (n: number) => ({ id: `run-${n}`, issueId: "task", nativeIssueId: "task", companyId: "company", agentId: "agent", + runtimeMode: "native", status: n === stage && recovering() ? "failed" : "succeeded", + nativePhase: n === stage && recovering() ? "retryable_failure" : "committed", errorCode: "native_session_interrupted", + finishedAt: new Date(now - 1_000).toISOString(), contextSnapshot: { issueId: "task", paperclipEnvironment: { id: "environment" } }, + runnerProfileJson: { nativeExecutionInput: { provider: { kind: "opencode", model: "model" } } }, + execution: { phase: "retry_scheduled", cause: "native_session_interrupted", attempt: 1, maxAttempts: 3, + recoveryOwner: "agent", retryAt: new Date(now + 1_000).toISOString() } }); + const api = { origin: "https://qa.example.test", get: vi.fn(async (route: string) => { + if (route === "/api/issues/task") return { ...issue }; + if (route === "/api/issues/task/runs") return Array.from({ length: stage }, (_, i) => ({ runId: `run-${i + 1}` })); + const match = /^\/api\/heartbeat-runs\/run-(\d+)$/.exec(route); + if (match) { + const n = Number(match[1]); + if (n === stage) reads.set(stage, (reads.get(stage) ?? 0) + 1); + return run(n); + } + if (route === "/api/issues/task/interactions") return [pending()]; + if (route === "/api/issues/task/comments?order=asc" || route === "/api/issues/task/attachments") return []; + if (route === "/api/tool-connections/service") return { id: "service", enabled: true }; + if (route === "/api/issues/task/documents/plan") { + expect(recovering(), "must not read the decision's Plan while its producing turn recovers").toBe(false); + return { id: "plan", key: "plan", latestRevisionId: `revision-${stage}`, latestRevisionNumber: stage, + body: stage === 1 ? `1. ${markers.draft}\n2. Check it` : `1. ${markers.revised}\n2. Check it\n3. Finish` }; + } + throw new Error(`Unexpected read ${route}`); + }) }; + const locator: Row = { last() { return this; }, first() { return this; }, getByTestId() { return this; }, locator() { return this; }, fill: async () => {} }; + const page = { goto: async () => {}, reload: async () => {}, locator: () => locator, getByTestId: () => locator, + getByRole: (_role: string, options: { name: string }) => ({ last() { return this; }, click: async () => { + expect(recovering(), "a human decision must wait for the producing native turn").toBe(false); + if (options.name === "Reject") { if (++rejects === 2) stage = 2; } + else { decisions.push(stage); throw stop; } + } }) }; + vi.mocked(createTaskThroughUi).mockResolvedValue({ issueId: "task" } as any); + vi.mocked(decideProtectedActionThroughUi).mockImplementation(async () => { + expect(recovering(), "protected approval must wait for the producing turn").toBe(false); + decisions.push(stage); throw stop; + }); + const context = { api, page, company: { id: "company", issuePrefix: "QA" }, user: { id: "user" }, environmentId: "environment", + agent: { id: "agent", name: "QA agent", provider: "opencode", model: "model", runtimeMode: "native" }, + fixtures: { reviewService: { id: "service", name: "Review", connectionId: "service", invocationCount: () => 0 } } } as unknown as JourneyContext; + return { api, reads, decisions, stop, execute: () => runAgentJourney(journey, context, { own: async () => {} } as unknown as TargetSession, + campaign, { checks: [] } as unknown as JourneyEvidence, { directory, deadlineAt, capture: async () => {} }) }; +} + +it("waits through both draft and revised Plan recovery before requesting changes or approving", async () => { + const f = await fixture("plan-revise-accept"); + await expect(f.execute()).rejects.toBe(f.stop); + expect([...f.reads.entries()]).toEqual([[1, 3], [2, 3]]); + expect(f.decisions).toEqual([2]); +}); +it("waits through pending protected-action recovery before making its first decision", async () => { + const f = await fixture("protected-actions"); + await expect(f.execute()).rejects.toBe(f.stop); + expect(f.reads.get(1)).toBe(3); + expect(f.decisions).toEqual([1]); +}); +it.each(["plan-revise-accept", "protected-actions"] as const)("does not decide %s when recovery outlives the original deadline", async journey => { + const f = await fixture(journey, true); + await expect(f.execute()).rejects.toMatchObject({ code: "agent_recovery_not_completed" }); + expect(f.decisions).toEqual([]); + expect(f.api.get.mock.calls.some(([route]) => route.endsWith("/documents/plan"))).toBe(false); + expect(decideProtectedActionThroughUi).not.toHaveBeenCalled(); +}); diff --git a/tests/runner-e2e/product-journeys/agent-recovery.test.ts b/tests/runner-e2e/product-journeys/agent-recovery.test.ts new file mode 100644 index 00000000000..634f3361e13 --- /dev/null +++ b/tests/runner-e2e/product-journeys/agent-recovery.test.ts @@ -0,0 +1,75 @@ +import { afterEach, expect, it, vi } from "vitest"; +import { agentTaskSettled, validateAgentTaskState, waitFor } from "./agent-flows.js"; +import type { JourneyContext } from "./types.js"; + +type Row = Record; +const context = { company: { id: "company" }, environmentId: "environment", + agent: { id: "agent", provider: "opencode", model: "model", runtimeMode: "native" } } as JourneyContext; +function snapshot() { + const now = Date.now(); + const run: Row & { status: string } = { id: "run", companyId: "company", agentId: "agent", issueId: "task", nativeIssueId: "task", + runtimeMode: "native", status: "failed", nativePhase: "retryable_failure", errorCode: "native_session_interrupted", + finishedAt: new Date(now - 1_000).toISOString(), contextSnapshot: { issueId: "task", paperclipEnvironment: { id: "environment" } }, + runnerProfileJson: { nativeExecutionInput: { provider: { kind: "opencode", model: "model" } } }, + execution: { phase: "retry_scheduled", cause: "native_session_interrupted", attempt: 1, maxAttempts: 3, + recoveryOwner: "agent", retryAt: new Date(now + 1_000).toISOString() } }; + return { currentIssue: { id: "task", companyId: "company", assigneeAgentId: "agent", status: "in_progress" }, + taskRuns: [run], comments: [], interactions: [], attachments: [] }; +} +afterEach(() => vi.useRealTimers()); + +it("observes a scheduled exact-run recovery through success within the original deadline and run limit", async () => { + vi.useFakeTimers(); + const state = snapshot(), deadline = Date.now() + 5_000; + const pending = waitFor(deadline, async () => { + validateAgentTaskState(context, "task", state, 1, [], deadline); + return state; + }, value => agentTaskSettled(value, 1), "agent_task_not_completed"); + const assertion = expect(pending).resolves.toBe(state); + await vi.advanceTimersByTimeAsync(1_000); + state.taskRuns[0]!.status = "succeeded"; + state.taskRuns[0]!.nativePhase = "committed"; + state.currentIssue.status = "done"; + await vi.advanceTimersByTimeAsync(1_000); + await assertion; + expect(state.taskRuns.map(run => run.id)).toEqual(["run"]); +}); + +it.each([ + ["terminal phase", (run: Row) => { run.nativePhase = "terminal_failure"; }], + ["terminal cause", (run: Row) => { run.errorCode = run.execution.cause = "native_provider_terminal_failed"; }], + ["no retry owner", (run: Row) => { run.execution.recoveryOwner = "board"; }], + ["exhausted retry", (run: Row) => { run.execution.attempt = 3; }], + ["late retry", (run: Row) => { run.execution.retryAt = new Date(Date.now() + 6_000).toISOString(); }], + ["different successor", (run: Row) => { run.execution.successorRunId = "other-run"; }], + ["foreign model", (run: Row) => { run.runnerProfileJson.nativeExecutionInput.provider.model = "other"; }], + ["foreign task", (run: Row) => { run.nativeIssueId = "other"; }], +] as const)("keeps %s fatal", (_label, change) => { + const state = snapshot(); change(state.taskRuns[0]!); + expect(() => validateAgentTaskState(context, "task", state, 1, [], Date.now() + 5_000)).toThrow(); +}); + +it("never counts a pending recovery as settled even if the task snapshot says done", () => { + const state = snapshot(); state.currentIssue.status = "done"; + expect(agentTaskSettled(state, 1)).toBe(false); +}); + +it("keeps the original campaign deadline when recovery never completes", async () => { + vi.useFakeTimers(); + const state = snapshot(), deadline = Date.now() + 2_000; + const pending = waitFor(deadline, async () => { + validateAgentTaskState(context, "task", state, 1, [], deadline); + return state; + }, value => agentTaskSettled(value, 1), "agent_task_not_completed"); + const assertion = expect(pending).rejects.toMatchObject({ code: "agent_task_not_completed" }); + await vi.advanceTimersByTimeAsync(2_000); + await assertion; +}); + + +it.each([null, undefined])("accepts an explicitly scheduled same-run retry with successor %s", successor => { + const state = snapshot(); state.taskRuns[0]!.execution.successorRunId = successor; + expect(() => validateAgentTaskState(context, "task", state, 1, [], Date.now() + 5_000)).not.toThrow(); + expect(() => validateAgentTaskState(context, "task", state, 1)).toThrow("agent_run_failed"); + expect(() => validateAgentTaskState(context, "task", state, 0, [], Date.now() + 5_000)).toThrow("agent_task_binding_mismatch"); +}); diff --git a/tests/runner-e2e/product-journeys/onboarding-first-task.test.ts b/tests/runner-e2e/product-journeys/onboarding-first-task.test.ts index 15b9f30007e..a5917bb3f21 100644 --- a/tests/runner-e2e/product-journeys/onboarding-first-task.test.ts +++ b/tests/runner-e2e/product-journeys/onboarding-first-task.test.ts @@ -292,7 +292,7 @@ describe("Cloud canonical onboarding first task", () => { await expect(onboardingFirstTask(f.input)).resolves.toMatchObject({ artifact: { originatingRunId: "child-run" } }); expect(connectionDelay).toHaveBeenCalledOnce(); }); - it.each(["active", "native-recovery", "workspace-replacement"])("waits past an old child blocker while %s remains pending", async mode => { + it.each(["active", "native-recovery", "native-recovery-without-successor-field", "workspace-replacement"])("waits past an old child blocker while %s remains pending", async mode => { let waiting = true; const now = Date.now(); vi.mocked(connectionDelay).mockImplementation(async () => { waiting = false; }); @@ -306,6 +306,10 @@ describe("Cloud canonical onboarding first task", () => { withBoardBlockedChild(state); if (mode === "active") Object.assign(state.runs[1]!, { status: "running", finishedAt: null }); if (mode === "native-recovery") withPendingNativeRecovery(state.runs[1]!, now - 1000, now + 30_000); + if (mode === "native-recovery-without-successor-field") { + withPendingNativeRecovery(state.runs[1]!, now - 1000, now + 30_000); + delete state.runs[1]!.execution.successorRunId; + } } }); await expect(onboardingFirstTask(f.input)).resolves.toMatchObject({ artifact: { originatingRunId: "child-run" } }); expect(connectionDelay).toHaveBeenCalledOnce(); @@ -448,7 +452,6 @@ describe("Cloud canonical onboarding first task", () => { ["noninteger attempt", (run: Row) => { run.execution.attempt = 1.5; }], ["unexpected ceiling", (run: Row) => { run.execution.maxAttempts = 4; }], ["different successor", (run: Row) => { run.execution.successorRunId = "other-run"; }], - ["missing successor state", (run: Row) => { delete run.execution.successorRunId; }], ] as const)("keeps a failed native run fatal with %s", async (_label, change) => { const now = Date.now(); vi.spyOn(Date, "now").mockReturnValue(now); diff --git a/tests/runner-e2e/product-journeys/workspace-deferral.ts b/tests/runner-e2e/product-journeys/workspace-deferral.ts index 9146cb87e17..ea925d4fa9e 100644 --- a/tests/runner-e2e/product-journeys/workspace-deferral.ts +++ b/tests/runner-e2e/product-journeys/workspace-deferral.ts @@ -27,6 +27,8 @@ export function isPendingNativeRecovery(run: RecordValue, deadlineAt: number): b const execution = object(run.execution); const finishedAt = typeof run.finishedAt === "string" ? Date.parse(run.finishedAt) : NaN; const retryAt = typeof execution.retryAt === "string" ? Date.parse(execution.retryAt) : NaN; + // Older deployed projections omit the optional successor field when there + // is no successor. Both forms preserve the exact same-run retry contract. return run.runtimeMode === "native" && run.status === "failed" && run.nativePhase === "retryable_failure" && typeof run.errorCode === "string" && run.errorCode.trim().length > 0 && execution.cause === run.errorCode && !nativeRecoveryTerminalCauses.has(run.errorCode) && @@ -34,7 +36,7 @@ export function isPendingNativeRecovery(run: RecordValue, deadlineAt: number): b (run.issueId == null || run.issueId === run.nativeIssueId) && (execution.phase === "retry_scheduled" || execution.phase === "reconnecting") && execution.recoveryOwner === "agent" && Number.isInteger(execution.attempt) && Number(execution.attempt) >= 1 && - execution.maxAttempts === 3 && Number(execution.attempt) < execution.maxAttempts && execution.successorRunId === null && + execution.maxAttempts === 3 && Number(execution.attempt) < execution.maxAttempts && execution.successorRunId == null && Number.isFinite(finishedAt) && Number.isFinite(retryAt) && Number.isFinite(deadlineAt) && retryAt > finishedAt && retryAt <= deadlineAt; } diff --git a/tests/runner-e2e/source-sdk-public-inputs.json b/tests/runner-e2e/source-sdk-public-inputs.json index 75d6e3bac23..71d4e53fcff 100644 --- a/tests/runner-e2e/source-sdk-public-inputs.json +++ b/tests/runner-e2e/source-sdk-public-inputs.json @@ -479,8 +479,8 @@ "packages/shared/src/validators/adapter-registry.ts": "6fb9f655d49f774ef7f082bf842f388f1187e545", "packages/shared/src/validators/adapter-skills.ts": "ae43f7b180f632d5f54dfa821b8dc5ef6c6aa53d", "packages/shared/src/validators/agent-commentary.ts": "8242c5b28a77131aefdc00c873ad84c6c6736e4b", - "packages/shared/src/validators/agent.test.ts": "d38767b0c1fc1439871855ed55dca3c8c7b645c6", - "packages/shared/src/validators/agent.ts": "13ba04317b11c4281b7a2133a34630b4ad446dfd", + "packages/shared/src/validators/agent.test.ts": "b15ce4e96097e807de7e52ca174139dd51e0d9c9", + "packages/shared/src/validators/agent.ts": "c6c4e351e64cc668e67ad7489f93cfcb4506ba6a", "packages/shared/src/validators/app-definition.ts": "87a60e50f386c8f836d1c5a1576b75a50bc719a2", "packages/shared/src/validators/approval.test.ts": "051d29b27400fdd1e311466587b276264cf072e4", "packages/shared/src/validators/approval.ts": "b8fd4da39568e3b70b767266196ea5303efeef25", From de4b60fc54f902024d5683f2872560ecee678cdd Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Tue, 24 Nov 2026 16:39:22 -0600 Subject: [PATCH 2/4] refactor(test): prune 28 completed migration, prose-grep, and Storybook fixture tests (#22832) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Over recent sprints, the test suite accumulated completed one-time SQL migration backfill tests, brittle static prose-matching guidance tests, and non-production Storybook fixture/prototype/feasibility-probe tests that add compile and CI maintenance cost without testing live behavioral invariants. > - Core database migration guards, active runtime migration services, security/safety static guards, and active adapter suites must stay intact. > - This pull request deletes 28 audited low-value test files (-1,894 LOC), preserves the one genuine schema validation assertion from `chat-communication-guidance.test.ts` inside `packages/shared/src/validators/chat-channels.test.ts`, prunes the 5 deleted server test keys from `scripts/general-server-shard-durations.json`, and refreshes `tests/runner-e2e/source-sdk-public-inputs.json`. > - The benefit is cleaner, higher-signal test coverage with zero lost invariants and synchronized SDK public source pins. ## Linked Issues or Issue Description Refs #22804 **What existing behavior does this improve?** Test suite signal-to-noise ratio and maintenance overhead across `packages/db`, `packages/shared`, `packages/skills-catalog`, `server`, `ui/storybook`, `scripts`, and `tests/speko-voice-proof`. **Subsystem affected** Cross-cutting (multiple of the above) **Current behavior** 28 test files test already-shipped one-time migrations/dead backfills, static markdown/copy wording, non-production Storybook fixtures/prototypes, or a superseded voice feasibility probe. **Proposed behavior** Remove the 28 low-value test files while preserving all core migration integrity suites, active runtime migration services, security static guards, live adapter suites, and the genuine `updateChatEndpointSchema` assertion. ## What Changed - **Completed one-time migrations & dead backfills (3 files deleted, 444 LOC):** - Deleted `packages/db/src/better-auth-account-issuer-migration.test.ts`, `packages/db/src/chat-telegram-draft-ids-migration.test.ts`, and `server/src/__tests__/tool-oauth-legacy-backfill.test.ts` (zero production callers outside barrel re-export). - Retained all core DB migration guards (`check-migration-safety`, `migration-compatibility`, `migration-snapshot-drift`, `check-pr-migration-order`) and active runtime migration/legacy-recovery services. - **Brittle static prose/wording grep tests (9 files deleted, 317 LOC):** - Deleted `packages/shared/src/connection-intent-guidance.test.ts`, `packages/shared/src/telemetry/readme-contract.test.ts`, `packages/skills-catalog/src/release-content-cases-contract.test.ts`, `server/src/__tests__/secret-entry-guidance.test.ts`, `server/src/__tests__/primary-agent-guidance.test.ts`, `server/src/services/chat-communication-guidance.test.ts`, `server/src/services/onboarding-greeting.test.ts`, `ui/src/lib/agent-onboarding-prompt.test.ts`, and `ui/src/lib/grok-bot-setup-prompt.test.ts`. - Moved the one genuine schema validation assertion (`updateChatEndpointSchema` `communicationInstructions`) into `packages/shared/src/validators/chat-channels.test.ts`. - Retained `cli-invocation-safety.test.ts` and all real security/auth/prompt-injection guards. - **Non-production Storybook fixture / prototype / feasibility-probe tests (16 files deleted, 1,182 LOC):** - Deleted 10 Storybook fixture/prototype/mock-API tests, 2 unreferenced Storybook audit script tests, and 4 superseded `tests/speko-voice-proof/*.test.mjs` feasibility probe tests. - **Manifest & SDK pin hygiene:** - Pruned the 5 deleted server test keys and reconciled coverage counts in `scripts/general-server-shard-durations.json`. - Synced `tests/runner-e2e/source-sdk-public-inputs.json` via `node tests/runner-e2e/source-sdk-public-inputs.mjs --write` (0 files deleted under `tests/runner-e2e/`). ## Verification - `node scripts/check-maps.mjs` — **PASS** (35 areas, 192 capabilities aligned) - `node scripts/check-test-budget.mjs --base origin/master` — **PASS** (588 nightly suites validated) - `pnpm exec vitest run` on retained suites (`chat-channels`, `telemetry`, `skills-catalog`, `check-migration-safety`, `migration-compatibility`, `migration-snapshot-drift`, `runner-api`) — **15/15 files, 2,532/2,532 PASS** - `node tests/runner-e2e/source-sdk-public-inputs.mjs $(git rev-parse HEAD) --check` and `vitest run --config tests/runner-e2e/vitest.config.ts tests/runner-e2e/source-sdk-public-inputs.test.mjs` — **PASS (13/13)** - `node --test scripts/typecheck-test-programs.test.mjs scripts/__tests__/ci-typecheck-lane.test.mjs scripts/__tests__/run-vitest-stable-shard.test.mjs scripts/storybook-catalog.test.mjs` — **103/103 PASS** - Typecheck (`@paperclipai/shared`, `@paperclipai/db` incl. `check:migrations`, `@paperclipai/skills-catalog`, `node scripts/ci-typecheck-lane.mjs --typecheck-ui`) — **PASS (0 errors)** ## Risks - Low risk: zero production code changed, zero core DB migration or auth/security guards removed, and zero dangling references across `maps/`, `scripts/`, `.github/`, or `tsconfig*.json`. ## Model Used - Google Gemini (Antigravity agent swarm) with extended reasoning, tool use, and local test execution (`typecheck-opt`, `verifier`, `ci-pipeline`). ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --- ...tter-auth-account-issuer-migration.test.ts | 19 -- .../src/connection-intent-guidance.test.ts | 23 -- .../src/telemetry/readme-contract.test.ts | 19 -- .../src/validators/chat-channels.test.ts | 12 + .../release-content-cases-contract.test.ts | 40 --- scripts/general-server-shard-durations.json | 10 +- scripts/storybook-button-usage.test.mjs | 25 -- scripts/storybook-muse-catalog.test.mjs | 68 ------ .../__tests__/primary-agent-guidance.test.ts | 56 ----- .../__tests__/secret-entry-guidance.test.ts | 37 --- .../chat-communication-guidance.test.ts | 55 ----- .../src/services/onboarding-greeting.test.ts | 39 --- .../runner-e2e/source-sdk-public-inputs.json | 4 +- tests/speko-voice-proof/cleanup.test.mjs | 149 ------------ .../speko-voice-proof/media-failure.test.mjs | 27 --- tests/speko-voice-proof/proof.test.mjs | 124 ---------- .../speko-voice-proof/summarize-run.test.mjs | 54 ----- .../ConnectionGuidanceFixtures.test.ts | 29 --- ui/src/lib/agent-onboarding-prompt.test.ts | 37 --- ui/src/lib/grok-bot-setup-prompt.test.ts | 18 -- .../fixtures/agent-avatar-url.test.ts | 28 --- ui/storybook/fixtures/onboardingDraft.test.ts | 72 ------ ui/storybook/fixtures/privateTasks.test.ts | 228 ------------------ .../fixtures/routineWebhookFields.test.tsx | 41 ---- .../google-workspace/ServiceConsent.test.ts | 35 --- .../support/capability-gaps/api.test.ts | 86 ------- .../swarm-activity/swarm-model.test.ts | 74 ------ .../fixture-api.test.tsx | 55 ----- .../skillSourceBranchSelection.test.ts | 24 -- 29 files changed, 16 insertions(+), 1472 deletions(-) delete mode 100644 packages/db/src/better-auth-account-issuer-migration.test.ts delete mode 100644 packages/shared/src/connection-intent-guidance.test.ts delete mode 100644 packages/shared/src/telemetry/readme-contract.test.ts delete mode 100644 packages/skills-catalog/src/release-content-cases-contract.test.ts delete mode 100644 scripts/storybook-button-usage.test.mjs delete mode 100644 scripts/storybook-muse-catalog.test.mjs delete mode 100644 server/src/__tests__/primary-agent-guidance.test.ts delete mode 100644 server/src/__tests__/secret-entry-guidance.test.ts delete mode 100644 server/src/services/chat-communication-guidance.test.ts delete mode 100644 server/src/services/onboarding-greeting.test.ts delete mode 100644 tests/speko-voice-proof/cleanup.test.mjs delete mode 100644 tests/speko-voice-proof/media-failure.test.mjs delete mode 100644 tests/speko-voice-proof/proof.test.mjs delete mode 100644 tests/speko-voice-proof/summarize-run.test.mjs delete mode 100644 ui/src/features/connections/ConnectionGuidanceFixtures.test.ts delete mode 100644 ui/src/lib/agent-onboarding-prompt.test.ts delete mode 100644 ui/src/lib/grok-bot-setup-prompt.test.ts delete mode 100644 ui/storybook/fixtures/agent-avatar-url.test.ts delete mode 100644 ui/storybook/fixtures/onboardingDraft.test.ts delete mode 100644 ui/storybook/fixtures/privateTasks.test.ts delete mode 100644 ui/storybook/fixtures/routineWebhookFields.test.tsx delete mode 100644 ui/storybook/prototypes/google-workspace/ServiceConsent.test.ts delete mode 100644 ui/storybook/support/capability-gaps/api.test.ts delete mode 100644 ui/storybook/support/design-proposals/swarm-activity/swarm-model.test.ts delete mode 100644 ui/storybook/support/github-bot-management/fixture-api.test.tsx delete mode 100644 ui/storybook/support/skillSourceBranchSelection.test.ts diff --git a/packages/db/src/better-auth-account-issuer-migration.test.ts b/packages/db/src/better-auth-account-issuer-migration.test.ts deleted file mode 100644 index 47466f37076..00000000000 --- a/packages/db/src/better-auth-account-issuer-migration.test.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { getTableConfig } from "drizzle-orm/pg-core"; -import { describe, expect, it } from "vitest"; -import { authAccounts } from "./schema/auth.js"; - -describe("account issuer schema", () => { - it("keeps issuer nullable and identifies accounts by provider and account ID", () => { - const config = getTableConfig(authAccounts); - const issuer = config.columns.find((column) => column.name === "issuer"); - expect(issuer).toBeDefined(); - expect(issuer?.notNull).toBe(false); - - const unique = config.indexes.find((index) => index.config.name === "account_provider_account_id_uq"); - expect(unique?.config.unique).toBe(true); - expect(unique?.config.columns.map((column) => (column as { name: string }).name)).toEqual([ - "provider_id", - "account_id", - ]); - }); -}); diff --git a/packages/shared/src/connection-intent-guidance.test.ts b/packages/shared/src/connection-intent-guidance.test.ts deleted file mode 100644 index ae89f72dff4..00000000000 --- a/packages/shared/src/connection-intent-guidance.test.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { CONNECTION_INTENT_AGENT_GUIDANCE, CONNECTION_REQUEST_TOOL_DESCRIPTION, CONNECTION_RUNTIME_TOOL_NAMES, CONNECTIONS_SEARCH_TOOL_DESCRIPTION } from "./connection-intent-guidance.js"; -describe("connection result guidance", () => { - it("delegates route decisions to trusted tool output instead of a provider decision tree", () => { - expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("follow the returned `instruction`"); - expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("Respect recorded declines and provider choices"); - expect(CONNECTION_INTENT_AGENT_GUIDANCE).not.toMatch(/Composio|Arcade|Executor|Zapier/); - expect(CONNECTION_INTENT_AGENT_GUIDANCE).not.toMatch(/https?:\/\/|bearer/); - }); - it("retains waiting, credential, and arbitrary URL boundaries", () => { - expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("yield without retrying or polling"); - expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("never ask for credentials in comments"); - expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("arbitrary MCP URLs"); - }); - it("binds a request card to the person it is addressed to", () => { - expect(CONNECTION_INTENT_AGENT_GUIDANCE).toContain("Only that person can complete or decline it"); - }); - it("describes exact questions and saved selection proof", () => { - expect(CONNECTIONS_SEARCH_TOOL_DESCRIPTION).toContain("exact providerQuestion"); - expect(CONNECTION_REQUEST_TOOL_DESCRIPTION).toContain("saved provider-selection interaction ID"); - expect(CONNECTION_RUNTIME_TOOL_NAMES).toEqual(["connections_search","connection_request"]); - }); -}); diff --git a/packages/shared/src/telemetry/readme-contract.test.ts b/packages/shared/src/telemetry/readme-contract.test.ts deleted file mode 100644 index eec9d4511dd..00000000000 --- a/packages/shared/src/telemetry/readme-contract.test.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { readFileSync } from "node:fs"; -import { fileURLToPath } from "node:url"; -import { describe, expect, it } from "vitest"; -import * as generatedTelemetry from "./generated/paperclip-telemetry.js"; - -const readmePath = fileURLToPath(new URL("./README.md", import.meta.url)); - -describe("telemetry README contract", () => { - it("documents generated event helper exports that exist", () => { - const readme = readFileSync(readmePath, "utf8"); - - expect(generatedTelemetry.SCHEMA_VERSION).toBeDefined(); - expect(generatedTelemetry.makeEvent).toBeTypeOf("function"); - expect(generatedTelemetry.makeBatch).toBeTypeOf("function"); - expect(readme).toContain("`SCHEMA_VERSION`, `makeEvent()`, and `makeBatch()`"); - expect(readme).not.toContain("createPaperclipTelemetryEvent"); - expect(readme).not.toContain("createPaperclipTelemetryEnvelope"); - }); -}); diff --git a/packages/shared/src/validators/chat-channels.test.ts b/packages/shared/src/validators/chat-channels.test.ts index eb157fcb001..4f58b4abfbc 100644 --- a/packages/shared/src/validators/chat-channels.test.ts +++ b/packages/shared/src/validators/chat-channels.test.ts @@ -5,6 +5,7 @@ import { resolveChatActionSchema, resolveChatPublicationSchema, chatPublicationStateSchema, + updateChatEndpointSchema, } from "./chat-channels.js"; describe("Microsoft Teams chat credential validation", () => { @@ -111,3 +112,14 @@ describe("chat provider-action resolution validation", () => { ); }); }); + +describe("chat endpoint communicationInstructions validation", () => { + it("accepts clearing instructions and rejects oversized instructions and unsupported controls", () => { + expect(updateChatEndpointSchema.parse({ communicationInstructions: " " })).toEqual({ + communicationInstructions: "", + }); + expect(updateChatEndpointSchema.safeParse({ communicationInstructions: "a".repeat(4001) }).success).toBe(false); + expect(updateChatEndpointSchema.safeParse({ replyDetail: "brief" }).success).toBe(false); + expect(updateChatEndpointSchema.safeParse({ progressUpdates: false }).success).toBe(false); + }); +}); diff --git a/packages/skills-catalog/src/release-content-cases-contract.test.ts b/packages/skills-catalog/src/release-content-cases-contract.test.ts deleted file mode 100644 index 64bd29a3372..00000000000 --- a/packages/skills-catalog/src/release-content-cases-contract.test.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { readFileSync } from "node:fs"; -import { describe, expect, it } from "vitest"; - -function readRepoFile(path: string) { - return readFileSync(new URL(`../../../${path}`, import.meta.url), "utf8"); -} - -describe("release-content Cases contract", () => { - it("keeps release-content skills wired to emit the required case tree", () => { - const release = readRepoFile(".agents/skills/release/SKILL.md"); - const changelog = readRepoFile(".agents/skills/release-changelog/SKILL.md"); - const discord = readRepoFile(".agents/skills/release-changelog-discord-message/SKILL.md"); - const announcement = readRepoFile("packages/skills-catalog/catalog/optional/content/release-announcement/SKILL.md"); - const combined = [release, changelog, discord, announcement].join("\n"); - - for (const required of [ - "\"caseType\": \"release\"", - "\"caseType\": \"blog_post\"", - "\"caseType\": \"tweet_storm\"", - "\"parentCaseId\"", - "PUT /api/cases/:caseId/documents/body", - "paperclip-release:vYYYY.MDD.P", - "X-Paperclip-Run-Id", - ]) { - expect(combined).toContain(required); - } - - expect(release).toContain("same three cases instead of duplicating them"); - expect(changelog).toContain("\"release_patch\": 0"); - expect(changelog).toContain("\"stable\": true"); - expect(changelog).toContain("\"channels\": [\"changelog\", \"blog_post\", \"tweet_storm\"]"); - expect(changelog).toContain("\"artifacts\""); - expect(changelog).toContain("\"verification\""); - expect(changelog).toContain("\"notes\": null"); - expect(announcement).toContain("\"word_count_target\": 650"); - expect(announcement).toContain("\"requires_screenshot\": false"); - expect(discord).toContain("\"needs_human_copy_paste\": true"); - expect(discord).toContain("\"approved_by\": null"); - }); -}); diff --git a/scripts/general-server-shard-durations.json b/scripts/general-server-shard-durations.json index e9b11bcf4fd..e5cf2d3d0ba 100644 --- a/scripts/general-server-shard-durations.json +++ b/scripts/general-server-shard-durations.json @@ -10,9 +10,9 @@ } ], "coverage": { - "measured": 1577, - "withSetup": 1577, - "inventory": 2142 + "measured": 1573, + "withSetup": 1573, + "inventory": 2138 }, "durations": { "server/scripts/build-config.test.mjs": 10828, @@ -900,7 +900,6 @@ "server/src/__tests__/prepared-chat-authorization.integration.test.ts": 7209, "server/src/__tests__/prepared-statements-driver.test.ts": 6901, "server/src/__tests__/prepared-statements.test.ts": 803, - "server/src/__tests__/primary-agent-guidance.test.ts": 4326, "server/src/__tests__/primary-agent.test.ts": 10405, "server/src/__tests__/principal-access-compatibility.test.ts": 3032, "server/src/__tests__/privacy-production-review.test.ts": 12611, @@ -1032,7 +1031,6 @@ "server/src/__tests__/scoped-deadline-work-notifications.test.ts": 2950, "server/src/__tests__/scoped-deadline-work.test.ts": 2998, "server/src/__tests__/secret-binding-discovery.test.ts": 2921, - "server/src/__tests__/secret-entry-guidance.test.ts": 3727, "server/src/__tests__/secret-provider-registry.test.ts": 917, "server/src/__tests__/secret-sensitive-request-error.test.ts": 6884, "server/src/__tests__/secrets-service-dangling-user-secret.test.ts": 8396, @@ -1453,7 +1451,6 @@ "server/src/services/chat-channels/slack/receipt-timing.test.ts": 940, "server/src/services/chat-channels/slack/signing-secret-preflight.test.ts": 7167, "server/src/services/chat-channels/slack/wake-authority.test.ts": 908, - "server/src/services/chat-communication-guidance.test.ts": 1886, "server/src/services/chat-control-admission-retry.test.ts": 5391, "server/src/services/chat-discord-adapter-patch.test.ts": 4770, "server/src/services/chat-discord-command-registration-store.test.ts": 7446, @@ -1969,7 +1966,6 @@ "server/src/services/object-run-log-store.test.ts": 9158, "server/src/services/offline-workspace-operation-reconciliation.test.ts": 8220, "server/src/services/onboarding-first-task-assets.test.ts": 2668, - "server/src/services/onboarding-greeting.test.ts": 1943, "server/src/services/online-durable-data-migration-postgres.test.ts": 9418, "server/src/services/online-durable-data-migration.test.ts": 8010, "server/src/services/online-legacy-workspace-recovery.test.ts": 6018, diff --git a/scripts/storybook-button-usage.test.mjs b/scripts/storybook-button-usage.test.mjs deleted file mode 100644 index d63699351be..00000000000 --- a/scripts/storybook-button-usage.test.mjs +++ /dev/null @@ -1,25 +0,0 @@ -import assert from "node:assert/strict"; -import test from "node:test"; -import { buttonReferences } from "./storybook-button-usage.mjs"; - -test("button usage follows canonical imports and aliases, excluding native and unrelated buttons", () => { - const entries = buttonReferences(` - import { Button as Action } from '@/components/ui/button'; - import * as UI from './ui/button'; - import { Button } from './OtherButton'; - export const View = () => <>