@@ -63,14 +63,25 @@ export interface SkippedMachine {
6363 readonly reason : string ;
6464}
6565
66+ /** Boot services before this build installed the server from npm, not from release archives. */
67+ const RELEASE_ARCHIVE_SELF_UPDATE_SINCE = "0.0.41-nightly.20260914.1700" ;
68+
6669/** Skip current and app-hosted servers; the latter update with the app and would relaunch mid-run.
67- * Desktop-managed servers use their own feed. */
70+ * Desktop-managed servers use their own feed. `waitForNpm` lists targets that need
71+ * `t3@<targetVersion>` on npm first. `releaseArchivesPublished` means the version came from the
72+ * desktop feed: its GitHub Release goes public with the CLI archives that boot services download. */
6873export function collectServerUpdateTargets (
6974 machines : ReadonlyArray < UpdateEverythingMachine > ,
7075 targetVersion : string ,
71- ) : { readonly targets : ServerUpdateTarget [ ] ; readonly skipped : SkippedMachine [ ] } {
76+ releaseArchivesPublished : boolean ,
77+ ) : {
78+ readonly targets : ServerUpdateTarget [ ] ;
79+ readonly skipped : SkippedMachine [ ] ;
80+ readonly waitForNpm : ServerUpdateTarget [ ] ;
81+ } {
7282 const targets : ServerUpdateTarget [ ] = [ ] ;
7383 const skipped : SkippedMachine [ ] = [ ] ;
84+ const waitForNpm : ServerUpdateTarget [ ] = [ ] ;
7485 for ( const machine of machines ) {
7586 const config = machine . serverConfig ;
7687 if ( machine . hostedByThisApp ) continue ;
@@ -105,16 +116,25 @@ export function collectServerUpdateTargets(
105116 skip ( `on the ${ cliReleaseChannelOf ( serverVersion ) } channel` ) ;
106117 continue ;
107118 }
108- targets . push ( {
119+ const target : ServerUpdateTarget = {
109120 environmentId : machine . environmentId ,
110121 serverLabel : machine . label ,
111122 selfUpdate,
112123 installation : config . environment . capabilities . serverInstallation ,
113124 desktopAppUpdate,
114125 targetVersion,
115- } ) ;
126+ } ;
127+ targets . push ( target ) ;
128+ if (
129+ selfUpdate !== "desktop-managed" &&
130+ ( ! releaseArchivesPublished ||
131+ selfUpdate === "respawn" ||
132+ compareSemverVersions ( serverVersion , RELEASE_ARCHIVE_SELF_UPDATE_SINCE ) < 0 )
133+ ) {
134+ waitForNpm . push ( target ) ;
135+ }
116136 }
117- return { targets, skipped } ;
137+ return { targets, skipped, waitForNpm } ;
118138}
119139
120140function unavailableReason ( machine : UpdateEverythingMachine ) : string | null {
0 commit comments