@@ -182,31 +182,6 @@ export async function buildClauderonWeb(
182182 return { container : c , frontendDist, outputs } ;
183183}
184184
185- /** Retry a check if it fails with a transient Dagger graphql error. */
186- async function withGraphqlRetry < T > (
187- name : string ,
188- fn : ( ) => Promise < T > ,
189- maxRetries = 2 ,
190- ) : Promise < T > {
191- for ( let attempt = 0 ; attempt <= maxRetries ; attempt ++ ) {
192- try {
193- return await fn ( ) ;
194- } catch ( error ) {
195- const msg = error instanceof Error ? error . message : String ( error ) ;
196- const isGraphqlError = msg . includes (
197- "unknown error while requesting data via graphql" ,
198- ) ;
199- if ( ! isGraphqlError || attempt === maxRetries ) {
200- throw error ;
201- }
202- console . log (
203- `⟳ ${ name } : graphql error on attempt ${ String ( attempt + 1 ) } , retrying...` ,
204- ) ;
205- }
206- }
207- throw new Error ( "unreachable" ) ;
208- }
209-
210185/** Run package-specific validation checks in parallel. */
211186export async function runPackageValidation (
212187 source : Directory ,
@@ -244,11 +219,9 @@ export async function runPackageValidation(
244219 }
245220 }
246221
247- // Run scout-for-lol separately with retry to avoid graphql errors
222+ // Run scout-for-lol separately to avoid graphql errors from engine pressure
248223 try {
249- outputs . push (
250- await withGraphqlRetry ( "scout-for-lol" , ( ) => checkScoutForLol ( source ) ) ,
251- ) ;
224+ outputs . push ( await checkScoutForLol ( source ) ) ;
252225 } catch ( error ) {
253226 const msg = error instanceof Error ? error . message : String ( error ) ;
254227 outputs . push ( `✗ scout-for-lol: ${ msg } ` ) ;
@@ -452,32 +425,51 @@ export async function runReleasePhase(
452425 }
453426 }
454427
455- // App deployments (parallel, returns appVersions from successful deploys)
456- const deployResult = await runAppDeployments ( options ) ;
457- outputs . push ( ...deployResult . outputs ) ;
458- errors . push ( ...deployResult . errors ) ;
428+ // App deployments and Clauderon binary release in parallel
429+ // (independent of each other — clauderon needs releaseOutput, deploys need options)
430+ const [ deploySettled , clauderonSettled ] = await Promise . allSettled ( [
431+ runAppDeployments ( options ) ,
432+ runClauderonRelease ( options , releaseResult . releaseOutput ) ,
433+ ] ) ;
434+
435+ // Extract deploy result
436+ let deployAppVersions : Record < string , string > = { } ;
437+ if ( deploySettled . status === "fulfilled" ) {
438+ outputs . push ( ...deploySettled . value . outputs ) ;
439+ errors . push ( ...deploySettled . value . errors ) ;
440+ deployAppVersions = deploySettled . value . appVersions ;
441+ } else {
442+ const msg =
443+ deploySettled . reason instanceof Error
444+ ? deploySettled . reason . message
445+ : String ( deploySettled . reason ) ;
446+ outputs . push ( `✗ App deployments: ${ msg } ` ) ;
447+ errors . push ( `App deployments: ${ msg } ` ) ;
448+ }
449+
450+ // Extract clauderon result
451+ if ( clauderonSettled . status === "fulfilled" ) {
452+ outputs . push ( ...clauderonSettled . value . outputs ) ;
453+ errors . push ( ...clauderonSettled . value . errors ) ;
454+ } else {
455+ const msg =
456+ clauderonSettled . reason instanceof Error
457+ ? clauderonSettled . reason . message
458+ : String ( clauderonSettled . reason ) ;
459+ outputs . push ( `✗ Clauderon release: ${ msg } ` ) ;
460+ errors . push ( `Clauderon release: ${ msg } ` ) ;
461+ }
459462
460463 // Homelab release (needs appVersions from deployments)
461- const homelabResult = await runHomelabRelease (
462- options ,
463- deployResult . appVersions ,
464- ) ;
464+ const homelabResult = await runHomelabRelease ( options , deployAppVersions ) ;
465465 outputs . push ( ...homelabResult . outputs ) ;
466466 errors . push ( ...homelabResult . errors ) ;
467467
468- // Clauderon binary release
469- const clauderonResult = await runClauderonRelease (
470- options ,
471- releaseResult . releaseOutput ,
472- ) ;
473- outputs . push ( ...clauderonResult . outputs ) ;
474- errors . push ( ...clauderonResult . errors ) ;
475-
476468 // Version commit-back — AFTER all deployments, only if no errors
477469 if ( errors . length === 0 ) {
478470 const commitResult = await runVersionCommitBack (
479471 options ,
480- deployResult . appVersions ,
472+ deployAppVersions ,
481473 homelabResult . infraVersions ,
482474 ) ;
483475 outputs . push ( ...commitResult ) ;
0 commit comments