Upgrade Test Plan
PUT/projects/:project_id/test-plan
Move a bound project onto another version of the plan it already pins.
The target version's dimensions and both locks are written onto the project and its
version pinned, so the project enforces exactly what that version declares.
A PUT, but deliberately not an upsert: a project bound to nothing is a 409 rather than an
attach, because only POST may adopt a task_type.
Within one plan's lineage only. A version of a different plan is refused, and so is an older version of this one — both are detach-and-attach, a different decision. The version the project is already on is accepted and re-asserts the contract, which is what makes this idempotent; for a project that edited its dimensions under an unlocked plan, that pulls them back onto the plan's.
Dimensions go through the same replacement path PATCH uses, so a target declaring the set
the project already holds mints nothing, while a different set stages a draft per affected
dataset and stales its verdicts. Both locks are re-written either way.
Dataset columns are checked — a dimension naming one this project's datasets do not carry
is a 422 and nothing is written — but an already-golden version's rows are not. It keeps
the dimension_snapshot frozen at its own promotion, so a golden version the target would
no longer admit is the next promotion's refusal rather than this route's; blocking here would
make a corrected methodology unadoptable by the projects that most need one.
Requires workspace_admin/workspace_editor membership of the project's workspace, with
no platform-admin bypass: this is one of the two sanctioned ways past the PATCH dimension
gate, so it cannot be reachable at a weaker bar than the gate itself sets.
Request
Responses
- 200
- 422
Successful Response
Validation Error