@@ -115,14 +115,17 @@ test("OpenCode sidecar runtime extracts commands, paths, output, and hashes", ()
115115 assert . match ( hashText ( "ok" ) , / ^ [ a - f 0 - 9 ] { 64 } $ / ) ;
116116} ) ;
117117
118- test ( "OpenCode sidecar runtime records after-tool evidence through input JSON" , ( ) => {
119- const runtimeSource = readFileSync ( path . join ( import . meta. dirname , ".." , "src" , "integrations" , "opencode" , "plugin-runtime" , "index.ts" ) , "utf8" ) ;
118+ test ( "generated sidecar uses input-json evidence file" , ( ) => {
119+ const code = [
120+ opencodeSidecarPluginTemplate ( "./runtime.js" ) ,
121+ readFileSync ( path . join ( import . meta. dirname , ".." , "src" , "integrations" , "opencode" , "plugin-runtime" , "index.ts" ) , "utf8" )
122+ ] . join ( "\n" ) ;
120123
121- assert . match ( runtimeSource , / " - - i n p u t - j s o n " , i n p u t J s o n / ) ;
122- assert . doesNotMatch ( runtimeSource , / " - - s t d o u t " / ) ;
123- assert . doesNotMatch ( runtimeSource , / " - - s t d e r r " / ) ;
124- assert . doesNotMatch ( runtimeSource , / e x i t C o d e F r o m O u t p u t \( o u t p u t \) \s * \? \? \s * 0 / ) ;
125- assert . doesNotMatch ( runtimeSource , / S t r i n g \( e x i t C o d e F r o m O u t p u t \( o u t p u t \) \s * \? \? \s * 0 \) / ) ;
124+ assert . match ( code , / - - i n p u t - j s o n / ) ;
125+ assert . doesNotMatch ( code , / - - s t d o u t / ) ;
126+ assert . doesNotMatch ( code , / - - s t d e r r / ) ;
127+ assert . doesNotMatch ( code , / \? \? \s * 0 / ) ;
128+ assert . match ( code , / O p e n C o d e P l u s P l u s S i d e c a r / ) ;
126129} ) ;
127130
128131test ( "OpenCode sidecar plugin uses the OpenCode++ path" , ( ) => {
0 commit comments