Repository navigation
fix(benchmark): isolate scanner provider defaults between runs - #210
Merged
Merged
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
vincentkoc
marked this pull request as ready for review
November 22, 2026 23:58
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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