Skip to content

fix(benchmark): isolate scanner provider defaults between runs - #210

Merged
vincentkoc merged 1 commit into
mainfrom
fix/benchmark-env-isolation
Nov 23, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/benchmark-env-isolation

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

When two in-process benchmark runs share an environment map, the first profile’s scanner provider and model defaults can carry over to the second. For example, an OpenAI run followed by an Anthropic run with only an OpenAI fixture key left SkillSpector in LLM mode for both runs.

Scope

Benchmark and scan setup now derive scanner settings from a copy of the caller’s environment. Target and profile batches also share the existing environment and clock fallback logic. The benchmark adapter interface and artifact formats are unchanged.

Security / Trust Impact

Derived settings stay local to the run that selected them. Existing credential requirements, sandbox choices and provider selection rules still apply.

Verification

The new regression failed on the base revision. It now confirms that only the OpenAI run enables LLM mode and that the caller’s environment has no added provider afterward. Both runs use a local dataset fixture and a recording command runner.

  • go test -count=1 ./...
  • go test -race -count=1 ./internal/runner -run 'Test(BenchmarkKeepsProviderDefaultsLocalToEachProfile|RunDoesNotLeakProfileDefaultsToNextRun)$'
  • go vet ./...
  • go run ./cmd/clawscan --help

@clawsweeper

clawsweeper Bot commented Nov 22, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 22, 2026 23:58
@vincentkoc
vincentkoc requested review from a team and Patrick-Erichsen as code owners November 22, 2026 23:58
@vincentkoc
vincentkoc merged commit 1222091 into main Nov 23, 2026
12 checks passed
@vincentkoc
vincentkoc deleted the fix/benchmark-env-isolation branch November 23, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant