Repository navigation
refactor: share Desktop and API command runtime assembly - #252
Merged
Merged
Conversation
Centralize Host, Local and Docker command backend assembly and manager cleanup. Keep entry-specific startup gates and shut down owned managers before closing the Desktop store when later initialization fails. Add a partial-startup rollback regression and update the Windows Auto preference fixture to the current CLI contract. Co-authored-by: Codex <codex@openai.com>
Wait for both active-command and recovery-only reconcilers to finish before shutting down command managers and closing the application store. Co-authored-by: Codex <codex@openai.com>
Qiyuanqiii
changed the base branch from
codex/trim-ci-and-update-architecture
to
main
October 5, 2026 03:51
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.
Desktop and the loopback API duplicated Host, Local and Docker command backend assembly. Their shutdown paths could close SQLite while command managers or the API command reconciler were still finishing work.
OpenCommandRuntimeSetnow owns backend assembly, startup reconciliation and manager shutdown. Each entry retains its existing startup gates, capabilities and shutdown deadlines. Desktop rolls back managers before closing its store; the API cancels and joins both active-command and recovery-only reconcilers before manager teardown. The set borrows the store and sandbox backends.The regression starts an owned command, fails subsequent Local backend initialization, and verifies that the job is interrupted and reaped before the helper returns while the store remains writable. The Windows permission-selection fixture now uses the current Auto CLI contract.
Validation: 9 focused Go tests passed across application, Desktop and API, covering partial startup rollback, duplicate backend rejection, installation gates, Local readiness, authenticated and read-only API startup/shutdown, invalid startup gates, and Windows CLI/API Local Sandbox probes. The Host, Local Sandbox and read-only API lifecycle tests also passed with the race detector. Formatting and diff checks passed.
Stacked on #251; the diff contains only this command-runtime cleanup.