Skip to content

docs: document HTTP 409 response for policy-blocked promote/rollback#13

Merged
Gsbreddy merged 1 commit into
mainfrom
cursor/documentation-automation-system-ba43
May 2, 2026
Merged

docs: document HTTP 409 response for policy-blocked promote/rollback#13
Gsbreddy merged 1 commit into
mainfrom
cursor/documentation-automation-system-ba43

Conversation

@cursor

@cursor cursor Bot commented May 2, 2026

Copy link
Copy Markdown

Docs added/updated

docs/http-api.md

  • POST /v1/promote: Added a "Policy-blocked response (HTTP 409)" section with the exact JSON shape (detail.message, detail.outcome including promoted_pointer_changed: false and policy.reasons). Updated the errors table to include HTTP 409.
  • POST /v1/rollback: Added an equivalent note that policy-blocked rollbacks return the same 409 shape with "Rollback blocked by policy." as the message.

docs/operations-and-policy.md

  • "Promotion blocked by policy" section: Replaced the single-sentence description with a three-bullet breakdown covering CLI (non-zero exit), HTTP (HTTP 409 with structured body, link to API reference), and SDK (httpx.HTTPStatusError with status_code == 409).

docs/sdk.md

  • Error handling section: Added a "Policy-blocked promote/rollback (HTTP 409)" subsection with a code example showing how to catch the 409, read detail["message"] and detail["outcome"]["policy"]["reasons"], and notes that the blocked action is still recorded in the audit ledger.

Codepaths covered

  • src/flightdeck/server/routes/actions.py_raise_policy_blocked (new helper) and the updated post_promote / post_rollback route handlers that now raise HTTP 409 instead of returning HTTP 200 with promoted_pointer_changed: false.

Knowledge gaps addressed

The fix(server) commit (b4f2f6a) introduced a breaking behavior change: policy-blocked actions now return HTTP 409 instead of HTTP 200. All three reference docs still described the old HTTP 200 path. This PR brings them into sync so API consumers, SDK users, and operations engineers see the correct status codes and error shapes.

Open in Web View Automation 

The fix(server) commit (b4f2f6a) changed POST /v1/promote and
POST /v1/rollback to return HTTP 409 Conflict when the active policy
blocks the action, replacing the prior behavior of HTTP 200 with
promoted_pointer_changed=false.

Update three reference docs to reflect this:

- docs/http-api.md: add a 'Policy-blocked response (HTTP 409)' section
  under POST /v1/promote with the exact JSON shape, update the error
  table to include 409, and mirror the equivalent note for
  POST /v1/rollback.

- docs/operations-and-policy.md: expand the 'Promotion blocked by
  policy' section to call out the 409 for HTTP and the raised
  HTTPStatusError for the SDK, replacing the single sentence that only
  mentioned CLI and HTTP 200 behavior.

- docs/sdk.md: add a 'Policy-blocked promote/rollback (HTTP 409)'
  subsection under Error handling with a code example showing how to
  catch and inspect the 409 detail body.

Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
@Gsbreddy Gsbreddy marked this pull request as ready for review May 2, 2026 09:59
@Gsbreddy Gsbreddy merged commit 2ab49c5 into main May 2, 2026
2 checks passed
@Gsbreddy Gsbreddy deleted the cursor/documentation-automation-system-ba43 branch May 2, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants