@@ -207,7 +207,7 @@ describe("runInferenceSet Hermes routing", () => {
207207 expect ( seedOrder ) . toBeGreaterThan ( writeOrder ) ;
208208 } ) ;
209209
210- it ( "does not re-seed the dashboard when the in-sandbox config write fails (#6893 )" , async ( ) => {
210+ it ( "fails after commit when the in-sandbox config write fails (#7083 )" , async ( ) => {
211211 const config : ConfigObject = {
212212 model : { default : "moonshotai/kimi-k2.6" , provider : "custom" } ,
213213 } ;
@@ -227,22 +227,32 @@ describe("runInferenceSet Hermes routing", () => {
227227 throw new Error ( "write failed" ) ;
228228 } ) ;
229229
230- await runInferenceSet (
231- {
230+ await expect (
231+ runInferenceSet (
232+ {
233+ provider : "hermes-provider" ,
234+ model : "openai/gpt-5.4-mini" ,
235+ sandboxName : "hermes" ,
236+ noVerify : true ,
237+ } ,
238+ deps ,
239+ ) ,
240+ ) . rejects . toThrow ( / H e r m e s i n f e r e n c e r o u t e s y n c h r o n i z a t i o n d i d n o t c o m p l e t e / ) ;
241+
242+ // A failed gateway-config write leaves the old config in place; re-seeding the
243+ // dashboard from it would be pointless. The host route remains committed, but
244+ // the command must fail so automation cannot accept a partial switch.
245+ expect ( deps . calls . updateSandbox ) . toHaveBeenCalledWith (
246+ "hermes" ,
247+ expect . objectContaining ( {
232248 provider : "hermes-provider" ,
233249 model : "openai/gpt-5.4-mini" ,
234- sandboxName : "hermes" ,
235- noVerify : true ,
236- } ,
237- deps ,
250+ } ) ,
238251 ) ;
239-
240- // A failed gateway-config write leaves the old config in place; re-seeding the
241- // dashboard from it would be pointless (and the guidance is to rebuild).
242252 expect ( deps . calls . seedHermesDashboardConfig ) . not . toHaveBeenCalled ( ) ;
243253 } ) ;
244254
245- it ( "does not re-seed or report synced when the config hash refresh fails (#6893 )" , async ( ) => {
255+ it ( "fails after commit when the config hash refresh fails (#7083 )" , async ( ) => {
246256 const config : ConfigObject = {
247257 model : { default : "moonshotai/kimi-k2.6" , provider : "custom" } ,
248258 } ;
@@ -262,15 +272,17 @@ describe("runInferenceSet Hermes routing", () => {
262272 throw new Error ( "hash refresh failed" ) ;
263273 } ) ;
264274
265- await runInferenceSet (
266- {
267- provider : "hermes-provider" ,
268- model : "openai/gpt-5.4-mini" ,
269- sandboxName : "hermes" ,
270- noVerify : true ,
271- } ,
272- deps ,
273- ) ;
275+ await expect (
276+ runInferenceSet (
277+ {
278+ provider : "hermes-provider" ,
279+ model : "openai/gpt-5.4-mini" ,
280+ sandboxName : "hermes" ,
281+ noVerify : true ,
282+ } ,
283+ deps ,
284+ ) ,
285+ ) . rejects . toThrow ( / H e r m e s i n f e r e n c e r o u t e s y n c h r o n i z a t i o n d i d n o t c o m p l e t e / ) ;
274286
275287 expect ( deps . calls . writeSandboxConfig ) . toHaveBeenCalledOnce ( ) ;
276288 expect ( deps . calls . seedHermesDashboardConfig ) . not . toHaveBeenCalled ( ) ;
0 commit comments