-
Notifications
You must be signed in to change notification settings - Fork 3.6k
perf(cli): long start due to synchronous config init in normal flow run #8138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 2 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="extensions/cli/src/onboarding.ts">
<violation number="1" location="extensions/cli/src/onboarding.ts:300">
Discarding the promise from runNormalFlow here lets onboarding continue even if config initialization fails, and the resulting rejection becomes unhandled.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
extensions/cli/src/onboarding.ts
Outdated
if (rules && rules.length > 0 && !result.wasOnboarded) { | ||
result.config = await injectRulesIntoConfig(result.config, rules); | ||
// when running normal flow, initialize (remote) config asynchronously | ||
void (async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discarding the promise from runNormalFlow here lets onboarding continue even if config initialization fails, and the resulting rejection becomes unhandled.
Prompt for AI agents
Address the following comment on extensions/cli/src/onboarding.ts at line 300:
<comment>Discarding the promise from runNormalFlow here lets onboarding continue even if config initialization fails, and the resulting rejection becomes unhandled.</comment>
<file context>
@@ -280,24 +280,35 @@ export async function initializeWithOnboarding(
- if (rules && rules.length > 0 && !result.wasOnboarded) {
- result.config = await injectRulesIntoConfig(result.config, rules);
+ // when running normal flow, initialize (remote) config asynchronously
+ void (async () => {
+ const onboardingResult = await runNormalFlow(
+ authConfig,
</file context>
✅ Addressed in 452da6e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uinstinct cubic comment seems right
Do we actually need the rules injected in config for onboarding? Could we just not load config/only load model or similar?
Right. |
6019e7a
to
5563846
Compare
🎉 This PR is included in version 1.24.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
When doing
runNormalFlow
, we need the config only for rules injection.We already fetch the config again when initializing services for config.
resolves CON-4174
AI Code Review
@continue-review
Checklist
Screen recording or screenshot
reduction of init time by approx 2 seconds
before
after

Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Make CLI start faster by initializing normal-flow config asynchronously instead of blocking; startup time drops by ~2 seconds. Addresses CON-4174.