Tests

Reorder the ATC chain inside a Test

Changed on

Bearer atc:write (or cookie session). Rearranges the Test's ATC chain, preserving the exact step set (no add/remove). Body is the complete new order of step_ids. One SECURITY DEFINER RPC enforces the write gate, set equality, optimistic lock, no-op detection, and the atomic position rewrite. Submitting the current order is a 200 no-op — no version bump, no updated_at change, no event. A real reorder emits a single test.reordered activity-log event with old_chain / new_chain (atc_id arrays).

patch/api/v1/tests/{id}/reorder

Request

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

Path parameters

idstring uuid required

Headers

X-If-Matchstring

Current Test version for optimistic locking (lenient — absent skips the guard). A mismatch returns 409 with details.current_version and details.current_chain. Uses a custom header instead of RFC 7232 If-Match because the Vercel edge rewrites If-Match to 412 (BK-96); If-Match is accepted as a fallback off-Vercel.

Request body

step_idsstring[] required

The COMPLETE new order as test_steps.id values — a permutation of the Test's current steps. step_id (not atc_id) is the handle because a chain may repeat an atc_id. Non-empty and free of duplicates.

Response

Reordered (or a no-op when the submitted order is unchanged). Returns the expanded Test.

testunknown

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

    • 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

    • info

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