(t *testing.T)
| 278 | func (nonBGHarness) Name() harness.Name { return harness.Name("codex") } |
| 279 | |
| 280 | func TestBackgroundLauncherForGate(t *testing.T) { |
| 281 | if _, err := backgroundLauncherFor(claude.New()); err != nil { |
| 282 | t.Errorf("claude must implement BackgroundLauncher: %v", err) |
| 283 | } |
| 284 | _, err := backgroundLauncherFor(nonBGHarness{}) |
| 285 | if err == nil { |
| 286 | t.Fatalf("non-bg harness must error (clean capability gate)") |
| 287 | } |
| 288 | if !strings.Contains(err.Error(), "codex") { |
| 289 | t.Errorf("gate error should name the harness, got: %v", err) |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | // TestBGAgentStatus: a claude-bound task whose session is in the registry |
| 294 | // resolves to its live agent (status/state/pid); absent or session-less |
nothing calls this directly
no test coverage detected