fix: Deprecated django tenant schema function replaced - #647
Merged
jaseemjaskp merged 1 commit intoSep 20, 2024
Merged
Conversation
chandrasekharan-zipstack
requested review from
kirtimanmishrazipstack
and removed request for
a team
September 3, 2024 13:25
Contributor
|
|
Contributor
|
@chandrasekharan-zipstack It might not be needed IF we rollout V2 |
jaseemjaskp
approved these changes
Sep 20, 2024
jaseemjaskp
deleted the
fix/deprecated-function-replaced-django-tenant-schemas
branch
September 20, 2024 08:56
pk-zipstack
pushed a commit
that referenced
this pull request
Aug 20, 2025
Replaced deprecated django tenant schema function
pk-zipstack
added a commit
that referenced
this pull request
Jul 27, 2026
Correctness / robustness:
- Return the real whisper_hash in extraction_metadata (was ''), and reject
image mode + highlight explicitly instead of silently dropping highlights.
- Store page images under {extract_dir}/{stem}/pages (per-document), not the
per-run hash — a re-extraction now overwrites its own pages instead of
orphaning a fresh tree in FileStorage every run.
- persist_page_images cleans up already-written pages on a mid-list failure.
- Poll loop fails closed: only explicit intermediate states continue; a
failure/unknown/empty status raises immediately instead of hanging to the
budget. _safe_json logs non-JSON/non-object bodies.
- verify_page_count is now live: expected count derived locally from the input
PDF (pdfplumber); extract asserts a contiguous 1..N page set (catches
truncation + duplicate/misnamed members) and logs skipped entries.
- Retrieve advertises accept: application/zip; submit sends Content-Type.
Layering / guard (UNS-757):
- Promote OUTPUT_MODE/image/PDF_EXTENSION/PDF_ONLY_ERROR + an is_pdf() helper
to the shared x2text.constants (ImageOutputConstants); backend imports the
generic surface instead of the adapter's private src.
- Move the PDF-only guard into dynamic_extractor (the single extract choke
point, under profile_manager) so all entry points and prompt-level profile
overrides are covered; gate on the LLMWhisperer adapter id as well as
output_mode so other x2text adapters can't inherit the rejection.
Comments: drop ticket-id/PR provenance and the contradictory PR#536/#647
contract notes; remove the unused IMAGE_MODE_LABEL 'single source of truth'.
Tests: fix the constants-reload cross-file pollution (retry tests now pin the
real budget on helper.WhispererDefaults); add network-layer coverage
(poll success/failure/non-JSON-fast-fail/budget, mid-stream download error +
close, submit-without-hash), mid-list cleanup, image+highlight rejection, a
non-LLMWhisperer no-op, and a dynamic_extractor call-site test. sdk1: 57 pass;
backend guard: 12 pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pk-zipstack
added a commit
that referenced
this pull request
Jul 27, 2026
…omments Follow-up to the review round: remove the contradictory 'ASSUMED contract (PR #647)' vs 'verified against PR #536' notes and the 'decision 2A' / UNS-743 provenance from the adapter helper + constants comments, keeping the factual one-line reason (comments carry the why, not the ticket). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.



What
connection.get_tenant()withconnection.tenantWhy
Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
Notes on Testing
Checklist
I have read and understood the Contribution Guidelines.