feat(verify): run install in parallel with prompter, off the critical path#186
Conversation
… path verify gate split into install + check halves. install runs in each writer worktree IN PARALLEL with Phase 1 (prompter); check runs after the writer commits (unchanged). Drops install off the critical path — saves ~1-2 min wall-clock on monorepos like v2. Legacy 'cmd' still honoured.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThis PR enables concurrent dependency installation during workflow orchestration by extending the verify configuration with separate ChangesParallel Dependency Installation Phase
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Comment |
Splits verify gate into
install(parallel with Phase 1 prompter) +check(post-writer, unchanged). Drops install cost off writer's critical path — saves ~1-2 min on v2 monorepo. Legacycmdstill honoured.Paired v2 PR follows with the cube.yaml change.
Summary
This PR refactors the verify gate into a two-phase model, moving the installation phase off the writer's critical path to save 1–2 minutes on large monorepos.
Key Changes
Configuration (
VerifyConfig)installandcheckcommandseffective_checkproperty for backwards compatibility with legacycmd-only configsinstallandcheckto enable the split; legacy setups using onlycmdcontinue working unchangedExecution Model
installcommands in parallel viarun_install_async, which runs in a thread to avoid blocking the async prompter loop. Logs to.cube/verify-logs/<task>-install-<writer>.logwith timeout handling (600s default)checkcommand runs the existing verify-and-repair loop unchangedPlumbing
WorkflowContextgainsinstall_tasksfield to track background installs between phasesis_install_configured()detects if install is declared,run_install_async()executes installs in parallelis_verify_configured()updated to checkeffective_checkcallable firstphase2_run_writersnow drains install tasks before starting writers and usesconfig.verify.effective_checkinstead of rawcmdImpact
Eliminates the install cost (typically 30s–2min per monorepo) from the writer's execution window, keeping node_modules warm without blocking feedback loops.