Skip to content

Split the delete of a processing result and its trace - #48

Merged
rferreira merged 1 commit into
mainfrom
raf/split-trace-delete
Aug 30, 2026
Merged

rferreira merged 1 commit into
mainfrom
raf/split-trace-delete

Conversation

@rferreira

@rferreira rferreira commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

The processing result and its processing trace are separate resources — separate readers, each with its own 404 — and the delete now treats them that way. Generated from the API's own OpenAPI output and reindented to this file's sequence style; the transform was verified by checking it reproduces the existing, unchanged trace get: block byte for byte.

This supersedes #47 and includes everything that was in it. #47 documented DELETE /v2.2/files/{id} as removing the result and its trace; that cascade is gone, so merging it would publish a contract that is about to stop being true, then amend it days later. One change, one publish. Close #47 when this lands.

What changed

DELETE /v2.2/files/{id}/trace — new. Removes the trace alone, leaving the result readable.

DELETE /v2.2/files/{id} — removes the result alone. The description says so outright, and points at where the trace lives: a customer deleting a result should not have to discover by accident that the findings are still readable at the trace endpoint. Erasing a scan entirely is two calls.

Both carry the 403 (an API key is required — a temporary auth token authenticates as the key that minted it and is refused) and the 404 (there was nothing to delete, which is also what a repeated delete returns) that #47 introduced, plus the ErrorResponse body on the 401 that the authentication entry point has always returned regardless of method.

Checks

vacuum lint -d --no-style and openapi-generator-cli validate --recommend both exit 0. The new operation adds 3 oas3-missing-example warnings and 4 description-duplication informs — the same classes every other response block in the file already produces.

Merge order

The API change ships first; this documents behaviour that goes with it, and merging here publishes to the docs site on push to main.

The result and its trace are separate resources - separate readers, each with
its own 404 - so deleting one no longer removes the other, and supersedes #47,
whose wording describes a cascade that is no longer how the API behaves.

* adds DELETE /v2.2/files/{id}/trace, which removes the trace alone
* DELETE /v2.2/files/{id} removes the result alone, and its description says so
  outright - a customer deleting a result must not assume the findings went with
  it, since they stay readable at the trace endpoint until deleted there
* both carry the 403 and 404 that #47 introduced, and the ErrorResponse body on
  the 401 that was always being returned

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rferreira
rferreira force-pushed the raf/split-trace-delete branch from 85235e1 to 5becb4b Compare August 30, 2026 14:03
@rferreira
rferreira marked this pull request as draft August 30, 2026 14:11
@rferreira
rferreira marked this pull request as ready for review August 30, 2026 14:12
@rferreira
rferreira merged commit 1bad181 into main Aug 30, 2026
2 checks passed
@rferreira
rferreira deleted the raf/split-trace-delete branch August 30, 2026 14:12
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.

1 participant