RPOPC-1320: Fix remaining 7 processors version extraction#52
Conversation
- Add __init__ method that stores self._speccpu_version = None - Reset _speccpu_version at START of parse_runs() to prevent state leakage - Store extracted version from version file in _speccpu_version - Override build_test_info() to return TestInfo with benchmark version (with fallback to wrapper version) - Add comprehensive test suite for version extraction and state reset - All tests pass (4 new tests + 5 existing timestamp tests) Implements RPOPC-1319 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Following the pattern from fio_processor.py (RPOPC-1318): - Add __init__ to initialize _passmark_version = None state - Reset state at START of parse_runs() to prevent leakage between parses - Override build_test_info() to return TestInfo with benchmark version (with fallback to wrapper version) - Extract version from YML Version block (Major.Minor.Build format) - Only store version if at least one component is non-zero Tests (from previous commit) verify: - Benchmark version extracted to test.version - Wrapper version preserved in test.wrapper_version - Fallback to wrapper version when benchmark version missing - State reset between sequential parses (no stale version) Validates RPOPC-1319. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Following the coremark pattern for fully affected processors: - Add __init__ to store _benchmark_version state - Reset state at start of parse_runs() to prevent leakage - Extract version from CSV comments (# Results version: 1.0) - Override build_test_info() to use benchmark version with fallback to wrapper version Tests verify: - Version extraction from CSV comments - Fallback to wrapper version when benchmark version missing - State reset between parses Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Follows same pattern as coremark_processor.py: - Add __init__ to store _benchmark_version state - Reset state at start of parse_runs() to prevent leakage - Extract benchmark version from CSV comments (# Results version: X.X) - Override build_test_info() to use benchmark version with fallback to wrapper version Tests verify: - Benchmark version extraction from CSV comments - Fallback to wrapper version when benchmark version missing - State reset between parses prevents version leakage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Follow same pattern as coremark_processor.py: - Add __init__ method storing self._benchmark_version = None - Reset state at START of parse_runs() to prevent leakage - Extract version from CSV comments (# Results version: v1.1.2743) - Override build_test_info() to use benchmark version with fallback Tests verify: - Version extraction from CSV comments - Fallback to wrapper version when missing - State reset between parse calls Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Following pattern from coremark_processor (RPOPC-1319), extract Phoronix benchmark version from CSV comments and store in test.version instead of conflating with wrapper version. Changes: - Add __init__ to store _benchmark_version state - Reset state at start of parse_runs() to prevent leakage - Extract version from CSV comment "# Results version: v10.8.1" - Override build_test_info() to use benchmark version with wrapper fallback Tests verify: - Benchmark version extracted to test.version - Wrapper version preserved in test.wrapper_version - Fallback to wrapper version when benchmark version missing - State reset between parse_runs() calls prevents leakage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (14)
📝 WalkthroughSummary by CodeRabbit
WalkthroughSeven benchmark processors ( ChangesBenchmark version extraction — all processors
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
grdumas
left a comment
There was a problem hiding this comment.
PR Review: RPOPC-1320: Fix remaining 7 processors version extraction
Summary
This PR successfully replicates the version conflation fix across the remaining 7 processors. The pattern of extracting the benchmark version, resetting the state to prevent leakage, and overriding build_test_info() has been applied consistently and correctly.
Critical Issues (MUST FIX)
None found.
Major Issues (SHOULD FIX)
None found.
Minor Issues (NICE TO HAVE)
None found.
Nitpicks (OPTIONAL)
None found.
Positive Notes
- Consistent Implementation: The implementation strategy across all 7 processors perfectly matches the established patterns from PR #49 (STREAMS), PR #50 (FIO), and PR #51 (CoreMark).
- Proactive State Management: Crucially, the state reset (e.g.,
self._autohpl_version = None,self._passmark_version = None) is correctly positioned at the top of theparse_runs()method in every updated processor, preventing the stale data leakage issue discovered in earlier reviews. - Exhaustive Testing: The addition of 25 new tests explicitly validating the extraction, fallback, and state-reset behaviors for each processor demonstrates excellent rigor. All 306 tests pass.
Overall Assessment
- Status: APPROVE
- Reasoning: The implementation is highly consistent, defensive against state leakage, and thoroughly tested. This effectively completes the version conflation fix epic.
- Next Steps: Ready to merge.
Reviewed by: Gemini Pro via automated code review
Summary
Fixes 7 remaining processors to extract benchmark version and use it in test.version instead of wrapper version, with state reset to prevent leakage between sequential parses.
Acceptance Criteria
build_test_info()to use already-extracted version from configbuild_test_info()parse_runs()to prevent state leakage when processing multiple distinct test runs sequentiallyself._benchmark_versionor equivalent state, reset it inparse_runs(), and overridebuild_test_info()Changes
Group 1 - Partially Affected (version already in config)
build_test_info()to use version from CSV commentsbuild_test_info()to use version from YML configbuild_test_info()to use version from config fileGroup 2 - Fully Affected (version extraction required)
build_test_info()build_test_info()build_test_info()build_test_info()Implementation Pattern
All processors follow the same pattern:
__init__to storeself._benchmark_version = None(or similar)parse_runs()to prevent leakagebuild_test_info()to use benchmark version with fallback to wrapper versionTesting
Technical Details
Related
Files Changed