Repository navigation
fix(resume-drill): add resilient resume project extraction status - #6
Merged
Merged
Conversation
CUinspace233
commented
May 24, 2026
Owner
- Added retry handling for resume project extraction with bounded attempts and backoff.
- Introduced a project quality gate before accepting AI extraction results.
- Persisted extraction_status on resumes and returned it through API schemas.
- Displayed resume extraction status in the Resume Drill sidebar.
- Moved synchronous OpenAI project extraction work onto a background thread.
- Added retry handling for resume project extraction with bounded attempts and backoff. - Introduced a project quality gate before accepting AI extraction results. - Persisted extraction_status on resumes and returned it through API schemas. - Displayed resume extraction status in the Resume Drill sidebar. - Moved synchronous OpenAI project extraction work onto a background thread.
There was a problem hiding this comment.
Pull request overview
This PR improves the resilience and observability of “resume project extraction” in the Resume Drill flow by persisting an extraction_status and adding retry + fallback behavior for AI extraction, then surfacing that status in the API and UI.
Changes:
- Added
extraction_statusto Resume DB model, API schema, and frontend types. - Implemented bounded retries with backoff, plus a quality gate and fallback extraction path for resume projects.
- Displayed extraction status as a UI chip in the Resume Drill sidebar.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/types/interview.ts | Extends ResumeResource type with extraction_status. |
| frontend/src/components/resume-drill/ResumeDrillSidebar.tsx | Shows extraction status chip next to parsed project count. |
| backend/main.py | Adds runtime schema migration to create resumes.extraction_status column. |
| backend/database/schemas.py | Adds extraction_status to ResumeResource API model. |
| backend/database/models.py | Persists extraction_status on the Resume SQLAlchemy model. |
| backend/api/endpoints/resume.py | Adds retry/backoff + quality gate + fallback logic and returns/persists extraction status. |
Comments suppressed due to low confidence (1)
backend/main.py:31
- The migration helper swallows all exceptions when running
ALTER TABLE ... ADD COLUMN ..., which can hide real migration failures (syntax issues, missing tables, permissions) and leave the app running with an unexpected schema. Instead of a blanketexcept Exception: pass, consider checking for column existence first (e.g.,PRAGMA table_info) or at least logging unexpected errors while still ignoring the specific "duplicate column" case.
# Add new columns to existing tables (SQLite ALTER TABLE)
# create_all only creates new tables, not new columns on existing ones.
for col_sql in [
"ALTER TABLE questions ADD COLUMN status VARCHAR(20) DEFAULT 'completed'",
"ALTER TABLE questions ADD COLUMN session_id VARCHAR REFERENCES interview_sessions(id)",
"ALTER TABLE resumes ADD COLUMN extraction_status VARCHAR(20) DEFAULT 'unknown' NOT NULL",
]:
try:
await conn.execute(text(col_sql))
except Exception:
pass # Column already exists
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
176
to
180
| filename: str | ||
| content_text: str | ||
| projects: list[ResumeProject] | ||
| extraction_status: str = "unknown" | ||
| created_at: datetime |
| <Chip | ||
| size="sm" | ||
| variant="soft" | ||
| color={resume.extraction_status === "fallback" ? "warning" : "success"} |
- Added a ResumeExtractionStatus enum to constrain resume parser status values in API schemas. - Normalized invalid persisted extraction statuses to unknown before returning resume resources. - Updated the Resume Drill status chip to map ai, fallback, and unknown states to explicit colors.
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.