Skip to content

[TN-58207] Add hard_delete_redacted_file to TextualNer - #135

Merged
akamor merged 1 commit into
mainfrom
claude/unattached-file-delete
Oct 12, 2026
Merged

akamor merged 1 commit into
mainfrom
claude/unattached-file-delete

Conversation

@Travmatth

Copy link
Copy Markdown
Contributor

Summary

  • add TextualNer.hard_delete_redacted_file(job_id), which calls the new DELETE /api/unattachedfile/{jobId} endpoint from TonicAI/solar#3776 to hard delete a file uploaded with start_file_redaction, its redaction job, and all derived data (detected entities, OCR and page data, embedded images)
  • raise the new FileNotReadyForDeletion exception when the server returns 409 because the job is still queued or running; a 404 for an unknown job surfaces as the usual HTTPError
  • document the method in redacting_files.rst ("Hard delete a redacted file") and the README Files section; the docstring is picked up by the existing TextualNer autoclass

Release after TonicAI/solar#3776 is deployed; older servers return 405 for this route.

Testing

  • tests/tests/redact_tests/test_hard_delete_redacted_file.py: mocked requests.delete covering 204, 409, and 404 (no server required)
  • ruff@0.11.10 check --target-version py39 passes

🤖 Generated with Claude Code

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>
@Travmatth Travmatth changed the title Add hard_delete_redacted_file to TextualNer [TN-58207] Add hard_delete_redacted_file to TextualNer Oct 8, 2026
@akamor
akamor self-requested a review October 12, 2026 14:56
@akamor
akamor merged commit b4e2288 into main Oct 12, 2026
3 checks passed
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