mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-02 03:35:09 +02:00
fix(benchmark): pass --skip-git-repo-check to codex adapter
The gpt provider adapter spawns `codex exec -C <workdir>` with arbitrary working directories (benchmark temp dirs, non-git paths). Without `--skip-git-repo-check`, codex refuses to run and returns "Not inside a trusted directory" — surfaced as a generic error.code='unknown' that looks like an API failure. Benchmarks don't care about codex's git-repo trust model; we just want the prompt executed. Surfaced by the new provider live E2E test on a temp workdir. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,10 @@ export class GptAdapter implements ProviderAdapter {
|
||||
|
||||
async run(opts: RunOpts): Promise<RunResult> {
|
||||
const start = Date.now();
|
||||
const args = ['exec', opts.prompt, '-C', opts.workdir, '-s', 'read-only', '--json'];
|
||||
// `--skip-git-repo-check` lets codex run in arbitrary working directories
|
||||
// (temp dirs, non-git paths) without the interactive trust prompt. Benchmarks
|
||||
// often don't care about the workdir — they're just running a prompt.
|
||||
const args = ['exec', opts.prompt, '-C', opts.workdir, '-s', 'read-only', '--skip-git-repo-check', '--json'];
|
||||
if (opts.model) args.push('-m', opts.model);
|
||||
if (opts.extraArgs) args.push(...opts.extraArgs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user