Skip to content

refactor: share Desktop and API command runtime assembly - #252

Merged
Qiyuanqiii merged 2 commits into
mainfrom
codex/share-command-backend-setup
Oct 5, 2026
Merged

Qiyuanqiii merged 2 commits into
mainfrom
codex/share-command-backend-setup

Conversation

@Qiyuanqiii

@Qiyuanqiii Qiyuanqiii commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

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.

OpenCommandRuntimeSet now 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.

Qiyuanqiii and others added 2 commits October 5, 2026 11:11
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
Qiyuanqiii changed the base branch from codex/trim-ci-and-update-architecture to main October 5, 2026 03:51
@Qiyuanqiii
Qiyuanqiii merged commit 9559e09 into main Oct 5, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant