Repository navigation
feat(app submit): a resubmit replaces your own version in review - #1005
Merged
Merged
Conversation
The server now replaces the author's own version still waiting for review with a new submit (civitai/civitai#11502), keeping its store listing and media. On top: - a submit whose manifest declares the same version as the one in review is refused with the exact bump (set "version" to 0.1.1 in block.manifest.json), exit 1 like the version guard; - otherwise the submit says which version (and publish request) it replaces and, on a terminal without --yes, asks first; - the success output names the replaced submission (the submit answer's `replaced`). The guard reads the same GET /api/v1/blocks/submissions as the version guard, through one read; a failed read warns and the submit goes ahead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ng withdraw Audit round 1 follow-ups (no deploy-blocker): - end-to-end app submit tests: the same version is refused before uploading (ErrSameVersionInReview, the exact bump), a new version is announced, one submissions read serves both guards, and the success line names the replaced submission; - app submit --help lists the guard; app withdraw --help and the page-money scaffold README say to submit again rather than withdraw to update a version in review; - the pending status is compared case-insensitively, and the prompt reads one line (readPromptLine) rather than through a buffered reader. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Audit round 0 (requirements and deletion): proceed to the checklist. Every behaviour traces to the operator's two asks. No open premises. Audit round 1 (the nine correctness axes), read at Two 🟢 findings are left open:
|
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
The Civitai server now replaces an author's own App Block version that is still waiting for review with a new submit (civitai/civitai#11502). The old version is marked replaced, its store listing and media are kept, and moderators see only the new version. Before, a second submit was refused ("withdraw it first"), and withdrawing a first version deleted its draft listing.
civitai app submitnow handles that case:pixel-garden@0.2.4 is already waiting for review (pubreq_…); set "version" to 0.2.5 in block.manifest.json, then submit again. It exits 1 like the version-regression guard: the project is wrong, not the invocation.--yesit asks first (Replace the version in review? [y/N]).--yesand unattended runs print the line and go ahead.replacedfield.The guard reads
GET /api/v1/blocks/submissions, which is scoped to the caller's own submissions, so a pending row there is the caller's own and is the one the server replaces. It shares one read with the version guard (onceLister). A failed read warns and the submit goes ahead, since the server enforces the replace rule itself. Like the other network guards, it runs after the submit confirmation and is skipped by--package-onlyand by a run with no token.README: the submit section and the exit-code list both describe it.
Testing
go build ./...go test ./internal/cmd/...passes.go test ./internal/appapi/...:TestSubmitVersionDoesNotTagWhenTheWriteWasCutShortfails its own CONTROL check on this machine, and it fails the same way on an unmodifiedorigin/maincheckout. It is environmental and not caused by this change. CI is the verdict.internal/cmd/app_submit_pending_guard_test.go:--yesannounces without asking;nextPatchVersioncases.🤖 Generated with Claude Code