fix: zero silent failures, Bedrock graceful handling, exact page reporting#50
Open
Nishit24113 wants to merge 3 commits into
Open
fix: zero silent failures, Bedrock graceful handling, exact page reporting#50Nishit24113 wants to merge 3 commits into
Nishit24113 wants to merge 3 commits into
Conversation
…rting - Adobe failures: report "Adobe API failed for this document" and exit cleanly (no pdf-lib BAD_PDF fallback that degraded output quality) - Bedrock graceful handling: images with extreme aspect ratio (>20:1) are tagged as "Decorative element" with exact page number logged to CloudWatch; other Bedrock failures log exact page and fail the pipeline properly - Exact page reporting: store page_num in SQLite image_data table so alt-text station can report "page=6" instead of misleading "pages=1-200" - Zero silent failures: failure-handler Lambda writes result/FAILED_<name>.json on every pipeline failure so UI stops polling and shows the user what happened - Title-generator and merger: return 500 dict replaced with raise so Step Functions Catch fires instead of silently continuing - Env var fix: s3_bucket passed correctly to ECS containers via JsonPath - Splitter: adds total_pages and pages_in_chunk to chunk metadata
…k pages - Adobe container: include actual Adobe error (errorCode, statusCode, requestTrackingId) in the failure message instead of generic text; compute page_start/page_end from chunk key so the failure marker shows which chunk range was being processed - Alt-text container: when all Bedrock requests fail, collect the page numbers of failed images from the SQLite DB and include them in the failure detail so the user can see which pages triggered the issue - Failure-handler: pass page_start/page_end from station errors through to the result marker; use station message as user-facing summary
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
page_numcolumn to SQLiteimage_datatable in Adobe container — alt-text station now logspage=6instead of misleadingpages=1-200result/FAILED_<name>.jsonon every pipeline failure so the UI stops polling and shows the user what happened instead of spinning indefinitelyreturn {"statusCode": 500}pattern withraiseso Step Functions Catch fires on failure instead of treating errors as successs3_bucketpassed correctly to ECS containers viaJsonPath.string_at("$.s3_bucket")instead of broken ContainerOverrides indexingtotal_pagesandpages_in_chunkto chunk metadataTest plan
deploy.shpage=<N>for Bedrock activitypages=1-200appears in CloudWatch logsFAILED_<name>.jsonin S3result/folder and UI stops spinning