fix: deduplicate concurrent upload parse dispatch - #351
Open
Frankie-Xu wants to merge 1 commit into
Open
Conversation
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. |
A successful pending-to-pending CAS retry was still enqueueing a second parse_task when the S3 notification raced confirm-upload.
Frankie-Xu
force-pushed
the
fix/Frankie-Xu/dedupe-parse-dispatch
branch
from
September 11, 2026 16:29
ad0e247 to
6912ba3
Compare
Author
|
Rebased/recreated on current |
5 tasks
Author
|
Follow-up: #412 lands a Windows-safe telemetry file lock, so |
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.main(85d5b2ba): main already no-ops a rejected CAS from pending, but a successful same-state retry still dispatched.confirm-uploadrace.confirm-uploadremains the fallback when the storage event is absent.RedisJobLockand the worker terminal-state gate are unchanged.Closes #286
Test plan
make lintuv run pytest apps/api/tests/contract/test_s3_event_contract.py -k "pending_to_pending or cas_winner or localstack" -q— 3 passed (no FastAPI import)apps/api/main.pyand currently fail on Windows becausefcntlis missing (project P3.2). Upstream CI is Ubuntu.