[FXC-6492] fix(): validate ImportedSurface DraftContext before draft submission#1910
Merged
benflexcompute merged 1 commit intorelease-candidate/25.8from Mar 19, 2026
Conversation
…submission Move the ImportedSurface-requires-DraftContext guard check before Draft.create(...).submit() to prevent orphan drafts on the server when the validation fails. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 19, 2026
…submission (#1910) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Draft.create(...).submit()to prevent orphan server-side drafts when validation fails.Test plan
run()with ImportedSurface outside a DraftContext raisesFlow360ValueErrorwithout creating a server-side draft🤖 Generated with Claude Code
Note
Low Risk
Low risk change that only reorders a precondition check in
Project._run; main impact is on when an error is raised during submission, not on successful runs.Overview
Prevents orphan server-side drafts by moving the
ImportedSurface-requires-DraftContextguard to run beforeDraft.create(...).submit()inProject._run.Now, calling
run()withparams.private_attribute_asset_cache.imported_surfacesoutside an active draft context fails fast withFlow360ValueErrorwithout creating a draft.Written by Cursor Bugbot for commit a312867. This will update automatically on new commits. Configure here.