Skip to content

Document get_deployment_payload / delete_deployment_payload response contracts - #600

Merged
Ethan-Arrowood merged 2 commits into
mainfrom
kris/1893-payload-ops-docs
Jul 27, 2026
Merged

Document get_deployment_payload / delete_deployment_payload response contracts#600
Ethan-Arrowood merged 2 commits into
mainfrom
kris/1893-payload-ops-docs

Conversation

@kriszyp

Copy link
Copy Markdown
Member

Companion to HarperFast/harper#1898 "Implement get_deployment_payload and delete_deployment_payload operations", which implements the two operations (documented since 5.1 but returning Operation not foundharper#1893).

Adds the previously-unspecified behavioral contracts:

  • get_deployment_payload — response is raw tarball bytes (octet-stream + download filename), never JSON/base64; 404 when the payload was reclaimed.
  • delete_deployment_payload — cluster-wide reclaim note, terminal-status requirement (409 otherwise), idempotency (freed_bytes: 0), response shape, and the payload_dropped audit event.

Hold merge until harper#1898 lands.

🤖 Generated with Claude Code (Opus 4.8)

…contracts
Companion to HarperFast/harper#1898 (which implements the two operations —
they were documented but returned "Operation not found", harper#1893):
raw-bytes response for get_deployment_payload, and the terminal-status
requirement, idempotency, response shape, and audit event for
delete_deployment_payload.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the API documentation in reference/operations-api/operations.md to detail the response format for retrieving a deployment's raw tarball and to expand on the behavior, constraints, and response schema of the delete_deployment_payload endpoint. The review feedback suggests a minor formatting improvement to use an em-dash instead of a hyphen for consistency.

}
```

The response is the raw tarball bytes (`Content-Type: application/octet-stream`, with a `Content-Disposition` download filename) - not JSON and not base64-encoded, so payloads of any size stream without inflation. Returns `404` if the deployment does not exist or its payload has already been reclaimed (by payload retention or `delete_deployment_payload`).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the rest of the document, use an em-dash () instead of a hyphen (-) to separate the clauses.

Suggested change
The response is the raw tarball bytes (`Content-Type: application/octet-stream`, with a `Content-Disposition` download filename) - not JSON and not base64-encoded, so payloads of any size stream without inflation. Returns `404` if the deployment does not exist or its payload has already been reclaimed (by payload retention or `delete_deployment_payload`).
The response is the raw tarball bytes (`Content-Type: application/octet-stream`, with a `Content-Disposition` download filename) not JSON and not base64-encoded, so payloads of any size stream without inflation. Returns `404` if the deployment does not exist or its payload has already been reclaimed (by payload retention or `delete_deployment_payload`).

@github-actions
github-actionsBot temporarily deployed to pr-600 July 22, 2026 15:02 Inactive
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL:https://preview.harper-documentation.harperfabric.com/pr-600

This preview will update automatically when you push new commits.

@kriszyp
kriszyp marked this pull request as ready for review July 23, 2026 00:23
@kriszyp
kriszyp requested a review from a team as a code ownerJuly 23, 2026 00:23
Comment threadreference/operations-api/operations.md

@Ethan-ArrowoodEthan-Arrowood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — with harper#1898 merged, I verified the documented response contracts field-for-field against the handler source (field names, status values, error codes, the octet-stream/Content-Disposition contract, cluster-wide reclaim, idempotency, and the audit note) — all accurate.

One net-new nit to fold in: the idempotent-case message differs from the example shown, worth aligning. And cb1kenobi's point is real — get_deployment_payload self-enforces super_user (non-delegable) while delete_deployment_payload doesn't — worth documenting that asymmetry.

sent with Claude Opus 4.8

get_deployment_payload checks requireSuperUser() directly in the handler,
unlike delete_deployment_payload and nearly every other super_user op,
which can be granted to a non-super_user role via that role's operations
allowlist. Document the asymmetry so admins don't hit an unexplained 403.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions
github-actionsBot temporarily deployed to pr-600 July 27, 2026 13:50 Inactive
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL:https://preview.harper-documentation.harperfabric.com/pr-600

This preview will update automatically when you push new commits.

@Ethan-Arrowood
Ethan-Arrowood merged commit fcf2c7a into mainJul 27, 2026
7 checks passed
@Ethan-Arrowood
Ethan-Arrowood deleted the kris/1893-payload-ops-docs branch July 27, 2026 14:42
@github-actions

Copy link
Copy Markdown

🧹 Preview Cleanup

The preview deployment for this PR has been removed.

dawsontoth added a commit that referenced this pull request Jul 29, 2026
Conflict in reference/operations-api/operations.md was additive: main added the
`credentials` parameter plus its "Deploy credentials" section (#581) where this
branch adds the two-phase parameters. Kept both — the parameter list now carries
activate/deployment_id/revert_on_failure/ignore_replication_errors/
deployment_timeout/two_phase AND credentials, followed by main's credentials
section. main's get_deployment_payload / delete_deployment_payload docs (#600)
are untouched.
Sign up for freeto 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.

3 participants

@kriszyp@cb1kenobi@Ethan-Arrowood