@@ -114,7 +114,7 @@ export class Monorepo {
114114 // ========================================================================
115115 const typeSharePromise = withTiming ( "TypeShare generation" , async ( ) => {
116116 const rc = getRustContainer ( source , undefined , s3AccessKeyId , s3SecretAccessKey )
117- . withExec ( [ "cargo" , "install" , "typeshare-cli" , "--locked" ] )
117+ . withExec ( [ "cargo" , "install" , "typeshare-cli" , "--locked" , "--root" , "/root/.cargo-tools" ] )
118118 . withExec ( [ "typeshare" , "." , "--lang=typescript" , "--output-file=web/shared/src/generated/index.ts" ] ) ;
119119 await rc . sync ( ) ;
120120 return rc ;
@@ -185,28 +185,37 @@ export class Monorepo {
185185
186186 // ========================================================================
187187 // TIER 3: knipCheck (needs fully-built container) + collect tier 0
188+ // Run in parallel — knip shouldn't block tier 0 collection
188189 // ========================================================================
189- try {
190- await knipCheck ( container ) . sync ( ) ;
190+ const [ knipResult , tier0Result ] = await Promise . allSettled ( [
191+ knipCheck ( container ) . sync ( ) ,
192+ collectTier0Results ( {
193+ compliance : tier0Compliance ,
194+ mobile : tier0Mobile ,
195+ birmel : tier0Birmel ,
196+ packages : tier0Packages ,
197+ quality : tier0Quality ,
198+ } ) ,
199+ ] ) ;
200+
201+ // Handle knip (non-blocking)
202+ if ( knipResult . status === "fulfilled" ) {
191203 outputs . push ( "✓ Knip" ) ;
192- } catch ( error ) {
193- const msg = error instanceof Error ? error . message : String ( error ) ;
204+ } else {
205+ const msg = knipResult . reason instanceof Error ? knipResult . reason . message : String ( knipResult . reason ) ;
194206 outputs . push ( `::warning title=Knip::${ msg . slice ( 0 , 200 ) } ` ) ;
195207 outputs . push ( `⚠ Knip (non-blocking): ${ msg } ` ) ;
196208 }
197209
198- // Collect TIER 0 results (have been running throughout critical path)
199- // Each step is try-caught so one failure doesn't prevent collecting others
200- const tier0Result = await collectTier0Results ( {
201- compliance : tier0Compliance ,
202- mobile : tier0Mobile ,
203- birmel : tier0Birmel ,
204- packages : tier0Packages ,
205- quality : tier0Quality ,
206- } ) ;
207- outputs . push ( ...tier0Result . outputs ) ;
208- if ( tier0Result . errors . length > 0 ) {
209- throw new Error ( `Tier 0 failures:\n${ tier0Result . errors . join ( "\n" ) } ` ) ;
210+ // Handle tier 0 results (blocking)
211+ if ( tier0Result . status === "fulfilled" ) {
212+ outputs . push ( ...tier0Result . value . outputs ) ;
213+ if ( tier0Result . value . errors . length > 0 ) {
214+ throw new Error ( `Tier 0 failures:\n${ tier0Result . value . errors . join ( "\n" ) } ` ) ;
215+ }
216+ } else {
217+ const reason : unknown = tier0Result . reason ;
218+ throw reason instanceof Error ? reason : new Error ( String ( reason ) ) ;
210219 }
211220
212221 // RELEASE PHASE
0 commit comments