Unified Agent + reusable Go agent core.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: stabilize credits and acp tests

Lyric 685c684a 421dc773

+14 -12
+1 -1
cmd/mistermorph/credits_test.go
··· 21 21 "Open Source", 22 22 "Cobra", 23 23 "Contributors", 24 - "Quaily", 24 + "Lyric Wai", 25 25 } { 26 26 if !strings.Contains(got, want) { 27 27 t.Fatalf("output missing %q:\n%s", want, got)
+13 -11
internal/acpclient/client_test.go
··· 337 337 "command": testTerminalEchoCommand(), 338 338 "args": testTerminalEchoArgs(), 339 339 "env": []map[string]any{ 340 + {"name": "MISTERMORPH_TEST_HELPER_TERMINAL_ECHO", "value": "1"}, 340 341 {"name": "MM_TERM_TEST", "value": "hello-from-terminal"}, 341 342 }, 342 343 "cwd": dir, ··· 400 401 }, 401 402 }, 402 403 }) 404 + // Let the client readLoop process the terminal notifications before the 405 + // prompt response closes the fake server side of the pipe. 406 + time.Sleep(10 * time.Millisecond) 403 407 encodeTestResponse(t, enc, promptMsg.ID, map[string]any{"stopReason": "end_turn"}) 404 408 }) 405 409 if err != nil { ··· 867 871 } 868 872 869 873 func testTerminalEchoCommand() string { 870 - switch runtime.GOOS { 871 - case "windows": 872 - return "cmd" 873 - default: 874 - return "sh" 875 - } 874 + return os.Args[0] 876 875 } 877 876 878 877 func testTerminalEchoArgs() []string { 879 - switch runtime.GOOS { 880 - case "windows": 881 - return []string{"/C", "echo %MM_TERM_TEST%"} 882 - default: 883 - return []string{"-lc", `printf '%s\n' "$MM_TERM_TEST"`} 878 + return []string{"-test.run=TestHelperProcessTerminalEcho", "--"} 879 + } 880 + 881 + func TestHelperProcessTerminalEcho(t *testing.T) { 882 + if os.Getenv("MISTERMORPH_TEST_HELPER_TERMINAL_ECHO") != "1" { 883 + return 884 884 } 885 + _, _ = io.WriteString(os.Stdout, os.Getenv("MM_TERM_TEST")+"\n") 886 + os.Exit(0) 885 887 } 886 888 887 889 func minInt(a int, b int) int {