Repository navigation
[TN-58207] Add hard_delete_redacted_file to TextualNer - #135
Merged
Merged
Conversation
Calls DELETE /api/unattachedfile/{jobId} to hard delete a file uploaded with
start_file_redaction, its job, and all derived data. A 409 (job still
processing) raises the new FileNotReadyForDeletion exception.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
akamor
self-requested a review
October 12, 2026 14:56
akamor
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TextualNer.hard_delete_redacted_file(job_id), which calls the newDELETE /api/unattachedfile/{jobId}endpoint from TonicAI/solar#3776 to hard delete a file uploaded withstart_file_redaction, its redaction job, and all derived data (detected entities, OCR and page data, embedded images)FileNotReadyForDeletionexception when the server returns 409 because the job is still queued or running; a 404 for an unknown job surfaces as the usualHTTPErrorredacting_files.rst("Hard delete a redacted file") and the README Files section; the docstring is picked up by the existingTextualNerautoclassRelease after TonicAI/solar#3776 is deployed; older servers return 405 for this route.
Testing
tests/tests/redact_tests/test_hard_delete_redacted_file.py: mockedrequests.deletecovering 204, 409, and 404 (no server required)ruff@0.11.10 check --target-version py39passes🤖 Generated with Claude Code