feat: extract runtime impls to dedicated workspace#227
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on March 22
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| }) | ||
| .collect::<Vec<_>>() | ||
| .join("\n") | ||
| } |
There was a problem hiding this comment.
Duplicated normalize_python_indent within same crate
Low Severity
The normalize_python_indent function is identically duplicated in executor.rs and virtual_file.rs within the same runtimes-python crate. Previously these copies lived in separate crates (poly-bench-runtime and poly-bench-lsp-v2), but the extraction brought both into a single crate where one pub(crate) version in a shared module would eliminate the duplication.
Additional Locations (1)
| } | ||
|
|
||
| result | ||
| } |
There was a problem hiding this comment.
Identical error mapping helpers duplicated across runtime crates
Low Severity
find_code_start and remap_error_lines are copied verbatim between Go and Rust error_mapping.rs files. The build_go_mappings and build_rust_mappings functions are also identical except for the Lang variant. Previously these were a single shared implementation in poly-bench-runtime/src/error_mapping.rs. These generic helpers belong in the planned poly-bench-runtime-traits crate.


Auto-generated PR from staged changes.
Note
Medium Risk
Large addition/refactor of runtime execution and validation paths across multiple languages, including subprocess compilation/execution and LSP diagnostics; failures could surface as broken benchmarking, validation, or IDE feedback rather than data loss.
Overview
Introduces a new
runtimes/workspace and adds standalone runtime crates for Go, Python, and Rust, each implementing thepoly-bench-runtime-traitsplugin surface (runtime factory, error mapping, project root detection, import extraction, and LSP virtual-file/diagnostics/hover integration).The Go runtime includes Go source generation plus both plugin-based execution and a cached subprocess fallback with async sampling policies, sink/memory profiling support, and compiler error remapping to
.benchline locations. The Python runtime adds subprocess execution with cached script reuse, syntax validation, optionalpyrightdiagnostics, and virtual file generation for embedded blocks.The Rust runtime code is moved into a dedicated crate with expanded embedded diagnostics via
cargo check, improved compile-check isolation (hash-based work dirs), cleanup of LSP virtual files, and runtime-env handling for memory profiling (alloc_tracker) and cached binary reuse.Written by Cursor Bugbot for commit a60b473. This will update automatically on new commits. Configure here.