Preserve current onboarding smoke coverage before final review

Keep the complete owned patch and all three unrelated upstream test and map changes.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit 'c2163b3ecf08c1d574685504fd1271a301d7bd1d':
  test(release): verify paused onboarding setup records (#18102)
This commit is contained in:
DottaandPaperclip committed 2026-10-28 18:26:43 -05:00
commit 0886a0229b
3 files changed
+63 -14

No files matched your search

+8
View File
@@ -48,6 +48,14 @@ Preconditions: follow the [baseline](./README.md#before-driving-a-journey). Use
Automated: [wizard tests](../../ui/src/components/OnboardingWizard.test.tsx) cover mocked wizard behavior; [onboarding browser suite](../../tests/e2e/onboarding.spec.ts) supplies its own test environment. Live model execution is a separate check.
The [published canary smoke](../../tests/canary-onboarding/canary-onboarding.spec.ts)
checks the exact installed version through Connect a model. Submitting the agent
name must save one paused setup record with disabled heartbeats and no task or
run. The [authenticated release smoke](../../tests/release-smoke/docker-auth-onboarding.spec.ts)
checks the same held state, then completes that record through Connect without
creating a second agent. Its Docker harness mocks credential verification; live
provider authentication remains separate evidence.
- **Create company and resume.** Start a fresh empty instance and run doctor using
the [verification skill](../../.agents/skills/verify-paperclip/SKILL.md). Run
`node .agents/skills/verify-paperclip/scripts/onboarding-smoke.mjs --evidence-dir "$VERIFY_EVIDENCE_DIR"`.
@@ -82,20 +82,34 @@ test("the exact published canary installs and reaches Connect a model", async ({
await page.getByRole("button", { name: "Next", exact: true }).click();
await expect(page.getByRole("heading", { name: "Connect a model" })).toBeVisible();
// Stop before Connect: a public-repository gate must not require a Claude or
// Codex credential, and reaching this screen has not hired an agent or made
// a first task.
expect(
await getJson<Array<{ id: string }>>(
await expect.poll(
() => getJson<Array<{ id: string }>>(
page.request,
`/api/companies/${company!.id}/agents`,
),
).toEqual([]);
{ message: "Connect a model must retain one paused setup record" },
).toEqual([
expect.objectContaining({
name: agentName,
status: "paused",
pauseReason: "setup",
metadata: expect.objectContaining({ setupAdapterPending: true }),
runtimeConfig: expect.objectContaining({
heartbeat: expect.objectContaining({ enabled: false }),
}),
}),
]);
expect(
await getJson<Array<{ id: string }>>(
page.request,
`/api/companies/${company!.id}/issues`,
),
).toEqual([]);
expect(
await getJson<Array<{ id: string }>>(
page.request,
`/api/companies/${company!.id}/heartbeat-runs`,
),
).toEqual([]);
expect(pageErrors, pageErrors.join("\n")).toEqual([]);
});
@@ -163,6 +163,37 @@ test.describe("Docker authenticated onboarding smoke", () => {
page.getByRole("heading", { name: "Connect a model" })
).toBeVisible({ timeout: 20_000 });
const companies = await getJson<Array<{ id: string; name: string }>>(
page,
`${baseUrl}/api/companies`
);
const company = companies.find((entry) => entry.name === COMPANY_NAME);
expect(company).toBeTruthy();
const agentsUrl = `${baseUrl}/api/companies/${company!.id}/agents`;
await expect.poll(
() => getJson<Array<{ id: string }>>(page, agentsUrl),
{ message: "Connect a model must retain one paused setup record" },
).toEqual([
expect.objectContaining({
name: AGENT_NAME,
status: "paused",
pauseReason: "setup",
metadata: expect.objectContaining({ setupAdapterPending: true }),
runtimeConfig: expect.objectContaining({
heartbeat: expect.objectContaining({ enabled: false }),
}),
}),
]);
const [setupAgent] = await getJson<Array<{ id: string }>>(page, agentsUrl);
for (const resource of ["issues", "heartbeat-runs"]) {
expect(
await getJson<Array<{ id: string }>>(
page,
`${baseUrl}/api/companies/${company!.id}/${resource}`,
),
).toEqual([]);
}
await page
.getByRole("button", { name: "Use API key instead", exact: true })
.click();
@@ -200,18 +231,14 @@ test.describe("Docker authenticated onboarding smoke", () => {
await getStartedButton.click();
await expect(page).toHaveURL(/\/issues\//, { timeout: 30_000 });
const companies = await getJson<Array<{ id: string; name: string }>>(
page,
`${baseUrl}/api/companies`
);
const company = companies.find((entry) => entry.name === COMPANY_NAME);
expect(company).toBeTruthy();
const agents = await getJson<
Array<{ id: string; name: string; role: string; adapterType: string }>
Array<{ id: string; name: string; role: string; adapterType: string; pauseReason: string | null }>
>(page, `${baseUrl}/api/companies/${company!.id}/agents`);
expect(agents).toHaveLength(1);
const leadAgent = agents.find((entry) => entry.name === AGENT_NAME);
expect(leadAgent).toBeTruthy();
expect(leadAgent!.id).toBe(setupAgent!.id);
expect(leadAgent!.pauseReason).not.toBe("setup");
expect(leadAgent!.role).toBe(AGENT_ROLE);
expect(leadAgent!.adapterType).not.toBe("process");