Repository navigation
Preserve multipart recovery state for missing upload IDs - #244
Open
rootzero00 wants to merge 2 commits into
Open
rootzero00 wants to merge 2 commits into
rootzero00 wants to merge 2 commits into
Conversation
rootzero00
marked this pull request as ready for review
November 22, 2026 10:27
TastelintThe only picture is a PowerShell window replaying test logs, not a user interface, so there is nothing here to review. |
Author
|
@claude review once |
Contributor
|
Reviewed at head 6ec9c4b: the change is correct and narrow — the tagged HTTP 400 becomes |
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.
What
error_codeintoAPIError.Codewithout changing legacy error-message handling.multipart_upload_not_foundcode returned by/files/completeas an uncertain completion outcome rather than a definitive rejection.Why
A missing multipart upload ID does not establish whether an earlier completion succeeded or the upload was otherwise removed.
Previously, the CLI classified this response as
complete_rejected, potentially suggesting replay or abort even though the completion outcome was uncertain.The related Rails API change, antiwork/gumroad#9245, introduced the machine-readable
multipart_upload_not_founderror code. This contribution uses that exact code alongside HTTP 400 to distinguish uncertain completion from ordinary definitive failures without matching error-message text.The approach preserves backward compatibility and the recovery information needed for reconciliation.
Before / After
Terminal recording: Gumroad CLI — Multipart Recovery Before/After Demonstration
multipart_upload_not_foundcomplete_rejectedcomplete_state_unknowncomplete_rejectedcomplete_rejected(unchanged)The demonstration uses a synthetic loopback HTTP server exercising the CLI binaries. It is not production Gumroad API or S3 validation.
Test Results
Local verification used Go 1.25.4 and the repository's applicable checks:
make buildmake testmake test-covermake test-racemake lint(golangci-lintv1.64.8)The initial
umask 0077run exposed a file-permission-sensitive test-environment problem; the controlledumask 0022execution passed the applicable tests, coverage gates, and race checks. Previously recorded logs were subsequently read back with integrity checks; this did not rerun the tests.Local test-results screenshot: Verified pre-push test evidence (build, tests, coverage, race detection, lint, and log integrity).
Source commit:
9fdc51ea906875586073b8dedcefa43927e8c9f5Base commit:
9c216072aefba8346bfc569d299575db335993d4These results cover local implementation and synthetic HTTP behavior, not production end-to-end validation against Gumroad/S3.
Self-review
The eight-file diff was reviewed, including exact HTTP 400/error-code matching; absent, unrelated, case-mismatched and malformed codes; HTTP 403/500 controls; original API error preservation; uncertain versus definitive classification; manifest, upload ID, key, part and ETag retention; automatic-abort suppression; and terminal/JSON guidance.
No unresolved source defect was identified within the locally tested scope. Production behavior remains unverified.
Related Contribution
AI Disclosure
Model: OpenAI GPT-6 (ChatGPT).
AI assistance was used for implementation analysis, error-classification reasoning, regression-test and verification planning, verification-script preparation, local test-result interpretation, terminal demonstration preparation, source self-review, and PR drafting. The contributor reviewed the changes, executed local verification, assessed the evidence, and authorized publication actions.
Representative prompts and instructions given to the assistant:
This is a representative summary of prompts and instructions, not a complete verbatim transcript of every prior development prompt.