Hold scene opens until the editor has opened its startup scenes - #1083
Merged
Merged
Conversation
An editor opens the scenes it restores, or the project's main scene, once its first scan is applied, and makes one of them current. A scene_open answered before then was replaced a moment later, and every later scene call acted on the main scene. scene.open and scene.create now wait at the front of the queue until the editor's file index is populated, which is the same moment on 4.5.1, 4.6.2 and 4.7.2. Commands behind them wait too, so nothing overtakes them. Adds a native test for the hold, a live test CI runs on each line, and a vibe probe that reproduces the switch.
This was referenced Sep 30, 2026
The 4.6.2 job on #1084 saw scene_open end in peer_closed after 5.7 s, with the editor alive, and the test had sent the editor output nowhere. It now keeps it with the extension at INFO, and a failure prints it with the sessions the server lists.
This was referenced Sep 30, 2026
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 #1069
An editor opens the scenes it restores, or the project's main scene, once its first scan of the project is applied, and makes one of them current. A
scene_opensent before then answeredopened: true, and a moment later the startup put the main scene in front. Every scene call after that acted on the main scene.scene.openandscene.createnow wait at the front of the bridge queue until the editor's file index has something in it. The index starts empty, and the editor swaps the scanned one in just before it opens its startup scenes. That holds on 4.5.1, 4.6.2 and 4.7.2 (EditorNode::_sources_changedwhilewaiting_for_first_scan). Anything queued behind them waits too, so nothing overtakes them. Other commands are not held. A wait past the route deadline answers504 route_deadline_exceededwithoutcome: not_started, and nothing was opened or written.Tests:
EditorHook.SceneOpenWaitsForTheStartupScenesholds both methods with a command queued behind each, and releases them once the editor has started. It fails with the hold removed.tests/test_editor_startup_live.pylaunches an editor, opens a scene as soon as the session is listed, and reads the edited scene for ten seconds. CI runs it in a new step on all three lines. It failed on 4.5.1 and 4.7.2 with the hold removed.tools/vibe/probes/startup_scene_open.pyreproduces the switch by hand.Also fixed a stale sentence in
docs/ARCHITECTURE.mdthat still said the editor's own scan could run queued commands. #995 part one closed that.Checked locally: native suite (954), Python suite (541), docs validator, test inventory, and the live harness on 4.5.1, 4.6.2 and 4.7.2. CHANGELOG updated under Unreleased, Fixed.