Flush editor execution before starting sketches - #13639
Draft
JordanNoone wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Fixes #13229.
What changed
flush()that runs pending work immediately and waits for work already in flight.KclManager.flushPendingEditorExecution().This keeps the normal one-second editor debounce unchanged. The only new ordering constraint is at sketch entry, where the current editor program and Rust scene graph must agree before a sketch ObjectId is created.
Why
The preserved QCC replay for #13229 reproduces the fast sequence 3/3 times and passes a human-paced control 2/2 times. The direct editor edit schedules a debounced settings-only execution, but Start Sketch can create
ObjectId(1)first. When the queued execution finally runs, it replaces the Rust scene graph; the next rectangle segment then targets the stale sketch id and fails withSketch not found: ObjectId(1).Two deterministic
KclManagerregressions cover both sides of that ordering boundary: flushing timer-pending editor work and waiting for an editor execution that has already started. They failed before the implementation because the synchronization boundary did not exist; after the change the focused integration suite passes 37/37. The focused utility suite passes 193/193, and TypeScript plus ESLint checks pass.I also checked draft PR #13605 at head
a02bdd3997855e3509e93f03c290eb8d9e324017as a negative control. It changesmodifyAstselection preservation only and does not touch the editor debounce,KclManager, the modeling machine, or Rust scene lifecycle, so it does not cover #13229.GUI coverage and risk
The QCC adapter discovered the targeted replay against exact
origin/main(d2e2a8a5c56024c60d00f11b3a9efd4933aa47a6) and against #13605. A live control replay stopped before browser launch because approved first-party QA authentication was unavailable in this environment. Per the QCC control-first contract, I did not run or claim a fixed GUI replay, so this PR has no new screenshot or trace artifact.Risk is localized: Start Sketch may now wait for the current direct editor execution instead of racing it. Deferred executions elsewhere retain their existing timer behavior. The remaining uncertainty is visual end-to-end confirmation on an authenticated preview.