Skip to content
Agents

Copy-for-AI prompt

The prompt the API returns for a failed attempt, ready for an assistant with the repository open.

Get a test’s attempts in a run, with the Copy-for-AI prompt. Every attempt of one test in one run, oldest first, each with its errors, code frame and a ready-made prompt for an assistant that has the repository open (null for an attempt without a real failure). Cheap.

curl "https://app.squally.dev/api/v1/projects/$PROJECT/runs/{runId}/tests/{testName}" \
-H "Authorization: Bearer $SQUALLY_API_KEY"

A prompt for an assistant that has the repository open, byte-identical to the Copy for AI button. null for an attempt without a real failure (a pass, a test.fail() marker, no error text).

The prompt for a first try that failed and passed on retry (invented data):

You have the repository open. Find the test below, explain the failure and propose a fix.
Failing test: chromium > checkout.spec.ts > Checkout > applies a coupon code
File: tests/checkout.spec.ts
Browser: chromium
Run branch: main
Attempt: first try
Outcome: a later retry of this test passed (the test is flaky rather than consistently broken).
Error message:
Error: expect(locator).toHaveText(expected) failed
Locator: getByTestId('order-total')
Expected: "€ 45.00"
Received: "€ 50.00"
Timeout: 5000ms
Stack (top frames):
at /home/runner/work/storefront-web/tests/checkout.spec.ts:48:52
Attempt duration: 6210 ms
Failure category: Assertion
Status from the flakiness engine: flaky (signals: Retry rate). Treat this as evidence to weigh, not as a verdict.

Every parameter and the whole response: API reference.