| index 9d6a353b..1e90d029 100644 |
| --- a/internal/headless/env_test.go |
| +++ b/internal/headless/env_test.go |
| @@ -451,14 +451,14 @@ func stagingEnv(t *testing.T) *Env { |
| |
| // processConfig is what a runner subprocess needs; runner.Config holds a func. |
| type processConfig struct { |
| - Origin, InstanceID, StateDir, AccountBindingsPath, AmadanCredentialPath string |
| - ClaudePath, CodexPath, CodexCodeModeHostPath, BwrapPath, GoRoot string |
| - GoBinary, WorkspaceRoot, ScratchRoot, GitPath, AmadanPath, ToolProxy string |
| - Digest, MoveInNote string |
| - MachineLabel, FakePlatform, FakeBin, FakeSandbox string |
| - CodexDigest, CodexHostDigest, AccountsRoot string |
| - NoMoveIn bool |
| - Idle, LockWait, MaxTurn, Margin time.Duration |
| + Origin, InstanceID, StateDir, AccountBindingsPath, AmadanCredentialPath string |
| + ClaudePath, CodexPath, CodexCodeModeHostPath, BwrapPath, GoRoot, ModuleCache string |
| + GoBinary, WorkspaceRoot, ScratchRoot, GitPath, AmadanPath, ToolProxy string |
| + Digest, MoveInNote string |
| + MachineLabel, FakePlatform, FakeBin, FakeSandbox string |
| + CodexDigest, CodexHostDigest, AccountsRoot string |
| + NoMoveIn bool |
| + Idle, LockWait, MaxTurn, Margin time.Duration |
| // Forge is the local forge's state, so a runner process works on the |
| // same bare repositories as an in-process one. |
| Forge *localForgeState |
| @@ -471,7 +471,7 @@ func runnerProcess(path string) int { |
| return 2 |
| } |
| self, _ := os.Executable() |
| - cfg := runner.Config{MachineLabel: p.MachineLabel, Origin: p.Origin, InstanceID: p.InstanceID, StateDir: p.StateDir, AccountBindingsPath: p.AccountBindingsPath, AmadanCredentialPath: p.AmadanCredentialPath, ClaudePath: p.ClaudePath, CodexPath: p.CodexPath, CodexCodeModeHostPath: p.CodexCodeModeHostPath, BwrapPath: p.BwrapPath, GoRoot: p.GoRoot, GoBinary: p.GoBinary, WorkspaceRoot: p.WorkspaceRoot, ScratchRoot: p.ScratchRoot, GitPath: p.GitPath, AmadanPath: p.AmadanPath, ToolProxyPath: p.ToolProxy, Executable: self} |
| + cfg := runner.Config{MachineLabel: p.MachineLabel, Origin: p.Origin, InstanceID: p.InstanceID, StateDir: p.StateDir, AccountBindingsPath: p.AccountBindingsPath, AmadanCredentialPath: p.AmadanCredentialPath, ClaudePath: p.ClaudePath, CodexPath: p.CodexPath, CodexCodeModeHostPath: p.CodexCodeModeHostPath, BwrapPath: p.BwrapPath, GoRoot: p.GoRoot, ModuleCache: p.ModuleCache, GoBinary: p.GoBinary, WorkspaceRoot: p.WorkspaceRoot, ScratchRoot: p.ScratchRoot, GitPath: p.GitPath, AmadanPath: p.AmadanPath, ToolProxyPath: p.ToolProxy, Executable: self} |
| ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGTERM, os.Interrupt) |
| defer stop() |
| opts := thin.Options{Version: "test", Logger: slog.New(slog.NewTextHandler(os.Stderr, nil)), NoMoveIn: p.NoMoveIn, MergeEvery: time.Second, FakePlatform: p.FakePlatform, FakeBin: p.FakeBin, FakeSandbox: p.FakeSandbox} |
| @@ -504,7 +504,7 @@ func (r *localRunner) startProcess(t *testing.T) { |
| if lf, ok := r.opts.Forge.(*localForge); ok { |
| fs = lf.state() |
| } |
| - raw, _ := json.Marshal(processConfig{Forge: fs, Origin: c.Origin, InstanceID: c.InstanceID, StateDir: c.StateDir, AccountBindingsPath: c.AccountBindingsPath, AmadanCredentialPath: c.AmadanCredentialPath, ClaudePath: c.ClaudePath, CodexPath: c.CodexPath, CodexCodeModeHostPath: c.CodexCodeModeHostPath, BwrapPath: c.BwrapPath, GoRoot: c.GoRoot, GoBinary: c.GoBinary, WorkspaceRoot: c.WorkspaceRoot, ScratchRoot: c.ScratchRoot, GitPath: c.GitPath, AmadanPath: c.AmadanPath, ToolProxy: c.ToolProxyPath, Digest: o.Digest, MoveInNote: o.MoveInNote, CodexDigest: r.opts.Codex.Digest, CodexHostDigest: r.opts.Codex.HostDigest, MachineLabel: c.MachineLabel, FakePlatform: r.opts.FakePlatform, FakeBin: r.opts.FakeBin, FakeSandbox: r.opts.FakeSandbox, AccountsRoot: r.opts.AccountsRoot, NoMoveIn: r.opts.NoMoveIn, Idle: o.Idle, LockWait: o.LockWait, MaxTurn: o.MaxTurn, Margin: o.Margin}) |
| + raw, _ := json.Marshal(processConfig{Forge: fs, Origin: c.Origin, InstanceID: c.InstanceID, StateDir: c.StateDir, AccountBindingsPath: c.AccountBindingsPath, AmadanCredentialPath: c.AmadanCredentialPath, ClaudePath: c.ClaudePath, CodexPath: c.CodexPath, CodexCodeModeHostPath: c.CodexCodeModeHostPath, BwrapPath: c.BwrapPath, GoRoot: c.GoRoot, ModuleCache: c.ModuleCache, GoBinary: c.GoBinary, WorkspaceRoot: c.WorkspaceRoot, ScratchRoot: c.ScratchRoot, GitPath: c.GitPath, AmadanPath: c.AmadanPath, ToolProxy: c.ToolProxyPath, Digest: o.Digest, MoveInNote: o.MoveInNote, CodexDigest: r.opts.Codex.Digest, CodexHostDigest: r.opts.Codex.HostDigest, MachineLabel: c.MachineLabel, FakePlatform: r.opts.FakePlatform, FakeBin: r.opts.FakeBin, FakeSandbox: r.opts.FakeSandbox, AccountsRoot: r.opts.AccountsRoot, NoMoveIn: r.opts.NoMoveIn, Idle: o.Idle, LockWait: o.LockWait, MaxTurn: o.MaxTurn, Margin: o.Margin}) |
| path := filepath.Join(r.root, "runner.json") |
| if err := os.WriteFile(path, raw, 0600); err != nil { |
| t.Fatal(err) |
| @@ -593,7 +593,7 @@ func runnerSetup(t *testing.T, origin, teamID string, cred runnerproto.RunnerCre |
| bindings := filepath.Join(config, "bindings.json") |
| writeJSON(t, bindings, []map[string]any{{"id": "claude-1", "local_id": "claude-1", "label": "claude-1", "person_id": thintest.Owner, "provider": "claude", "family": "claude", "model": "claude-opus-5-5", "account_id": thintest.Owner, "provider_home": home, "kind": "subscription", "expected_identity": identity}}) |
| self, _ := os.Executable() |
| - cfg := runner.Config{Origin: origin, InstanceID: teamID, StateDir: state, AccountBindingsPath: bindings, AmadanCredentialPath: filepath.Join(config, "amadan.json"), ClaudePath: filepath.Join(bin, "claude"), CodexPath: filepath.Join(bin, "codex"), CodexCodeModeHostPath: filepath.Join(bin, "codex-code-mode-host"), BwrapPath: "/usr/bin/bwrap", GoRoot: filepath.Join(root, "go"), GoBinary: filepath.Join(root, "go", "bin", "go"), WorkspaceRoot: filepath.Join(root, "work"), ScratchRoot: filepath.Join(root, "scratch"), GitPath: "/usr/bin/git", AmadanPath: filepath.Join(bin, "claude"), ToolProxyPath: filepath.Join(bin, "equipo-tool-proxy"), Executable: self} |
| + cfg := runner.Config{Origin: origin, InstanceID: teamID, StateDir: state, AccountBindingsPath: bindings, AmadanCredentialPath: filepath.Join(config, "amadan.json"), ClaudePath: filepath.Join(bin, "claude"), CodexPath: filepath.Join(bin, "codex"), CodexCodeModeHostPath: filepath.Join(bin, "codex-code-mode-host"), BwrapPath: "/usr/bin/bwrap", GoRoot: private(t, filepath.Join(root, "go")), ModuleCache: private(t, filepath.Join(root, "modules")), GoBinary: filepath.Join(root, "go", "bin", "go"), WorkspaceRoot: filepath.Join(root, "work"), ScratchRoot: filepath.Join(root, "scratch"), GitPath: "/usr/bin/git", AmadanPath: filepath.Join(bin, "claude"), ToolProxyPath: filepath.Join(bin, "equipo-tool-proxy"), Executable: self} |
| logger := slog.New(slog.NewTextHandler(io.Discard, nil)) |
| if testing.Verbose() { |
| logger = slog.New(slog.NewTextHandler(os.Stderr, nil)) |