@@ -30,7 +30,8 @@ import (
3030 _ "github.com/joho/godotenv/autoload"
3131)
3232
33−type env struct {
33+// fakeEnv is an environment for testing.
34+type fakeEnv struct {
3435 workingDir string
3536 sessions session.Service
3637 messages message.Service
@@ -100,7 +101,7 @@ func zAIBuilder(model string) builderFunc {
100101 }
101102}
102103
103−func testEnv(t *testing.T) env {
104+func testEnv(t *testing.T) fakeEnv {
104105 workingDir := filepath.Join("/tmp/crush-test/", t.Name())
105106 os.RemoveAll(workingDir)
106107
@@ -123,7 +124,7 @@ func testEnv(t *testing.T) env {
123124 os.RemoveAll(workingDir)
124125 })
125126
126− return env{
127+ return fakeEnv{
127128 workingDir,
128129 sessions,
129130 messages,
@@ -133,7 +134,7 @@ func testEnv(t *testing.T) env {
133134 }
134135}
135136
136−func testSessionAgent(env env, large, small fantasy.LanguageModel, systemPrompt string, tools ...fantasy.AgentTool) SessionAgent {
137+func testSessionAgent(env fakeEnv, large, small fantasy.LanguageModel, systemPrompt string, tools ...fantasy.AgentTool) SessionAgent {
137138 largeModel := Model{
138139 Model: large,
139140 CatwalkCfg: catwalk.Model{
@@ -152,7 +153,7 @@ func testSessionAgent(env env, large, small fantasy.LanguageModel, systemPrompt
152153 return agent
153154}
154155
155−func coderAgent(r *recorder.Recorder, env env, large, small fantasy.LanguageModel) (SessionAgent, error) {
156+func coderAgent(r *recorder.Recorder, env fakeEnv, large, small fantasy.LanguageModel) (SessionAgent, error) {
156157 fixedTime := func() time.Time {
157158 t, _ := time.Parse("1/2/2006", "1/1/2025")
158159 return t