Skip to content

state: Preserve drafts changed during publication - #1440

Merged
abhinav merged 2 commits into
review-draft-lifecyclefrom
review-draft-publish-concurrency
Sep 6, 2026
Merged

state: Preserve drafts changed during publication#1440
abhinav merged 2 commits into
review-draft-lifecyclefrom
review-draft-publish-concurrency

Conversation

@abhinav

@abhinav abhinav commented Sep 6, 2026

Copy link
Copy Markdown
Owner

A forge request runs without holding a state snapshot.
A concurrent command can add, edit, or remove drafts
before the request returns.

Remove only drafts whose stored values match the submitted review.
Express cleanup as replayable JSON member deletions,
so storage retries preserve concurrent additions and edits.
If the branch is untracked during submission,
do not recreate its draft state.

A forge request runs without holding a state snapshot.
A concurrent command can add, edit, or remove drafts
before the request returns.

Remove only drafts whose stored values match the submitted review.
Express cleanup as replayable JSON member deletions,
so storage retries preserve concurrent additions and edits.
If the branch is untracked during submission,
do not recreate its draft state.
Published drafts leave the branch allocator intact.
A later cleanup could otherwise reset the allocator
and reuse an identifier that a user still remembers.

Cover publication followed by another draft
through state and command boundaries.
The next draft must receive a larger branch-local ID.
@abhinav abhinav added the skip changelog PRs that don't need a changelog. label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog PRs that don't need a changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant