@@ -112,9 +112,11 @@ describe("Cloudflare-fronted VPS deployment", () => {
112112 readFile ( join ( deploymentRoot , "vps" , "deploy.sh" ) , "utf8" ) ,
113113 ] ) ;
114114
115- expect ( config ) . toContain (
116- '~^/social/pyble-beta-og-1200x630\\.(?:png|svg)(?:\\?|$) "no-store";' ,
117- ) ;
115+ for ( const extension of [ "png" , "svg" ] ) {
116+ const path = `/social/pyble-beta-og-1200x630.${ extension } ` ;
117+ expect ( config ) . toContain ( `"${ path } " "no-store";` ) ;
118+ expect ( config ) . toContain ( `~^${ path . replace ( "." , "\\." ) } \\? "no-store";` ) ;
119+ }
118120 expect ( script ) . toContain ( "retired_public_asset_paths=(" ) ;
119121 expect ( script ) . toContain ( "/social/pyble-beta-og-1200x630.png" ) ;
120122 expect ( script ) . toContain ( "/social/pyble-beta-og-1200x630.svg" ) ;
@@ -257,6 +259,24 @@ describe("Cloudflare-fronted VPS deployment", () => {
257259 ) ;
258260 } ) ;
259261
262+ it ( "routes explicit post-activation smoke rejections through rollback" , async ( ) => {
263+ const script = await readFile (
264+ join ( deploymentRoot , "vps" , "deploy.sh" ) ,
265+ "utf8" ,
266+ ) ;
267+ const smokeStart = script . indexOf ( "trap rollback_on_smoke_error ERR" ) ;
268+ const smokeEnd = script . indexOf ( "trap - ERR" , smokeStart + 1 ) ;
269+ const smokeRegion = script . slice ( smokeStart , smokeEnd ) ;
270+
271+ expect ( smokeStart ) . toBeGreaterThan ( - 1 ) ;
272+ expect ( smokeEnd ) . toBeGreaterThan ( smokeStart ) ;
273+ expect ( script ) . toMatch (
274+ / r e j e c t _ p o s t _ a c t i v a t i o n _ s m o k e \( \) [ \s \S ] * ?r e t u r n \s + " \$ \{ s m o k e _ s t a t u s \} " / ,
275+ ) ;
276+ expect ( smokeRegion ) . not . toMatch ( / \b e x i t \s + (?: 6 6 | 6 7 ) \b / ) ;
277+ expect ( smokeRegion ) . toMatch ( / \b r e j e c t _ p o s t _ a c t i v a t i o n _ s m o k e \s + (?: 6 6 | 6 7 ) \b / ) ;
278+ } ) ;
279+
260280 it ( "arms rollback before the current symlink can switch or the activation SSH can fail" , async ( ) => {
261281 const script = await readFile (
262282 join ( deploymentRoot , "vps" , "deploy.sh" ) ,
0 commit comments