@@ -41,6 +41,7 @@ type SidecarUtilsModule = {
4141 platform ?: string ;
4242 arch ?: string ;
4343 validateAll ?: boolean ;
44+ env ?: Record < string , string | undefined > ;
4445 } ) => ValidateSidecarsResult ;
4546} ;
4647
@@ -233,15 +234,11 @@ describe('godot sidecar bootstrap contracts', () => {
233234 ) . rejects . toThrow ( / s h a 2 5 6 / i) ;
234235 } ) ;
235236
236- test ( 'validates the host-specific godot binary name together with server and markdown worker sidecars' , ( ) => {
237+ test ( 'does not require a linux host godot binary by default when validating sidecars' , ( ) => {
237238 const fakeRepoRoot = temp . mkdir ( 'repo' ) ;
238239 const binDir = temp . mkdir ( path . join ( 'repo' , 'src-tauri' , 'bin' ) ) ;
239240 fs . writeFileSync ( path . join ( binDir , 'server-x86_64-unknown-linux-gnu' ) , 'server' ) ;
240241 fs . writeFileSync ( path . join ( binDir , 'markdown-worker-x86_64-unknown-linux-gnu' ) , 'worker' ) ;
241- fs . writeFileSync (
242- path . join ( binDir , 'godot-x86_64-unknown-linux-gnu' ) ,
243- Buffer . alloc ( sidecarUtils . MIN_GODOT_BINARY_BYTES + 8 , 5 )
244- ) ;
245242
246243 const result = sidecarUtils . validateTauriSidecars ( {
247244 repoRoot : fakeRepoRoot ,
@@ -255,6 +252,36 @@ describe('godot sidecar bootstrap contracts', () => {
255252 expect ( result . invalid ) . toEqual ( [ ] ) ;
256253 } ) ;
257254
255+ test ( 'requires the windows host godot binary together with server and markdown worker sidecars' , ( ) => {
256+ const fakeRepoRoot = temp . mkdir ( 'repo' ) ;
257+ const binDir = temp . mkdir ( path . join ( 'repo' , 'src-tauri' , 'bin' ) ) ;
258+ fs . writeFileSync ( path . join ( binDir , 'server-x86_64-pc-windows-msvc.exe' ) , 'server' ) ;
259+ fs . writeFileSync ( path . join ( binDir , 'markdown-worker-x86_64-pc-windows-msvc.exe' ) , 'worker' ) ;
260+
261+ const missingGodot = sidecarUtils . validateTauriSidecars ( {
262+ repoRoot : fakeRepoRoot ,
263+ platform : 'win32' ,
264+ arch : 'x64' ,
265+ } ) ;
266+
267+ expect ( missingGodot . invalid ) . toEqual ( [
268+ expect . stringContaining ( 'godot-x86_64-pc-windows-msvc.exe' ) ,
269+ ] ) ;
270+
271+ fs . writeFileSync (
272+ path . join ( binDir , 'godot-x86_64-pc-windows-msvc.exe' ) ,
273+ Buffer . alloc ( sidecarUtils . MIN_GODOT_BINARY_BYTES + 8 , 5 )
274+ ) ;
275+
276+ const ready = sidecarUtils . validateTauriSidecars ( {
277+ repoRoot : fakeRepoRoot ,
278+ platform : 'win32' ,
279+ arch : 'x64' ,
280+ } ) ;
281+
282+ expect ( ready . invalid ) . toEqual ( [ ] ) ;
283+ } ) ;
284+
258285 test ( 'treats git-lfs pointer placeholders as invalid server and markdown-worker sidecars' , ( ) => {
259286 const fakeRepoRoot = temp . mkdir ( 'repo' ) ;
260287 const binDir = temp . mkdir ( path . join ( 'repo' , 'src-tauri' , 'bin' ) ) ;
@@ -266,11 +293,6 @@ describe('godot sidecar bootstrap contracts', () => {
266293
267294 fs . writeFileSync ( path . join ( binDir , 'server-x86_64-unknown-linux-gnu' ) , lfsPointer ) ;
268295 fs . writeFileSync ( path . join ( binDir , 'markdown-worker-x86_64-unknown-linux-gnu' ) , lfsPointer ) ;
269- fs . writeFileSync (
270- path . join ( binDir , 'godot-x86_64-unknown-linux-gnu' ) ,
271- Buffer . alloc ( sidecarUtils . MIN_GODOT_BINARY_BYTES + 8 , 5 )
272- ) ;
273-
274296 const result = sidecarUtils . validateTauriSidecars ( {
275297 repoRoot : fakeRepoRoot ,
276298 platform : 'linux' ,
0 commit comments