Repository navigation
Add implement outcome scoring to compare - #413
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📝 WalkthroughWalkthroughThis PR adds implement-task outcome scoring to the native-agent compare pipeline. The change introduces CLI support for ChangesImplement Task Outcome Measurement
Sequence DiagramsequenceDiagram
participant CLI
participant Parser
participant Suite
participant ExecuteCompare
participant Workspace
participant Validator
participant Report
CLI->>Parser: --task implement
Parser->>Parser: parseContextPackTask
Parser->>Suite: options.task
Suite->>Suite: suiteTaskKind(taskId)
Suite->>ExecuteCompare: compareInput.task
ExecuteCompare->>ExecuteCompare: task === 'implement'
ExecuteCompare->>Workspace: create baseline copy
ExecuteCompare->>Workspace: create madar copy
Workspace->>Workspace: fingerprint baseline
ExecuteCompare->>Validator: run baseline command in workspace
Validator->>Workspace: snapshot baseline state
Validator->>Validator: run validation checks
Workspace->>Workspace: fingerprint madar
ExecuteCompare->>Validator: run madar command in workspace
Validator->>Workspace: snapshot madar state
Validator->>Validator: run validation checks
ExecuteCompare->>Report: compute implement_outcome
Report->>Report: score edit_targeting, test_coverage, risk_boundary_respect
ExecuteCompare->>Workspace: cleanup temporary copies
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes The PR introduces substantial new logic across multiple subsystems: workspace-based execution with file fingerprinting, temporary directory management, validation command execution with timeouts, and conditional task-dependent report scoring. The core Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/unit/benchmark-suite.test.ts`:
- Around line 515-622: The test "passes implement tasks through to native-agent
compare inputs" currently places the assertion inside the
executeNativeAgentCompare callback after a return, making it unreachable;
extract the expectation so it runs after runBenchmarkSuite completes. Keep the
seenTasks array and the executeNativeAgentCompare stub as-is to collect calls,
but move the expect(seenTasks).toEqual([...]) out of the callback and
immediately after the awaited runBenchmarkSuite(...) call so the assertion
executes; reference symbols: seenTasks, runBenchmarkSuite,
executeNativeAgentCompare, and the "passes implement tasks through to
native-agent compare inputs" it block.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1e05fafd-d715-4e5a-87e0-ef5a697d6688
📒 Files selected for processing (8)
docs/benchmarks/suite/tasks.jsonsrc/cli/main.tssrc/cli/parser.tssrc/infrastructure/benchmark/suite.tssrc/infrastructure/compare.tstests/unit/benchmark-suite.test.tstests/unit/cli.test.tstests/unit/compare-native-agent.test.ts
Summary
Testing
Closes #408
Summary by CodeRabbit
--taskoption to compare command for selecting task type (defaults to "explain")