@@ -204,6 +204,41 @@ def runner(argv, **kwargs):
204204 assert {Path (argv [0 ]).name for argv in calls } == set (acceptance_module .COMPONENT_IDS )
205205
206206
207+ def test_smoke_accepts_sessionfind_command_list_help (acceptance_module , tmp_path ):
208+ managed_bin = tmp_path / "xdg-data" / "brigade" / "bin"
209+ _write_managed_binaries (managed_bin )
210+
211+ def runner (argv , ** kwargs ):
212+ if Path (argv [0 ]).name == "graphtrail-mcp" :
213+ return subprocess .CompletedProcess (argv , 0 , '{"jsonrpc":"2.0","id":1,"result":{}}' , "" )
214+ if Path (argv [0 ]).name == "sessionfind" :
215+ return subprocess .CompletedProcess (argv , 0 , "\n sessionfind query [PATH]...\n " , "" )
216+ return subprocess .CompletedProcess (argv , 0 , "ok" , "" )
217+
218+ acceptance_module .smoke_managed_components (
219+ {component_id : managed_bin / component_id for component_id in acceptance_module .COMPONENT_IDS },
220+ runner = runner ,
221+ )
222+
223+
224+ def test_smoke_rejects_sessionfind_unrelated_success_output (acceptance_module , tmp_path ):
225+ managed_bin = tmp_path / "xdg-data" / "brigade" / "bin"
226+ _write_managed_binaries (managed_bin )
227+
228+ def runner (argv , ** kwargs ):
229+ if Path (argv [0 ]).name == "graphtrail-mcp" :
230+ return subprocess .CompletedProcess (argv , 0 , '{"jsonrpc":"2.0","id":1,"result":{}}' , "" )
231+ if Path (argv [0 ]).name == "sessionfind" :
232+ return subprocess .CompletedProcess (argv , 0 , "commands available" , "no help text" )
233+ return subprocess .CompletedProcess (argv , 0 , "ok" , "" )
234+
235+ with pytest .raises (acceptance_module .AcceptanceError , match = "sessionfind smoke produced no help text" ):
236+ acceptance_module .smoke_managed_components (
237+ {component_id : managed_bin / component_id for component_id in acceptance_module .COMPONENT_IDS },
238+ runner = runner ,
239+ )
240+
241+
207242def test_poison_binary_invocation_is_a_failure (acceptance_module , tmp_path ):
208243 marker = tmp_path / "poison-invoked"
209244 marker .write_text ("graphtrail\n " )
0 commit comments