Runs

Finish an in-progress Run with a final verdict

Changed on

Bearer run:execute (or cookie session); member+ write access. Transactional finish via one SECURITY DEFINER RPC: closes the Run with the chosen final verdict passed or failed (sets finished_at, bumps version), marks every not-yet-executed step skipped, and preserves already-recorded step results. Only a running Run can be finished — an already-closed Run (passed/failed/aborted) returns 409. A human, an AI Test Agent, and a CI pipeline are handled identically. Finish is first-wins: a concurrent double-submit (or a race with abort) serializes on a row lock and the loser gets 409.

post/api/v1/runs/{id}/finish

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/api/v1/runs/{id}/finish
  • Auth: one of:
    • API key in cookie sb-fmbpikzpkafptqximhxn-auth-token
    • HTTP bearer

Path parameters

idstring uuid required

Request body

verdict'passed' | 'failed' required

The final verdict to close the run with. aborted is not a finish verdict — abort is its own action (BK-36).

Response

Run finished. Returns the updated Run with status set to the final verdict (passed/failed) and finished_at stamped.

Changes

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • warning

      added the new test_outside_plan_project enum value to the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status

    • info

      removed the test_outside_plan_project enum value from the / response property for the response status