Version states
At any moment, the version you are looking at is in exactly one of four states.
Clients select the state they want to look at through a URL parameter on the policy detail endpoint:
selectedVersion to the numeric version and reports the corresponding versionState.
Only the
active version is used during evaluation. Looking at a draft or historical version never changes what MeshQu actually decides for production traffic.Maker-checker
MeshQu tenants can enable maker-checker enforcement to require that a different person approves a draft than the one who created it.- The maker authored the draft.
- The checker approves or rejects it.
- The same user cannot be both on the same draft when maker-checker is enabled.
403 MAKER_CHECKER_VIOLATION regardless of what the UI shows.
When maker-checker is disabled, the author can ratify their own draft.
Lifecycle transitions
- Start editing — creates a new draft from the active version. Only one draft per policy at a time.
- Submit — moves a draft into the
submittedstate for a checker. Available in a future release. - Approve (ratify) — ratifies the submitted draft. It becomes the new active version; the previous active becomes historical.
- Reject — returns a submitted draft to
draftwith a rejection reason attached. Available in a future release. - Discard — deletes the draft. Does not affect the active version.
- Create draft from v — copies a historical version into a new draft. Useful for reverting.
How permissions are returned
Rather than ask the client to re-derive what a user can do, the policy detail response carries two fields that answer this directly.permissions — a boolean record:
canDiscard).
actions — an ordered array of lifecycle actions the UI should surface:
actions, the server does not authorise it.
Action kinds
submit, recall, approve, and reject are part of the type contract but are not emitted by the current API. They become available once the submit/reject endpoints ship. Clients built today against actions[] will render them automatically when the server starts returning them — no code change needed.Action matrix
For a given version state, authored-by relationship, and role, the server emits a specific ordered set of actions. The table lists what is emitted today; entries in italics will be added in a future release.
When maker-checker is disabled, the “non-author vs author” distinction stops mattering for
approve — the author can ratify their own draft.
Errors
404 NOT_FOUND— the policy, the requested?version=number, or the requested?version=draftdoes not exist. The response message distinguishes the case ("Policy not found","Draft version not found", etc.) but thecodeis alwaysNOT_FOUNDfor client convenience.403 MAKER_CHECKER_VIOLATION— returned by the ratify endpoint when maker-checker is enabled and the actor is the draft author.
Why the server owns this
Policy governance is a compliance surface. Emittingpermissions and actions[] from the server means:
- The UI cannot accidentally show a button whose action the server would refuse.
- Clients do not need to re-implement role resolution, tenant-settings lookup, or the action matrix.
- New action kinds (like
submitorreject) can roll out server-side and become visible in existing clients without a coordinated release.