Skip to content

feat(core): error recovery with retry and partial results#41

Open
szj2ys wants to merge 8 commits intoBIT-DataLab:mainfrom
szj2ys:T1.0-error-recovery
Open

feat(core): error recovery with retry and partial results#41
szj2ys wants to merge 8 commits intoBIT-DataLab:mainfrom
szj2ys:T1.0-error-recovery

Conversation

@szj2ys
Copy link

@szj2ys szj2ys commented Mar 14, 2026

Summary

Implements comprehensive error handling infrastructure for robust conversion pipeline operation.

Changes

Backend

  • Exception hierarchy with specific error types (SegmentationError, OCRParsingError, LLMProcessingError, FileValidationError, TimeoutError, XMLGenerationError, ArrowProcessingError, ProcessingPartialResultError)
  • @Retry decorator with exponential backoff and configurable strategies for sync/async functions
  • PartialResultsHandler for saving/recovering conversion state on failure
  • 60 comprehensive unit tests for exceptions, retry, and partial results

Integration

  • Pipeline updated with error handling hooks
  • Service modules export new exception types

Deferred

  • Frontend ErrorBoundary and ErrorToast components (Phase 2)
  • Component/integration tests for error UI (Phase 2)

Test Plan

  • Unit tests: pytest tests/core/ -v → 60 tests passing
  • Retry logic tested with sync/async functions
  • Partial results verified with save/load roundtrips

Related Issues

N/A

jeff and others added 8 commits March 14, 2026 10:20
- Add Navbar with logo and navigation
- Add Hero section with CTA and stats
- Add UploadSection with file conversion integration
- Add Features section with 6 key features
- Add Footer with links and copyright
- Replace default Next.js template in page.tsx
Setup GitHub Actions CI/CD pipeline

- Add frontend CI workflow (lint, type-check, build)
- Add backend CI workflow (flake8 lint, syntax check)
- Add Vercel deployment workflow
- Add PR template with checklist
- Add Issue templates for bugs and features
…step

- Add optional fields to Job interface in types.ts
- Add null checks in upload-section.tsx progress calculation

Fixes: 'total_steps' does not exist on type 'Job'
- Install @vercel/analytics package
- Add Analytics component to root layout
- Track custom events: file_selected, conversion_started,
  conversion_completed, download_clicked

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create example-showcase.tsx with interactive before/after gallery
- Add 3 example categories: Flowchart, Architecture, Network
- Include trust badges with stats
- Integrate into main page between Features and Footer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add EditBananaException hierarchy with specific error types:
  - SegmentationError, OCRParsingError, LLMProcessingError
  - FileValidationError, TimeoutError, XMLGenerationError
  - ArrowProcessingError, ProcessingPartialResultError
- Implement @Retry decorator with exponential backoff
  - Support sync/async functions
  - Configurable max_retries, base_delay, max_delay
  - Global retry statistics tracking
- Create PartialResultsHandler for failure recovery
  - Save/load partial conversion state
  - Generate partial DrawIO XML from saved state
- Update main.py Pipeline with error handling integration
- Add comprehensive tests (60 tests total)
  - 21 exception class tests
  - 20 retry logic tests
  - 19 partial results tests

Frontend error UI to be implemented in follow-up.
szj2ys pushed a commit to szj2ys/Edit-Banana-1 that referenced this pull request Mar 14, 2026
…, and arrow connector

Implements comprehensive error handling infrastructure:

Backend Changes:
- Exception hierarchy with specific error types (SegmentationError, OCRParsingError, etc.)
- @Retry decorator with exponential backoff and configurable strategies
- PartialResultsHandler for saving/recovering conversion state on failure
- Arrow processor module for automatic arrow-shape association
- 60 comprehensive unit tests for exceptions, retry, and partial results

CI/CD:
- GitHub Actions workflows for backend, frontend, and deployment

Frontend: Clean merge keeping history persistence and share features

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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