TestRemoteRuntime_Contract runs the same surface contract LocalRuntime passes against a RemoteRuntime backed by a stub client. Any silent no-op on RemoteRuntime that the contract considers a failure surfaces here as a red test rather than a runtime user complaint.
(t *testing.T)
| 154 | // no-op on RemoteRuntime that the contract considers a failure surfaces |
| 155 | // here as a red test rather than a runtime user complaint. |
| 156 | func TestRemoteRuntime_Contract(t *testing.T) { |
| 157 | t.Parallel() |
| 158 | |
| 159 | runRuntimeContract(t, func(t *testing.T) Runtime { |
| 160 | t.Helper() |
| 161 | client := &stubRemoteClient{ |
| 162 | cfg: &latest.Config{ |
| 163 | Agents: latest.Agents{ |
| 164 | {Name: "test", Description: "test agent"}, |
| 165 | }, |
| 166 | }, |
| 167 | } |
| 168 | rt, err := NewRemoteRuntime(client) |
| 169 | require.NoError(t, err) |
| 170 | |
| 171 | // Seed a session ID so Steer / FollowUp / Resume / ResumeElicitation |
| 172 | // reach the (stubbed) client instead of returning "no active session". |
| 173 | rt.sessionID = "test-session" |
| 174 | return rt |
| 175 | }) |
| 176 | } |
| 177 | |
| 178 | // TestRemoteRuntime_SetCurrentAgent_PropagatesClientError pins the |
| 179 | // fixed behaviour reviewers flagged: when GetAgent fails (network, |
nothing calls this directly
no test coverage detected