Skip to content

fix(benchmark): resolve select agent_dirs against the suite directory - #705

Merged
piekstra merged 1 commit into
mainfrom
fix/benchmark-select-suite-relative-agent-dirs
Nov 2, 2026
Merged

piekstra merged 1 commit into
mainfrom
fix/benchmark-select-suite-relative-agent-dirs

Conversation

@piekstra

@piekstra piekstra commented Nov 2, 2026

Copy link
Copy Markdown
Member

Closes #702

Problem

cr benchmark select passed candidate stages.reviewers.agent_dirs to the selection pipeline as written, so a relative entry resolved against the working directory. cr benchmark run resolves the same field against the suite file's directory, as BENCHMARKING.md documents. A suite at .codereview/benchmarks/suite.yml with agent_dirs: [../agents] ran from anywhere, but select worked only from inside .codereview/benchmarks/. From the repository root every case failed with agents: read source ../agents: … no such file or directory.

Fix

select resolves each agent_dirs entry with benchmark.ResolveSuitePath(suiteDir, dir), the helper run already uses. Absolute paths are unchanged. The BENCHMARKING.md selection field-mapping table now says the entries are resolved against the suite file directory.

Tests

TestSelectResolvesRelativeAgentDirsAgainstSuiteDirectory runs benchmark select from an unrelated working directory on a suite with agent_dirs: [../agents]. It asserts the selection request carries the suite-relative absolute path. Without the fix it carries ../agents and fails.

make check passes (tidy, fmt, lint with 0 issues, tests, build).

benchmark select passed candidate agent_dirs through as written, so a relative entry resolved against the working directory while benchmark run and BENCHMARKING.md resolve it against the suite file directory. Resolve each entry with benchmark.ResolveSuitePath, as run does.

Closes #702

Twapp-Session: 59d912f3-982f-402e-8bd8-3e31269a28b0

@piekstra-dev piekstra-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated PR Review

Reviewed commit: e34e79e689bb
Profile: reviewer - Posting as: piekstra-dev

Summary

Reviewer Findings
go:implementation-tests 0
documentation:docs 0
policies:conventions 0
go:implementation 0

Reviewer Coverage

Complete coverage details are retained in the local coverage.json artifact.

  • go:implementation-tests — complete (broad); scope: 2 files; examples: internal/cmd/benchmarkcmd/select.go, internal/cmd/benchmarkcmd/select_test.go; body-inspected: 2 files; examples: internal/cmd/benchmarkcmd/select.go, internal/cmd/benchmarkcmd/select_test.go; skipped: none; constraints: Tests were not executed; review was static, based on the diff and benchmark.ResolveSuitePath in internal/benchmark/suite.go.
  • documentation:docs — complete (broad); scope: 1 file; examples: BENCHMARKING.md; body-inspected: 1 file; examples: BENCHMARKING.md; skipped: none; constraints: Did not verify the Go code change or the new test; review limited to the BENCHMARKING.md doc change.
  • policies:conventions — complete (broad); scope: 2 files; examples: BENCHMARKING.md, internal/cmd/benchmarkcmd/select.go; body-inspected: 2 files; examples: BENCHMARKING.md, internal/cmd/benchmarkcmd/select.go; skipped: none; constraints: Did not inspect the test file or shared cli-common docs; scope limited to the two assigned files.
  • go:implementation — complete (broad); scope: 1 file; examples: internal/cmd/benchmarkcmd/select.go; body-inspected: 1 file; examples: internal/cmd/benchmarkcmd/select.go; skipped: none; constraints: Did not run tests; the added test file was outside the assigned scope.

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 1m 46s | ~$0.34 (est.) | claude-sonnet-5-5 | cr 0.10.359
Field Value
Model claude-sonnet-5-5
Reviewers go:implementation-tests, documentation:docs, policies:conventions, go:implementation
Engine claude_cli · claude-sonnet-5-5
Reviewed by cr · piekstra-dev
Duration 1m 46s wall · 3m 13s compute
Cost ~$0.34 (est.)
Pricing basis baseline-2026-10-02/pricing
Tokens 44 in / 5.7k out

Per-workstream usage

  • orchestrator-selection — claude-sonnet-5-5
    • In: 4
    • Out: 928
    • Cache read: 9.2k
    • Cache create: 11.0k
    • Cost: ~$0.05 (est.)
    • Duration: 19s
  • go:implementation-tests — claude-sonnet-5-5
    • In: 8
    • Out: 1.0k
    • Cache read: 41.5k
    • Cache create: 12.1k
    • Cost: ~$0.07 (est.)
    • Duration: 36s
  • documentation:docs — claude-sonnet-5-5
    • In: 10
    • Out: 1.2k
    • Cache read: 55.1k
    • Cache create: 11.0k
    • Cost: ~$0.07 (est.)
    • Duration: 43s
  • policies:conventions — claude-sonnet-5-5
    • In: 8
    • Out: 990
    • Cache read: 38.8k
    • Cache create: 10.2k
    • Cost: ~$0.06 (est.)
    • Duration: 35s
  • go:implementation — claude-sonnet-5-5
    • In: 10
    • Out: 1.2k
    • Cache read: 57.3k
    • Cache create: 11.9k
    • Cost: ~$0.07 (est.)
    • Duration: 37s
  • orchestrator-rollup — claude-sonnet-5-5
    • In: 4
    • Out: 327
    • Cache read: 31.1k
    • Cache create: 2.1k
    • Cost: ~$0.02 (est.)
    • Duration: 20s

@piekstra
piekstra merged commit 43e92b8 into main Nov 2, 2026
12 checks passed
@piekstra
piekstra deleted the fix/benchmark-select-suite-relative-agent-dirs branch November 2, 2026 23:25
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.

benchmark select resolves relative agent_dirs against the working directory

2 participants