@@ -174,6 +174,10 @@ vi.mock("../infra/restart-stale-pids.js", () => ({
174174 getSelfAndAncestorPidsSync : ( ) => mockGetSelfAndAncestorPidsSync ( ) ,
175175} ) ) ;
176176
177+ vi . mock ( "../infra/update-managed-service-handoff-cleanup.js" , ( ) => ( {
178+ cleanupStaleManagedServiceUpdateHandoffs : vi . fn ( async ( ) => 0 ) ,
179+ } ) ) ;
180+
177181vi . mock ( "node:child_process" , async ( ) => {
178182 const actual = await vi . importActual < typeof import ( "node:child_process" ) > ( "node:child_process" ) ;
179183 return {
@@ -224,6 +228,32 @@ vi.mock("../plugins/installed-plugin-index-records.js", async (importOriginal) =
224228 } ;
225229} ) ;
226230
231+ vi . mock ( "./update-cli/post-core-plugin-convergence.js" , ( ) => ( {
232+ convergenceWarningsToOutcomes : ( convergence : {
233+ warnings : Array < { pluginId ?: string ; message : string } > ;
234+ errored : boolean ;
235+ } ) => ( {
236+ warnings : convergence . warnings ,
237+ outcomes : convergence . warnings
238+ . filter ( ( warning ) : warning is { pluginId : string ; message : string } =>
239+ Boolean ( warning . pluginId ) ,
240+ )
241+ . map ( ( warning ) => ( {
242+ pluginId : warning . pluginId ,
243+ status : "error" ,
244+ message : warning . message ,
245+ } ) ) ,
246+ errored : convergence . errored ,
247+ } ) ,
248+ runPostCorePluginConvergence : vi . fn ( async ( params : { baselineInstallRecords ?: unknown } ) => ( {
249+ changes : [ ] ,
250+ warnings : [ ] ,
251+ errored : false ,
252+ smokeFailures : [ ] ,
253+ installRecords : params . baselineInstallRecords ?? { } ,
254+ } ) ) ,
255+ } ) ) ;
256+
227257vi . mock ( "../daemon/service.js" , ( ) => ( {
228258 readGatewayServiceState : async ( ) => {
229259 const command = await serviceReadCommand ( ) ;
0 commit comments