refactor(desktop): register startup tasks - #5414
Draft
colaforniaw wants to merge 5 commits into
Draft
colaforniaw wants to merge 5 commits into
colaforniaw wants to merge 5 commits into
Conversation
colaforniaw
marked this pull request as draft
September 16, 2026 16:26
colaforniaw
force-pushed
the
refactor/desktop-startup-task-registry
branch
from
September 17, 2026 07:54
aff66df to
eb1a013
Compare
added 3 commits
September 17, 2026 16:09
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
colaforniaw
force-pushed
the
refactor/desktop-startup-task-registry
branch
from
September 17, 2026 08:23
f3eb13f to
0382f09
Compare
added 2 commits
September 17, 2026 17:14
Generated-by: Codex
Generated-by: Codex
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
Make the startup task graph the production scheduling authority for Desktop Runtime Host boot.
runtime-host-boot.tsnow only supplies task implementations to the production registry and invokes onerunAll()entry point. The runner validates the complete graph before execution, performs a deterministic topological sort with registration order as the tie-break for ready peers, and models fire-and-forget startup work explicitly asdetachedtasks.The existing boot module has a large shared context, so this milestone uses the permitted migration slice:
resolve-shell-envruns first, then alegacy-runtime-host-sequenceplaceholder dynamically imports the existing boot body, and the migrated post-render/background nodes run through the same production graph. This narrows the migration surface without restoring per-task productionrunTaskcalls. Every task still transitively depends onresolve-shell-env, preserving the #1316 requirement before store, tool, or child-process work.The registry also records task start/completion timestamps, duration, phase, execution mode, and failure status through a diagnostic log observer. Measurement failures are isolated from startup behavior. This establishes the B-2 scheduling baseline without changing startup dispatch order or adding concurrency.
This is behavior-preserving: the effective startup dispatch order, synchronous throw timing, detached boundaries, and
startupStep/updateDesktopStartupProgresscadence remain unchanged.main.tsstartup gates and the public signatures ofstartup-presentation.tsandworkhub-presentation.tsare unchanged.Refs #5380
Manual orchestration removed
startupTasks.runTask(...)andrunTaskSync(...)calls fromruntime-host-boot.ts; production execution now has oneregistry.runAll()entry point.indexOf(...)assertions that treated call position as a second startup sequence; the sequence test now imports the production registration seam, runsrunAll(), and asserts execution events.Verification
npm --workspace @maka/desktop run build:with-depsnpm run build:testnpm --workspace @maka/desktop run typechecknpm run format:checknpm run lintnpm --workspace @maka/desktop run test:dist: 2695 passed across 193 suites.npx playwright test --config e2e/playwright.config.ts e2e/workhub-reconstruction.spec.ts: 1 passed.git diff --checkAI use
Select exactly one:
Tool(s) and scope: OpenAI Codex implemented the registry migration and tests, performed the fixed-snapshot review and rebase conflict audit, and ran verification. The commits include a
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?