fix: deduplicate concurrent upload parse dispatch - #351
Open
Frankie-Xu wants to merge 2 commits into
Open
Conversation
…os-AI#286) Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
This is a first-time fork workflow and GitHub currently reports no checks. The focused regression, concurrent HTTP cases, affected contract file, lint, and typecheck pass locally; the full API contract result and its unrelated environment-specific failure are documented in the PR body. Please approve the workflow run when convenient. |
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
waiting-file -> pendingtransition.pending -> pendingas an idempotent no-op.confirm-uploadrace.Closes #286
Verification
uv run pytest apps/api/tests/contract/test_s3_event_contract.py -q— 13 passedmake lint— passedmake typecheck— 0 errors, 0 warningsuv run pytest apps/api/tests/contract -q— 222 passed, 1 unrelated environment-specific failure intest_should_reject_a_url_source_when_file_type_detection_redirects_to_a_private_host; this environment resolvesexample.comto reserved198.18.0.92, so URL validation rejects it before the test fake HEAD client is called. The failing test and URL-validation path are unchanged by this PR.Deployment notes
Scope
Changed files only:
apps/api/app/services/document_ingestion/handoff_service.pyapps/api/tests/contract/test_s3_event_contract.py